Commit 873d7543 by Awais

In progress course run tabs.

ECOM-6038
parent f0547b5a
...@@ -1089,6 +1089,21 @@ class DashboardTests(TestCase): ...@@ -1089,6 +1089,21 @@ class DashboardTests(TestCase):
self.assertEqual(len(response.context['preview_course_runs']), 0) self.assertEqual(len(response.context['preview_course_runs']), 0)
self.assertContains(response, 'There are no course runs marked for preview.') self.assertContains(response, 'There are no course runs marked for preview.')
def test_without_in_progress_course_runs(self):
""" Verify in progress tabs shows a message if no course run available. """
response = self.assert_dashboard_response()
self.assertEqual(len(response.context['in_progress_course_runs']), 0)
self.assertContains(response, 'There are no in progress course runs.')
def test_with_in_progress_course_runs(self):
""" Verify that in progress tabs loads the course runs list. """
self.course_run_2.change_state(target=State.NEEDS_FINAL_APPROVAL)
self.course_run_2.save()
response = self.assert_dashboard_response()
self.assertEqual(len(response.context['in_progress_course_runs']), 1)
self.assertContains(response, self.table_class.format(id='in-progress'))
def assert_dashboard_response(self): def assert_dashboard_response(self):
""" Dry method to assert the response.""" """ Dry method to assert the response."""
response = self.client.get(self.page_url) response = self.client.get(self.page_url)
......
...@@ -153,3 +153,14 @@ class CourseRunWrapperTests(TestCase): ...@@ -153,3 +153,14 @@ class CourseRunWrapperTests(TestCase):
self.wrapped_course_run.keywords, self.wrapped_course_run.keywords,
self.course.keywords_data self.course.keywords_data
) )
@ddt.data(True, False)
def test_is_seo_reviews(self, is_seo_review):
""" Verify that the wrapper return the is_seo_review. """
self.course.is_seo_review = is_seo_review
self.course.save()
self.assertEqual(
self.wrapped_course_run.is_seo_review,
self.course.is_seo_review
)
...@@ -49,11 +49,14 @@ class Dashboard(mixins.LoginRequiredMixin, ListView): ...@@ -49,11 +49,14 @@ class Dashboard(mixins.LoginRequiredMixin, ListView):
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
context = super(Dashboard, self).get_context_data(**kwargs) context = super(Dashboard, self).get_context_data(**kwargs)
course_runs = context.get('object_list') course_runs = context.get('object_list')
published_course_runs = course_runs.filter( published_course_runs = course_runs.filter(
state__name=State.PUBLISHED, state__name=State.PUBLISHED,
state__modified__gt=datetime.today() - timedelta(days=self.default_published_days) state__modified__gt=datetime.today() - timedelta(days=self.default_published_days)
).select_related('state').all().order_by('-state__modified') ).select_related('state').order_by('-state__modified')
unpublished_course_runs = course_runs.exclude(state__name=State.PUBLISHED) unpublished_course_runs = course_runs.exclude(state__name=State.PUBLISHED)
studio_request_courses = unpublished_course_runs.filter(lms_course_id__isnull=True) studio_request_courses = unpublished_course_runs.filter(lms_course_id__isnull=True)
context['studio_request_courses'] = [CourseRunWrapper(course_run) for course_run in studio_request_courses] context['studio_request_courses'] = [CourseRunWrapper(course_run) for course_run in studio_request_courses]
...@@ -61,10 +64,15 @@ class Dashboard(mixins.LoginRequiredMixin, ListView): ...@@ -61,10 +64,15 @@ class Dashboard(mixins.LoginRequiredMixin, ListView):
context['published_course_runs'] = [CourseRunWrapper(course_run) for course_run in published_course_runs] context['published_course_runs'] = [CourseRunWrapper(course_run) for course_run in published_course_runs]
context['default_published_days'] = self.default_published_days context['default_published_days'] = self.default_published_days
preview_course_runs = course_runs.filter( in_progress_course_runs = course_runs.filter(
state__name=State.NEEDS_FINAL_APPROVAL, preview_url__isnull=False state__name=State.NEEDS_FINAL_APPROVAL
).select_related('state').order_by('-state__modified') ).select_related('state').order_by('-state__modified')
preview_course_runs = in_progress_course_runs.filter(
preview_url__isnull=False
).order_by('-state__modified')
context['in_progress_course_runs'] = [CourseRunWrapper(course_run) for course_run in in_progress_course_runs]
context['preview_course_runs'] = [CourseRunWrapper(course_run) for course_run in preview_course_runs] context['preview_course_runs'] = [CourseRunWrapper(course_run) for course_run in preview_course_runs]
return context return context
......
...@@ -186,3 +186,7 @@ class CourseRunWrapper(BaseWrapper): ...@@ -186,3 +186,7 @@ class CourseRunWrapper(BaseWrapper):
@property @property
def keywords(self): def keywords(self):
return self.wrapped_obj.course.keywords_data return self.wrapped_obj.course.keywords_data
@property
def is_seo_review(self):
return self.wrapped_obj.course.is_seo_review
...@@ -7,7 +7,7 @@ msgid "" ...@@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-11-18 17:35+0000\n" "POT-Creation-Date: 2016-11-23 14:30+0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
...@@ -17,6 +17,7 @@ msgstr "" ...@@ -17,6 +17,7 @@ msgstr ""
"Language: \n" "Language: \n"
#: apps/api/filters.py #: apps/api/filters.py
#, python-brace-format
msgid "No user with the username [{username}] exists." msgid "No user with the username [{username}] exists."
msgstr "" msgstr ""
...@@ -110,6 +111,7 @@ msgstr "" ...@@ -110,6 +111,7 @@ msgstr ""
#. Translators: 'period_choices' is a list of possible values, like ('second', #. Translators: 'period_choices' is a list of possible values, like ('second',
#. 'minute', 'hour') #. 'minute', 'hour')
#: apps/core/forms.py #: apps/core/forms.py
#, python-brace-format
msgid "period must be one of {period_choices}." msgid "period must be one of {period_choices}."
msgstr "" msgstr ""
...@@ -408,6 +410,7 @@ msgid "JSON string containing an elasticsearch function score config." ...@@ -408,6 +410,7 @@ msgid "JSON string containing an elasticsearch function score config."
msgstr "" msgstr ""
#: apps/publisher/emails.py #: apps/publisher/emails.py
#, python-brace-format
msgid "Course Run {title}-{pacing_type}-{start} state has been changed." msgid "Course Run {title}-{pacing_type}-{start} state has been changed."
msgstr "" msgstr ""
...@@ -565,10 +568,12 @@ msgid "Please fill all required field." ...@@ -565,10 +568,12 @@ msgid "Please fill all required field."
msgstr "" msgstr ""
#: apps/publisher/views.py #: apps/publisher/views.py
#, python-brace-format
msgid "Course run created successfully for course \"{course_title}\"." msgid "Course run created successfully for course \"{course_title}\"."
msgstr "" msgstr ""
#: apps/publisher/views.py #: apps/publisher/views.py
#, python-brace-format
msgid "There was an error saving course run, {error}" msgid "There was an error saving course run, {error}"
msgstr "" msgstr ""
...@@ -577,6 +582,7 @@ msgid "Please fill all required fields." ...@@ -577,6 +582,7 @@ msgid "Please fill all required fields."
msgstr "" msgstr ""
#: apps/publisher/views.py #: apps/publisher/views.py
#, python-brace-format
msgid "Content moved to `{state}` successfully." msgid "Content moved to `{state}` successfully."
msgstr "" msgstr ""
...@@ -601,10 +607,12 @@ msgid "Publish" ...@@ -601,10 +607,12 @@ msgid "Publish"
msgstr "" msgstr ""
#: apps/publisher_comments/emails.py #: apps/publisher_comments/emails.py
#, python-brace-format
msgid "New comment added in course run: {title}-{pacing_type}-{start}" msgid "New comment added in course run: {title}-{pacing_type}-{start}"
msgstr "" msgstr ""
#: apps/publisher_comments/emails.py #: apps/publisher_comments/emails.py
#, python-brace-format
msgid "New comment added in Course: {title}" msgid "New comment added in Course: {title}"
msgstr "" msgstr ""
...@@ -1539,6 +1547,7 @@ msgid "No Seats Available." ...@@ -1539,6 +1547,7 @@ msgid "No Seats Available."
msgstr "" msgstr ""
#: templates/publisher/course_run_detail/_studio.html #: templates/publisher/course_run_detail/_studio.html
#: templates/publisher/dashboard/_in_progress.html
#: templates/publisher/dashboard/_preview_ready.html #: templates/publisher/dashboard/_preview_ready.html
#: templates/publisher/dashboard/_published.html #: templates/publisher/dashboard/_published.html
#: templates/publisher/dashboard/_studio_requests.html #: templates/publisher/dashboard/_studio_requests.html
...@@ -1631,8 +1640,31 @@ msgstr "" ...@@ -1631,8 +1640,31 @@ msgstr ""
msgid "PUBLISHED COURSE RUNS" msgid "PUBLISHED COURSE RUNS"
msgstr "" msgstr ""
#: templates/publisher/dashboard.html #: templates/publisher/dashboard/_in_progress.html
msgid "In Progress" msgid "There are no in progress course runs."
msgstr ""
#: templates/publisher/dashboard/_in_progress.html
msgid "Institution"
msgstr ""
#: templates/publisher/dashboard/_in_progress.html
#: templates/publisher/dashboard/_published.html
msgid "Start"
msgstr ""
#: templates/publisher/dashboard/_in_progress.html
#: templates/publisher/dashboard/_published.html
msgid "End"
msgstr ""
#: templates/publisher/dashboard/_in_progress.html
#: templates/publisher/dashboard/_published.html
msgid "Target Content"
msgstr ""
#: templates/publisher/dashboard/_in_progress.html
msgid "SEO Review"
msgstr "" msgstr ""
#: templates/publisher/dashboard/_preview_ready.html #: templates/publisher/dashboard/_preview_ready.html
...@@ -1666,21 +1698,9 @@ msgid "" ...@@ -1666,21 +1698,9 @@ msgid ""
msgstr "" msgstr ""
#: templates/publisher/dashboard/_published.html #: templates/publisher/dashboard/_published.html
msgid "Start"
msgstr ""
#: templates/publisher/dashboard/_published.html
msgid "End"
msgstr ""
#: templates/publisher/dashboard/_published.html
msgid "Published Date" msgid "Published Date"
msgstr "" msgstr ""
#: templates/publisher/dashboard/_published.html
msgid "Target Content"
msgstr ""
#: templates/publisher/dashboard/_studio_requests.html #: templates/publisher/dashboard/_studio_requests.html
msgid "" msgid ""
"The list below are the courses that need a studio instance to start " "The list below are the courses that need a studio instance to start "
......
...@@ -7,7 +7,7 @@ msgid "" ...@@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-11-18 17:35+0000\n" "POT-Creation-Date: 2016-11-23 14:30+0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
......
...@@ -7,7 +7,7 @@ msgid "" ...@@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-11-18 17:35+0000\n" "POT-Creation-Date: 2016-11-23 14:30+0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
...@@ -18,6 +18,7 @@ msgstr "" ...@@ -18,6 +18,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: apps/api/filters.py #: apps/api/filters.py
#, python-brace-format
msgid "No user with the username [{username}] exists." msgid "No user with the username [{username}] exists."
msgstr "" msgstr ""
"Nö üsér wïth thé üsérnämé [{username}] éxïsts. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, " "Nö üsér wïth thé üsérnämé [{username}] éxïsts. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, "
...@@ -138,6 +139,7 @@ msgstr "" ...@@ -138,6 +139,7 @@ msgstr ""
#. Translators: 'period_choices' is a list of possible values, like ('second', #. Translators: 'period_choices' is a list of possible values, like ('second',
#. 'minute', 'hour') #. 'minute', 'hour')
#: apps/core/forms.py #: apps/core/forms.py
#, python-brace-format
msgid "period must be one of {period_choices}." msgid "period must be one of {period_choices}."
msgstr "" msgstr ""
"pérïöd müst ßé öné öf {period_choices}. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕ#" "pérïöd müst ßé öné öf {period_choices}. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕ#"
...@@ -512,6 +514,7 @@ msgstr "" ...@@ -512,6 +514,7 @@ msgstr ""
"∂σłσя ѕιт αмєт, ¢σηѕє¢тєтυя α#" "∂σłσя ѕιт αмєт, ¢σηѕє¢тєтυя α#"
#: apps/publisher/emails.py #: apps/publisher/emails.py
#, python-brace-format
msgid "Course Run {title}-{pacing_type}-{start} state has been changed." msgid "Course Run {title}-{pacing_type}-{start} state has been changed."
msgstr "" msgstr ""
"Çöürsé Rün {title}-{pacing_type}-{start} stäté häs ßéén çhängéd. Ⱡ'σяєм " "Çöürsé Rün {title}-{pacing_type}-{start} stäté häs ßéén çhängéd. Ⱡ'σяєм "
...@@ -685,12 +688,14 @@ msgid "Please fill all required field." ...@@ -685,12 +688,14 @@ msgid "Please fill all required field."
msgstr "Pléäsé fïll äll réqüïréd fïéld. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕє¢т#" msgstr "Pléäsé fïll äll réqüïréd fïéld. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕє¢т#"
#: apps/publisher/views.py #: apps/publisher/views.py
#, python-brace-format
msgid "Course run created successfully for course \"{course_title}\"." msgid "Course run created successfully for course \"{course_title}\"."
msgstr "" msgstr ""
"Çöürsé rün çréätéd süççéssfüllý för çöürsé \"{course_title}\". Ⱡ'σяєм ιρѕυм " "Çöürsé rün çréätéd süççéssfüllý för çöürsé \"{course_title}\". Ⱡ'σяєм ιρѕυм "
"∂σłσя ѕιт αмєт, ¢σηѕє¢тєтυя α#" "∂σłσя ѕιт αмєт, ¢σηѕє¢тєтυя α#"
#: apps/publisher/views.py #: apps/publisher/views.py
#, python-brace-format
msgid "There was an error saving course run, {error}" msgid "There was an error saving course run, {error}"
msgstr "" msgstr ""
"Théré wäs än érrör sävïng çöürsé rün, {error} Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, " "Théré wäs än érrör sävïng çöürsé rün, {error} Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, "
...@@ -702,6 +707,7 @@ msgstr "" ...@@ -702,6 +707,7 @@ msgstr ""
"Pléäsé fïll äll réqüïréd fïélds. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕє¢тє#" "Pléäsé fïll äll réqüïréd fïélds. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕє¢тє#"
#: apps/publisher/views.py #: apps/publisher/views.py
#, python-brace-format
msgid "Content moved to `{state}` successfully." msgid "Content moved to `{state}` successfully."
msgstr "" msgstr ""
"Çöntént mövéd tö `{state}` süççéssfüllý. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, " "Çöntént mövéd tö `{state}` süççéssfüllý. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, "
...@@ -730,12 +736,14 @@ msgid "Publish" ...@@ -730,12 +736,14 @@ msgid "Publish"
msgstr "Püßlïsh Ⱡ'σяєм ιρѕυм #" msgstr "Püßlïsh Ⱡ'σяєм ιρѕυм #"
#: apps/publisher_comments/emails.py #: apps/publisher_comments/emails.py
#, python-brace-format
msgid "New comment added in course run: {title}-{pacing_type}-{start}" msgid "New comment added in course run: {title}-{pacing_type}-{start}"
msgstr "" msgstr ""
"Néw çömmént äddéd ïn çöürsé rün: {title}-{pacing_type}-{start} Ⱡ'σяєм ιρѕυм " "Néw çömmént äddéd ïn çöürsé rün: {title}-{pacing_type}-{start} Ⱡ'σяєм ιρѕυм "
"∂σłσя ѕιт αмєт, ¢σηѕє¢тєтυя #" "∂σłσя ѕιт αмєт, ¢σηѕє¢тєтυя #"
#: apps/publisher_comments/emails.py #: apps/publisher_comments/emails.py
#, python-brace-format
msgid "New comment added in Course: {title}" msgid "New comment added in Course: {title}"
msgstr "" msgstr ""
"Néw çömmént äddéd ïn Çöürsé: {title} Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕє¢тє#" "Néw çömmént äddéd ïn Çöürsé: {title} Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕє¢тє#"
...@@ -1811,6 +1819,7 @@ msgid "No Seats Available." ...@@ -1811,6 +1819,7 @@ msgid "No Seats Available."
msgstr "Nö Séäts Àväïläßlé. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт,#" msgstr "Nö Séäts Àväïläßlé. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт,#"
#: templates/publisher/course_run_detail/_studio.html #: templates/publisher/course_run_detail/_studio.html
#: templates/publisher/dashboard/_in_progress.html
#: templates/publisher/dashboard/_preview_ready.html #: templates/publisher/dashboard/_preview_ready.html
#: templates/publisher/dashboard/_published.html #: templates/publisher/dashboard/_published.html
#: templates/publisher/dashboard/_studio_requests.html #: templates/publisher/dashboard/_studio_requests.html
...@@ -1910,9 +1919,34 @@ msgstr "STÛDÌÖ RÉQÛÉST Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт#" ...@@ -1910,9 +1919,34 @@ msgstr "STÛDÌÖ RÉQÛÉST Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт#"
msgid "PUBLISHED COURSE RUNS" msgid "PUBLISHED COURSE RUNS"
msgstr "PÛBLÌSHÉD ÇÖÛRSÉ RÛNS Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, #" msgstr "PÛBLÌSHÉD ÇÖÛRSÉ RÛNS Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, #"
#: templates/publisher/dashboard.html #: templates/publisher/dashboard/_in_progress.html
msgid "In Progress" msgid "There are no in progress course runs."
msgstr "Ìn Prögréss Ⱡ'σяєм ιρѕυм ∂σłσя #" msgstr ""
"Théré äré nö ïn prögréss çöürsé rüns. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, "
"¢σηѕє¢тєтυ#"
#: templates/publisher/dashboard/_in_progress.html
msgid "Institution"
msgstr "Ìnstïtütïön Ⱡ'σяєм ιρѕυм ∂σłσя #"
#: templates/publisher/dashboard/_in_progress.html
#: templates/publisher/dashboard/_published.html
msgid "Start"
msgstr "Stärt Ⱡ'σяєм ιρѕ#"
#: templates/publisher/dashboard/_in_progress.html
#: templates/publisher/dashboard/_published.html
msgid "End"
msgstr "Énd Ⱡ'σяєм#"
#: templates/publisher/dashboard/_in_progress.html
#: templates/publisher/dashboard/_published.html
msgid "Target Content"
msgstr "Tärgét Çöntént Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт#"
#: templates/publisher/dashboard/_in_progress.html
msgid "SEO Review"
msgstr "SÉÖ Révïéw Ⱡ'σяєм ιρѕυм ∂σłσ#"
#: templates/publisher/dashboard/_preview_ready.html #: templates/publisher/dashboard/_preview_ready.html
msgid "There are no course runs marked for preview." msgid "There are no course runs marked for preview."
...@@ -1959,21 +1993,9 @@ msgstr "" ...@@ -1959,21 +1993,9 @@ msgstr ""
"%(default_published_days)s däýs. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕє¢тєтυя#" "%(default_published_days)s däýs. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕє¢тєтυя#"
#: templates/publisher/dashboard/_published.html #: templates/publisher/dashboard/_published.html
msgid "Start"
msgstr "Stärt Ⱡ'σяєм ιρѕ#"
#: templates/publisher/dashboard/_published.html
msgid "End"
msgstr "Énd Ⱡ'σяєм#"
#: templates/publisher/dashboard/_published.html
msgid "Published Date" msgid "Published Date"
msgstr "Püßlïshéd Däté Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт#" msgstr "Püßlïshéd Däté Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт#"
#: templates/publisher/dashboard/_published.html
msgid "Target Content"
msgstr "Tärgét Çöntént Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт#"
#: templates/publisher/dashboard/_studio_requests.html #: templates/publisher/dashboard/_studio_requests.html
msgid "" msgid ""
"The list below are the courses that need a studio instance to start " "The list below are the courses that need a studio instance to start "
......
...@@ -7,7 +7,7 @@ msgid "" ...@@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-11-18 17:35+0000\n" "POT-Creation-Date: 2016-11-23 14:30+0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
......
...@@ -53,4 +53,9 @@ $(document).ready(function() { ...@@ -53,4 +53,9 @@ $(document).ready(function() {
$('.data-table-preview').DataTable({ $('.data-table-preview').DataTable({
"autoWidth": false "autoWidth": false
}); });
$('.data-table-in-progress').DataTable({
"autoWidth": false
});
}); });
.publisher-container { .publisher-container {
@include padding(5px, 5px, 5px, 5px);
font-family: "Open Sans", Arial, Helvetica, sans-serif; font-family: "Open Sans", Arial, Helvetica, sans-serif;
.studio-instance-success { .studio-instance-success {
...@@ -18,7 +19,6 @@ ...@@ -18,7 +19,6 @@
@include padding(12px, 20px, 12px, 20px); @include padding(12px, 20px, 12px, 20px);
@include margin-right(1px); @include margin-right(1px);
@include float(left); @include float(left);
outline: none;
background: #f2f2f2; background: #f2f2f2;
margin-bottom: 0 !important; margin-bottom: 0 !important;
position: relative; position: relative;
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
color: #949494; color: #949494;
text-transform: capitalize; text-transform: capitalize;
text-decoration: none; text-decoration: none;
z-index: 999;
border: { border: {
width: 2px; width: 2px;
style: solid; style: solid;
...@@ -45,6 +46,7 @@ ...@@ -45,6 +46,7 @@
cursor: default; cursor: default;
background: white; background: white;
color: #169bd5; color: #169bd5;
z-index: 1001;
border: { border: {
width: 2px; width: 2px;
style: solid; style: solid;
...@@ -78,10 +80,6 @@ ...@@ -78,10 +80,6 @@
} }
} }
&:focus {
box-shadow: none;
border:1px solid #169bd5;
}
} }
&:before, &:before,
...@@ -134,6 +132,8 @@ ...@@ -134,6 +132,8 @@
input { input {
@include padding-left(6px); @include padding-left(6px);
@include padding-right(6px); @include padding-right(6px);
padding-top: 0;
padding-bottom: 0;
height: 25px; height: 25px;
border-radius: 0; border-radius: 0;
border: 1px solid #bebebe; border: 1px solid #bebebe;
......
...@@ -7,19 +7,30 @@ ...@@ -7,19 +7,30 @@
{% endblock title %} {% endblock title %}
{% block content %} {% block content %}
{% with studio_count=studio_request_courses|length published_count=published_course_runs|length preview_count=preview_course_runs|length %} {% with studio_count=studio_request_courses|length published_count=published_course_runs|length preview_count=preview_course_runs|length in_progress_count=in_progress_course_runs|length %}
<div class="publisher-container"> <div class="publisher-container">
<h2 class="hd-2 emphasized">{% trans "Course runs" %}</h2> <h2 class="hd-2 emphasized">{% trans "Course runs" %}</h2>
<ul role="tablist" class="tabs"> <ul role="tablist" class="tabs">
<li role="tab" id="tab-progress" class="tab" aria-selected="true" aria-expanded="false" aria-controls="progress" tabindex="0"><span>0</span>{% trans "IN PROGRESS" %}</li> <li role="tab" id="tab-progress" class="tab" aria-selected="true" aria-expanded="false"
<li role="tab" id="tab-preview" class="tab" aria-selected="false" aria-expanded="false" aria-controls="preview" tabindex="-1"><span>{{ preview_count }}</span>{% trans "PREVIEW READY" %}</li> aria-controls="progress" tabindex="0">
<li role="tab" id="tab-studio" class="tab" aria-selected="false" aria-expanded="true" aria-controls="studio" tabindex="-1" data-studio-count="{{ studio_count }}"><span>{{ studio_count }}</span>{% trans "STUDIO REQUEST" %}</li> <span>{{ in_progress_count }}</span>{% trans "IN PROGRESS" %}
<li role="tab" id="tab-published" class="tab" aria-selected="false" aria-expanded="false" aria-controls="published" tabindex="-1"><span>{{ published_count }}</span>{% trans "PUBLISHED COURSE RUNS" %}</li> </li>
<li role="tab" id="tab-preview" class="tab" aria-selected="false" aria-expanded="false"
aria-controls="preview" tabindex="-1">
<span>{{ preview_count }}</span>{% trans "PREVIEW READY" %}
</li>
<li role="tab" id="tab-studio" class="tab" aria-selected="false" aria-expanded="true"
aria-controls="studio" tabindex="-1" data-studio-count="{{ studio_count }}">
<span>{{ studio_count }}</span>{% trans "STUDIO REQUEST" %}
</li>
<li role="tab" id="tab-published" class="tab" aria-selected="false" aria-expanded="false"
aria-controls="published" tabindex="-1">
<span>{{ published_count }}</span>{% trans "PUBLISHED COURSE RUNS" %}
</li>
</ul> </ul>
<div role="tabpanel" id="progress" class="tab-panel" aria-labelledby="tab-progress" aria-hidden="false" tabindex="-1"> <div role="tabpanel" id="progress" class="tab-panel" aria-labelledby="tab-progress" aria-hidden="false" tabindex="-1">
<h2>{% trans "In Progress" %}</h2> {% include "publisher/dashboard/_in_progress.html" %}
<p></p>
</div> </div>
<div role="tabpanel" id="preview" class="tab-panel" aria-labelledby="tab-preview" aria-hidden="true" tabindex="-1"> <div role="tabpanel" id="preview" class="tab-panel" aria-labelledby="tab-preview" aria-hidden="true" tabindex="-1">
......
{% load i18n %}
{% if in_progress_count == 0 %}
<p>{% trans "There are no in progress course runs." %}</p>
{% else %}
<table class="data-table-in-progress display nowrap" cellspacing="0" width="100%">
<thead>
<tr>
<th role="button">
{% trans "Course Name" %}
</th>
<th role="button">
{% trans "Institution" %}
</th>
<th role="button">
{% trans "Start" %}
</th>
<th role="button">
{% trans "End" %}
</th>
<th role="button">
{% trans "Target Content" %}
</th>
<th role="button">
{% trans "SEO Review" %}
</th>
</tr>
</thead>
<tbody>
{% for course_run in in_progress_course_runs %}
<tr>
<td>
<a href="{% url 'publisher:publisher_course_run_detail' course_run.id %}">{{ course_run.title }}</a>
</td>
<td>{% if course_run.course.group_institution %}
{{ course_run.course.group_institution }}
{% endif %}
</td>
<td>
{{ course_run.start|date:"Y-m-d" }}
</td>
<td>
{{ course_run.end|date:"Y-m-d" }}
</td>
<td>
{% if course_run.target_content %}Y{% else %}N{% endif %}
</td>
<td>
{% if course_run.is_seo_review %}Y{% else %}N{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment