@@ -1,16 +1,15 @@
|
|||||||
{% if not course.upcoming %}
|
{% if not course.upcoming %}
|
||||||
<div class="reviews-parent">
|
<div class="reviews-parent">
|
||||||
{% set reviews = course.get_reviews() %}
|
{% set reviews = course.get_reviews() %}
|
||||||
{% if reviews | length or course.is_eligible_to_review(membership) %}
|
|
||||||
<div class="mb-5">
|
<div class="mb-5">
|
||||||
<span class="course-home-headings">Reviews</span>
|
<span class="course-home-headings">Reviews</span>
|
||||||
{% if course.is_eligible_to_review(membership) %}
|
{% if course.is_eligible_to_review(membership) and reviews | length %}
|
||||||
<span class="review-link button is-secondary pull-right">
|
<span class="review-link button is-secondary pull-right">
|
||||||
Write a review
|
Write a review
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
|
||||||
{% if reviews | length %}
|
{% if reviews | length %}
|
||||||
<div class="reviews-section">
|
<div class="reviews-section">
|
||||||
{% for review in reviews %}
|
{% for review in reviews %}
|
||||||
@@ -36,9 +35,20 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="common-card-style thread-card">
|
<div class="common-card-style thread-card">
|
||||||
<span class="text-center"> No Reviews <img src="/assets/community/icons/slash.svg"></span>
|
<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) %}
|
||||||
|
<span class="review-link button is-secondary ml-auto mr-auto mt-3">
|
||||||
|
Write a review
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
@@ -48,7 +58,7 @@
|
|||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<div class="course-home-headings modal-headings">Review</div>
|
<div class="font-weight-bold">Write a Review</div>
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -330,6 +330,11 @@ input[type=checkbox] {
|
|||||||
|
|
||||||
.quiz-label {
|
.quiz-label {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.quiz-label p {
|
||||||
|
display: inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.course-card-wide {
|
.course-card-wide {
|
||||||
@@ -519,7 +524,7 @@ input[type=checkbox] {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding-bottom: 0.5rem;
|
padding-bottom: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chapter-description {
|
.chapter-description {
|
||||||
@@ -637,7 +642,7 @@ input[type=checkbox] {
|
|||||||
|
|
||||||
.course-outline {
|
.course-outline {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 16px 12px 16px;
|
padding: 1rem 0.75rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lessons {
|
.lessons {
|
||||||
@@ -881,8 +886,8 @@ input[type=checkbox] {
|
|||||||
|
|
||||||
.question {
|
.question {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
width: 688px;
|
width: 85%;
|
||||||
margin: auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.question p {
|
.question p {
|
||||||
|
|||||||
@@ -29,8 +29,8 @@
|
|||||||
data-correct="{{ question['is_correct_' + loop.index | string] }}" {% if question.multiple %}
|
data-correct="{{ question['is_correct_' + loop.index | string] }}" {% if question.multiple %}
|
||||||
type="checkbox" {% else %} type="radio" name="{{ question.question | urlencode }}" {% endif %}>
|
type="checkbox" {% else %} type="radio" name="{{ question.question | urlencode }}" {% endif %}>
|
||||||
<img class="empty-checkbox mr-3" />
|
<img class="empty-checkbox mr-3" />
|
||||||
</label>
|
|
||||||
<span class="label-area">{{ frappe.utils.md_to_html(option) }}</span>
|
<span class="label-area">{{ frappe.utils.md_to_html(option) }}</span>
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% set explanation = question['explanation_' + loop.index | string] %}
|
{% set explanation = question['explanation_' + loop.index | string] %}
|
||||||
|
|||||||
@@ -169,7 +169,8 @@ var parse_options = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var add_icon = (element, icon) => {
|
var add_icon = (element, icon) => {
|
||||||
$(element).parent().empty().html(`<img class="mr-3" src="/assets/community/icons/${icon}.svg">`);
|
var label = $(element).parent().find(".label-area p").text();
|
||||||
|
$(element).parent().empty().html(`<img class="mr-3" src="/assets/community/icons/${icon}.svg"> ${label}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
var add_to_local_storage = (quiz_name, current_index, answer, is_correct) => {
|
var add_to_local_storage = (quiz_name, current_index, answer, is_correct) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user