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