fix: jobs ui
This commit is contained in:
0
school/job/doctype/job_settings/__init__.py
Normal file
0
school/job/doctype/job_settings/__init__.py
Normal file
8
school/job/doctype/job_settings/job_settings.js
Normal file
8
school/job/doctype/job_settings/job_settings.js
Normal file
@@ -0,0 +1,8 @@
|
||||
// Copyright (c) 2022, Frappe and contributors
|
||||
// For license information, please see license.txt
|
||||
|
||||
frappe.ui.form.on('Job Settings', {
|
||||
// refresh: function(frm) {
|
||||
|
||||
// }
|
||||
});
|
||||
42
school/job/doctype/job_settings/job_settings.json
Normal file
42
school/job/doctype/job_settings/job_settings.json
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"actions": [],
|
||||
"allow_rename": 1,
|
||||
"creation": "2022-01-10 17:16:46.598673",
|
||||
"doctype": "DocType",
|
||||
"editable_grid": 1,
|
||||
"engine": "InnoDB",
|
||||
"field_order": [
|
||||
"allow_posting"
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"default": "0",
|
||||
"fieldname": "allow_posting",
|
||||
"fieldtype": "Check",
|
||||
"label": "Allow Job Posting From Website"
|
||||
}
|
||||
],
|
||||
"index_web_pages_for_search": 1,
|
||||
"issingle": 1,
|
||||
"links": [],
|
||||
"modified": "2022-01-10 18:45:26.646438",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Job",
|
||||
"name": "Job Settings",
|
||||
"owner": "Administrator",
|
||||
"permissions": [
|
||||
{
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
"email": 1,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"role": "System Manager",
|
||||
"share": 1,
|
||||
"write": 1
|
||||
}
|
||||
],
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"states": []
|
||||
}
|
||||
8
school/job/doctype/job_settings/job_settings.py
Normal file
8
school/job/doctype/job_settings/job_settings.py
Normal file
@@ -0,0 +1,8 @@
|
||||
# Copyright (c) 2022, Frappe and contributors
|
||||
# For license information, please see license.txt
|
||||
|
||||
# import frappe
|
||||
from frappe.model.document import Document
|
||||
|
||||
class JobSettings(Document):
|
||||
pass
|
||||
8
school/job/doctype/job_settings/test_job_settings.py
Normal file
8
school/job/doctype/job_settings/test_job_settings.py
Normal file
@@ -0,0 +1,8 @@
|
||||
# Copyright (c) 2022, Frappe and Contributors
|
||||
# See license.txt
|
||||
|
||||
# import frappe
|
||||
import unittest
|
||||
|
||||
class TestJobSettings(unittest.TestCase):
|
||||
pass
|
||||
@@ -63,9 +63,8 @@ input[type=checkbox] {
|
||||
text-align: center;
|
||||
letter-spacing: 0.011em;
|
||||
text-transform: uppercase;
|
||||
color: #2C5477;
|
||||
font-weight: bold;
|
||||
box-shadow: 0px 5px 10px rgb(0 0 0 / 10%);
|
||||
box-shadow: var(--shadow-base);
|
||||
}
|
||||
|
||||
.dark-pills {
|
||||
@@ -119,9 +118,7 @@ input[type=checkbox] {
|
||||
|
||||
.card-heading {
|
||||
font-weight: 600;
|
||||
font-size: 1.5rem;
|
||||
line-height: 156%;
|
||||
letter-spacing: -0.014em;
|
||||
font-size: var(--text-3xl);
|
||||
color: var(--text-color-dark);
|
||||
}
|
||||
|
||||
@@ -1478,20 +1475,20 @@ pre {
|
||||
|
||||
.job-card {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-right: 1rem;
|
||||
}
|
||||
|
||||
.job-card-info {
|
||||
padding: 2rem 1rem 1rem;
|
||||
}
|
||||
|
||||
.job-description-section {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.job-card-info {
|
||||
padding: 0 1.5rem;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.company-logo {
|
||||
background-position: left;
|
||||
background-position: center;
|
||||
background-size: 88px;
|
||||
}
|
||||
|
||||
.job-card-parent {
|
||||
display: grid;
|
||||
row-gap: 1rem;
|
||||
}
|
||||
|
||||
@@ -3,32 +3,47 @@
|
||||
{% block title %}{{ _('Job Openings') }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% set allow_posting = frappe.db.get_single_value("Job Settings", "allow_posting") %}
|
||||
<div class="common-page-style">
|
||||
<div class="container">
|
||||
<a class="button is-primary pull-right" href="/job-opportunity">{{ _("Post a Job") }}</a>
|
||||
|
||||
{% if allow_posting and jobs | length %}
|
||||
<a class="button is-primary pull-right" href="/job-opportunity?new=1">{{ _("Post a Job") }}</a>
|
||||
{% endif %}
|
||||
|
||||
<div class="course-home-headings">{{ _("Job Openings") }}</div>
|
||||
<div class="cards-parent">
|
||||
{% if jobs | length %}
|
||||
<div class="job-card-parent">
|
||||
{% for job in jobs %}
|
||||
<div class="common-card-style course-card">
|
||||
<div class="job-card">
|
||||
<div>
|
||||
<div class="course-tags">
|
||||
<div class="course-card-pills">{{ _(job.type) }}</div>
|
||||
<div class="course-card-pills">{{ job.location }}</div>
|
||||
</div>
|
||||
<div class="job-card-info">
|
||||
<div class="bold-title">{{ _(job.job_title) }}</div>
|
||||
<small>{{ job.company_name }}</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="avatar avatar-large" title="{{ job.company_name}}">
|
||||
<span class="avatar-frame company-logo" style="background-image: url( {{ job.company_logo | urlencode }} );"></span>
|
||||
</div>
|
||||
<div class="job-card-info">
|
||||
<div class="d-flex mb-1">
|
||||
<div class="course-card-pills">{{ _(job.type) }}</div>
|
||||
<div class="course-card-pills">{{ job.location }}</div>
|
||||
</div>
|
||||
<div class="card-heading">{{ _(job.job_title) }}</div>
|
||||
<div>{{ job.company_name }}</div>
|
||||
</div>
|
||||
<div class="small">Posted on: {{ frappe.utils.format_date(job.creation, "medium") }}</div>
|
||||
</div>
|
||||
<a class="stretched-link" href="/jobs/{{ job.name }}"></a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="empty-state text-center">
|
||||
<img class="icon icon-xl" src="/assets/frappe/icons/timeless/message.svg">
|
||||
<div class="course-home-headings mt-4 mb-0" style="color: inherit;"> {{ _("No open positions") }} </div>
|
||||
<div class="small mb-6"> {{ _("There are no job openings available.") }} </div>
|
||||
{% if allow_posting %}
|
||||
<a class="button is-secondary dark-links m-auto" href="/job-opportunity?new=1">{{ _("Post a Job") }}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -8,7 +8,7 @@ def get_context(context):
|
||||
},
|
||||
[
|
||||
"job_title", "location", "type", "company_name",
|
||||
"company_logo", "name"
|
||||
"company_logo", "name", "creation"
|
||||
],
|
||||
order_by="creation desc")
|
||||
|
||||
|
||||
@@ -8,23 +8,28 @@
|
||||
<div class="container">
|
||||
{{ BreadCrumb(job) }}
|
||||
<div class="common-card-style thread-card">
|
||||
<div class="job-card">
|
||||
<div>
|
||||
<span class="course-tags">
|
||||
<div class="course-card-pills">{{ _(job.type) }}</div>
|
||||
<div class="course-card-pills">{{ job.location }}</div>
|
||||
</span>
|
||||
<div class="job-card-info">
|
||||
<div class="card-heading">{{ _(job.job_title) }}</div>
|
||||
<a class="dark-links" href="{{ job.company_website }}">{{ job.company_name }}</a>
|
||||
<div class="small mt-1">Posted On: {{ frappe.utils.format_date(job.creation, "medium") }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex">
|
||||
<div class="avatar avatar-large" title="{{ job.company_name}}">
|
||||
<span class="avatar-frame company-logo" style="background-image: url( {{ job.company_logo | urlencode }} );"></span>
|
||||
</div>
|
||||
<div class="job-card-info">
|
||||
<span class="d-flex mb-1">
|
||||
<div class="course-card-pills">{{ _(job.type) }}</div>
|
||||
<div class="course-card-pills">{{ job.location }}</div>
|
||||
</span>
|
||||
<div class="">
|
||||
<div class="card-heading">{{ _(job.job_title) }}</div>
|
||||
<a class="dark-links" href="{{ job.company_website }}">{{ job.company_name }}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="small">Posted On: {{ frappe.utils.format_date(job.creation, "medium") }}</div>
|
||||
<a class="pull-right mt-3" href="/job-opportunity/{{ job.name }}">Edit</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="job-description-section">
|
||||
|
||||
<div class="mt-5">
|
||||
<div>{{ _(job.description) }}</div>
|
||||
<a class="button is-primary mt-5" href="{{ job.application_link }}">{{ _("Apply Now") }}</a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user