full_calendar_event.mustache 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. <div id="full_calendar_event_holder">
  19. <div class="calendar_event" id="full_calendar_event">
  20. <div style="float: right; text-align: right; font-size: 0.8em;">
  21. <div class="date_text" style="<%= hidden unless calendar_event && calendar_event.start_at %>">
  22. <span class="start_at_date_string" title="<%= date_string(calendar_event.start_at, :long) %>"><%= date_string(calendar_event.start_at, :long) %></span>
  23. <span class="non_all_day" style="<%= hidden if calendar_event.try_rescue(:all_day) %>">
  24. <span class="from_string" style="<%= hidden if calendar_event.end_at && calendar_event.end_at != calendar_event.start_at %>"> from </span>
  25. <span class="at_string" style="<%= hidden unless calendar_event.end_at && calendar_event.end_at != calendar_event.start_at %>"> at </span>
  26. <span class="start_at_time_string"><%= time_string(calendar_event.start_at) %></span>
  27. <span class="to_string" style="<%= hidden if calendar_event.end_at && calendar_event.end_at != calendar_event.start_at %>"> to </span>
  28. <span class="end_at_time_string" style="<%= hidden if calendar_event.end_at && calendar_event.end_at != calendar_event.start_at %>"><%= time_string(calendar_event.end_at) %></span>
  29. </span>
  30. <div style="display: none;">
  31. <span class="all_day"><%= calendar_event.try_rescue(:all_day) || false %></span>
  32. <span class="all_day_date"><%= date_string(calendar_event.try_rescue(:all_day_date), :long) %></span>
  33. </div>
  34. </div>
  35. </div>
  36. <h2 class="title">
  37. <%= calendar_event.try_rescue(:title) %>
  38. </h2>
  39. <div class="description user_content"><%= calendar_event && calendar_event.description && !calendar_event.description.empty? ? user_content(calendar_event.description) : t(:no_content, "No Content") %></div>
  40. <div class="course_id" style="display: none;"><%= @context.id if @context && @context.is_a?(Course) %></div>
  41. </div>
  42. </div>