Skip to content

Commit

Permalink
feat: add closes on and company to portal page
Browse files Browse the repository at this point in the history
(cherry picked from commit f69b950)
  • Loading branch information
krantheman authored and mergify[bot] committed Dec 12, 2023
1 parent 5060bf4 commit 2d4eb3b
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 49 deletions.
20 changes: 9 additions & 11 deletions hrms/templates/generators/job_opening.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,16 @@ <h1 class="my-0 mr-32" style="font-size: 3rem">{{ job_title }}</h1>
</b>
</p>
{% endif %}
<p>
<i>
{%- if doc.closes_on -%} {{ _("Closes on " +
frappe.format_date(doc.closes_on, "d MMM, YYYY") ) }} {%- if
no_of_applications -%} {{ " - " }}
{% endif %}
<p class="font-italic">
{%- if doc.closes_on -%} {{ _("Closes on " +
frappe.format_date(doc.closes_on, "d MMM, YYYY") ) }} {%- if
no_of_applications -%} {{ " - " }}
{% endif %}
{%- if
no_of_applications -%} {{ no_of_applications }} {{ _("application
received" if no_of_applications == 1 else "applications received") }}
{% endif %}
</i>
{% endif %}
{%- if
no_of_applications -%} {{ no_of_applications }} {{ _("application
received" if no_of_applications == 1 else "applications received") }}
{% endif %}
</p>
</div>
{%- if doc.description -%}<p>{{ description }}</p>{% endif %}
Expand Down
12 changes: 12 additions & 0 deletions hrms/www/jobs/index.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
.primary-stroke {
--icon-stroke: var(--primary);
}

.salary {
font-size: 18px
}

h3 {
font-size: 1.7rem
}

p {
margin-bottom: 0
}
85 changes: 47 additions & 38 deletions hrms/www/jobs/index.html
Original file line number Diff line number Diff line change
@@ -1,49 +1,58 @@
{% extends "templates/web.html" %}
{% block header %}
Current Job Openings
{% endblock header %}
{% block page_content %}
<div class="pt-12">
<div class="mx-32 ">
{% for jo in job_openings %}
<div class="mb-12 card border p-6">
<div>
<h4 class="mt-0 mb-3">{{ jo.job_title }}</h4>
<div class="flex mb-3 align-items-center primary-stroke">
{%- if jo.department -%}
<svg class="icon icon-md ml-0 mr-1">
<use href="#icon-branch"></use>
<div class="mb-8 card border p-6">
<div class="flex">
<div class="mr-12">
<h3 class="mt-0 mb-3">{{ jo.job_title }}</h3>
<div class="flex mb-8 align-items-center primary-stroke">
<svg class="icon icon-lg ml-0 mr-1">
<use href="#icon-organization"></use>
</svg>
<p class="mr-3 mb-0">{{ jo.department }}</p>
{% endif %}
{%- if jo.location -%}
<svg class="icon icon-md ml-0 mr-1"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 16 16">
<g stroke="var(--primary)" stroke-miterlimit="10">
<path d="M11.467 3.458c1.958 1.957 1.958 5.088.027 7.02L7.97 14l-3.523-3.523a4.945 4.945 0 010-6.993l.026-.026a4.922 4.922 0 016.993 0zm0 0c-.026-.026-.026-.026 0 0z">
</path>
<path d="M7.971 8.259a1.305 1.305 0 100-2.61 1.305 1.305 0 000 2.61z"></path>
</g>
</svg>
<p class="mr-3 mb-0">{{ jo.location }}</p>
{% endif %}
{%- if jo.employment_type -%}
<svg class="icon icon-md ml-0 mr-1">
<use href="#icon-hr"></use>
</svg>
<p class="mr-3 mb-0">{{ jo.employment_type }}</p>
{% endif %}
<p class="mr-3 ">{{ jo.company }}</p>
{%- if jo.department -%}
<svg class="icon icon-md ml-0 mr-1">
<use href="#icon-branch"></use>
</svg>
<p class="mr-3 ">{{ jo.department }}</p>
{% endif %}
{%- if jo.location -%}
<svg class="icon icon-md ml-0 mr-1"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 16 16">
<g stroke="var(--primary)" stroke-miterlimit="10">
<path d="M11.467 3.458c1.958 1.957 1.958 5.088.027 7.02L7.97 14l-3.523-3.523a4.945 4.945 0 010-6.993l.026-.026a4.922 4.922 0 016.993 0zm0 0c-.026-.026-.026-.026 0 0z">
</path>
<path d="M7.971 8.259a1.305 1.305 0 100-2.61 1.305 1.305 0 000 2.61z"></path>
</g>
</svg>
<p class="mr-3 ">{{ jo.location }}</p>
{% endif %}
{%- if jo.employment_type -%}
<svg class="icon icon-md ml-0 mr-1">
<use href="#icon-hr"></use>
</svg>
<p class="mr-3 ">{{ jo.employment_type }}</p>
{% endif %}
</div>
<a href="{{ jo.route }}">{{ _("Learn More →") }}</a>
</div>
{%- if jo.publish_salary_range -%}
<p>
{{ _("Salary range " + jo.salary_type.lower() ) }}:
<b>{{ frappe.format_value(frappe.utils.flt(jo.lower_range) ,
<div class="ml-auto flex flex-column">
{%- if jo.publish_salary_range -%}
<p class="font-weight-bold salary text-right">
{{ frappe.format_value(frappe.utils.flt(jo.lower_range) ,
currency=jo.currency) }} - {{ frappe.format_value(frappe.utils.flt(jo.upper_range) ,
currency=jo.currency) }}
</b>
</p>
<p class="text-secondary text-right">{{ jo.salary_type.lower() }}</p>
{% endif %}
<p class="font-italic text-right">
{%- if jo.closes_on -%} {{ _("Closes on " +
frappe.format_date(jo.closes_on, "d MMM, YYYY") ) }}
{% endif %}
</p>
{% endif %}
<a href="{{ jo.route }}">{{ _("Learn More →") }}</a>
</div>
</div>
</div>
{% endfor %}
Expand Down
2 changes: 2 additions & 0 deletions hrms/www/jobs/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ def get_job_openings(txt=None, filters=None, limit_start=0, limit_page_length=20
"location",
"department",
"employment_type",
"company",
"closes_on",
]

filters = filters or {}
Expand Down

0 comments on commit 2d4eb3b

Please sign in to comment.