123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- <title>%1</title>
- <% content_for :auto_discovery do %>
- <% if @current_user %>
- <%= auto_discovery_link_tag(:atom, feeds_user_format_path(@current_user.feed_code, :atom), {:title => t('titles.rss.course_announcements', "Course Announcements Atom Feed")}) %>
- <% end %>
- <% end %>
- <% css_bundle :context_list, :course_list %>
- <% js_bundle :course_list %>
- <% @favorite_course_ids = @current_user.courses_with_primary_enrollment(:favorite_courses).map(&:id) %>
- <% @show_star_column = true %>
- <div class="header-bar">
- <h2>{{#t}}All Courses{{/t}}</h2>
- </div>
- <div class="ic-Action-header content--hasMarginTop">
- <div class="ic-Action-header__Secondary">
- <% if @domain_root_account.feature_enabled?(:course_catalog) %>
- <%= link_to t('browse_more_courses', 'Browse More Courses'), "/search/all_courses/", class:"Button" %>
- <% end %>
- <% if show_user_create_course_button(@current_user) %>
- <button type="button"
- id="start_new_course"
- class="Button element_toggler"
- aria-controls="new_course_form"
- aria-label="{{#t}}Add a Course{{/t}}">
- <i class="icon-plus"></i> {{#t}}Course{{/t}}</button>
- {{> views/shared/new_course_form}}
- <% end %>
- </div>
- </div>
- <% if @current_enrollments.empty? %>
- {{#t}}You are not enrolled in any courses.{{/t}}
- <% else %>
- <table id="my_courses_table" class="ic-Table ic-Table--bordered course-list-table">
- <thead>
- <tr>
- <th scope="col" class="course-list-star-column"></th>
- <th scope="col" class="course-list-course-title-column course-list-no-left-border">{{#t}}Course{{/t}}</th>
- <th scope="col" class="course-list-nickname-column course-list-no-left-border">{{#t}}Nickname{{/t}}</th>
- <th scope="col" class="course-list-term-column course-list-no-left-border">{{#t}}Term{{/t}}</th>
- <th scope="col" class="course-list-enrolled-as-column course-list-no-left-border">{{#t}}Enrolled as{{/t}}</th>
- <th scope="col" class="course-list-published-column course-list-no-left-border">{{#t}}Published{{/t}}</th>
- </tr>
- </thead>
- <tbody>
- <% @current_enrollments.each do |enrollment| %>
- {{> views/shared/current_enrollment}}
- <% end %>
- </tbody>
- </table>
- <% end %>
- <% @show_star_column = true %>
- <% unless @past_enrollments.empty? %>
- <div class="content--hasMarginTop">
- <h2>{{#t}}Past Enrollments{{/t}}</h2>
- </div>
- <table id="past_enrollments_table" class="ic-Table ic-Table--bordered course-list-table">
- <thead>
- <tr>
- <th scope="col" class="course-list-star-column"></th>
- <th scope="col" class="course-list-course-title-column course-list-no-left-border">{{#t}}Course{{/t}}</th>
- <th scope="col" class="course-list-nickname-column course-list-no-left-border">{{#t}}Nickname{{/t}}</th>
- <th scope="col" class="course-list-term-column course-list-no-left-border">{{#t}}Term{{/t}}</th>
- <th scope="col" class="course-list-enrolled-as-column course-list-no-left-border">{{#t}}Enrolled as{{/t}}</th>
- <th scope="col" class="course-list-published-column course-list-no-left-border">{{#t}}Published{{/t}}</th>
- </tr>
- </thead>
- <tbody>
- <% @past_enrollments.each do |enrollment| %>
- {{> views/shared/current_enrollment}}
- <% end %>
- </tbody>
- </table>
- <% end %>
- <% unless @future_enrollments.empty? %>
- <div class="content--hasMarginTop">
- <h2>{{#t}}Future Enrollments{{/t}}</h2>
- </div>
- <table id="future_enrollments_table" class="ic-Table ic-Table--bordered course-list-table">
- <thead>
- <tr>
- <th scope="col" class="course-list-star-column"></th>
- <th scope="col" class="course-list-course-title-column course-list-no-left-border">{{#t}}Course{{/t}}</th>
- <th scope="col" class="course-list-nickname-column course-list-no-left-border">{{#t}}Nickname{{/t}}</th>
- <th scope="col" class="course-list-term-column course-list-no-left-border">{{#t}}Term{{/t}}</th>
- <th scope="col" class="course-list-enrolled-as-column course-list-no-left-border">{{#t}}Enrolled as{{/t}}</th>
- <th scope="col" class="course-list-published-column course-list-no-left-border">{{#t}}Published{{/t}}</th>
- </tr>
- </thead>
- <tbody>
- <% @future_enrollments.each do |enrollment| %>
- {{> views/shared/current_enrollment}}
- <% end %>
- </tbody>
- </table>
- <% end %>
- <% @show_star_column = false %>
- <% unless @visible_groups.empty? %>
- <div class="content--hasMarginTop">
- <h2>{{#t}}My Groups{{/t}}</h2>
- </div>
- <table id="my_groups_table" class="ic-Table ic-Table--bordered course-list-table">
- <thead>
- <tr>
- <th scope="col" class="course-list-group-column">{{#t}}Group{{/t}}</th>
- <th scope="col" class="course-list-course-title-column course-list-no-left-border">{{#t}}Course{{/t}}</th>
- <th scope="col" class="course-list-term-column course-list-no-left-border">{{#t}}Term{{/t}}</th>
- </tr>
- </thead>
- <tbody>
- <% @visible_groups.each do |group| %>
- <% group_name = group.name %>
- <tr>
- <td>
- <a href=<%= group_path(group) %>>
- <span class="name" title="<%= group_name %>">
- <%= group_name %>
- </span>
- </a>
- </td>
- <td class="course-list-no-left-border">
- <span class="name"><%= group.context.name %></span>
- </td>
- <td class="course-list-no-left-border">
- <% if group.context_type == 'Course' && !group.context.enrollment_term.default_term? %>
- <%= group.context.enrollment_term.name %>
- <% end %>
- </td>
- </tr>
- <% end %>
- </tbody>
- </table>
- <% end %>
|