%
# Copyright (C) 2011 - present Instructure, Inc.
#
# This file is part of Canvas.
#
# Canvas is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see .
%>
<% provide :page_title do %><%= join_title @page.name, @category.name, @portfolio.name %><% end %>
<% provide :left_side do %>
<% end %>
<% if @owner_view %>
<% if @portfolio.flagged_as_possible_spam? %>
<%= t("This ePortfolio has been flagged as possible spam. Until it has been reviewed by an administrator, it will only be visible to you. Please contact an administrator if you have any questions.") %>
<%= t("This ePortfolio has been identified as spam, and is only visible to you. Please contact an administrator if you have any questions.") %>
<% end %>
<%= t('headers.welcome', "Welcome to Your ePortfolio") %>
<%= t(:welcome, <<-DETAILS)
If this is your first time here, you may want to pop up the wizard and see
how best to get started. Otherwise you can quickly add recent submissions
or just jump straight to the portfolio.
DETAILS
%>
<%= t('headers.public_eportfolio', "Your ePortfolio is Public") %>
<%= t(:public_eportfolio, <<-DETAILS,
That means anyone who knows the address of your portfolio can view it.
You can make your portfolio private by *changing your portfolio
settings*.
DETAILS
:wrapper => '\1') %>
<% else %>
<%= t('headers.private_eportfolio', "Your ePortfolio is Private") %>
<%= t(:private_eportfolio, <<-DETAILS)
That means people can't find it or even view it without permission. You
can see it since it's your portfolio, but if you want to let anybody else
see it, you'll need to copy and share the the following special link so
they can access your portfolio:
DETAILS
%>
<% end %>
<% if @portfolio.spam? && @portfolio.grants_right?(@current_user, :moderate)%>
<% if @portfolio.flagged_as_possible_spam? %>
<%= t("This ePortfolio has been identified as possible spam. It is currently only visible to administrators and the author. If you're sure this content is not spam, you can mark it as safe. Otherwise, you can confirm it as spam.") %>
<% else %>
<%= t("This ePortfolio has been identified as spam. It is currently only visible to administrators and the author. If you're sure this content is not spam, you can mark it as safe.") %>
<%= t("This ePortfolio has been flagged as possible spam. Until it has been reviewed by an administrator, it will only be visible to you. Please contact an administrator if you have any questions.") %>
<%= before_label(:html_content, "Copy and paste your HTML code into the box below") %>
<%= before_label(:choose_submission, "Select an assignment submission to embed in this page") %>
<% submissions = @portfolio.user.submissions.except(:preload).preload(:assignment).to_a %>
<% if submissions.empty? %>
<%= t 'headings.page_comments', 'Page Comments' %>
<% if @page.show_comments || can_do(@portfolio, @current_user, :update) %>
<% if !@page.page_comments.empty? && !@page.show_comments %>
<%= t(:private_comments, <<-DETAILS,
Right now only you can see the comments for this page. You can make the
comments public if you like by *changing the settings for this page*.
DETAILS
:wrapper => '\1') %>
<% end %>
<%= t(:no_comments, "No Comments") if @page.page_comments.empty? %>
<%= render :partial => "eportfolios/page_comment", :collection => @page.page_comments %>
<%= t(:write_only_comments, <<-DETAILS)
Comments for this page are private. You can make comments, but only the
portfolio's owner will be able to see them.
DETAILS
%>
<% end %>
<% if @page.allow_comments %>
<%= form_for :page_comment, :url => eportfolio_entry_page_comments_path(@portfolio.id, @page.id), :html => {:id => "add_page_comment_form", :style => "margin-top: 20px;"} do |f| %>
<%= before_label(:add_comment, "Add a New Comment") %>
<%= form_tag eportfolio_url(@portfolio.id), {:method => :delete, :id => "delete_eportfolio_form", :style => "margin-top: 20px; margin-#{direction('left')}: 20px; display: none;"} do %>
<%= t(:delete_confirm, {
:one => "You currently have 1 page in this ePortfolio. Are you sure you want to delete the entire ePortfolio?",
:other => "You currently have %{count} pages in this ePortfolio. Are you sure you want to delete the entire ePortfolio?"
}, :count => @portfolio.eportfolio_entries.count) %>