Merge branch 'main' into main
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://www.frappelms.com/">
|
<a href="https://www.frappelms.com/">
|
||||||
<img src="https://frappelms.com/files/lms-logo-medium.png" alt="Frappe LMS" width="120px" height="25px">
|
<img src="https://frappe.io/files/lms.png" alt="Frappe LMS" width="50px" height="50px">
|
||||||
</a>
|
</a>
|
||||||
<p align="center">Easy to use, open source, learning management system.</p>
|
<p align="center">Easy to use, open source, learning management system.</p>
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
$ git clone https://github.com/frappe/lms.git
|
$ git clone https://github.com/frappe/lms.git
|
||||||
|
|
||||||
$ cd lms
|
$ cd lms
|
||||||
|
|
||||||
|
$ cd docker
|
||||||
```
|
```
|
||||||
|
|
||||||
**Step 2:** Run docker-compose
|
**Step 2:** Run docker-compose
|
||||||
|
|||||||
@@ -173,7 +173,8 @@ website_route_rules = [
|
|||||||
"to_route": "cohorts/join",
|
"to_route": "cohorts/join",
|
||||||
},
|
},
|
||||||
{"from_route": "/users", "to_route": "profiles/profile"},
|
{"from_route": "/users", "to_route": "profiles/profile"},
|
||||||
{"from_route": "/jobs/<job>", "to_route": "jobs/job"},
|
{"from_route": "/job-openings", "to_route": "jobs_openings/index"},
|
||||||
|
{"from_route": "/job-openings/<job>", "to_route": "jobs_openings/job"},
|
||||||
{
|
{
|
||||||
"from_route": "/batches/<batchname>/students/<username>",
|
"from_route": "/batches/<batchname>/students/<username>",
|
||||||
"to_route": "/batches/progress",
|
"to_route": "/batches/progress",
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ def add_pages_to_nav():
|
|||||||
{"label": "Courses", "url": "/courses", "parent": "Explore", "idx": 2},
|
{"label": "Courses", "url": "/courses", "parent": "Explore", "idx": 2},
|
||||||
{"label": "Batches", "url": "/batches", "parent": "Explore", "idx": 3},
|
{"label": "Batches", "url": "/batches", "parent": "Explore", "idx": 3},
|
||||||
{"label": "Statistics", "url": "/statistics", "parent": "Explore", "idx": 4},
|
{"label": "Statistics", "url": "/statistics", "parent": "Explore", "idx": 4},
|
||||||
{"label": "Jobs", "url": "/jobs", "parent": "Explore", "idx": 5},
|
{"label": "Jobs", "url": "/job-openings", "parent": "Explore", "idx": 5},
|
||||||
{"label": "People", "url": "/community", "parent": "Explore", "idx": 6},
|
{"label": "People", "url": "/community", "parent": "Explore", "idx": 6},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,6 @@
|
|||||||
frappe.ui.form.on("Job Opportunity", {
|
frappe.ui.form.on("Job Opportunity", {
|
||||||
refresh: (frm) => {
|
refresh: (frm) => {
|
||||||
if (frm.doc.name)
|
if (frm.doc.name)
|
||||||
frm.add_web_link(`/jobs/${frm.doc.name}`, "See on Website");
|
frm.add_web_link(`/job-openings/${frm.doc.name}`, "See on Website");
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
frappe.ready(function () {
|
frappe.ready(function () {
|
||||||
frappe.web_form.after_save = () => {
|
frappe.web_form.after_save = () => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
window.location.href = `/jobs`;
|
window.location.href = `/job-openings`;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
"list_columns": [],
|
"list_columns": [],
|
||||||
"login_required": 1,
|
"login_required": 1,
|
||||||
"max_attachment_size": 0,
|
"max_attachment_size": 0,
|
||||||
"modified": "2022-09-15 17:22:43.957184",
|
"modified": "2022-09-15 17:22:43.957185",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Job",
|
"module": "Job",
|
||||||
"name": "job-opportunity",
|
"name": "job-opportunity",
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
"show_list": 1,
|
"show_list": 1,
|
||||||
"show_sidebar": 0,
|
"show_sidebar": 0,
|
||||||
"success_message": "",
|
"success_message": "",
|
||||||
"success_url": "/jobs",
|
"success_url": "/job-openings",
|
||||||
"title": "Job Opportunity",
|
"title": "Job Opportunity",
|
||||||
"web_form_fields": [
|
"web_form_fields": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,9 +1,23 @@
|
|||||||
# Copyright (c) 2022, Frappe and contributors
|
# Copyright (c) 2022, Frappe and contributors
|
||||||
# For license information, please see license.txt
|
# For license information, please see license.txt
|
||||||
|
|
||||||
# import frappe
|
import frappe
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
|
||||||
class BatchStudent(Document):
|
class BatchStudent(Document):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
@frappe.whitelist()
|
||||||
|
def enroll_batch(batch_name):
|
||||||
|
if frappe.db.exists(
|
||||||
|
"Batch Student", {"student": frappe.session.user, "parent": batch_name}
|
||||||
|
):
|
||||||
|
frappe.throw("You are already enrolled in this batch")
|
||||||
|
enrollment = frappe.new_doc("Batch Student")
|
||||||
|
enrollment.student = frappe.session.user
|
||||||
|
enrollment.parent = batch_name
|
||||||
|
enrollment.parentfield = "students"
|
||||||
|
enrollment.parenttype = "LMS Batch"
|
||||||
|
enrollment.save(ignore_permissions=True)
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
"start_time",
|
"start_time",
|
||||||
"end_time",
|
"end_time",
|
||||||
"published",
|
"published",
|
||||||
|
"allow_self_enrollment",
|
||||||
"section_break_rgfj",
|
"section_break_rgfj",
|
||||||
"medium",
|
"medium",
|
||||||
"category",
|
"category",
|
||||||
@@ -293,11 +294,17 @@
|
|||||||
"fieldname": "amount_usd",
|
"fieldname": "amount_usd",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"label": "Amount (USD)"
|
"label": "Amount (USD)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "0",
|
||||||
|
"fieldname": "allow_self_enrollment",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"label": "Allow Self Enrollment"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2023-12-21 12:27:16.849362",
|
"modified": "2024-01-22 10:42:42.872995",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "LMS",
|
"module": "LMS",
|
||||||
"name": "LMS Batch",
|
"name": "LMS Batch",
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
"event": "Days Before",
|
"event": "Days Before",
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"is_standard": 1,
|
"is_standard": 1,
|
||||||
"message": "{% set title = frappe.db.get_value(\"LMS Course\", doc.course, \"title\") %}\n\n<p> {{ _('Your evaluation for the course ${0} has been scheduled on ${1} at ${2}.').format(title, frappe.utils.format_date(doc.date, \"medium\"), frappe.utils.format_time(doc.start_time, \"short\")) }}</p>\n\n<p> {{ _(\"Please prepare well and be on time for the evaluations.\") }} </p>\n",
|
"message": "{% set title = frappe.db.get_value(\"LMS Course\", doc.course, \"title\") %}\n\n<p> {{ _('Your evaluation for the course {0} has been scheduled on {1} at {2}.').format(title, frappe.utils.format_date(doc.date, \"medium\"), frappe.utils.format_time(doc.start_time, \"short\")) }}</p>\n\n<p> {{ _(\"Please prepare well and be on time for the evaluations.\") }} </p>\n",
|
||||||
"message_type": "HTML",
|
"message_type": "HTML",
|
||||||
"modified": "2023-11-29 17:26:53.355501",
|
"modified": "2023-11-29 17:26:53.355501",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
@@ -29,4 +29,4 @@
|
|||||||
"send_system_notification": 0,
|
"send_system_notification": 0,
|
||||||
"send_to_all_assignees": 0,
|
"send_to_all_assignees": 0,
|
||||||
"subject": "Reminder for Certificate Evaluation"
|
"subject": "Reminder for Certificate Evaluation"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,4 +81,5 @@ lms.patches.v1_0.create_batch_source
|
|||||||
|
|
||||||
[post_model_sync]
|
[post_model_sync]
|
||||||
lms.patches.v1_0.batch_tabs_settings
|
lms.patches.v1_0.batch_tabs_settings
|
||||||
execute:frappe.delete_doc("Notification", "Assignment Submission Notification")
|
execute:frappe.delete_doc("Notification", "Assignment Submission Notification")
|
||||||
|
lms.patches.v1_0.change_jobs_url #17-01-2024
|
||||||
15
lms/patches/v1_0/change_jobs_url.py
Normal file
15
lms/patches/v1_0/change_jobs_url.py
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import frappe
|
||||||
|
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
jobs_link = frappe.db.exists(
|
||||||
|
"Top Bar Item",
|
||||||
|
{
|
||||||
|
"label": "Jobs",
|
||||||
|
"url": "/jobs",
|
||||||
|
"parent_label": "Explore",
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
if jobs_link:
|
||||||
|
frappe.db.set_value("Top Bar Item", jobs_link, "url", "/job-openings")
|
||||||
BIN
lms/public/images/lms-logo.png
Normal file
BIN
lms/public/images/lms-logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 43 KiB |
@@ -49,11 +49,14 @@
|
|||||||
<use href="#icon-calendar"></use>
|
<use href="#icon-calendar"></use>
|
||||||
</svg>
|
</svg>
|
||||||
<span>
|
<span>
|
||||||
{{ frappe.utils.format_date(batch_info.start_date, "long") }} -
|
{{ frappe.utils.format_date(batch_info.start_date, "long") }}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
{% if batch_info.start_date != batch_info.end_date %}
|
||||||
<span>
|
<span>
|
||||||
{{ frappe.utils.format_date(batch_info.end_date, "long") }}
|
- {{ frappe.utils.format_date(batch_info.end_date, "long") }}
|
||||||
</span>
|
</span>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span class="seperator"></span>
|
<span class="seperator"></span>
|
||||||
@@ -646,4 +649,4 @@
|
|||||||
|
|
||||||
<link rel="stylesheet" href="https://uicdn.toast.com/calendar/latest/toastui-calendar.min.css" />
|
<link rel="stylesheet" href="https://uicdn.toast.com/calendar/latest/toastui-calendar.min.css" />
|
||||||
<script src="https://uicdn.toast.com/calendar/latest/toastui-calendar.min.js"></script>
|
<script src="https://uicdn.toast.com/calendar/latest/toastui-calendar.min.js"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -57,11 +57,13 @@
|
|||||||
<use href="#icon-calendar"></use>
|
<use href="#icon-calendar"></use>
|
||||||
</svg>
|
</svg>
|
||||||
<span>
|
<span>
|
||||||
{{ frappe.utils.format_date(batch_info.start_date, "long") }} -
|
{{ frappe.utils.format_date(batch_info.start_date, "long") }}
|
||||||
</span>
|
|
||||||
<span>
|
|
||||||
{{ frappe.utils.format_date(batch_info.end_date, "long") }}
|
|
||||||
</span>
|
</span>
|
||||||
|
{% if batch_info.start_date != batch_info.end_date %}
|
||||||
|
<span>
|
||||||
|
- {{ frappe.utils.format_date(batch_info.end_date, "long") }}
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if batch_info.start_time and batch_info.end_time %}
|
{% if batch_info.start_time and batch_info.end_time %}
|
||||||
@@ -115,11 +117,13 @@
|
|||||||
<use href="#icon-calendar"></use>
|
<use href="#icon-calendar"></use>
|
||||||
</svg>
|
</svg>
|
||||||
<span>
|
<span>
|
||||||
{{ frappe.utils.format_date(batch_info.start_date, "long") }} -
|
{{ frappe.utils.format_date(batch_info.start_date, "long") }}
|
||||||
</span>
|
|
||||||
<span>
|
|
||||||
{{ frappe.utils.format_date(batch_info.end_date, "long") }}
|
|
||||||
</span>
|
</span>
|
||||||
|
{% if batch_info.start_date != batch_info.end_date %}
|
||||||
|
<span>
|
||||||
|
- {{ frappe.utils.format_date(batch_info.end_date, "long") }}
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if batch_info.start_time and batch_info.end_time %}
|
{% if batch_info.start_time and batch_info.end_time %}
|
||||||
@@ -146,6 +150,10 @@
|
|||||||
href="/billing/batch/{{ batch_info.name }}">
|
href="/billing/batch/{{ batch_info.name }}">
|
||||||
{{ _("Register Now") }}
|
{{ _("Register Now") }}
|
||||||
</a>
|
</a>
|
||||||
|
{% elif batch_info.allow_self_enrollment and batch_info.seat_count and seats_left %}
|
||||||
|
<button class="btn btn-primary wide-button enroll-batch">
|
||||||
|
{{ _("Enroll Now") }}
|
||||||
|
</button>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="alert alert-info">
|
<div class="alert alert-info">
|
||||||
{{ _("To join this batch, please contact the Administrator.") }}
|
{{ _("To join this batch, please contact the Administrator.") }}
|
||||||
@@ -235,4 +243,4 @@
|
|||||||
let batch_info = {{ batch_info | json }};
|
let batch_info = {{ batch_info | json }};
|
||||||
</script>
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -12,6 +12,10 @@ frappe.ready(() => {
|
|||||||
$(".btn-remove-course").click((e) => {
|
$(".btn-remove-course").click((e) => {
|
||||||
remove_course(e);
|
remove_course(e);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(".enroll-batch").click((e) => {
|
||||||
|
enroll_batch(e);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
const show_course_modal = (e) => {
|
const show_course_modal = (e) => {
|
||||||
@@ -54,6 +58,30 @@ const show_course_modal = (e) => {
|
|||||||
}, 1000);
|
}, 1000);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const enroll_batch = (e) => {
|
||||||
|
let batch_name = $(".class-details").data("batch");
|
||||||
|
if (frappe.session.user == "Guest") {
|
||||||
|
window.location.href =
|
||||||
|
"/login?redirect-to=/batches/details/" + batch_name;
|
||||||
|
}
|
||||||
|
frappe.call({
|
||||||
|
method: "lms.lms.doctype.batch_student.batch_student.enroll_batch",
|
||||||
|
args: {
|
||||||
|
batch_name: batch_name,
|
||||||
|
},
|
||||||
|
callback(r) {
|
||||||
|
frappe.show_alert(
|
||||||
|
{
|
||||||
|
message: __("Successfully Enrolled"),
|
||||||
|
indicator: "green",
|
||||||
|
},
|
||||||
|
2000
|
||||||
|
);
|
||||||
|
window.location.href = `/batches/${batch_name}`;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const add_course = (values, course_name) => {
|
const add_course = (values, course_name) => {
|
||||||
frappe.call({
|
frappe.call({
|
||||||
method: "lms.lms.doctype.lms_batch.lms_batch.add_course",
|
method: "lms.lms.doctype.lms_batch.lms_batch.add_course",
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ def get_context(context):
|
|||||||
"batch_details_raw",
|
"batch_details_raw",
|
||||||
"evaluation_end_date",
|
"evaluation_end_date",
|
||||||
"amount_usd",
|
"amount_usd",
|
||||||
|
"allow_self_enrollment",
|
||||||
],
|
],
|
||||||
as_dict=1,
|
as_dict=1,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -140,14 +140,16 @@
|
|||||||
<use href="#icon-calendar"></use>
|
<use href="#icon-calendar"></use>
|
||||||
</svg>
|
</svg>
|
||||||
<span>
|
<span>
|
||||||
{{ frappe.utils.format_date(batch.start_date, "medium") }} -
|
{{ frappe.utils.format_date(batch.start_date, "medium") }}
|
||||||
</span>
|
</span>
|
||||||
|
{% if batch.start_date != batch.end_date %}
|
||||||
<span>
|
<span>
|
||||||
{{ frappe.utils.format_date(batch.end_date, "medium") }}
|
- {{ frappe.utils.format_date(batch.end_date, "long") }}
|
||||||
</span>
|
</span>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-auto mb-2">
|
<div class="mb-2">
|
||||||
<svg class="icon icon-sm">
|
<svg class="icon icon-sm">
|
||||||
<use href="#icon-clock"></use>
|
<use href="#icon-clock"></use>
|
||||||
</svg>
|
</svg>
|
||||||
@@ -204,4 +206,4 @@
|
|||||||
let batch_info = null;
|
let batch_info = null;
|
||||||
</script>
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
<div class="flex">
|
<div class="flex">
|
||||||
<div class="field-label">
|
<div class="field-label">
|
||||||
{{ _("Total Price: ") }}
|
{{ _("Total Price: ") }}
|
||||||
<span class="total-price">{{ frappe.utils.fmt_money(amount, 2, currency) }}</span>
|
<span class="total-price">{{ frappe.utils.fmt_money(amount_with_gst, 2, currency) if gst_applied else frappe.utils.fmt_money(amount, 2, currency) }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% if gst_applied %}
|
{% if gst_applied %}
|
||||||
|
|||||||
@@ -17,9 +17,7 @@ def get_context(context):
|
|||||||
|
|
||||||
context.original_currency = context.currency
|
context.original_currency = context.currency
|
||||||
context.original_amount = (
|
context.original_amount = (
|
||||||
apply_gst(context.amount, None)[0]
|
(context.amount * 1.18) if context.original_currency == "INR" else context.amount
|
||||||
if context.original_currency == "INR"
|
|
||||||
else context.amount
|
|
||||||
)
|
)
|
||||||
|
|
||||||
context.exception_country = frappe.get_all(
|
context.exception_country = frappe.get_all(
|
||||||
@@ -32,7 +30,7 @@ def get_context(context):
|
|||||||
|
|
||||||
context.address = get_address()
|
context.address = get_address()
|
||||||
if context.currency == "INR":
|
if context.currency == "INR":
|
||||||
context.amount, context.gst_applied = apply_gst(context.amount, None)
|
context.amount_with_gst, context.gst_applied = apply_gst(context.amount, None)
|
||||||
|
|
||||||
|
|
||||||
def validate_access(doctype, docname, module):
|
def validate_access(doctype, docname, module):
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
{% extends "www/cohorts/base.html" %} {% block title %} {{ _("Manage") }} {{
|
{% extends "www/cohorts/base.html" %} {% block title %} {{ _("Manage") }} {{
|
||||||
course.title }} {% endblock %} {% block page_content %}
|
course.title }} {% endblock %} {% block page_content %}
|
||||||
<div class="course-home-headings">{{ cohort.title }}</div>
|
<div class="course-home-headings">{{ cohort.title }}</div>
|
||||||
|
{% if cohort.description %}
|
||||||
|
<div>
|
||||||
|
{{ frappe.utils.md_to_html(cohort.description) }}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
{{ frappe.db.count("Cohort Subgroup", {"cohort": cohort.name}) }} {{
|
{{ frappe.db.count("Cohort Subgroup", {"cohort": cohort.name}) }} {{
|
||||||
|
|||||||
@@ -10,9 +10,11 @@ from lms.lms.utils import (
|
|||||||
has_course_instructor_role,
|
has_course_instructor_role,
|
||||||
)
|
)
|
||||||
from lms.overrides.user import get_enrolled_courses, get_authored_courses
|
from lms.overrides.user import get_enrolled_courses, get_authored_courses
|
||||||
|
from frappe.utils.telemetry import capture
|
||||||
|
|
||||||
|
|
||||||
def get_context(context):
|
def get_context(context):
|
||||||
|
capture("active_site", "lms")
|
||||||
context.no_cache = 1
|
context.no_cache = 1
|
||||||
context.live_courses, context.upcoming_courses = get_courses()
|
context.live_courses, context.upcoming_courses = get_courses()
|
||||||
context.enrolled_courses = (
|
context.enrolled_courses = (
|
||||||
|
|||||||
@@ -17,7 +17,8 @@
|
|||||||
<div class="job-cards-parent">
|
<div class="job-cards-parent">
|
||||||
{% for job in jobs %}
|
{% for job in jobs %}
|
||||||
<div class="common-card-style job-card">
|
<div class="common-card-style job-card">
|
||||||
<span title="{{ job.company_name}}" style="background-image: url( {{ job.company_logo | urlencode }} );"
|
{% set company_logo = job.company_logo.replace(' ', '%20') %}
|
||||||
|
<span title="{{ job.company_name}}" style="background-image: url( {{ company_logo }} );"
|
||||||
class="company-logo"></span>
|
class="company-logo"></span>
|
||||||
<div class="job-card-info">
|
<div class="job-card-info">
|
||||||
<div class="card-heading">{{ _(job.job_title) }}</div>
|
<div class="card-heading">{{ _(job.job_title) }}</div>
|
||||||
@@ -37,7 +38,7 @@
|
|||||||
<div class="text-muted">{{ frappe.utils.format_date(job.creation, "medium") }}</div>
|
<div class="text-muted">{{ frappe.utils.format_date(job.creation, "medium") }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a class="stretched-link" href="/jobs/{{ job.name }}"></a>
|
<a class="stretched-link" href="/job-openings/{{ job.name }}"></a>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
@@ -11,7 +11,8 @@
|
|||||||
<div class="common-card-style job-detail-card">
|
<div class="common-card-style job-detail-card">
|
||||||
|
|
||||||
<div class="job-detail-header">
|
<div class="job-detail-header">
|
||||||
<span title="{{ job.company_name}}" style="background-image: url( {{ job.company_logo | urlencode }} );"
|
{% set company_logo = job.company_logo.replace(' ', '%20') %}
|
||||||
|
<span title="{{ job.company_name}}" style="background-image: url( {{ company_logo }} );"
|
||||||
class="company-logo"></span>
|
class="company-logo"></span>
|
||||||
|
|
||||||
<div class="job-card-info">
|
<div class="job-card-info">
|
||||||
@@ -33,7 +34,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% set application_link = job.application_link if frappe.session.user != 'Guest' else '/login?redirect-to=/jobs/' + job.name %}
|
{% set application_link = job.application_link if frappe.session.user != 'Guest' else '/login?redirect-to=/job-openings/' + job.name %}
|
||||||
<div class="job-actions">
|
<div class="job-actions">
|
||||||
<a class="btn btn-primary btn-sm mr-2" href="{{ application_link }}"> {{ _("Apply") }} </a>
|
<a class="btn btn-primary btn-sm mr-2" href="{{ application_link }}"> {{ _("Apply") }} </a>
|
||||||
<div class="btn btn-default btn-sm mr-2" id="report" data-job="{{ job.name }}"> {{ _("Report") }} </div>
|
<div class="btn btn-default btn-sm mr-2" id="report" data-job="{{ job.name }}"> {{ _("Report") }} </div>
|
||||||
@@ -94,7 +95,7 @@
|
|||||||
|
|
||||||
{% macro BreadCrumb(job) %}
|
{% macro BreadCrumb(job) %}
|
||||||
<div class="breadcrumb">
|
<div class="breadcrumb">
|
||||||
<a class="dark-links" href="/jobs">{{ _("Job Openings") }}</a>
|
<a class="dark-links" href="/job-openings">{{ _("Job Openings") }}</a>
|
||||||
<img class="ml-1 mr-1" src="/assets/lms/icons/chevron-right.svg">
|
<img class="ml-1 mr-1" src="/assets/lms/icons/chevron-right.svg">
|
||||||
<span class="breadcrumb-destination">{{ job.job_title }}</span>
|
<span class="breadcrumb-destination">{{ job.job_title }}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -11,7 +11,7 @@ frappe.ready(() => {
|
|||||||
const open_report_dialog = (e) => {
|
const open_report_dialog = (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if (frappe.session.user == "Guest") {
|
if (frappe.session.user == "Guest") {
|
||||||
window.location.href = `/login?redirect-to=/jobs/${$(
|
window.location.href = `/login?redirect-to=/job-openings/${$(
|
||||||
e.currentTarget
|
e.currentTarget
|
||||||
).data("job")}`;
|
).data("job")}`;
|
||||||
return;
|
return;
|
||||||
@@ -5,7 +5,7 @@ def get_context(context):
|
|||||||
try:
|
try:
|
||||||
job = frappe.form_dict["job"]
|
job = frappe.form_dict["job"]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
frappe.local.flags.redirect_location = "/jobs"
|
frappe.local.flags.redirect_location = "/job-openings"
|
||||||
raise frappe.Redirect
|
raise frappe.Redirect
|
||||||
|
|
||||||
context.job = frappe.get_doc("Job Opportunity", job)
|
context.job = frappe.get_doc("Job Opportunity", job)
|
||||||
Reference in New Issue
Block a user