display course nickname in all courses table

Fixes: CNVS-27934

test plan:
- as a teacher or student using the new ui
- ensure you have a course that you have changed the
  name using the nickname option from the user
  dashcard
- now click the courses link from the left nav
- click the "all courses" link
- the table should now show a nickname that
  corresponds to it's course (it will be blank
  if there is not a nickname)

Change-Id: I0fe0a801cb8746d311d245d4e48d2c4e1be6fd91
Reviewed-on: https://gerrit.instructure.com/74452
Reviewed-by: Chris Hart <chart@instructure.com>
Product-Review: Chris Hart <chart@instructure.com>
Tested-by: Jenkins
QA-Review: Myller de Araujo <myller@instructure.com>
This commit is contained in:
Pam Hiett 2016-03-03 09:53:41 -07:00
parent 0083b8fc2f
commit 7970d39a39
3 changed files with 18 additions and 9 deletions

View File

@ -10,16 +10,19 @@
color: $ic-color-icon-disabled;
}
.course-list-term-column,
.course-list-enrolled-as-column,
.course-list-published-column {
width: 16%;
.course-list-enrolled-as-column {
width: 15%;
}
.course-list-published-column {
width: 7%;
}
.course-list-nickname-column {
width: 25%;
}
.course-list-course-title-column,
.course-list-not-favoritable {
width: 49%;
}
.course-list-not-favoritable,
.course-list-group-column {
width: 32%;
width: 35%;
}
.course-list-no-left-border {

View File

@ -39,6 +39,7 @@
<tr>
<th scope="col" class="course-list-star-column"><span class="screenreader-only"><%= t ('Favorites') %></span></th>
<th scope="col" class="course-list-course-title-column course-list-no-left-border"><%= t ('Course') %></th>
<th scope="col" class="course-list-nickname-column course-list-no-left-border"><%= t ('Nickname') %></th>
<th scope="col" class="course-list-term-column course-list-no-left-border"><%= t ('Term') %></th>
<th scope="col" class="course-list-enrolled-as-column course-list-no-left-border"><%= t ('Enrolled as') %></th>
<th scope="col" class="course-list-published-column course-list-no-left-border"><%= t ('Published') %></th>
@ -63,6 +64,7 @@
<tr>
<th scope="col" class="course-list-star-column"><span class="screenreader-only"><%= t ('Favorites') %></span></th>
<th scope="col" class="course-list-course-title-column course-list-no-left-border"><%= t ('Course') %></th>
<th scope="col" class="course-list-nickname-column course-list-no-left-border"><%= t ('Nickname') %></th>
<th scope="col" class="course-list-term-column course-list-no-left-border"><%= t ('Term') %></th>
<th scope="col" class="course-list-enrolled-as-column course-list-no-left-border"><%= t ('Enrolled as') %></th>
<th scope="col" class="course-list-published-column course-list-no-left-border"><%= t ('Published') %></th>
@ -86,6 +88,7 @@
<tr>
<th scope="col" class="course-list-star-column"><span class="screenreader-only"><%= t ('Favorites') %></span></th>
<th scope="col" class="course-list-course-title-column course-list-no-left-border"><%= t ('Course') %></th>
<th scope="col" class="course-list-nickname-column course-list-no-left-border"><%= t ('Nickname') %></th>
<th scope="col" class="course-list-term-column course-list-no-left-border"><%= t ('Term') %></th>
<th scope="col" class="course-list-enrolled-as-column course-list-no-left-border"><%= t ('Enrolled as') %></th>
<th scope="col" class="course-list-published-column course-list-no-left-border"><%= t ('Published') %></th>
@ -137,4 +140,3 @@
</tbody>
</table>
<% end %>

View File

@ -42,12 +42,16 @@
<%= "course-list-not-favoritable" unless @show_star_column %>">
<% if show_link %><a href="<%= course_path(current_enrollment.course_id) %>"><% end %>
<span class="name">
<%= current_enrollment.long_name %>
<%= current_enrollment.course.name %>
</span>
<% if show_link %></a>
<% end %>
</td>
<td class="course-list-no-left-border course-list-nickname-column">
<%= current_enrollment.course.nickname_for(@current_user, nil) %>
</td>
<td class="course-list-no-left-border course-list-term-column">
<% if current_enrollment.course.enrollment_term.default_term? %>
<span class="screenreader-only"><%= current_enrollment.course.enrollment_term.name %></span>