Skip to content
Snippets Groups Projects
Commit a1edced2 authored by Stefan Galinski's avatar Stefan Galinski :video_game:
Browse files

[TASK] Cleanup, Improve some styling, move experience level to the proper place

parent 9d70262f
No related branches found
No related tags found
No related merge requests found
{namespace h=SGalinski\SgJobs\ViewHelpers}
<f:alias map="{leftBrace: '{', rightBrace: '}'}">
<script type="application/ld+json">
{leftBrace}
"@context": "https://schema.org/",
"@type": "JobPosting",
"title": "{job.title}",
"description": "<f:format.htmlentities><f:format.html>{job.description}{job.task}{job.qualification}</f:format.html></f:format.htmlentities>",
"employmentType": [
<f:for each="{h:explodeString(string: '{job.employmentTypes}', delimiter: ',')}" as="employmentType" iteration="iterator">
"{employmentType}"{f:if(condition: '{iterator.isLast} == FALSE', then: ',')}
</f:for>
],
"datePosted": "{f:format.date(date: '{f:if(condition: job.datePosted, then: job.datePosted, else: \'now\')}', format: 'Y-m-d')}",
<f:if condition="{job.validThrough}">
"validThrough": "{f:format.date(date: job.validThrough, format: 'Y-m-d')}",
</f:if>
<script type="application/ld+json"><f:render section="default" arguments="{_all}"/> </script>
<f:if condition="{job.salaryCurrency} && {job.baseSalary} > 0">
"baseSalary": {leftBrace}
"@type": "MonetaryAmount",
"currency": "{job.salaryCurrency}",
"value": {leftBrace}
"@type": "QuantitativeValue",
<f:if condition="{job.baseSalary} === {job.maxSalary}">
<f:then>
"value": {job.baseSalary},
</f:then>
<f:else>
"minValue": {job.baseSalary},
"maxValue": {job.maxSalary},
</f:else>
</f:if>
"unitText": "{job.salaryUnit}"
{rightBrace}
{rightBrace},
</f:if>
<f:section name="default">
<f:alias map="{leftBrace: '{', rightBrace: '}'}">{leftBrace}
"@context": "https://schema.org/",
"@type": "JobPosting",
"title": "{job.title}",
"description": "<f:format.htmlentities><f:format.html>{job.description}{job.task}{job.qualification}</f:format.html></f:format.htmlentities>",
"employmentType": [
<f:for each="{h:explodeString(string: '{job.employmentTypes}', delimiter: ',')}" as="employmentType" iteration="iterator">
"{employmentType}"{f:if(condition: '{iterator.isLast} == FALSE', then: ',')}
</f:for>
],
"datePosted": "{f:format.date(date: '{f:if(condition: job.datePosted, then: job.datePosted, else: \'now\')}', format: 'Y-m-d')}",
<f:if condition="{job.validThrough}">
"validThrough": "{f:format.date(date: job.validThrough, format: 'Y-m-d')}",
</f:if>
<f:if condition="{job.salaryCurrency} && {job.baseSalary} > 0">
"baseSalary": {leftBrace}
"@type": "MonetaryAmount",
"currency": "{job.salaryCurrency}",
"value": {leftBrace}
"@type": "QuantitativeValue",
<f:if condition="{job.baseSalary} === {job.maxSalary}">
<f:then>
"value": {job.baseSalary},
</f:then>
<f:else>
"minValue": {job.baseSalary},
"maxValue": {job.maxSalary},
</f:else>
</f:if>
"unitText": "{job.salaryUnit}"
{rightBrace}
{rightBrace},
</f:if>
<f:if condition="{job.locationRequirements}">
"applicantLocationRequirements": [
<f:for each="{h:explodeString(string: '{job.locationRequirements}', delimiter: ',')}" as="locationRequirement" iteration="iterator">
{leftBrace}
"@type": "Country",
"name": "{locationRequirement}"
{rightBrace}{f:if(condition: '{iterator.isLast} == FALSE', then: ',')}
</f:for>
],
</f:if>
<f:if condition="{job.telecommutePossible}">
"jobLocationType": "TELECOMMUTE",
</f:if>
<f:if condition="{job.locationRequirements}">
"applicantLocationRequirements": [
<f:for each="{h:explodeString(string: '{job.locationRequirements}', delimiter: ',')}" as="locationRequirement" iteration="iterator">
{leftBrace}
"@type": "Country",
"name": "{locationRequirement}"
{rightBrace}{f:if(condition: '{iterator.isLast} == FALSE', then: ',')}
</f:for>
],
</f:if>
<f:if condition="{job.officeWorkPossible}">
<f:for each="{job.companies}" as="company">
"jobLocation": {leftBrace}
"@type": "Place",
"address": {leftBrace}
"@type": "PostalAddress",
"streetAddress": "{company.street -> f:format.htmlentities()}",
"addressLocality": "{company.city -> f:format.htmlentities()}",
"postalCode": "{company.zip}",
"addressCountry": "{company.country -> f:format.htmlentities()}"
{rightBrace}
{rightBrace},
</f:for>
</f:if>
<f:if condition="{job.telecommutePossible}">
"jobLocationType": "TELECOMMUTE",
</f:if>
<f:comment><!--
We need a property that is certainly included to make sure the last property never ends with a comma.
--></f:comment>
"hiringOrganization": {leftBrace}
<f:if condition="{job.officeWorkPossible}">
<f:for each="{job.companies}" as="company">
"jobLocation": {leftBrace}
"@type": "Place",
"address": {leftBrace}
"@type": "PostalAddress",
"streetAddress": "{company.street -> f:format.htmlentities()}",
"addressLocality": "{company.city -> f:format.htmlentities()}",
"postalCode": "{company.zip}",
"addressCountry": "{company.country -> f:format.htmlentities()}"
{rightBrace}
{rightBrace},
</f:for>
</f:if>
"hiringOrganization": {leftBrace}
"@type": "Organization",
"name": "{job.company.name}",
"sameAs": "{f:uri.typolink(parameter: job.company.identifyingUrl, absolute: 'TRUE')}",
"department": {leftBrace}
"@type": "Organization",
"name": "{job.company.name}",
"sameAs": "{f:uri.typolink(parameter: job.company.identifyingUrl, absolute: 'TRUE')}",
"department": {leftBrace}
"@type": "Organization",
"name": "{job.department.title}"
{rightBrace}
"name": "{job.department.title}"
{rightBrace}
{rightBrace}
</script>
</f:alias>
{rightBrace}
</f:alias>
</f:section>
......@@ -38,20 +38,6 @@
</h3>
<f:format.html parseFuncTSPath="lib.parseFunc_RTE">{job.qualification}</f:format.html>
</div>
<f:if condition="{job.experienceLevel -> f:count() > 0}">
<div class="default-content-element">
<h3 class="h4">
<f:translate key="frontend.experienceLevel"/>
</h3>
<ul>
<f:for each="{job.experienceLevel}" as="experienceLevel" iteration="iterator">
<li>
{experienceLevel.title}{f:if(condition: '!{iterator.isLast}', then: ', ')}
</li>
</f:for>
</ul>
</div>
</f:if>
</div>
<div class="col-md-4 col-sm-6 col-xs-12">
<div class="highlight-box bg-card sgjobs-meta-box">
......@@ -87,6 +73,16 @@
</f:else>
</f:if>
</li>
<f:if condition="{job.experienceLevel -> f:count() > 0}">
<li>
<strong>
<f:translate key="frontend.experienceLevel"/>:
</strong>
<f:for each="{job.experienceLevel}" as="experienceLevel" iteration="iterator">
{experienceLevel.title}{f:if(condition: '!{iterator.isLast}', then: ', ')}
</f:for>
</li>
</f:if>
</ul>
<hr>
......@@ -657,11 +653,12 @@
</div>
</div>
</f:if>
<f:if condition="{job.relatedJobs}">
<f:then>
<div class="row">
<div class="container">
<h3><f:translate key="frontend.apply.relatedJobs"/></h3>
<h2><f:translate key="frontend.apply.relatedJobs"/></h2>
<div class="row default-content-element equal-height-columns stretch-first-child">
<f:for each="{job.relatedJobs}" as="relatedJob">
<f:render partial="Teaser" arguments="{job: relatedJob, applyPageUid: settings.applyPage}"/>
......@@ -674,7 +671,7 @@
<f:if condition="{settings.enableAutomaticRelatedJobs} && {relatedJobs}">
<div class="row">
<div class="container">
<h3><f:translate key="frontend.apply.relatedJobs"/></h3>
<h2><f:translate key="frontend.apply.relatedJobs"/></h2>
<div class="row default-content-element equal-height-columns stretch-first-child">
<f:for each="{relatedJobs}" as="relatedJob">
<f:render partial="Teaser" arguments="{job: relatedJob, applyPageUid: settings.applyPage}"/>
......@@ -685,7 +682,6 @@
</f:if>
</f:else>
</f:if>
</f:section>
<f:section name="privacyPolicyCheckboxLink">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment