show.mustache 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <%
  2. # Copyright (C) 2011 - present Instructure, Inc.
  3. #
  4. # This file is part of Canvas.
  5. #
  6. # Canvas is free software: you can redistribute it and/or modify it under
  7. # the terms of the GNU Affero General Public License as published by the Free
  8. # Software Foundation, version 3 of the License.
  9. #
  10. # Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
  11. # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  12. # A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
  13. # details.
  14. #
  15. # You should have received a copy of the GNU Affero General Public License along
  16. # with this program. If not, see <http://www.gnu.org/licenses/>.
  17. %>
  18. <% content_for :page_title do %><%= join_title @group.name, @context.full_name %><% end %>
  19. <% css_bundle :dashboard %>
  20. <% js_bundle :dashboard %>
  21. <% @active_tab = "home" %>
  22. <% content_for :auto_discovery do %>
  23. <% if @context_membership %>
  24. <%= auto_discovery_link_tag(:atom, feeds_group_format_url(@context_membership.feed_code, :atom), {:title => t('group_atom_feed', "Group Atom Feed")}) %>
  25. <% elsif @context.available? %>
  26. <%= auto_discovery_link_tag(:atom, feeds_group_format_url(@context.feed_code, :atom), {:title => t('group_atom_feed', "Group Atom Feed")}) %>
  27. <% end %>
  28. <% end %>
  29. <% content_for :right_side do %>
  30. <% if can_do(@context, @current_user, :update) %>
  31. <div>
  32. <a href="#" id="edit_group" title="Edit Group" class="Button button-sidebar-wide">
  33. <i class="icon-edit" role="presentation"></i>
  34. <%= t 'edit_group',"Edit Group" %>
  35. </a>
  36. </div>
  37. <% end %>
  38. <% if can_do(@context.announcements.temp_record, @current_user, :create) %>
  39. <div>
  40. <a href="<%= group_announcements_path(@context) %>#new" title="Add Announcement" id="add-announcement" class="Button button-sidebar-wide">
  41. <i class="icon-plus" role="presentation"></i>
  42. <%= t 'new_announcement', "Announcement" %>
  43. </a>
  44. </div>
  45. <% end %>
  46. <% locals = {:title => t('coming_up', "Coming Up"), :contexts_to_link_to => @context, :upcoming => true, :period => :one_week} %>
  47. <% if @current_user %>
  48. <% cache([@current_user, @context, 'group_upcoming_events' ]) do %>
  49. {{> views/shared/event_list}}
  50. <% end %>
  51. <% else %>
  52. {{> views/shared/event_list}}
  53. <% end %>
  54. <% end %>
  55. <div id="group_messages">
  56. {{> views/shared/dashboard_messages}}
  57. {{> views/shared/recent_activity}}
  58. </div>
  59. <% js_bundle :student_group_dialog %>
  60. <% js_env({
  61. :student_mode => true,
  62. :group => @group.as_json[:group],
  63. :group_category => @group.group_category.try(:[], :group_category)
  64. })%>