<% # Copyright (C) 2012 - 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 . %>
<% if @domain_root_account.feature_enabled?(:instui_nav) %>

<% if @context.nil? || @context.is_a?(User) %> <%= t :recent_activity, "Recent Activity" %> <% else %> <%= t :recent_activity_in_course, "Recent Activity in %{course_or_group}", :course_or_group => @context.nickname_for(@current_user, :short_name) %> <% end %>

<% if @context.is_a?(Group) %>
<% if can_do(@context.announcements.temp_record, @current_user, :create) %> <%= t 'new_announcement', "Announcement" %> <% end %> <% if can_do(@context, @current_user, :update) %> <%= t 'edit_group',"Edit Group" %>
<% end %> <% if can_do(@context.announcements.temp_record, @current_user, :create) %> <%= t 'new_announcement', "Announcement" %> <% end %>
<% end %> <% else %>

<% if @context.nil? || @context.is_a?(User) %> <%= t :recent_activity, "Recent Activity" %> <% else %> <%= t :recent_activity_in_course, "Recent Activity in %{course_or_group}", :course_or_group => @context.nickname_for(@current_user, :short_name) %> <% end %>

<% end %>
<% if categorized_items.values.map(&:count).sum == 0 %> <%= render :partial => 'shared/no_recent_activity' %> <% end %>