%
# 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 @group.name, @context.full_name %><% end %>
<% css_bundle :dashboard %>
<% js_bundle :dashboard %>
<% set_active_tab "home" %>
<% provide :right_side do %>
<% if !@domain_root_account.feature_enabled?(:instui_nav) %>
<% if can_do(@context, @current_user, :update) %>
<% end %>
<% if can_do(@context.announcements.temp_record, @current_user, :create) %>
<% end %>
<% end %>
<% locals = {:title => t('coming_up', "Coming Up"), :contexts_to_link_to => @context, :upcoming => true, :period => :one_week} %>
<% if @current_user %>
<% cache([@current_user, @context, 'group_upcoming_events' ]) do %>
<%= render :partial => "shared/event_list", :object => @current_user.upcoming_events(:contexts => @context), :locals => locals %>
<% end %>
<% else %>
<%= render :partial => "shared/event_list", :object => [], :locals => locals %>
<% end %>
<% end %>
<%= render :partial => 'shared/dashboard_messages' %>
<%= render :partial => 'shared/recent_activity' %>
<% js_bundle :student_group_dialog %>
<% js_env({
:student_mode => true,
:group => @group.as_json[:group],
:group_category => @group.group_category.try(:[], :group_category)
})%>