Merge pull request #257 from pateljannat/empty-states
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
{% set site_name = frappe.db.get_single_value("System Settings", "app_name") %}
|
||||
<div class="empty-state">
|
||||
<div class="course-home-headings text-center mb-0" style="color: inherit;">You haven't enrolled for any courses</div>
|
||||
<p class="text-center mb-8">Here are a few courses we recommend for you to get started with {{ site_name }}</p>
|
||||
<p class="small text-center mb-8">Here are a few courses we recommend for you to get started with {{ site_name }}</p>
|
||||
{% set recommended_courses = [course1, course2, course3] %}
|
||||
<div class="cards-parent">
|
||||
{% for recommended_course in recommended_courses %}
|
||||
|
||||
@@ -37,18 +37,19 @@
|
||||
</div>
|
||||
|
||||
{% else %}
|
||||
<div class="common-card-style thread-card">
|
||||
<div class="w-25 text-center" style="margin: 0 auto;">
|
||||
<span class="font-weight-bold"> No Reviews </span>
|
||||
<div class="small">
|
||||
There are no reviews for this course.
|
||||
</div>
|
||||
{% if course.is_eligible_to_review(membership) %}
|
||||
<div class="empty-state text-center">
|
||||
<img class="icon icon-xl" src="/assets/frappe/icons/timeless/message.svg">
|
||||
<div class="course-home-headings mt-4 mb-0" style="color: inherit;"> {{ _("Review the course") }} </div>
|
||||
<div class="small mb-6"> {{ _("Help us improve our course material.") }} </div>
|
||||
{% if course.is_eligible_to_review(membership) %}
|
||||
<span class="review-link button is-secondary ml-auto mr-auto mt-3">
|
||||
Write a review
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% elif frappe.session.user == "Guest" %}
|
||||
<a class="button is-secondary dark-links ml-auto mr-auto mt-3" href="/login?redirect-to=/courses/{{ course.name }}"> {{ _("Login") }} </a>
|
||||
{% elif not membership %}
|
||||
<div class="button is-secondary join-batch ml-auto mr-auto mt-3" data-course="{{ course.name | urlencode }}"> {{ _("Start Learning") }} </div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -113,9 +113,11 @@
|
||||
{% set condition = is_instructor if is_instructor else membership %}
|
||||
{% set doctype, docname = "Course Lesson", lesson.name %}
|
||||
{% set title = "Questions" %}
|
||||
{% set cta_title = "New Question" %}
|
||||
{% set cta_title = "Ask a Question" %}
|
||||
{% set button_name = "Start Learning" %}
|
||||
{% set redirect_to = "/courses/" + course.name %}
|
||||
{% set empty_state_title = "Have a doubt?" %}
|
||||
{% set empty_state_subtitle = "Post it here, our mentors will help you out." %}
|
||||
|
||||
{% include "frappe/templates/discussions/discussions_section.html" %}
|
||||
{% endmacro %}
|
||||
|
||||
Reference in New Issue
Block a user