<% # 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 %>

<%= @portfolio.name %>

<% if @owner_url %> <%= @portfolio.user.name %> <% else %> <%= @portfolio.user.name %> <% end %>
<%= render :partial => "eportfolios/section_list" %> <% end %> <% provide :right_side do %>
<% if can_do(@portfolio, @current_user, :manage) && !@owner_view %> <% end %> <%= render :partial => "eportfolios/page_list" %> <% if can_do(@portfolio, @current_user, :manage) && !@owner_view %>

<%= t('headers.add_content', "Add Content") %>

<%= render :partial => "shared/wiki_sidebar" %>
<% end %>
<% 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.") %>

<% elsif @portfolio.spam?(include_possible_spam: false) %>

<%= 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 %>

<% if @portfolio.public %>

<%= 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 %>

<%= t('links.share', "Copy and share this link to give others access to your private ePortfolio:") %>
style="overflow-wrap: break-word;" <% end %> > <%= eportfolio_url(@portfolio.id, :verifier => @portfolio.uuid) %>

<% end %>

<%= t('headers.recent_submissions', "Recent Submissions") %>

<%= t(:recent_submissions, "Click any submission to add it to a new page in your ePortfolio.") %>

<% if @portfolio.user.submissions.empty? %>
<%= t(:no_submissions, "No Submissions Found") %>
<% end %> <% else %> <% if can_do(@portfolio, @current_user, :manage) %>
<%= edit_link_text %>
<% 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.") %>

<% end %> <% elsif @portfolio.flagged_as_possible_spam? && @portfolio.user == @current_user %>

<%= 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.") %>

<% elsif @portfolio.spam?(include_possible_spam: false) && @portfolio.user == @current_user %>

<%= t("This ePortfolio has been identified as spam, and is only visible to you. Please contact an administrator if you have any questions.") %>

<% end %>

<%= @page.name %>

<%= form_for @page, :url => eportfolio_entry_url(@portfolio, @page), :html => {:id => "edit_page_form" } do |f| %>
<%= f.label :name, before_label(:page_name, "Page Name") %> <%= f.text_field :name %>
<% @page.content_sections.each_with_index do |c, idx| %> <%= render :partial => "eportfolios/page_section", :object => c, :locals => {:idx => idx} %> <% end %>
<%= f.check_box :allow_comments, :class => "allow_comments" %> <%= f.label :allow_comments, t('labels.allow_comments', "Allow Comments on this Page") %>
"> <%= f.check_box :show_comments, :class => "show_comments" %> <%= f.label :show_comments, t('labels.show_comments', "Make Comments Public") %>
<% end %> <%= render :partial => "eportfolios/page_section", :object => nil, :locals => {:idx => "blank"} %> <% if can_do(@portfolio, @current_user, :manage) %>
<% @files.each do |file| %>
<%= file.uuid %>
<% end %>
<% end %> <% end %> <%= form_for @portfolio, :url => eportfolio_path(@portfolio), :html => {:style => "display: none; position: relative;", :id => "edit_eportfolio_form"} do |f| %>
<%= f.label :name, before_label(:eportfolio_name, "ePortfolio Name") %> <%= f.text_field :name %>
<%= f.check_box :public %> <%= f.label :public, t('labels.make_public', "Make it Public") %>
<% end %> <% if !@owner_view %>

<%= 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 %>
<%= render :partial => "eportfolios/page_comment", :object => nil %> <% elsif @page.allow_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") %>

<% if @current_user %> <%= f.text_area :message, :style => "width: 400px; height: 75px;" %>
<% else %>
<%= t(:login_required, "You must be *logged in* to make comments on this page.", :wrapper => "\\1") %>
<% end %> <% end %> <% end %>
<% end %> <% if @owner_view %>
<%= t('links.download_eportfolio', "Download the contents of this ePortfolio as a zip file") %>
<%= t('links.delete', "Delete this ePortfolio") %>
<%= 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) %>
<% end %> <% end %>
" class="eportfolio_download_url"> 
<%= @category.id %>
<%= render :partial => "eportfolios/wizard_box" %>