show.mustache 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 :right_side do %>
  19. <% return_to_url = return_to_calendar(:context => @context, :event => @event) %>
  20. <a class="base_calendar_url" href="<%= calendar_url_for() %>" style="display: none;">&nbsp;</a>
  21. <div id="sidebar_content">
  22. <ul class="page-action-list">
  23. <li><a class="return_url calendar_url" href="<%= return_to_url %>"><i class="icon-arrow-left" aria-hidden='true'></i> <%= t 'links.back_to_calendar', "Back to Calendar" %></a></li>
  24. <% if can_do(@event, @current_user, :update) %>
  25. <li>
  26. <%= link_to context_url(@context, :edit_context_calendar_event_url, @event.id, :return_to => params[:return_to]) do %>
  27. <i class="icon-edit" aria-hidden='true'></i> <%= t 'links.edit', "Edit Calendar Event" %>
  28. <% end %>
  29. </li>
  30. <% unless @event.new_record? %>
  31. <li><a href="<%= context_url(@context, :context_calendar_event_url, @event.id) %>" class="delete_event_link" data-method="delete" rel="nofollow" data-confirm="<%= t "Are you sure you want to delete this event?" %>">
  32. <i class="icon-trash" aria-hidden='true'></i> <%= t 'links.delete', "Delete the Event" %></a>
  33. </li>
  34. <% end %>
  35. <% end %>
  36. </ul>
  37. </div>
  38. <% end %>
  39. {{> views/full_calendar_event}}