Commit b19ee392 by Waheed Ahmed

Added list of Preview Ready course-runs empty/non-empty state message

ECOM-6334
parent 6d716199
...@@ -1231,7 +1231,7 @@ class DashboardTests(TestCase): ...@@ -1231,7 +1231,7 @@ class DashboardTests(TestCase):
""" Verify that preview ready tabs loads the course runs list. """ """ Verify that preview ready tabs loads the course runs list. """
response = self.assert_dashboard_response(studio_count=2, preview_count=1, progress_count=3, published_count=1) response = self.assert_dashboard_response(studio_count=2, preview_count=1, progress_count=3, published_count=1)
self.assertContains(response, self.table_class.format(id='preview')) self.assertContains(response, self.table_class.format(id='preview'))
self.assertContains(response, 'The list below contains all course runs awaiting course team approval') self.assertContains(response, 'The following course run previews are available for course team approval.')
self._assert_tabs_with_roles(response) self._assert_tabs_with_roles(response)
def test_without_preview_ready_course_runs(self): def test_without_preview_ready_course_runs(self):
...@@ -1239,7 +1239,6 @@ class DashboardTests(TestCase): ...@@ -1239,7 +1239,6 @@ class DashboardTests(TestCase):
self.course_run_2.preview_url = None self.course_run_2.preview_url = None
self.course_run_2.save() self.course_run_2.save()
response = self.assert_dashboard_response(studio_count=2, preview_count=0, progress_count=3, published_count=1) response = self.assert_dashboard_response(studio_count=2, preview_count=0, progress_count=3, published_count=1)
self.assertContains(response, 'There are no course runs marked for preview.')
self._assert_tabs_with_roles(response) self._assert_tabs_with_roles(response)
def test_without_preview_url(self): def test_without_preview_url(self):
...@@ -1247,7 +1246,6 @@ class DashboardTests(TestCase): ...@@ -1247,7 +1246,6 @@ class DashboardTests(TestCase):
self.course_run_2.preview_url = None self.course_run_2.preview_url = None
self.course_run_2.save() self.course_run_2.save()
response = self.assert_dashboard_response(studio_count=2, preview_count=0, progress_count=3, published_count=1) response = self.assert_dashboard_response(studio_count=2, preview_count=0, progress_count=3, published_count=1)
self.assertContains(response, 'There are no course runs marked for preview.')
self._assert_tabs_with_roles(response) self._assert_tabs_with_roles(response)
def test_with_in_progress_course_runs(self): def test_with_in_progress_course_runs(self):
......
...@@ -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: 2017-01-27 13:02+0500\n" "POT-Creation-Date: 2017-01-27 16: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"
...@@ -2115,14 +2115,11 @@ msgid "SEO Review" ...@@ -2115,14 +2115,11 @@ msgid "SEO Review"
msgstr "" msgstr ""
#: templates/publisher/dashboard/_preview_ready.html #: templates/publisher/dashboard/_preview_ready.html
msgid "There are no course runs marked for preview."
msgstr ""
#: templates/publisher/dashboard/_preview_ready.html
msgid "" msgid ""
"The list below contains all course runs awaiting course team approval. Once " "The following course run previews are available for course team approval. "
"approved, the marketing team will push the course run. you will be notified " "After the course team approves the preview, the edX marketing team will "
"via email when the course runs are live on the production site." "publish the course run on edx.org. The course team will receive an email "
"message when the course run has been published."
msgstr "" msgstr ""
#: templates/publisher/dashboard/_preview_ready.html #: templates/publisher/dashboard/_preview_ready.html
......
...@@ -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: 2017-01-27 13:02+0500\n" "POT-Creation-Date: 2017-01-27 16: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"
...@@ -30,6 +30,10 @@ msgstr "" ...@@ -30,6 +30,10 @@ msgstr ""
msgid "There was an error in saving your data." msgid "There was an error in saving your data."
msgstr "" msgstr ""
#: static/js/publisher/views/dashboard.js
msgid "No course run previews are currently available."
msgstr ""
#: static/js/publisher/views/navbar.js #: static/js/publisher/views/navbar.js
msgid "OFF" msgid "OFF"
msgstr "" msgstr ""
......
...@@ -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: 2017-01-27 13:02+0500\n" "POT-Creation-Date: 2017-01-27 16: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"
...@@ -2467,25 +2467,19 @@ msgid "SEO Review" ...@@ -2467,25 +2467,19 @@ msgid "SEO Review"
msgstr "SÉÖ Révïéw Ⱡ'σяєм ιρѕυм ∂σłσ#" 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."
msgstr ""
"Théré äré nö çöürsé rüns märkéd för prévïéw. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, "
"¢σηѕє¢тєтυя #"
#: templates/publisher/dashboard/_preview_ready.html
msgid "" msgid ""
"The list below contains all course runs awaiting course team approval. Once " "The following course run previews are available for course team approval. "
"approved, the marketing team will push the course run. you will be notified " "After the course team approves the preview, the edX marketing team will "
"via email when the course runs are live on the production site." "publish the course run on edx.org. The course team will receive an email "
msgstr "" "message when the course run has been published."
"Thé lïst ßélöw çöntäïns äll çöürsé rüns äwäïtïng çöürsé téäm äppröväl. Önçé " msgstr ""
"äpprövéd, thé märkétïng téäm wïll püsh thé çöürsé rün. ýöü wïll ßé nötïfïéd " "Thé föllöwïng çöürsé rün prévïéws äré äväïläßlé för çöürsé téäm äppröväl. "
"vïä émäïl whén thé çöürsé rüns äré lïvé ön thé prödüçtïön sïté. Ⱡ'σяєм ιρѕυм" "Àftér thé çöürsé téäm äpprövés thé prévïéw, thé édX märkétïng téäm wïll "
" ∂σłσя ѕιт αмєт, ¢σηѕє¢тєтυя α∂ιριѕι¢ιηg єłιт, ѕє∂ ∂σ єιυѕмσ∂ тємρσя " "püßlïsh thé çöürsé rün ön édx.örg. Thé çöürsé téäm wïll réçéïvé än émäïl "
"ιη¢ι∂ι∂υηт υт łαвσяє єт ∂σłσяє мαgηα αłιqυα. υт єηιм α∂ мιηιм νєηιαм, qυιѕ " "méssägé whén thé çöürsé rün häs ßéén püßlïshéd. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт,"
"ησѕтяυ∂ єχєя¢ιтαтιση υłłαм¢σ łαвσяιѕ ηιѕι υт αłιqυιρ єχ єα ¢σммσ∂σ " " ¢σηѕє¢тєтυя α∂ιριѕι¢ιηg єłιт, ѕє∂ ∂σ єιυѕмσ∂ тємρσя ιη¢ι∂ι∂υηт υт łαвσяє єт"
"¢σηѕєqυαт. ∂υιѕ αυтє ιяυяє ∂σłσя ιη яєρяєнєη∂єяιт ιη νσłυρтαтє νєłιт єѕѕє " " ∂σłσяє мαgηα αłιqυα. υт єηιм α∂ мιηιм νєηιαм, qυιѕ ησѕтяυ∂ єχєя¢ιтαтιση "
"¢ιłłυм ∂σłσяє єυ ƒυgιαт ηυłłα ραяιαтυя.#" "υłłαм¢σ łαвσяιѕ ηιѕι υт αłιqυιρ єχ єα ¢σммσ∂σ ¢σηѕєqυαт. ∂υιѕ αυтє#"
#: templates/publisher/dashboard/_preview_ready.html #: templates/publisher/dashboard/_preview_ready.html
msgid "Approved" msgid "Approved"
......
...@@ -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: 2017-01-27 13:02+0500\n" "POT-Creation-Date: 2017-01-27 16: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"
...@@ -36,6 +36,12 @@ msgstr "" ...@@ -36,6 +36,12 @@ msgstr ""
"Théré wäs än érrör ïn sävïng ýöür dätä. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, " "Théré wäs än érrör ïn sävïng ýöür dätä. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, "
"¢σηѕє¢тєтυя#" "¢σηѕє¢тєтυя#"
#: static/js/publisher/views/dashboard.js
msgid "No course run previews are currently available."
msgstr ""
"Nö çöürsé rün prévïéws äré çürréntlý äväïläßlé. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт,"
" ¢σηѕє¢тєтυя α#"
#: static/js/publisher/views/navbar.js #: static/js/publisher/views/navbar.js
msgid "OFF" msgid "OFF"
msgstr "ÖFF Ⱡ'σяєм#" msgstr "ÖFF Ⱡ'σяєм#"
......
...@@ -58,7 +58,8 @@ $(document).ready(function() { ...@@ -58,7 +58,8 @@ $(document).ready(function() {
}); });
$('.data-table-preview').DataTable({ $('.data-table-preview').DataTable({
"autoWidth": false "autoWidth": false,
"oLanguage": { "sEmptyTable": gettext("No course run previews are currently available.") }
}); });
$('.data-table-in-progress').DataTable({ $('.data-table-in-progress').DataTable({
......
...@@ -128,6 +128,10 @@ ...@@ -128,6 +128,10 @@
td { td {
@include text-align(left); @include text-align(left);
} }
.dataTables_empty {
text-align: center;
}
} }
} }
......
{% load i18n %} {% load i18n %}
{% if preview_count == 0 %} <p>
<div class="depth depth-0"> {% trans "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." %}
<p class="empty-courserun-text">{% trans "There are no course runs marked for preview." %}</p> </p>
</div> <div class="table-view">
<table class="data-table-preview display" cellspacing="0" width="100%">
{% else %} <thead>
<p>{% trans "The list below contains all course runs awaiting course team approval. Once approved, the marketing team will push the course run. you will be notified via email when the course runs are live on the production site." %}</p> <tr>
<div class="table-view"> <th role="button">
<table class="data-table-preview display" cellspacing="0" width="100%"> {% trans "Course Name" %}
<thead> </th>
<th role="button">
{% trans "Organization" %}
</th>
<th role="button">
{% trans "Approved" %}
</th>
<th role="button">
{% trans "Preview URL" %}
</th>
</tr>
</thead>
<tbody>
{% for course_run in preview_course_runs %}
<tr> <tr>
<th role="button"> <td id="course-title-{{ course_run.title }}">
{% trans "Course Name" %} <a href="{% url 'publisher:publisher_course_run_detail' course_run.id %}">{{ course_run.title }}</a>
</th> </td>
<th role="button"> <td>
{% trans "Organization" %} {% if course_run.course.organizations.first %}{{ course_run.course.organizations.first.name }}{% endif %}
</th> </td>
<th role="button"> <td>
{% trans "Approved" %} {{ course_run.state }}
</th> </td>
<th role="button"> <td>
{% trans "Preview URL" %} <a target="_blank" href="{{ course_run.preview_url }}">{{ course_run.preview_url }}</a>
</th> </td>
</tr> </tr>
</thead> {% endfor %}
<tbody> </tbody>
{% for course_run in preview_course_runs %} </table>
<tr> </div>
<td id="course-title-{{ course_run.title }}">
<a href="{% url 'publisher:publisher_course_run_detail' course_run.id %}">{{ course_run.title }}</a>
</td>
<td>
{% if course_run.course.organizations.first %}{{ course_run.course.organizations.first.name }}{% endif %}
</td>
<td>
{{ course_run.state }}
</td>
<td>
<a target="_blank" href="{{ course_run.preview_url }}">{{ course_run.preview_url }}</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% 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