show2.mustache 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <%
  2. # Copyright (C) 2012 - 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. <%
  19. content_for :page_title, "Calendar"
  20. js_env :CALENDAR => {
  21. :CONTEXTS => @contexts_json,
  22. :MANAGE_CONTEXTS => @manage_contexts,
  23. :SELECTED_CONTEXTS => @selected_contexts,
  24. :ACTIVE_EVENT => @active_event_id,
  25. :VIEW_START => @view_start,
  26. :CAL2_ONLY => true,
  27. :SHOW_SCHEDULER => @domain_root_account.show_scheduler?,
  28. :BETTER_SCHEDULER => @domain_root_account.feature_enabled?(:better_scheduler) && @domain_root_account.show_scheduler?,
  29. :MAX_GROUP_CONVERSATION_SIZE => Conversation.max_group_conversation_size,
  30. :VISIBLE_CONTEXTS_LIMIT => @domain_root_account.settings[:calendar_contexts_limit] || 10,
  31. }
  32. js_env :STUDENT_PLANNER_ENABLED => @domain_root_account&.feature_enabled?(:student_planner) && @current_user.has_student_enrollment?
  33. js_bundle :calendar2
  34. css_bundle :calendar2, :agenda_view
  35. crumbs.clear
  36. @body_classes << "full-width no-page-block hide-content-while-scripts-not-loaded"
  37. %>
  38. <h1 class="screenreader-only">{{#t}}Calendar{{/t}}</h1>
  39. <% content_for :auto_discovery do %>
  40. <%= auto_discovery_link_tag(:atom, @feed_url + '.atom', {:title => t(:feed_title, "Course Calendar Atom Feed")}) %>
  41. <% end %>
  42. <% content_for :right_side do %>
  43. <a href="#" class="skip-to-calendar screenreader-only">{{#t}}Skip to calendar{{/t}}</a>
  44. <div class="rs-section">
  45. <div tabindex="0" role="note" class="screenreader-only accessibility-warning">
  46. <span><%= t 'Mini calendar' %></span>
  47. <span><%= t "Warning: For improved accessibility of calendar events, please use the agenda view." %></span>
  48. </div>
  49. <div id="minical"></div>
  50. </div>
  51. <div id="select-course-component" class="rs-section"></div>
  52. <div class="rs-section">
  53. <span role="button" id="calendar-toggle-button" class="element_toggler" aria-controls="context-list-holder" aria-expanded="true"
  54. aria-label="{{#t}}Calendars toggle list visibility{{/t}}" tabindex="0">
  55. <i class="icon-mini-arrow-down auto_rotate"></i> {{#t}}Calendars{{/t}}
  56. </span>
  57. <div id="context-list-holder"></div>
  58. </div>
  59. <div class="rs-section" id="undated-events-section">
  60. <span href="#" role="button" id="undated-events-button" class="element_toggler" aria-controls="undated-events" aria-expanded="false"
  61. aria-label="{{#t}}Undated items toggle list visibility{{/t}}" tabindex="0">
  62. <i class="icon-mini-arrow-right auto_rotate"></i> {{#t}}Undated{{/t}}
  63. </span>
  64. <div id="undated-events"></div>
  65. </div>
  66. <div class="rs-section" id="calendar-feed">
  67. <button class="dialog_opener Button Button--link" aria-controls="calendar_feed_box" data-dialog-opts='{"resizable":false, "width": 400}'>
  68. <i class="icon-calendar-days"></i> <%= t :calendar_feed, "Calendar Feed" %>
  69. </button>
  70. </div>
  71. <% end %>
  72. <div style="display: none" id="calendar_feed_box" title="{{#t}}Calendar Feed{{/t}}">
  73. <p id="calendar-feed-message">
  74. <%= t "calendar_feed_instructions", "Copy the link below and paste it into any calendar app that takes iCal feeds (Google Calendar, iCal, Outlook, etc.)" %>
  75. </p>
  76. <p id="calendar-feed-box-lower">
  77. <input value="<%= @feed_url%>.ics"><br>
  78. <a href="<%= @feed_url%>.ics"><%= t "links.feed", 'click here to view the feed' %></a>
  79. </p>
  80. </div>
  81. <div id="calendar_header"></div>
  82. <div id="calendar-app" role="tabpanel" class="<%= 'wrap-calendar-event-titles' if @wrap_titles %>"></div>
  83. <div id="calendar-drag-and-drop-container"></div>