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):
""" 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)
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)
def test_without_preview_ready_course_runs(self):
......@@ -1239,7 +1239,6 @@ class DashboardTests(TestCase):
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=3, published_count=1)
self.assertContains(response, 'There are no course runs marked for preview.')
self._assert_tabs_with_roles(response)
def test_without_preview_url(self):
......@@ -1247,7 +1246,6 @@ class DashboardTests(TestCase):
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=3, published_count=1)
self.assertContains(response, 'There are no course runs marked for preview.')
self._assert_tabs_with_roles(response)
def test_with_in_progress_course_runs(self):
......
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -2115,14 +2115,11 @@ msgid "SEO Review"
msgstr ""
#: templates/publisher/dashboard/_preview_ready.html
msgid "There are no course runs marked for preview."
msgstr ""
#: templates/publisher/dashboard/_preview_ready.html
msgid ""
"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."
"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/_preview_ready.html
......
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -30,6 +30,10 @@ msgstr ""
msgid "There was an error in saving your data."
msgstr ""
#: static/js/publisher/views/dashboard.js
msgid "No course run previews are currently available."
msgstr ""
#: static/js/publisher/views/navbar.js
msgid "OFF"
msgstr ""
......
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -2467,25 +2467,19 @@ msgid "SEO Review"
msgstr "SÉÖ Révïéw Ⱡ'σяєм ιρѕυм ∂σłσ#"
#: 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 ""
"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."
msgstr ""
"Thé lïst ßélöw çöntäïns äll çöürsé rüns äwäïtïng çöürsé téäm äppröväl. Önçé "
"äpprövéd, thé märkétïng téäm wïll püsh thé çöürsé rün. ýöü wïll ßé nötïfïéd "
"vïä émäïl whén thé çöürsé rüns äré lïvé ön thé prödüçtïön sïté. Ⱡ'σяєм ιρѕυм"
" ∂σłσя ѕιт αмєт, ¢σηѕє¢тєтυя α∂ιριѕι¢ιηg єłιт, ѕє∂ ∂σ єιυѕмσ∂ тємρσя "
"ιη¢ι∂ι∂υηт υт łαвσяє єт ∂σłσяє мαgηα αłιqυα. υт єηιм α∂ мιηιм νєηιαм, qυιѕ "
"ησѕтяυ∂ єχєя¢ιтαтιση υłłαм¢σ łαвσяιѕ ηιѕι υт αłιqυιρ єχ єα ¢σммσ∂σ "
"¢σηѕєqυαт. ∂υιѕ αυтє ιяυяє ∂σłσя ιη яєρяєнєη∂єяιт ιη νσłυρтαтє νєłιт єѕѕє "
"¢ιłłυм ∂σłσяє єυ ƒυgιαт ηυłłα ραяιαтυя.#"
"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/_preview_ready.html
msgid "Approved"
......
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -36,6 +36,12 @@ msgstr ""
"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
msgid "OFF"
msgstr "ÖFF Ⱡ'σяєм#"
......
......@@ -58,7 +58,8 @@ $(document).ready(function() {
});
$('.data-table-preview').DataTable({
"autoWidth": false
"autoWidth": false,
"oLanguage": { "sEmptyTable": gettext("No course run previews are currently available.") }
});
$('.data-table-in-progress').DataTable({
......
......@@ -128,6 +128,10 @@
td {
@include text-align(left);
}
.dataTables_empty {
text-align: center;
}
}
}
......
{% load i18n %}
{% if preview_count == 0 %}
<div class="depth depth-0">
<p class="empty-courserun-text">{% trans "There are no course runs marked for preview." %}</p>
</div>
{% else %}
<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>
<div class="table-view">
<table class="data-table-preview display" cellspacing="0" width="100%">
<thead>
<p>
{% 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>
<div class="table-view">
<table class="data-table-preview display" cellspacing="0" width="100%">
<thead>
<tr>
<th role="button">
{% trans "Course Name" %}
</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>
<th role="button">
{% trans "Course Name" %}
</th>
<th role="button">
{% trans "Organization" %}
</th>
<th role="button">
{% trans "Approved" %}
</th>
<th role="button">
{% trans "Preview URL" %}
</th>
<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>
</thead>
<tbody>
{% for course_run in preview_course_runs %}
<tr>
<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 %}
{% endfor %}
</tbody>
</table>
</div>
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