Show something reasonable when class has no students

This commit is contained in:
phoenixeliot 2016-05-31 15:12:08 -07:00
parent cf76434943
commit ebc94e6e4b
2 changed files with 30 additions and 21 deletions
app
locale
templates/courses

View file

@ -1339,6 +1339,7 @@
unarchive_class: "unarchive class"
unarchive_this_class: "Unarchive this class"
no_students_yet: "This class has no students yet."
try_refreshing: "(You may need to refresh the page)"
add_students: "Add Students"
create_new_class: "Create a New Class"
class_overview: "Class Overview" # View Class page

View file

@ -108,28 +108,36 @@ block content
+copyCodes
+addStudentsButton
ul.nav.nav-tabs.m-t-5(role='tablist')
- var activeTab = state.get('activeTab');
li(class=(activeTab === "#students-tab" ? 'active' : ''))
a.students-tab-btn(href='#students-tab')
.small-details.text-center(data-i18n='teacher.students')
.tab-spacer
li(class=(activeTab === "#course-progress-tab" ? 'active' : ''))
a.course-progress-tab-btn(href='#course-progress-tab')
.small-details.text-center(data-i18n='teacher.course_progress')
.tab-spacer
li(class=(activeTab === "#enrollment-status-tab" ? 'active' : ''))
a.course-progress-tab-btn(href='#enrollment-status-tab')
.small-details.text-center(data-i18n='teacher.enrollment_status')
.tab-filler
if view.students.length > 0
ul.nav.nav-tabs.m-t-5(role='tablist')
- var activeTab = state.get('activeTab');
li(class=(activeTab === "#students-tab" ? 'active' : ''))
a.students-tab-btn(href='#students-tab')
.small-details.text-center(data-i18n='teacher.students')
.tab-spacer
li(class=(activeTab === "#course-progress-tab" ? 'active' : ''))
a.course-progress-tab-btn(href='#course-progress-tab')
.small-details.text-center(data-i18n='teacher.course_progress')
.tab-spacer
li(class=(activeTab === "#enrollment-status-tab" ? 'active' : ''))
a.course-progress-tab-btn(href='#enrollment-status-tab')
.small-details.text-center(data-i18n='teacher.enrollment_status')
.tab-filler
.tab-content
if activeTab === '#students-tab'
+studentsTab
else if activeTab === '#course-progress-tab'
+courseProgressTab
else
+enrollmentStatusTab
.tab-content
if activeTab === '#students-tab'
+studentsTab
else if activeTab === '#course-progress-tab'
+courseProgressTab
else
+enrollmentStatusTab
else
.text-center.m-t-5.m-b-5
.text-h2
span(data-i18n="teacher.no_students_yet")
.text-h4
span(data-i18n="teacher.try_refreshing")
mixin breadcrumbs
.breadcrumbs