fix: ui issues
This commit is contained in:
@@ -661,7 +661,7 @@ input[type=checkbox] {
|
|||||||
font-size: var(--text-sm);
|
font-size: var(--text-sm);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
margin-bottom: 3rem;
|
margin-bottom: 2.5rem;
|
||||||
padding-left: 200px;
|
padding-left: 200px;
|
||||||
padding-right: 1rem;
|
padding-right: 1rem;
|
||||||
box-shadow: var(--shadow-sm);
|
box-shadow: var(--shadow-sm);
|
||||||
@@ -764,7 +764,7 @@ input[type=checkbox] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.education-details {
|
.education-details {
|
||||||
margin-top: 3rem;
|
margin-top: 1.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bold-title {
|
.bold-title {
|
||||||
@@ -1661,3 +1661,9 @@ li {
|
|||||||
.help-article {
|
.help-article {
|
||||||
font-size: var(--text-base);
|
font-size: var(--text-base);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.quiz-row {
|
||||||
|
position: relative;
|
||||||
|
color: var(--text-color);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|||||||
@@ -223,7 +223,7 @@
|
|||||||
<!-- Help Article -->
|
<!-- Help Article -->
|
||||||
{% macro HelpArticle() %}
|
{% macro HelpArticle() %}
|
||||||
<div class="help-article">
|
<div class="help-article">
|
||||||
<h3> {{ _("Help Article") }} </h3>
|
<h3> {{ _("Embed Components") }} </h3>
|
||||||
<p>
|
<p>
|
||||||
{{ _("You can add additional content to the lesson using a special syntax. The table below mentions
|
{{ _("You can add additional content to the lesson using a special syntax. The table below mentions
|
||||||
all types of dynamic content that you can add to the lessons and the syntax for the same.") }}
|
all types of dynamic content that you can add to the lessons and the syntax for the same.") }}
|
||||||
@@ -239,11 +239,11 @@
|
|||||||
{{ _("YouTube Video") }}
|
{{ _("YouTube Video") }}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{% raw %} {{ YouTubeVideo("embed_src") }} {% endraw %}
|
{% raw %} {{ YouTubeVideo('Video ID') }} {% endraw %}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span>
|
<span>
|
||||||
{{ _("Copy and paste the syntax in the editor. Replace 'embed_src' with the embed source
|
{{ _("Copy and paste the syntax in the editor. Replace 'Video ID' with the embed source
|
||||||
that YouTube provides. To get the source, follow the steps mentioned below.") }}
|
that YouTube provides. To get the source, follow the steps mentioned below.") }}
|
||||||
</span>
|
</span>
|
||||||
<ul class="p-4">
|
<ul class="p-4">
|
||||||
@@ -265,11 +265,12 @@
|
|||||||
{{ _("Quiz") }}
|
{{ _("Quiz") }}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{% raw %} {{ Quiz("lms_quiz_id") }} {% endraw %}
|
{% raw %} {{ Quiz('Quiz ID') }} {% endraw %}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{% set quiz_link = "<a href='/quizzes'> Quiz List </a>" %}
|
{% set quiz_link = "<a href='/quizzes'> Quiz List </a>" %}
|
||||||
{{ _("Copy and paste the syntax in the editor. Replace 'lms_quiz_id' with the ID of the Quiz. You can get the ID of the quiz from the {0}.").format(quiz_link) }}
|
{{ _("Copy and paste the syntax in the editor. Replace 'Quiz ID' with the Id of the Quiz.
|
||||||
|
You can get the Id of the quiz from the {0}.").format(quiz_link) }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -279,8 +280,10 @@
|
|||||||
|
|
||||||
<!-- Discussions Component -->
|
<!-- Discussions Component -->
|
||||||
{% macro Discussions() %}
|
{% macro Discussions() %}
|
||||||
{% set topics_count = frappe.db.count("Discussion Topic",
|
{% set topics_count = frappe.db.count("Discussion Topic", {
|
||||||
{"reference_doctype": "Course Lesson", "reference_docname": lesson.name}) %}
|
"reference_doctype": "Course Lesson",
|
||||||
|
"reference_docname": lesson.name
|
||||||
|
}) %}
|
||||||
{% set is_instructor = frappe.session.user == course.instructor %}
|
{% set is_instructor = frappe.session.user == course.instructor %}
|
||||||
{% set condition = is_instructor if is_instructor else membership %}
|
{% set condition = is_instructor if is_instructor else membership %}
|
||||||
{% set doctype, docname = _("Course Lesson"), lesson.name %}
|
{% set doctype, docname = _("Course Lesson"), lesson.name %}
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ frappe.ready(() => {
|
|||||||
|
|
||||||
$(".btn-back").click((e) => {
|
$(".btn-back").click((e) => {
|
||||||
window.location.href = window.location.href.split("?")[0];
|
window.location.href = window.location.href.split("?")[0];
|
||||||
})
|
});
|
||||||
|
|
||||||
$(document).on("click", ".copy-link", (e) => {
|
$(document).on("click", ".copy-link", (e) => {
|
||||||
frappe.utils.copy_to_clipboard($(e.currentTarget).data("link"));
|
frappe.utils.copy_to_clipboard($(e.currentTarget).data("link"));
|
||||||
@@ -540,6 +540,11 @@ const build_attachment_table = (file_doc) => {
|
|||||||
|
|
||||||
|
|
||||||
const make_editor = () => {
|
const make_editor = () => {
|
||||||
|
let comment = `<!--
|
||||||
|
{{ YouTubeVideo('Video Id') }}
|
||||||
|
{{ Quiz('Quiz Id') }}
|
||||||
|
-->`
|
||||||
|
|
||||||
this.code_field_group = new frappe.ui.FieldGroup({
|
this.code_field_group = new frappe.ui.FieldGroup({
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
@@ -549,7 +554,7 @@ const make_editor = () => {
|
|||||||
wrap: true,
|
wrap: true,
|
||||||
max_lines: Infinity,
|
max_lines: Infinity,
|
||||||
min_lines: 20,
|
min_lines: 20,
|
||||||
default: $("#body").data("body"),
|
default: $("#body").data("body") || comment,
|
||||||
depends_on: 'eval:doc.type=="Markdown"',
|
depends_on: 'eval:doc.type=="Markdown"',
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
<div class="d-flex justify-content-between option-{{ num }}">
|
<div class="d-flex justify-content-between option-{{ num }}">
|
||||||
<div contenteditable="true" data-placeholder="{{ _('Option') }}"
|
<div contenteditable="true" data-placeholder="{{ _('Option') }}"
|
||||||
class="option-input">{% if option %}{{ option }}{% endif %}</div>
|
class="option-input">{% if option %}{{ option }}{% endif %}</div>
|
||||||
<div contenteditable="true" data-placeholder="{{ _('Explanation') }}"
|
<div contenteditable="true" data-placeholder="{{ _('Explain the option') }}"
|
||||||
class="option-input">{% if explanation %}{{ explanation }}{% endif %}</div>
|
class="option-input">{% if explanation %}{{ explanation }}{% endif %}</div>
|
||||||
<div class="option-checkbox">
|
<div class="option-checkbox">
|
||||||
<input type="checkbox" {% if question['is_correct_' + num] %} checked {% endif %}>
|
<input type="checkbox" {% if question['is_correct_' + num] %} checked {% endif %}>
|
||||||
@@ -68,8 +68,17 @@
|
|||||||
|
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<button class="btn btn-secondary btn-sm btn-question"> {{ _("New Question") }} </button>
|
<button class="btn btn-secondary btn-sm btn-question"> {{ _("New Question") }} </button>
|
||||||
<button class="btn btn-primary btn-sm btn-save-question ml-2
|
|
||||||
{% if not quiz.name %} hide {% endif %}"> {{ _("Save Quiz") }} </button>
|
{% if quiz.name %}
|
||||||
|
<button class="btn btn-secondary btn-sm copy-quiz-id ml-2" data-name="'{{ quiz.name }}'">
|
||||||
|
{{ _("Copy Quiz ID") }}
|
||||||
|
</button>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<button class="btn btn-primary btn-sm btn-save-question ml-2 {% if not quiz.name %} hide {% endif %}">
|
||||||
|
{{ _("Save Quiz") }}
|
||||||
|
</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|||||||
@@ -8,7 +8,11 @@ frappe.ready(() => {
|
|||||||
save_question(e);
|
save_question(e);
|
||||||
});
|
});
|
||||||
|
|
||||||
get_questions()
|
$(".copy-quiz-id").click((e) => {
|
||||||
|
frappe.utils.copy_to_clipboard($(e.currentTarget).data("name"));
|
||||||
|
});
|
||||||
|
|
||||||
|
get_questions();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -54,6 +58,7 @@ const save_question = (e) => {
|
|||||||
if (!$("#quiz-title").text()) {
|
if (!$("#quiz-title").text()) {
|
||||||
frappe.throw(__("Quiz Title is mandatory."));
|
frappe.throw(__("Quiz Title is mandatory."));
|
||||||
}
|
}
|
||||||
|
|
||||||
frappe.call({
|
frappe.call({
|
||||||
method: "lms.lms.doctype.lms_quiz.lms_quiz.save_quiz",
|
method: "lms.lms.doctype.lms_quiz.lms_quiz.save_quiz",
|
||||||
args: {
|
args: {
|
||||||
|
|||||||
@@ -15,26 +15,37 @@
|
|||||||
{% if quiz_list | length %}
|
{% if quiz_list | length %}
|
||||||
<a class="btn btn-secondary btn-sm pull-right" href="/quizzes/new-quiz"> {{ _("Add Quiz") }} </a>
|
<a class="btn btn-secondary btn-sm pull-right" href="/quizzes/new-quiz"> {{ _("Add Quiz") }} </a>
|
||||||
<div class="course-home-headings"> {{ _("Quiz List") }} </div>
|
<div class="course-home-headings"> {{ _("Quiz List") }} </div>
|
||||||
|
|
||||||
<div class="common-card-style">
|
<div class="common-card-style">
|
||||||
<table class="table">
|
<table class="table">
|
||||||
|
|
||||||
<tr style="background-color: var(--fg-hover-color); font-weight: bold">
|
<tr style="background-color: var(--fg-hover-color); font-weight: bold">
|
||||||
<td style="width: 10%;"> {{ _("No.") }} </td>
|
<td style="width: 10%;"> {{ _("No.") }} </td>
|
||||||
<td style="width: 45%;"> {{ _("Title") }} </td>
|
<td style="width: 45%;"> {{ _("Title") }} </td>
|
||||||
<td> {{ _("ID") }} </td>
|
<td> {{ _("ID") }} </td>
|
||||||
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
{% for quiz in quiz_list %}
|
{% for quiz in quiz_list %}
|
||||||
<tr style="position: relative; color: var(--text-color);">
|
<tr class="quiz-row" data-name="{{ quiz.name }}">
|
||||||
<td> {{ loop.index }} </td>
|
<td> {{ loop.index }} </td>
|
||||||
<td>
|
<td>
|
||||||
<a class="button-links" href="/quizzes/{{ quiz.name }}">{{ quiz.title }}</a>
|
{{ quiz.title }}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a class="button-links" href="/quizzes/{{ quiz.name }}">{{ quiz.name }}</a>
|
{{ quiz.name }}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a class="btn btn-secondary btn-sm copy-quiz-id" data-name="'{{ quiz.name }}'">
|
||||||
|
{{ _("Copy Quiz ID") }}
|
||||||
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="empty-state">
|
<div class="empty-state">
|
||||||
<div class="empty-state-text">
|
<div class="empty-state-text">
|
||||||
@@ -42,7 +53,8 @@
|
|||||||
<div class="course-meta mb-6">{{ _("Create a quiz and add it to your course to engage users.") }}</div>
|
<div class="course-meta mb-6">{{ _("Create a quiz and add it to your course to engage users.") }}</div>
|
||||||
<a class="btn btn-secondary btn-sm"
|
<a class="btn btn-secondary btn-sm"
|
||||||
href="{% if frappe.session.user == 'Guest' %} /login?redirect-to=/quizzes {% else %} /quizzes/new-quiz {% endif %}">
|
href="{% if frappe.session.user == 'Guest' %} /login?redirect-to=/quizzes {% else %} /quizzes/new-quiz {% endif %}">
|
||||||
{{ _("Add Quiz") }} </a>
|
{{ _("Add Quiz") }}
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -50,3 +62,22 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
{% block script %}
|
||||||
|
<script>
|
||||||
|
frappe.ready(() => {
|
||||||
|
|
||||||
|
$(".copy-quiz-id").click((e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
frappe.utils.copy_to_clipboard($(e.currentTarget).data("name"));
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".quiz-row").click((e) => {
|
||||||
|
if (!$(e.target).hasClass("copy-quiz-id")) {
|
||||||
|
window.location.href = `/quizzes/${$(e.currentTarget).data('name')}`;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
||||||
|
|||||||
@@ -114,7 +114,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="course-image-attachment {% if not course.image %} hide {% endif %} ">
|
<div class="course-image-attachment {% if not course.image %} hide {% endif %} ">
|
||||||
<a href="{{ course.image }}" id="image" target="_blank"> {{ course.image }} </a>
|
<a {% if course.image %} href="{{ course.image }}" {% endif %} id="image" target="_blank">
|
||||||
|
{{ course.image }}
|
||||||
|
</a>
|
||||||
<button class="btn btn-sm btn-default btn-clear ml-4"> {{ _("Clear") }} </button>
|
<button class="btn btn-sm btn-default btn-clear ml-4"> {{ _("Clear") }} </button>
|
||||||
</div>
|
</div>
|
||||||
<a class="btn btn-default btn-sm btn-attach mt-1 {% if course.image %} hide {% endif %}"> {{ _("Attach Image") }} </a>
|
<a class="btn btn-default btn-sm btn-attach mt-1 {% if course.image %} hide {% endif %}"> {{ _("Attach Image") }} </a>
|
||||||
|
|||||||
@@ -329,6 +329,7 @@ const add_tag = (e) => {
|
|||||||
const save_course = (e) => {
|
const save_course = (e) => {
|
||||||
let tags = $('.course-card-pills').map((i, el) => $(el).text().trim()).get();
|
let tags = $('.course-card-pills').map((i, el) => $(el).text().trim()).get();
|
||||||
tags = tags.filter(word => word.trim().length > 0);
|
tags = tags.filter(word => word.trim().length > 0);
|
||||||
|
|
||||||
frappe.call({
|
frappe.call({
|
||||||
method: "lms.lms.doctype.lms_course.lms_course.save_course",
|
method: "lms.lms.doctype.lms_course.lms_course.save_course",
|
||||||
args: {
|
args: {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
{% if show_creators_section %}
|
{% if show_creators_section %}
|
||||||
<a class="btn btn-secondary btn-md pull-right" id="create-course-link" href="/courses/new-course">
|
<a class="btn btn-secondary btn-sm pull-right" id="create-course-link" href="/courses/new-course">
|
||||||
{{ _("Create a Course") }}
|
{{ _("Create a Course") }}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -3,9 +3,11 @@
|
|||||||
<meta name="description" content="{{ member.full_name }}" />
|
<meta name="description" content="{{ member.full_name }}" />
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="common-page-style profile-page">
|
<div class="common-page-style profile-page">
|
||||||
{{ ProfileBanner(member) }}
|
{{ ProfileBanner(member) }}
|
||||||
|
|
||||||
<div class="profile-page-body">
|
<div class="profile-page-body">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{% set read_only = member.name != frappe.session.user %}
|
{% set read_only = member.name != frappe.session.user %}
|
||||||
@@ -18,6 +20,7 @@
|
|||||||
{{ CareerPreference(member) }}
|
{{ CareerPreference(member) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{{ CoursesCreated(member, read_only) }}
|
{{ CoursesCreated(member, read_only) }}
|
||||||
{{ CoursesMentored(member, read_only) }}
|
{{ CoursesMentored(member, read_only) }}
|
||||||
@@ -26,16 +29,20 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Banner -->
|
||||||
{% macro ProfileBanner(member) %}
|
{% macro ProfileBanner(member) %}
|
||||||
{% set cover_image = member.cover_image if member.cover_image else "/assets/lms/images/profile-banner.png" %}
|
{% set cover_image = member.cover_image if member.cover_image else "/assets/lms/images/profile-banner.png" %}
|
||||||
{% set enrollment = get_course_membership(frappe.session.user, member_type="Student") | length %}
|
{% set enrollment = get_course_membership(frappe.session.user, member_type="Student") | length %}
|
||||||
{% set enrollment_suffix = _("Courses") if enrollment > 1 else _("Course") %}
|
{% set enrollment_suffix = _("Courses") if enrollment > 1 else _("Course") %}
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="profile-banner" style="background-image: url({{ cover_image }})">
|
<div class="profile-banner" style="background-image: url({{ cover_image }})">
|
||||||
<div class="profile-avatar">
|
<div class="profile-avatar">
|
||||||
{{ widgets.Avatar(member=member, avatar_class="avatar-square") }}
|
{{ widgets.Avatar(member=member, avatar_class="avatar-square") }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="profile-info">
|
<div class="profile-info">
|
||||||
<div class="profile-name-section">
|
<div class="profile-name-section">
|
||||||
<div class="profile-name"> {{ member.full_name }} </div>
|
<div class="profile-name"> {{ member.full_name }} </div>
|
||||||
@@ -49,7 +56,10 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if frappe.session.user == member.email %}
|
{% if frappe.session.user == member.email %}
|
||||||
<a class="button is-secondary ml-auto mt-1" href="/edit-profile?name={{ member.email }}"> {{ _("Edit Profile") }} </a>
|
<div class="ml-auto mt-1">
|
||||||
|
<a class="btn btn-secondary btn-sm" href="/dashboard"> {{ _("Visit Dashboard") }} </a>
|
||||||
|
<a class="btn btn-secondary btn-sm ml-2" href="/edit-profile?name={{ member.email }}"> {{ _("Edit Profile") }} </a>
|
||||||
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -61,16 +71,19 @@
|
|||||||
{% if enrollment %}
|
{% if enrollment %}
|
||||||
<div class="course-meta">
|
<div class="course-meta">
|
||||||
<img src="/assets/lms/icons/book_plain.svg">
|
<img src="/assets/lms/icons/book_plain.svg">
|
||||||
{{ enrollment }} {{ enrollment_suffix }} {{ _("taken") }} </div>
|
{{ enrollment }} {{ enrollment_suffix }} {{ _("taken") }}
|
||||||
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Courses Created -->
|
||||||
{% macro CoursesCreated(member, read_only) %}
|
{% macro CoursesCreated(member, read_only) %}
|
||||||
{% set authored_courses = get_authored_courses(member.name) %}
|
{% set authored_courses = get_authored_courses(member.name) %}
|
||||||
|
|
||||||
{% if authored_courses | length %}
|
{% if authored_courses | length %}
|
||||||
<div class="profile-courses">
|
<div class="profile-courses">
|
||||||
<div class="course-home-headings"> {{ _("Courses Created") }} </div>
|
<div class="course-home-headings"> {{ _("Courses Created") }} </div>
|
||||||
@@ -83,6 +96,8 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Courses Mentored -->
|
||||||
{% macro CoursesMentored(member, read_only) %}
|
{% macro CoursesMentored(member, read_only) %}
|
||||||
{% if member.get_mentored_courses() | length %}
|
{% if member.get_mentored_courses() | length %}
|
||||||
<div class="profile-courses">
|
<div class="profile-courses">
|
||||||
@@ -96,6 +111,8 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Courses Enrolled -->
|
||||||
{% macro CoursesEnrolled(member, read_only) %}
|
{% macro CoursesEnrolled(member, read_only) %}
|
||||||
{% set enrolled = get_enrolled_courses() %}
|
{% set enrolled = get_enrolled_courses() %}
|
||||||
|
|
||||||
@@ -120,9 +137,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Profile Tabs Extension -->
|
||||||
{% macro ProfileTabs(profile_tabs) %}
|
{% macro ProfileTabs(profile_tabs) %}
|
||||||
<div>
|
<div>
|
||||||
{% for tab in profile_tabs %}
|
{% for tab in profile_tabs %}
|
||||||
@@ -136,6 +154,8 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
|
|
||||||
|
<!-- About Section -->
|
||||||
{% macro About(member) %}
|
{% macro About(member) %}
|
||||||
{% if member.bio %}
|
{% if member.bio %}
|
||||||
<div class="">
|
<div class="">
|
||||||
@@ -147,6 +167,8 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Work Preference -->
|
||||||
{% macro WorkPreference(member) %}
|
{% macro WorkPreference(member) %}
|
||||||
<div class="education-details">
|
<div class="education-details">
|
||||||
<div class="common-card-style profile-card">
|
<div class="common-card-style profile-card">
|
||||||
@@ -161,12 +183,16 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Career Preference -->
|
||||||
{% macro CareerPreference(member) %}
|
{% macro CareerPreference(member) %}
|
||||||
{% if member.preferred_functions or member.preferred_industries or member.preferred_location or member.dream_companies %}
|
{% if member.preferred_functions or member.preferred_industries or member.preferred_location or member.dream_companies %}
|
||||||
<div class="education-details">
|
<div class="education-details">
|
||||||
<div class="common-card-style profile-card">
|
<div class="common-card-style profile-card">
|
||||||
|
|
||||||
<div class="course-home-headings"> {{ _("Career Preference") }} </div>
|
<div class="course-home-headings"> {{ _("Career Preference") }} </div>
|
||||||
<div class="profile-column-grid">
|
<div class="profile-column-grid">
|
||||||
|
|
||||||
{% if member.preferred_functions | length %}
|
{% if member.preferred_functions | length %}
|
||||||
<div>
|
<div>
|
||||||
<b>{{ _("Preferred Functions:") }}</b>
|
<b>{{ _("Preferred Functions:") }}</b>
|
||||||
@@ -198,13 +224,15 @@
|
|||||||
<div class="description"> {{ member.dream_companies }} </div>
|
<div class="description"> {{ member.dream_companies }} </div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Contact Section -->
|
||||||
{% macro Contact(member) %}
|
{% macro Contact(member) %}
|
||||||
{% if member.linkedin or member.medium or member.github %}
|
{% if member.linkedin or member.medium or member.github %}
|
||||||
<div class="education-details">
|
<div class="education-details">
|
||||||
@@ -236,6 +264,8 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Skills -->
|
||||||
{% macro Skills(member) %}
|
{% macro Skills(member) %}
|
||||||
{% if member.skill | length %}
|
{% if member.skill | length %}
|
||||||
<div class="education-details">
|
<div class="education-details">
|
||||||
@@ -251,11 +281,14 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Education Details -->
|
||||||
{% macro EducationDetails(member) %}
|
{% macro EducationDetails(member) %}
|
||||||
{% if member.education %}
|
{% if member.education %}
|
||||||
<div class="education-details">
|
<div class="education-details">
|
||||||
<div class="common-card-style profile-card">
|
<div class="common-card-style profile-card">
|
||||||
<div class="course-home-headings"> {{ _("Education") }} </div>
|
<div class="course-home-headings"> {{ _("Education") }} </div>
|
||||||
|
|
||||||
<div class="profile-grid-card">
|
<div class="profile-grid-card">
|
||||||
{% for edu in member.education %}
|
{% for edu in member.education %}
|
||||||
<div class="profile-card-row">
|
<div class="profile-card-row">
|
||||||
@@ -266,44 +299,61 @@
|
|||||||
{% if edu.grade %} <span></span> {{ edu.grade }} {% endif %}
|
{% if edu.grade %} <span></span> {{ edu.grade }} {% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="description">
|
<div class="description">
|
||||||
{% if edu.start_date %}
|
{% if edu.start_date %}
|
||||||
{{ frappe.utils.format_date(edu.start_date, "MMM YYYY") }} -
|
{{ frappe.utils.format_date(edu.start_date, "MMM YYYY") }} -
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ frappe.utils.format_date(edu.end_date, "MMM YYYY") }} </div>
|
{{ frappe.utils.format_date(edu.end_date, "MMM YYYY") }}
|
||||||
|
</div>
|
||||||
<div class="description"> {{ edu.location }} </div>
|
<div class="description"> {{ edu.location }} </div>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Work Details -->
|
||||||
{% macro WorkDetails(member) %}
|
{% macro WorkDetails(member) %}
|
||||||
{% set work_details = member.work_experience + member.internship %}
|
{% set work_details = member.work_experience + member.internship %}
|
||||||
|
|
||||||
{% if work_details | length %}
|
{% if work_details | length %}
|
||||||
<div class="education-details">
|
<div class="education-details">
|
||||||
<div class="common-card-style profile-card">
|
<div class="common-card-style profile-card">
|
||||||
<div class="course-home-headings"> {{ _("Work Experience") }} </div>
|
<div class="course-home-headings"> {{ _("Work Experience") }} </div>
|
||||||
<div class="profile-grid-card">
|
<div class="profile-grid-card">
|
||||||
|
|
||||||
{% for work in work_details %}
|
{% for work in work_details %}
|
||||||
<div class="">
|
<div class="">
|
||||||
<div class="bold-title"> {{ work.title }} </div>
|
<div class="bold-title"> {{ work.title }} </div>
|
||||||
<div class="profile-item"> {{ work.company }} </div>
|
<div class="profile-item"> {{ work.company }} </div>
|
||||||
<div class="description"> {{ frappe.utils.format_date(work.from_date, "MMM YYYY") }} -
|
<div class="description">
|
||||||
{% if work.to_date %} {{ frappe.utils.format_date(work.to_date, "MMM YYYY") }} {% else %} Present {% endif %} </div>
|
{{ frappe.utils.format_date(work.from_date, "MMM YYYY") }} -
|
||||||
|
{% if work.to_date %} {{ frappe.utils.format_date(work.to_date, "MMM YYYY") }}
|
||||||
|
{% else %} Present {% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="description"> {{ work.location }} </div>
|
<div class="description"> {{ work.location }} </div>
|
||||||
{% if work.description %} <div class="profile-item"> {{ work.description }} </div> {% endif %}
|
|
||||||
|
{% if work.description %}
|
||||||
|
<div class="profile-item">
|
||||||
|
{{ work.description }}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Certifications -->
|
||||||
{% macro Certification(member) %}
|
{% macro Certification(member) %}
|
||||||
{% if member.certification %}
|
{% if member.certification %}
|
||||||
<div class="education-details">
|
<div class="education-details">
|
||||||
@@ -312,20 +362,32 @@
|
|||||||
<div class="profile-grid-card">
|
<div class="profile-grid-card">
|
||||||
{% for cert in member.certification %}
|
{% for cert in member.certification %}
|
||||||
<div class="">
|
<div class="">
|
||||||
|
|
||||||
<div class="bold-title"> {{ cert.certification_name }} </div>
|
<div class="bold-title"> {{ cert.certification_name }} </div>
|
||||||
<div class="profile-item"> {{ cert.organization }} </div>
|
<div class="profile-item"> {{ cert.organization }} </div>
|
||||||
<div class="description"> {{ frappe.utils.format_date(cert.issue_date, "MMM YYYY") }}
|
|
||||||
{% if cert.expiration_date %} - {{ frappe.utils.format_date(cert.expiration_date, "MMM YYYY") }} {% endif %} </div>
|
<div class="description">
|
||||||
{% if cert.description %} <div class="profile-item"> {{ cert.description }} </div> {% endif %}
|
{{ frappe.utils.format_date(cert.issue_date, "MMM YYYY") }}
|
||||||
|
{% if cert.expiration_date %}
|
||||||
|
- {{ frappe.utils.format_date(cert.expiration_date, "MMM YYYY") }}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% if cert.description %}
|
||||||
|
<div class="profile-item">
|
||||||
|
{{ cert.description }}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
|
|
||||||
{% block script %}
|
{% block script %}
|
||||||
<script>
|
<script>
|
||||||
frappe.ready(() => {
|
frappe.ready(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user