style: job card redesign
This commit is contained in:
@@ -2,25 +2,43 @@
|
||||
{% 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">
|
||||
{% if allow_posting and jobs | length %}
|
||||
<a class="button is-primary pull-right mt-5" href="/job-opportunity?new=1">{{ _("Post a Job") }}</a>
|
||||
{% endif %}
|
||||
|
||||
{% 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 mb-2">{{ _("{0}").format(title) }}</div>
|
||||
<div class="job-subtitle">{{ _("{0}").format(subtitle) }}</div>
|
||||
|
||||
<div class="course-home-headings">{{ _("Job Openings") }}</div>
|
||||
{% if jobs | length %}
|
||||
<div class="job-card-parent">
|
||||
{% for job in jobs %}
|
||||
<div class="common-card-style course-card">
|
||||
{% set show_edit_link = False %}
|
||||
{% include "school/templates/job_card.html" %}
|
||||
<a class="stretched-link" href="/jobs/{{ job.name }}"></a>
|
||||
{% if jobs | length %}
|
||||
<div class="common-card-style job-list-card">
|
||||
{% for job in jobs %}
|
||||
<div class="job-card">
|
||||
<div class="avatar avatar-medium" title="{{ job.company_name}}">
|
||||
<span class="avatar-frame company-logo" style="background-image: url( {{ job.company_logo | urlencode }} );"></span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<div class="job-card-info col-8">
|
||||
<div class="job-card-heading">{{ _(job.job_title) }}</div>
|
||||
<a class="dark-links company-name mt-1" href="{{ job.company_website }}">{{ job.company_name }}</a>
|
||||
</div>
|
||||
<div class="job-meta col">
|
||||
<img class="mr-2" src="/assets/school/icons/location.svg">
|
||||
<div>{{ job.location }}</div>
|
||||
</div>
|
||||
<div class="job-card-logo-section">
|
||||
<div class="job-type"> {{ job.type }} </div>
|
||||
<div class="job-meta">{{ frappe.utils.pretty_date(job.creation) }}</div>
|
||||
</div>
|
||||
<a class="stretched-link" href="/jobs/{{ job.name }}"></a>
|
||||
</div>
|
||||
{% if loop.index != jobs | length %}
|
||||
<div class="card-divider mt-5"></div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="empty-state text-center">
|
||||
<img class="icon icon-xl" src="/assets/frappe/icons/timeless/message.svg">
|
||||
|
||||
@@ -11,4 +11,6 @@ def get_context(context):
|
||||
"company_logo", "name", "creation"
|
||||
],
|
||||
order_by="creation desc")
|
||||
|
||||
context.title = frappe.db.get_single_value("Job Settings", "title")
|
||||
context.subtitle = frappe.db.get_single_value("Job Settings", "subtitle")
|
||||
context.allow_posting = frappe.db.get_single_value("Job Settings", "allow_posting")
|
||||
|
||||
@@ -7,20 +7,37 @@
|
||||
<div class="container">
|
||||
{{ BreadCrumb(job) }}
|
||||
<div class="common-card-style job-detail-card">
|
||||
{% set show_edit_link = True %}
|
||||
{% include "school/templates/job_card.html" %}
|
||||
<div class="p-4">
|
||||
<div>{{ _(job.description) }}</div>
|
||||
<div class="d-flex justify-content-between mt-5">
|
||||
{% if frappe.session.user != "Guest" %}
|
||||
<a class="button is-primary" href="{{ job.application_link }}">{{ _("Apply Now") }}</a>
|
||||
<div class="button is-secondary" id="report">{{ _("Report this post") }}</div>
|
||||
{% else %}
|
||||
<a class="button is-secondary dark-links" href="/login?redirect-to=/jobs/{{ job.name }}">Login to apply for this job.</a>
|
||||
|
||||
<div class="d-flex justify-content-between">
|
||||
<div>
|
||||
<div class="avatar avatar-medium mb-6" title="{{ job.company_name}}">
|
||||
<div class="avatar-frame company-logo" style="background-image: url( {{ job.company_logo | urlencode }} );"></div>
|
||||
</div>
|
||||
<div class="course-home-headings mb-2">{{ _(job.job_title) }}</div>
|
||||
<div class="d-flex align-items-center mb-2">
|
||||
<a class="dark-links company-name" href="{{ job.company_website }}">{{ job.company_name }}</a>
|
||||
<span></span>
|
||||
<div class="job-meta">
|
||||
<img class="mr-2" src="/assets/school/icons/location.svg">
|
||||
<div>{{ job.location }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="job-type"> {{ job.type }} </div>
|
||||
</div>
|
||||
|
||||
{% set application_link = job.application_link if frappe.session.user != 'Guest' else '/login?redirect-to=/jobs/' + job.name %}
|
||||
<div class="d-flex align-items-start">
|
||||
<a class="button is-primary mr-2"
|
||||
href="{{ application_link }}">{{ _("Apply") }}</a>
|
||||
<div class="button is-default mr-2" id="report" data-job="{{ job.name }}">{{ _("Report") }}</div>
|
||||
{% if job.owner == frappe.session.user %}
|
||||
<a class="button is-default button-links" href="/job-opportunity?name={{ job.name }}">Edit</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="job-description job-meta">{{ _(job.description) }}</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -10,6 +10,10 @@ frappe.ready(() => {
|
||||
|
||||
const open_report_dialog = (e) => {
|
||||
e.preventDefault();
|
||||
if (frappe.session.user == "Guest") {
|
||||
window.location.href = `/login?redirect-to=/jobs/${$(e.currentTarget).data("job")}`;
|
||||
return;
|
||||
}
|
||||
$("#report-modal").modal("show");
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user