2017-04-28 13:27:59 +08:00
<%
# 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 <http://www.gnu.org/licenses/>.
%>
2011-06-28 07:53:07 +08:00
<% content_for :page_title do %><%= join_title t(:page_title, "Collaboration"), @context.name %><% end %>
2011-02-01 09:57:29 +08:00
2011-11-11 00:31:45 +08:00
<% js_bundle :collaborations %>
2011-02-01 09:57:29 +08:00
<% content_for :right_side do %>
2016-10-26 12:07:18 +08:00
<p><%= mt :description_rs, <<-HEREDOC, :google_url => "http://docs.google.com"
2015-07-14 04:36:58 +08:00
Free online web tools like [Google Docs](%{google_url}) are an excellent place for students to work on group projects or papers, take shared notes, etc.
2011-06-17 01:11:21 +08:00
Teacher *or* students can set up group collaborations.
HEREDOC
2016-10-26 12:07:18 +08:00
%>
</p>
2011-02-01 09:57:29 +08:00
<% end %>
<a href="#" class="external_link" target="_blank" style="display: none;"> </a>
2012-12-27 00:01:18 +08:00
2015-05-13 06:39:59 +08:00
<header class="collaborations-header clearfix">
<h1><%= t 'titles.current', "Current Collaborations" %></h1>
2012-12-27 00:01:18 +08:00
2015-05-02 07:27:17 +08:00
<% if can_do(@context, @current_user, :create_collaborations) && !@hide_create_ui %>
2015-05-13 06:39:59 +08:00
<a role="button" href="#" class="btn add_collaboration_link">
2012-12-27 00:01:18 +08:00
<i class="icon-add" aria-hidden="true"></i>
<%= t('links.new', 'Start a new collaboration') %>
</a>
<% end %>
</header>
2011-02-01 09:57:29 +08:00
<div id="no_collaborations_message" style="<%= hidden unless @collaborations.empty? %>">
<% if can_do(@context, @current_user, :manage_content) %>
2015-07-14 04:36:58 +08:00
<p><%= mt :description_teacher, <<-HEREDOC, :google_url => "http://docs.google.com"
2011-06-17 01:11:21 +08:00
**What do we mean by collaborations?** We're talking about web-based tools that most
likely your students are already familiar with. Students can use resources like
2015-07-14 04:36:58 +08:00
[Google Docs](%{google_url})
2011-06-17 01:11:21 +08:00
to work collaboratively on tasks like group papers or note-taking. This page gives them
(and you) an easy place to keep track of those collaborations, and also to set them
up without having to swap emails.
HEREDOC
2011-10-19 13:54:58 +08:00
%></p>
2011-02-01 09:57:29 +08:00
<% else %>
2015-07-14 04:36:58 +08:00
<p><%= mt :description_student, <<-HEREDOC, :google_url => "http://docs.google.com"
2011-06-17 01:11:21 +08:00
**What do we mean by collaborations?** We're talking about web-based tools for
working together on a shared document. You can use resources like
2015-07-14 04:36:58 +08:00
[Google Docs](%{google_url})
2011-06-17 01:11:21 +08:00
to work collaboratively on tasks like group papers or note-taking. This page is
an easy place to keep track of those collaborations, and also to set them
up without having to swap emails.
HEREDOC
2011-10-19 13:54:58 +08:00
%></p>
<% end %>
2015-05-02 07:27:17 +08:00
<% if can_do(@context, @current_user, :create_collaborations) && !@hide_create_ui %>
2011-10-19 13:54:58 +08:00
<p>
<%= t :how_to_start_a_new_collaboration, 'To find out more about a particular type of collaboration, click "Start a New Collaboration" and then choose that type in the dropdown list.' %>
</p>
2011-02-01 09:57:29 +08:00
<% end %>
</div>
<div id="collaborations">
2016-03-17 13:49:35 +08:00
<%= @collaborations.map {|c| collaboration(c, @current_user, @user_has_google_drive)}.join.html_safe %>
2011-02-01 09:57:29 +08:00
</div>
2015-05-02 07:27:17 +08:00
<% if can_do(@context, @current_user, :create_collaborations) && !@hide_create_ui %>
2011-02-01 09:57:29 +08:00
<%= render :partial => 'collaborations/forms' %>
2011-10-19 05:54:42 +08:00
<% end %>