fix: changed jobs route to job-openings
This commit is contained in:
@@ -173,7 +173,8 @@ website_route_rules = [
|
||||
"to_route": "cohorts/join",
|
||||
},
|
||||
{"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>",
|
||||
"to_route": "/batches/progress",
|
||||
|
||||
@@ -19,7 +19,7 @@ def add_pages_to_nav():
|
||||
{"label": "Courses", "url": "/courses", "parent": "Explore", "idx": 2},
|
||||
{"label": "Batches", "url": "/batches", "parent": "Explore", "idx": 3},
|
||||
{"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},
|
||||
]
|
||||
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
frappe.ui.form.on("Job Opportunity", {
|
||||
refresh: (frm) => {
|
||||
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.web_form.after_save = () => {
|
||||
setTimeout(() => {
|
||||
window.location.href = `/jobs`;
|
||||
window.location.href = `/job-openings`;
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"list_columns": [],
|
||||
"login_required": 1,
|
||||
"max_attachment_size": 0,
|
||||
"modified": "2022-09-15 17:22:43.957184",
|
||||
"modified": "2022-09-15 17:22:43.957185",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Job",
|
||||
"name": "job-opportunity",
|
||||
@@ -32,7 +32,7 @@
|
||||
"show_list": 1,
|
||||
"show_sidebar": 0,
|
||||
"success_message": "",
|
||||
"success_url": "/jobs",
|
||||
"success_url": "/job-openings",
|
||||
"title": "Job Opportunity",
|
||||
"web_form_fields": [
|
||||
{
|
||||
|
||||
@@ -81,4 +81,5 @@ lms.patches.v1_0.create_batch_source
|
||||
|
||||
[post_model_sync]
|
||||
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")
|
||||
@@ -37,7 +37,7 @@
|
||||
<div class="text-muted">{{ frappe.utils.format_date(job.creation, "medium") }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<a class="stretched-link" href="/jobs/{{ job.name }}"></a>
|
||||
<a class="stretched-link" href="/job-openings/{{ job.name }}"></a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
@@ -33,7 +33,7 @@
|
||||
</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">
|
||||
<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>
|
||||
@@ -94,7 +94,7 @@
|
||||
|
||||
{% macro BreadCrumb(job) %}
|
||||
<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">
|
||||
<span class="breadcrumb-destination">{{ job.job_title }}</span>
|
||||
</div>
|
||||
@@ -11,7 +11,7 @@ frappe.ready(() => {
|
||||
const open_report_dialog = (e) => {
|
||||
e.preventDefault();
|
||||
if (frappe.session.user == "Guest") {
|
||||
window.location.href = `/login?redirect-to=/jobs/${$(
|
||||
window.location.href = `/login?redirect-to=/job-openings/${$(
|
||||
e.currentTarget
|
||||
).data("job")}`;
|
||||
return;
|
||||
@@ -5,7 +5,7 @@ def get_context(context):
|
||||
try:
|
||||
job = frappe.form_dict["job"]
|
||||
except KeyError:
|
||||
frappe.local.flags.redirect_location = "/jobs"
|
||||
frappe.local.flags.redirect_location = "/job-openings"
|
||||
raise frappe.Redirect
|
||||
|
||||
context.job = frappe.get_doc("Job Opportunity", job)
|
||||
Reference in New Issue
Block a user