new.mustache 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. <%
  19. content_for :page_title, @event.title || t(:page_title, "New Calendar Event")
  20. return_to_url = return_to_calendar(:context => @context, :event => @event)
  21. event_attrs = {
  22. :id => @event.id,
  23. :context_code => @context.asset_string,
  24. :return_to_url => return_to_url
  25. }
  26. if @context.is_a? Course
  27. event_attrs[:sections_url] = context_url(@context, :api_v1_context_sections_url)
  28. end
  29. js_env :CALENDAR_EVENT => event_attrs
  30. js_bundle :edit_calendar_event
  31. css_bundle :tinymce, :edit_calendar_event_full
  32. content_for :right_side, render(:partial => 'shared/wiki_sidebar')
  33. %>