Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5b9c7e57fe | |||
| 8f8e2c3b2f | |||
| d0e7ee8b74 | |||
| c0445c9ad3 | |||
| 65dfac1af5 | |||
| 50831adf20 | |||
| 5f2e5fddbf | |||
| e905cb063c |
@@ -90,18 +90,20 @@
|
||||
<p class="chip">{{ tag }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="col s12 m-t-20 ">
|
||||
{% if not is_granted('ROLE_COMPANY') %}
|
||||
<p class="item-detail-reply center-align">
|
||||
<a href="{{ path('talent_spontaneous_application_create',{'id': company.id}) }}"
|
||||
class="btn btn-default">
|
||||
Candidature spontanée
|
||||
</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if not is_granted('ROLE_COMPANY') %}
|
||||
<div class="row bg-bordered row-promoted">
|
||||
<div class="col s12 center-align">
|
||||
<h3>Vous souhaitez rejoindre <span class="color-blue1">{{ company.brandname }}</span> ?</h3>
|
||||
<a href="{{ path('talent_spontaneous_application_create',{'id': company.getId()}) }}"
|
||||
class="btn btn-default">
|
||||
Candidature spontanée
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div id="offers" class="row">
|
||||
<div class="col s12">
|
||||
<h1>Les offres d’emploi pour {{ company.brandname }}</h1>
|
||||
|
||||
@@ -34,6 +34,15 @@
|
||||
</div>
|
||||
<div class="row m-b-0 p-b-30">
|
||||
<div class="col s12 m12">
|
||||
<div id="header-resultats">
|
||||
{% if isPromotedAds is defined%}
|
||||
<div><span class="color-blue2">{{ ads|length }}</span> offres d'emploi pourvues</div>
|
||||
<div><span><a href="{{ path('ad_search_result') }}">Voir les offres d'emploi en cours</a></span></div>
|
||||
{% else %}
|
||||
<div><span class="color-blue2">{{ ads|length }}</span> offres d'emploi en cours</div>
|
||||
<div><span><a href="{{ path('ad_search_result', {'promoted': true }) }}">Voir les offres d'emploi pourvues</a></span></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div id="liste-resultats">
|
||||
{% if ads|length > 0 and noResults == false %}
|
||||
{% include 'default/ad_listing.html.twig' with {'ads':ads} %}
|
||||
|
||||
@@ -96,16 +96,29 @@
|
||||
{{ 'ad.talent.isAnswer.label'|trans }}
|
||||
</div>
|
||||
{% elseif not is_granted('ROLE_COMPANY') %}
|
||||
<p class="item-detail-reply">
|
||||
<a href="{{ path('talent_answer_create',{'id': ad.getId()}) }}"
|
||||
class="btn btn-default">
|
||||
Postuler
|
||||
</a>
|
||||
</p>
|
||||
{% if not ad.isPromoted %}
|
||||
<p class="item-detail-reply">
|
||||
<a href="{{ path('talent_answer_create',{'id': ad.getId()}) }}"
|
||||
class="btn btn-default">
|
||||
Postuler
|
||||
</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% if ad.isPromoted %}
|
||||
<div class="row bg-bordered row-promoted">
|
||||
<div class="col s12 center-align">
|
||||
<h3>Vous souhaitez rejoindre <span class="color-blue1">{{ ad.company.brandname }}</span> ?</h3>
|
||||
<a href="{{ path('talent_spontaneous_application_create',{'id': ad.company.getId()}) }}"
|
||||
class="btn btn-default">
|
||||
Candidature spontanée
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="col s12 hide-on-large-only m-b-50">
|
||||
{% include 'default/ad_sidebar.html.twig' with {'ad': ad, 'showBrand': true} %}
|
||||
</div>
|
||||
|
||||
@@ -56,12 +56,18 @@
|
||||
{{ 'ad.talent.isAnswer.label'|trans }}
|
||||
</div>
|
||||
{% elseif not is_granted('ROLE_COMPANY') %}
|
||||
<p class="item-detail-reply">
|
||||
<a href="{{ path('talent_answer_create',{'id': ad.getId()}) }}"
|
||||
class="btn btn-default">
|
||||
Postuler
|
||||
</a>
|
||||
</p>
|
||||
{% if not ad.isPromoted %}
|
||||
<p class="item-detail-reply">
|
||||
<a href="{{ path('talent_answer_create',{'id': ad.getId()}) }}"
|
||||
class="btn btn-default">
|
||||
Postuler
|
||||
</a>
|
||||
</p>
|
||||
{% else %}
|
||||
<div class="item-detail-ispromoted">
|
||||
Offre pourvue
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
@@ -288,9 +288,9 @@ class AdController extends Controller
|
||||
***********************/
|
||||
|
||||
/**
|
||||
* @Route("/annonce/recherche/", name="ad_search_result")
|
||||
* @Route("/annonce/recherche/{promoted}", defaults={"promoted"=false}, name="ad_search_result")
|
||||
*/
|
||||
public function adSearchResultAction(Request $request)
|
||||
public function adSearchResultAction(Request $request, $promoted)
|
||||
{
|
||||
$session = $request->getSession();
|
||||
$form = $this->createForm(AdSearchType::class);
|
||||
@@ -307,7 +307,7 @@ class AdController extends Controller
|
||||
$adSearcher = $this->get('app.ad_searcher');
|
||||
$ads = $adSearcher->process($data);
|
||||
if(empty($ads)){
|
||||
$ads = $this->getPublishedAds();
|
||||
$ads = $this->getPublishedAds($promoted);
|
||||
$noResults = true;
|
||||
} else {
|
||||
$noResults = false;
|
||||
@@ -324,18 +324,19 @@ class AdController extends Controller
|
||||
|
||||
} else {
|
||||
|
||||
$ads = $this->getPublishedAds();
|
||||
$ads = $this->getPublishedAds($promoted);
|
||||
}
|
||||
|
||||
return $this->render('default/ad_search_result.html.twig', [
|
||||
'ads' => $ads,
|
||||
'noResults' => false
|
||||
'noResults' => false,
|
||||
'isPromotedAds' => $promoted
|
||||
]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function getPublishedAds()
|
||||
public function getPublishedAds($promoted)
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$repo = $em->getRepository('AppBundle:Ad');
|
||||
@@ -345,6 +346,17 @@ class AdController extends Controller
|
||||
$mediaManager->getThumbnails($ad);
|
||||
}
|
||||
|
||||
return $this->filterPromoted($ads, $promoted);
|
||||
}
|
||||
|
||||
public function filterPromoted($result, $promoted = "false")
|
||||
{
|
||||
$ads = array();
|
||||
foreach ($result as $ad) {
|
||||
if ($ad->getIsPromoted() === (boolean)$promoted) {
|
||||
$ads[] = $ad;
|
||||
}
|
||||
}
|
||||
return $ads;
|
||||
}
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ class AdSearcher
|
||||
{
|
||||
$ads = array();
|
||||
foreach ($result as $ad) {
|
||||
if ($ad->getStatus() == "PUBLISHED" && $ad->getIsPrivate() != true) {
|
||||
if ($ad->getStatus() == "PUBLISHED" && $ad->getIsPrivate() != true && $ad->getIsPromoted() != true) {
|
||||
$ads[] = $ad;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13129,7 +13129,7 @@ a.link-white-underline {
|
||||
padding-top: 10px; }
|
||||
|
||||
.profil-company {
|
||||
padding: 0 40px; }
|
||||
padding: 0 20px; }
|
||||
|
||||
/*************************** FLEX ****************************/
|
||||
.flexcontainer {
|
||||
@@ -13986,6 +13986,16 @@ a.link-white-underline {
|
||||
.items-list-dark .item-list p.item-list-name, .items-list-dark .item-list p.item-list-city {
|
||||
border-color: #AAAAAA; }
|
||||
|
||||
#header-resultats {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-items: flex-end;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 15px;
|
||||
font-size: 1rem; }
|
||||
#header-resultats a {
|
||||
color: #000; }
|
||||
|
||||
#liste-resultats .item-list-bis {
|
||||
margin-bottom: 20px;
|
||||
background: #FFFFFF;
|
||||
@@ -15769,6 +15779,21 @@ table.highlight > tbody > tr:hover {
|
||||
width: 101px;
|
||||
height: 101px; }
|
||||
|
||||
.item-detail-ispromoted {
|
||||
display: block;
|
||||
text-align: center;
|
||||
padding: 10px 20px;
|
||||
color: #ff9800;
|
||||
border: 1px solid #ff9800;
|
||||
border-radius: 6px;
|
||||
text-transform: uppercase;
|
||||
font-size: 1.1rem; }
|
||||
|
||||
#ad_show .row-promoted {
|
||||
padding-bottom: 40px; }
|
||||
#ad_show .row-promoted h3 span {
|
||||
text-decoration: none; }
|
||||
|
||||
#company_show .chip {
|
||||
font-size: 14px; }
|
||||
#company_show h3 {
|
||||
@@ -15788,6 +15813,11 @@ table.highlight > tbody > tr:hover {
|
||||
font-size: 16px;
|
||||
margin: 20px 0; }
|
||||
|
||||
#company_show .row-promoted {
|
||||
padding-bottom: 40px; }
|
||||
#company_show .row-promoted h3 span {
|
||||
text-decoration: none; }
|
||||
|
||||
#page-static {
|
||||
font-size: 14px;
|
||||
/***** OLD STEP *****/ }
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -70,7 +70,7 @@
|
||||
}
|
||||
|
||||
.profil-company {
|
||||
padding: 0 40px;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
/*************************** FLEX ****************************/
|
||||
|
||||
@@ -55,6 +55,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
#header-resultats{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-items: flex-end;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 15px;
|
||||
font-size: 1rem;
|
||||
a{
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
#liste-resultats {
|
||||
.item-list-bis {
|
||||
margin-bottom: 20px;
|
||||
|
||||
@@ -122,3 +122,23 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-detail-ispromoted{
|
||||
display: block;
|
||||
text-align: center;
|
||||
padding: 10px 20px;
|
||||
color: $orange;
|
||||
border: 1px solid $orange;
|
||||
border-radius: 6px;
|
||||
text-transform: uppercase;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
#ad_show .row-promoted{
|
||||
h3{
|
||||
span{
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
padding-bottom: 40px;
|
||||
}
|
||||
@@ -28,4 +28,13 @@
|
||||
margin: 20px 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#company_show .row-promoted{
|
||||
h3{
|
||||
span{
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
padding-bottom: 40px;
|
||||
}
|
||||
Reference in New Issue
Block a user