fix: subtitle field for testimonial and course cards
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
<div>
|
||||
{% include "public/icons/symbol-defs.svg" %}
|
||||
<h2 class="section-title">{{ _(title) }}</h2>
|
||||
{% if subtitle %}
|
||||
<p> {{ _(subtitle) }} </p>
|
||||
{% endif %}
|
||||
<div class="cards-parent mt-10">
|
||||
{% for course_row in courses %}
|
||||
{% set course = frappe.db.get_value("LMS Course", course_row.course,
|
||||
|
||||
@@ -5,21 +5,25 @@
|
||||
"doctype": "Web Template",
|
||||
"fields": [
|
||||
{
|
||||
"__unsaved": 1,
|
||||
"fieldname": "title",
|
||||
"fieldtype": "Data",
|
||||
"label": "Title",
|
||||
"reqd": 0
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"__unsaved": 1,
|
||||
"fieldname": "subtitle",
|
||||
"fieldtype": "Small Text",
|
||||
"label": "Subtitle",
|
||||
"reqd": 0
|
||||
},
|
||||
{
|
||||
"fieldname": "courses",
|
||||
"fieldtype": "Table Break",
|
||||
"label": "Courses",
|
||||
"reqd": 0
|
||||
},
|
||||
{
|
||||
"__unsaved": 1,
|
||||
"fieldname": "course",
|
||||
"fieldtype": "Link",
|
||||
"label": "Course",
|
||||
@@ -27,8 +31,8 @@
|
||||
"reqd": 0
|
||||
}
|
||||
],
|
||||
"idx": 0,
|
||||
"modified": "2021-08-26 10:35:35.903834",
|
||||
"idx": 2,
|
||||
"modified": "2022-06-28 17:15:55.981008",
|
||||
"modified_by": "Administrator",
|
||||
"module": "LMS",
|
||||
"name": "Course Cards",
|
||||
|
||||
@@ -1,17 +1,25 @@
|
||||
<h3 class="section-title text-center mb-10">{{ _(title) }}</h3>
|
||||
<div id="carouselExampleControls" class="carousel slide" data-ride="carousel" data-interval="5000">
|
||||
<div class="text-center mb-10">
|
||||
<h3 class="section-title">{{ _(title) }}</h3>
|
||||
{% if subtitle %}
|
||||
<p class="section-subtitle"> {{ _(subtitle) }} </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<!-- data-ride="carousel" data-interval="5000" -->
|
||||
<div id="carouselExampleControls" class="carousel slide">
|
||||
<div class="carousel-inner">
|
||||
|
||||
{% for testimonial_row in testimonials_table %}
|
||||
{% set review = frappe.db.get_value("LMS Course Review", testimonial_row.testimonials, ["owner", "review"], as_dict=True) %}
|
||||
{% set member = frappe.db.get_value("User", review.owner, ["name", "username", "full_name", "user_image", "headline"], as_dict=True) %}
|
||||
<div class="testimonial carousel-item {% if loop.index == 1 %} active {% endif %} ">
|
||||
{{ widgets.Avatar(member=member, avatar_class="avatar-large") }}
|
||||
<div class="testimonial-content">
|
||||
“{{ review.review }}”
|
||||
</div>
|
||||
<div class="testimonial-by">
|
||||
{{ member.full_name }}
|
||||
<div class="common-card-style p-10" style="width: 70%; margin: 0 auto;">
|
||||
{{ widgets.Avatar(member=member, avatar_class="avatar-large") }}
|
||||
<div class="ml-10">
|
||||
<div class="">“{{ review.review }}”</div>
|
||||
<div class="mt-2">
|
||||
- {{ member.full_name }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
@@ -8,6 +8,12 @@
|
||||
"fieldname": "title",
|
||||
"fieldtype": "Data",
|
||||
"label": "Title",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "subtitle",
|
||||
"fieldtype": "Small Text",
|
||||
"label": "Subtitle",
|
||||
"reqd": 0
|
||||
},
|
||||
{
|
||||
@@ -25,7 +31,7 @@
|
||||
}
|
||||
],
|
||||
"idx": 1,
|
||||
"modified": "2022-03-21 11:52:27.728610",
|
||||
"modified": "2022-06-28 17:16:39.614879",
|
||||
"modified_by": "Administrator",
|
||||
"module": "LMS",
|
||||
"name": "Multiple Testimonials",
|
||||
|
||||
Reference in New Issue
Block a user