show.mustache 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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 %><%= @account.name %><% end %>
  19. <%
  20. @active_tab = "courses"
  21. add_crumb t(:courses_crumb, "Courses"), account_path(@account)
  22. %>
  23. <% content_for :right_side do %>
  24. {{> views/courses_right_side}}
  25. <% end %>
  26. <h1>{{#t}}Courses In This Account{{/t}}</h1>
  27. <% if @associated_courses_count > 0 %>
  28. <% if @term %>
  29. <h3 style="margin-bottom: 1em;"><%= mt(:subtitle_term, "For the term **%{term}**", :term => @term.name) %></h3>
  30. <% end %>
  31. <% if @associated_courses_count > @maximum_courses_im_gonna_show %>
  32. <p class='ui-state-highlight' style='padding:0.7em;'>
  33. <%= t(:too_many_courses_message, "There are too many courses to show (%{count}). " +
  34. "Please use the finder on the right to find a specific course.", :count => @associated_courses_count) %>
  35. </p>
  36. <% end %>
  37. <ul class='courses' style="list-style-type: none;">
  38. {{> views/course}}
  39. </ul>
  40. <% else %>
  41. <h3><%= @root_account.enrollment_terms.active.count > 1 ?
  42. t(:no_courses_term_message, "There are no courses in this term") :
  43. t(:no_courses_account_message, "There are no courses in this account") %></h3>
  44. <ul class='courses' style="list-style-type: none;">
  45. {{> views/course}}
  46. </ul>
  47. <% end %>