Commit 0d8026f6 by tasawernawaz Committed by Tasawer Nawaz

update preview tab on publisher dashboard

ECOM-7528
parent 816c4c91
......@@ -1341,15 +1341,22 @@ class DashboardTests(TestCase):
def test_without_preview_ready_course_runs(self):
""" Verify preview ready tabs shows a message if no course run available. """
self.course_run_2.preview_url = None
self.course_run_2.save()
response = self.assert_dashboard_response(studio_count=2, preview_count=0, progress_count=2, published_count=1)
self.course_run_2.course_run_state.name = CourseRunStateChoices.Draft
self.course_run_2.course_run_state.save()
response = self.assert_dashboard_response(studio_count=2, preview_count=0, progress_count=3, published_count=1)
self._assert_tabs_with_roles(response)
def test_without_preview_url(self):
""" Verify preview ready tabs shows a message if no course run available. """
""" Verify in preview tab shows course in "in review" tab if course run is approve regardless of
preview url is added or not.
"""
response = self.assert_dashboard_response(studio_count=2, preview_count=1, progress_count=2, published_count=1)
self._assert_tabs_with_roles(response)
# without preview url
self.course_run_2.preview_url = None
self.course_run_2.save()
response = self.assert_dashboard_response(studio_count=2, preview_count=0, progress_count=2, published_count=1)
response = self.assert_dashboard_response(studio_count=2, preview_count=1, progress_count=2, published_count=1)
self._assert_tabs_with_roles(response)
def test_with_in_progress_course_runs(self):
......
......@@ -108,7 +108,6 @@ class Dashboard(mixins.LoginRequiredMixin, ListView):
preview_course_runs = unpublished_course_runs.filter(
course_run_state__name=CourseRunStateChoices.Approved,
preview_url__isnull=False
).order_by('-course_run_state__modified')
context['in_progress_course_runs'] = [CourseRunWrapper(course_run) for course_run in in_progress_course_runs]
......
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-03-31 15:15+0500\n"
"POT-Creation-Date: 2017-04-03 15:32+0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -468,7 +468,7 @@ msgstr ""
#: apps/publisher/choices.py
#: templates/publisher/course_run_detail/_widgets.html
#: templates/publisher/dashboard/_preview_ready.html
#: templates/publisher/dashboard/_in_preview.html
msgid "Approved"
msgstr ""
......@@ -543,7 +543,6 @@ msgstr ""
#: apps/publisher/forms.py templates/publisher/course_detail.html
#: templates/publisher/course_revision_history.html
#: templates/publisher/dashboard/_in_progress.html
#: templates/publisher/dashboard/_preview_ready.html
#: templates/publisher/dashboard/_published.html
#: templates/publisher/dashboard/_studio_requests.html
msgid "Course Number"
......@@ -965,7 +964,7 @@ msgstr ""
#: templates/publisher/_add_instructor_popup.html
#: templates/publisher/course_run_detail/_studio.html
#: templates/publisher/dashboard/_preview_ready.html
#: templates/publisher/dashboard/_in_preview.html
#: templates/publisher/dashboard/_published.html
#: templates/publisher/dashboard/_studio_requests.html
msgid "Organization"
......@@ -2278,8 +2277,8 @@ msgstr ""
#: templates/publisher/course_run_detail/_studio.html
#: templates/publisher/courses.html
#: templates/publisher/dashboard/_in_preview.html
#: templates/publisher/dashboard/_in_progress.html
#: templates/publisher/dashboard/_preview_ready.html
#: templates/publisher/dashboard/_published.html
#: templates/publisher/dashboard/_studio_requests.html
msgid "Course Name"
......@@ -2318,7 +2317,7 @@ msgid "COURSE PREVIEW"
msgstr ""
#: templates/publisher/course_run_detail/_widgets.html
#: templates/publisher/dashboard/_preview_ready.html
#: templates/publisher/dashboard/_in_preview.html
msgid "Preview URL"
msgstr ""
......@@ -2393,7 +2392,7 @@ msgid "IN DEVELOPMENT"
msgstr ""
#: templates/publisher/dashboard.html
msgid "PREVIEW READY"
msgid "IN PREVIEW"
msgstr ""
#: templates/publisher/dashboard.html
......@@ -2404,6 +2403,26 @@ msgstr ""
msgid "PUBLISHED COURSE RUNS"
msgstr ""
#: templates/publisher/dashboard/_in_preview.html
msgid ""
"The following course run previews are available for course team approval. "
"After the course team approves the preview, the edX marketing team will "
"publish the course run on edx.org. The course team will receive an email "
"message when the course run has been published."
msgstr ""
#: templates/publisher/dashboard/_in_preview.html
msgid "Status"
msgstr ""
#: templates/publisher/dashboard/_in_preview.html
msgid "Preview Requested"
msgstr ""
#: templates/publisher/dashboard/_in_preview.html
msgid "In Review"
msgstr ""
#: templates/publisher/dashboard/_in_progress.html
msgid "There are no in progress course runs."
msgstr ""
......@@ -2418,14 +2437,6 @@ msgstr ""
msgid "End"
msgstr ""
#: templates/publisher/dashboard/_preview_ready.html
msgid ""
"The following course run previews are available for course team approval. "
"After the course team approves the preview, the edX marketing team will "
"publish the course run on edx.org. The course team will receive an email "
"message when the course run has been published."
msgstr ""
#: templates/publisher/dashboard/_published.html
msgid "Looks like you haven't published any course yet"
msgstr ""
......
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-03-31 15:15+0500\n"
"POT-Creation-Date: 2017-04-03 15:32+0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-03-31 15:15+0500\n"
"POT-Creation-Date: 2017-04-03 15:32+0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -580,7 +580,7 @@ msgstr "Révïéw Ⱡ'σяєм ιρѕυ#"
#: apps/publisher/choices.py
#: templates/publisher/course_run_detail/_widgets.html
#: templates/publisher/dashboard/_preview_ready.html
#: templates/publisher/dashboard/_in_preview.html
msgid "Approved"
msgstr "Àpprövéd Ⱡ'σяєм ιρѕυм ∂#"
......@@ -671,7 +671,6 @@ msgstr "Çöürsé Tïtlé Ⱡ'σяєм ιρѕυм ∂σłσя ѕ#"
#: apps/publisher/forms.py templates/publisher/course_detail.html
#: templates/publisher/course_revision_history.html
#: templates/publisher/dashboard/_in_progress.html
#: templates/publisher/dashboard/_preview_ready.html
#: templates/publisher/dashboard/_published.html
#: templates/publisher/dashboard/_studio_requests.html
msgid "Course Number"
......@@ -1126,7 +1125,7 @@ msgstr "Tïtlé Ⱡ'σяєм ιρѕ#"
#: templates/publisher/_add_instructor_popup.html
#: templates/publisher/course_run_detail/_studio.html
#: templates/publisher/dashboard/_preview_ready.html
#: templates/publisher/dashboard/_in_preview.html
#: templates/publisher/dashboard/_published.html
#: templates/publisher/dashboard/_studio_requests.html
msgid "Organization"
......@@ -2673,8 +2672,8 @@ msgstr "Çértïfïçäté Ìssüéd Däté Ⱡ'σяєм ιρѕυм ∂σłσя
#: templates/publisher/course_run_detail/_studio.html
#: templates/publisher/courses.html
#: templates/publisher/dashboard/_in_preview.html
#: templates/publisher/dashboard/_in_progress.html
#: templates/publisher/dashboard/_preview_ready.html
#: templates/publisher/dashboard/_published.html
#: templates/publisher/dashboard/_studio_requests.html
msgid "Course Name"
......@@ -2713,7 +2712,7 @@ msgid "COURSE PREVIEW"
msgstr "ÇÖÛRSÉ PRÉVÌÉW Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт#"
#: templates/publisher/course_run_detail/_widgets.html
#: templates/publisher/dashboard/_preview_ready.html
#: templates/publisher/dashboard/_in_preview.html
msgid "Preview URL"
msgstr "Prévïéw ÛRL Ⱡ'σяєм ιρѕυм ∂σłσя #"
......@@ -2800,8 +2799,8 @@ msgid "IN DEVELOPMENT"
msgstr "ÌN DÉVÉLÖPMÉNT Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт#"
#: templates/publisher/dashboard.html
msgid "PREVIEW READY"
msgstr "PRÉVÌÉW RÉÀDÝ Ⱡ'σяєм ιρѕυм ∂σłσя ѕι#"
msgid "IN PREVIEW"
msgstr "ÌN PRÉVÌÉW Ⱡ'σяєм ιρѕυм ∂σłσ#"
#: templates/publisher/dashboard.html
msgid "STUDIO REQUEST"
......@@ -2811,6 +2810,33 @@ msgstr "STÛDÌÖ RÉQÛÉST Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт#"
msgid "PUBLISHED COURSE RUNS"
msgstr "PÛBLÌSHÉD ÇÖÛRSÉ RÛNS Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, #"
#: templates/publisher/dashboard/_in_preview.html
msgid ""
"The following course run previews are available for course team approval. "
"After the course team approves the preview, the edX marketing team will "
"publish the course run on edx.org. The course team will receive an email "
"message when the course run has been published."
msgstr ""
"Thé föllöwïng çöürsé rün prévïéws äré äväïläßlé för çöürsé téäm äppröväl. "
"Àftér thé çöürsé téäm äpprövés thé prévïéw, thé édX märkétïng téäm wïll "
"püßlïsh thé çöürsé rün ön édx.örg. Thé çöürsé téäm wïll réçéïvé än émäïl "
"méssägé whén thé çöürsé rün häs ßéén püßlïshéd. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт,"
" ¢σηѕє¢тєтυя α∂ιριѕι¢ιηg єłιт, ѕє∂ ∂σ єιυѕмσ∂ тємρσя ιη¢ι∂ι∂υηт υт łαвσяє єт"
" ∂σłσяє мαgηα αłιqυα. υт єηιм α∂ мιηιм νєηιαм, qυιѕ ησѕтяυ∂ єχєя¢ιтαтιση "
"υłłαм¢σ łαвσяιѕ ηιѕι υт αłιqυιρ єχ єα ¢σммσ∂σ ¢σηѕєqυαт. ∂υιѕ αυтє#"
#: templates/publisher/dashboard/_in_preview.html
msgid "Status"
msgstr "Stätüs Ⱡ'σяєм ιρѕυ#"
#: templates/publisher/dashboard/_in_preview.html
msgid "Preview Requested"
msgstr "Prévïéw Réqüéstéd Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмє#"
#: templates/publisher/dashboard/_in_preview.html
msgid "In Review"
msgstr "Ìn Révïéw Ⱡ'σяєм ιρѕυм ∂σł#"
#: templates/publisher/dashboard/_in_progress.html
msgid "There are no in progress course runs."
msgstr ""
......@@ -2827,21 +2853,6 @@ msgstr "Stärt Ⱡ'σяєм ιρѕ#"
msgid "End"
msgstr "Énd Ⱡ'σяєм#"
#: templates/publisher/dashboard/_preview_ready.html
msgid ""
"The following course run previews are available for course team approval. "
"After the course team approves the preview, the edX marketing team will "
"publish the course run on edx.org. The course team will receive an email "
"message when the course run has been published."
msgstr ""
"Thé föllöwïng çöürsé rün prévïéws äré äväïläßlé för çöürsé téäm äppröväl. "
"Àftér thé çöürsé téäm äpprövés thé prévïéw, thé édX märkétïng téäm wïll "
"püßlïsh thé çöürsé rün ön édx.örg. Thé çöürsé téäm wïll réçéïvé än émäïl "
"méssägé whén thé çöürsé rün häs ßéén püßlïshéd. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт,"
" ¢σηѕє¢тєтυя α∂ιριѕι¢ιηg єłιт, ѕє∂ ∂σ єιυѕмσ∂ тємρσя ιη¢ι∂ι∂υηт υт łαвσяє єт"
" ∂σłσяє мαgηα αłιqυα. υт єηιм α∂ мιηιм νєηιαм, qυιѕ ησѕтяυ∂ єχєя¢ιтαтιση "
"υłłαм¢σ łαвσяιѕ ηιѕι υт αłιqυιρ єχ єα ¢σммσ∂σ ¢σηѕєqυαт. ∂υιѕ αυтє#"
#: templates/publisher/dashboard/_published.html
msgid "Looks like you haven't published any course yet"
msgstr ""
......
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-03-31 15:15+0500\n"
"POT-Creation-Date: 2017-04-03 15:32+0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......
......@@ -20,7 +20,7 @@
</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" %}
<span>{{ preview_count }}</span>{% trans "IN PREVIEW" %}
</li>
{% if is_project_coordinator %}
<li role="tab" id="tab-studio" class="tab" aria-selected="false" aria-expanded="true"
......@@ -40,7 +40,7 @@
</div>
<div role="tabpanel" id="preview" class="tab-panel" aria-labelledby="tab-preview" aria-hidden="true" tabindex="-1">
{% include "publisher/dashboard/_preview_ready.html" %}
{% include "publisher/dashboard/_in_preview.html" %}
<p></p>
</div>
......
......@@ -11,13 +11,10 @@
{% trans "Course Name" %}
</th>
<th role="button">
{% trans "Course Number" %}
</th>
<th role="button">
{% trans "Organization" %}
</th>
<th role="button">
{% trans "Approved" %}
{% trans "Status" %}
</th>
<th role="button">
{% trans "Preview URL" %}
......@@ -31,13 +28,16 @@
<a href="{% url 'publisher:publisher_course_run_detail' course_run.id %}">{{ course_run.title }}</a>
</td>
<td>
{{ course_run.number }}
{% if course_run.course.organizations.first %}{{ course_run.course.organizations.first.key }}{% endif %}
</td>
<td>
{% if course_run.course.organizations.first %}{{ course_run.course.organizations.first.name }}{% endif %}
</td>
<td>
{{ course_run.state }}
{% if not course_run.preview_url %}
{% trans "Preview Requested" %}
{% elif course_run.course_run_state.preview_accepted %}
{% trans "Approved" %}
{% else %}
{% trans "In Review" %}
{% endif %}
</td>
<td>
<a target="_blank" href="{{ course_run.preview_url }}">{{ course_run.preview_url }}</a>
......
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