Compare commits

...

7 Commits

Author SHA1 Message Date
Thomas MONCHICOURT b0b1179bdc Feat : Modification listing company #6269 @1h30 2018-04-24 14:16:19 +02:00
Thomas MONCHICOURT 0e2494797e Fix : Bloc vidéo après mot clés #6266 @0h25 2018-04-23 16:09:00 +02:00
Thomas MONCHICOURT 69a7595966 Fix : page detail territoire 2018-04-23 16:04:33 +02:00
Thomas MONCHICOURT e404b4d876 Merge branch 'develop' 2018-04-23 16:00:15 +02:00
Thomas MONCHICOURT fa8b21b93c Merge branch 'develop' of https://git.e-declic.net/talents-tube/website into develop 2018-04-23 15:59:43 +02:00
Thomas MONCHICOURT 8e8312c0f9 Feat : modification video territoire #6266 @0H15 2018-04-23 15:59:40 +02:00
Maxime Thévenot 0297191e07 Fix : update teritory sorting order 2018-04-20 15:23:45 +02:00
4 changed files with 45 additions and 13 deletions
@@ -100,7 +100,7 @@
{"targets": 3, "searchable": true, "orderable": true, "className": "text-center"},
{"targets": 4, "searchable": false, "orderable": false, "className": "text-center"},
],
"order": [[0, "asc"]]
"order": [[0, "desc"]]
});
});
</script>
@@ -88,11 +88,6 @@
<div class="item-detail-description">
<p>{{ company.description|nl2br }}</p>
</div>
{% if company.descriptionAdmin %}
<div class="item-detail-description-bo">
<p>{{ company.descriptionAdmin|raw }}</p>
</div>
{% endif %}
<h3 class="blue-text">Les mots clés</h3>
{% for tag in company.publicTag %}
<p class="chip">{{ tag }}</p>
@@ -100,6 +95,17 @@
</div>
</div>
</div>
{% if company.descriptionAdmin %}
<div class="col s12 m12 l8 xl9 right">
<div class="row bg-bordered">
<div class="col s12">
<div class="item-detail-description-bo">
<p>{{ company.descriptionAdmin|raw }}</p>
</div>
</div>
</div>
</div>
{% endif %}
{% if companyAds|length > 0 %}
<div id="offers" class="row">
<div class="col s12">
@@ -86,9 +86,9 @@ class Company
/**
* @ORM\OneToOne(targetEntity="AppBundle\Entity\Media", cascade={"persist"})
* @ORM\JoinColumn(nullable=true)
* @ORM\JoinColumn(name="presentation_video_id", nullable=true)
*/
private $presentation_video;
private $presentationVideo;
/**
* @var string
@@ -498,7 +498,7 @@ class Company
*/
public function setPresentationVideo(\AppBundle\Entity\Media $presentationVideo = null)
{
$this->presentation_video = $presentationVideo;
$this->presentationVideo = $presentationVideo;
return $this;
}
@@ -510,7 +510,7 @@ class Company
*/
public function getPresentationVideo()
{
return $this->presentation_video;
return $this->presentationVideo;
}
/**
@@ -14,6 +14,16 @@ class CompanyRepository extends EntityRepository
{
public function getCompanySortByAds()
{
$qb = $this
->createQueryBuilder('c')
->andWhere('c.type = :type')
->setParameter(':type', "COMPANY")
->andWhere('c.presentationVideo IS NOT NULL')
->orderBy('c.cTime', 'DESC');
$badCompany = $qb->getQuery()->getResult();
$qb = $this
->createQueryBuilder('c')
->from('AppBundle:Ad', 'a')
@@ -21,10 +31,26 @@ class CompanyRepository extends EntityRepository
->andWhere('a.status = :status')
->orderBy('a.publishedAt', 'DESC')
->setParameter(':status', "PUBLISHED");
$firstCompany = $qb->getQuery()->getResult();
return $qb
->getQuery()
->getResult();
$mergeArray = array();
array_map(function($a, $b) use (&$mergeArray) {
if($a){
if(!isset($mergeArray[$a->getId()])) {
$mergeArray[$a->getId()] = $a;
}
}
if ($b) {
if (!isset($mergeArray[$b->getId()])) {
$mergeArray[$b->getId()] = $b;
}
}
}, $firstCompany, $badCompany);
return $mergeArray;
}
public function getTerritorySortByAds()