Compare commits

...

9 Commits

Author SHA1 Message Date
llaniau 605834be03 sitemap 2021-01-24 12:40:28 +01:00
llaniau dca7bf9efe tri par statut candaidature dash tt 2021-01-23 21:03:19 +01:00
llaniau 99434105e3 Bug spammer 2021-01-23 20:33:39 +01:00
llaniau d018b73fc8 Stocker adid au moment de inscription 2021-01-22 17:10:32 +01:00
llaniau 10975021c3 Lien vers cv papier Dashboard TT 2021-01-22 10:05:21 +01:00
llaniau 2af32f2835 MEP V2.5.4 2021-01-21 14:46:35 +01:00
llaniau 2c41f2aa02 Video orpheline 2021-01-21 13:44:12 +01:00
llaniau ef50bfddff version V2.5.4 2021-01-20 18:17:29 +01:00
llaniau 029d86649a site map 2021-01-20 18:15:00 +01:00
13 changed files with 230 additions and 65 deletions
@@ -70,7 +70,12 @@
<th width="11%"><input id='input4' type='text' class='form-control' placeholder='par prénom' style='font-family:Arial, FontAwesome; width:100%'/></th>
<th width="25%"><input id='input5' type='text' class='form-control' placeholder='par entreprise / offre' style='font-family:Arial, FontAwesome; width:100%'/></th>
<th width="15%"><input id='input7' type='text' class='form-control' placeholder='par statut' style='font-family:Arial, FontAwesome; width:100%'/></th>
<th width="15%">
<select id='input7'>
<option value="sended">Envoyé</option>
<option value="draft">Brouillon</option>
</select>
</th>
</tr>
</table>
@@ -22,7 +22,8 @@
<th>ID</th>
<th>Titre</th>
<th>Utilisateur</th>
<th>Status</th>
<th>Annonce?</th>
<th>Date de réponse</th>
<th>action</th>
</tr>
</thead>
@@ -30,11 +31,12 @@
<tbody>
{% for m in medias %}
<tr>
<td>{{ m.id }}</td>
<td>{{ m.title }}</td>
<td>{{ m.creator.firstname }} {{ m.creator.lastname }}</td>
<td>{{ m.mediaid }}</td>
<td><a href="{{ chemin }}{{ m.original_url }}" target="_blank">{{ m.title }}</a></td>
<td>{{ m.firstname }} {{ m.lastname }} - ({{ m.email }}) </td>
<td>{% if m.answerid %}({{ m.adtitle }}){% else %}<b>Vidéo orpheline</b>{% endif %}</td>
<td>
<span class="label pull-right bg-orange">{{ m.status }}</span>
<span class="label pull-right bg-orange">{{ m.sendtime }}</span>
</td>
<td>
<a href="{{ path('admin_video_moderation',{'id':m.id}) }}">
@@ -67,9 +69,11 @@
{"targets": 0, "searchable": true, "orderable": true},
{"targets": 1, "searchable": true, "orderable": true},
{"targets": 2, "searchable": true, "orderable": true},
{"targets": 3, "searchable": true, "orderable": true, "className": "text-center"},
{"targets": 4, "searchable": false, "orderable": false, "className": "text-center"},
]
{"targets": 3, "searchable": true, "orderable": true},
{"targets": 4, "searchable": true, "orderable": true, "className": "text-center"},
{"targets": 5, "searchable": false, "orderable": false, "className": "text-center"},
],
"order": [[ 0, "desc" ]]
});
});
</script>
@@ -21,6 +21,9 @@
<th class="col-md-2">Date de création</th>
<th>Prénom - Nom</th>
<th>Email</th>
<th>Dernière connexion</th>
<th>Validé</th>
<th>Annonce?</th>
<th class="col-md-1">Vidéos</th>
<th class="col-md-1">A la une</th>
<th>Action</th>
@@ -29,12 +32,32 @@
<tbody>
{% for talent in t if talent.MainUser %}
{% set user = talent.users|first %}
{% set adId = talent.description|split(':') %}
<tr>
<td data-order="{{ talent.cTime|date('U') }}">{{ talent.cTime|date('d/m/Y') }}</td>
<td>
{{ user.firstname }} {{ user.lastname }}
{{ user.firstname }} / {{ user.lastname }} - {% if talent.extra["phoneTalent"] is defined %} (Tel : {{ talent.extra["phoneTalent"] }}) {% endif %}
</td>
<td><a href="mailto:{{ user.email }}">{{ user.email }}</a></td>
<td>
{% if user.enabled == 1 %}
{{ user.lastLogin|date('d-m-Y h:m') }}
{% endif %}</td>
<td>
{% if user.enabled == 1 %}
oui
{% else %}
non
{% endif %}
</td>
<td> {% if adId|length > 1 %}
{% if user.medias|length > 0 %}
{% else %}
<a href="https://www.talentstube.com/Offre/{{ adId[1]|replace({' ': ''}) }}-{{ adId[1] }}" target="_blank">Lien vers l'annonce avant inscription</a>
{% endif %}
{% endif %}
</td>
<td>
{% if user.medias|length > 0 %}
{{ user.medias|length }}
@@ -90,9 +113,12 @@
{"targets": 0, "searchable": true, "orderable": true},
{"targets": 1, "searchable": true, "orderable": true},
{"targets": 2, "searchable": true, "orderable": true},
{"targets": 3, "searchable": true, "orderable": true, "className": "text-center"},
{"targets": 4, "searchable": true, "orderable": true, "className": "text-center"},
{"targets": 5, "searchable": false, "orderable": false, "className": "text-center"},
{"targets": 3, "searchable": true, "orderable": true},
{"targets": 4, "searchable": true, "orderable": true},
{"targets": 5, "searchable": true, "orderable": true},
{"targets": 6, "searchable": true, "orderable": true, "className": "text-center"},
{"targets": 7, "searchable": true, "orderable": true, "className": "text-center"},
{"targets": 8, "searchable": false, "orderable": false, "className": "text-center"},
],
"order": [[0, "desc"]]
});
@@ -1,9 +1,12 @@
{% extends 'base.html.twig' %}
{% extends 'basev2.html.twig' %}
{% block metarobot %}<meta name="robots" content="noindex,follow">{% endblock %}
{% block metarobot %}
<meta name="robots" content="noindex,follow">
<link rel="canonical" href="https://www.talentstube.com/Offres" />
{% endblock %}
{% block content %}
{% if typeObject == 'Ad' %}
{# {% if typeObject == 'Ad' %}
{% set subtitle = 'Candidature à l\'offre d\'emploi:' %}
{% set title = object.title %}
{% set route = "answer_create_ad_step2" %}
@@ -11,20 +14,20 @@
{% set subtitle = 'Candidature pour l\'entreprise :' %}
{% set title = object.brandName %}
{% set route = "answer_create_company_step2" %}
{% endif %}
{% endif %} #}
<div class="fluid-container bg-grey-3">
<div class="container contentWrapper contentPage">
<div class="row">
<div class="col s12">
{# <div class="col s12">
<div class="col-content center-align m-t-20">
<strong>{{ subtitle }}</strong>
<h3 class="color-blue1 m-0 m-t-10">{{ title }}</h3>
</div>
</div>
</div> #}
</div>
<div class="row">
<div class="col s12 m6 ">
{# <div class="col s12 m6 ">
<div class="col-content p-15 bg-blue-1 center-align whiteColor z-depth-2 choice-answer-item">
<img src="{{ asset('img/img_popupcv/webcam_cv_video.svg')}}">
<h3>J'enregistre mon CV vidéo !</h3>
@@ -40,13 +43,13 @@
<a href="{{ path(route,{'id': object.id, 'type': 'import'}) }}" class="btn btn btn-default">Importer mon CV vidéo</a><br /><br />
<a id="link-videotheque" href="{{ route_videotheque }}">Choisir une vidéo de ma vidéothèque</a>
</div>
</div>
</div> #}
</div>
</div>
</div>
</div>
{% endblock %}
{% block javascripts %}
{{ parent() }}
{# {{ parent() }}
<script type="text/javascript">
{% if mustLogin == true %}
$('#link-videotheque').on('click',function(event){
@@ -54,5 +57,5 @@
$('#modal_login').modal('open');
});
{% endif %}
</script>
</script> #}
{% endblock %}
@@ -15,7 +15,7 @@
<!-- Required Meta Tags Always Come First -->
<meta charset="utf-8">
<meta name="robots" content="noindex,nofollow">
{# <meta name="robots" content="noindex,nofollow"> #}
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
{% block meta %}
{% endblock %}
+1 -1
View File
@@ -80,7 +80,7 @@ twig:
globals:
push_public_key: "%push_params.public_key%"
fairlane_cookie_consent: '@fairlane_cookie_consent.twig'
version: '2.5.2'
version: '2.5.4'
@@ -159,6 +159,16 @@ class AnswerController extends AbstractController
// But if that werent't the case, its value should have been tested
// before assigning it to $responseTemp
$responseTemp = $answer->getUser()->getFirstname();
if($answer->getUser()->getCompany()){
if($answer->getUser()->getCompany()->getCv()){
if ($this->container->get( 'kernel' )->getEnvironment() == "dev") {
$cheminCv = "../../../../../uploads/cv/";
}else{
$cheminCv = "../../../../uploads/cv/";
}
$responseTemp .= "<br> <a target='_blank' href='".$cheminCv.$answer->getUser()->getCompany()->getCv()."'>Lien vers le CV papier</a>";
}
}
break;
}
@@ -206,7 +216,12 @@ class AnswerController extends AbstractController
}
case 'status':
{
$responseTemp = "<span id='status_".$answer->getId()."'> ".$answer->getstatus()."</span> ";
if($answer->getstatus()=="SENDED"){
$status= "ENVOYE <br><small>car ça choque Sarah Sended</small>";
}else{
$status=$answer->getstatus();
}
$responseTemp = "<span id='status_".$answer->getId()."'> ".$status."</span> ";
break;
@@ -24,10 +24,15 @@ class MediaController extends Controller
public function adminVideoModerationListAction()
{
$em = $this->getDoctrine()->getManager();
$medias = $em->getRepository('AppBundle:Media')->findByStatus('TO_MODERATE');
$medias = $em->getRepository('AppBundle:Media')->getMedias();
if ($this->container->get( 'kernel' )->getEnvironment() == "dev") {
$chemin="../../../../uploads/videos/";
}else{
$chemin="../../../uploads/videos/";
}
return $this->render('admin/media_list_moderation.html.twig', array(
'medias' => $medias,
'chemin' => $chemin,
));
}
@@ -271,42 +271,37 @@ class AnswerController extends Controller
*/
public function talentCreateSpontaneaousAction(Request $request, Company $company)
{
$securityContext = $this->container->get('security.authorization_checker');
if (!$securityContext->isGranted('IS_AUTHENTICATED_FULLY')) {
$this->createAnonymousUser();
}
$em = $this->getDoctrine()->getManager();
$existAnswer = $em->getRepository('AppBundle:Answer')->findOneBy(array('user' => $this->getUser(), 'company' => $company));
if ($existAnswer) {
if ($existAnswer->getStatus() == "SENDED") {
$answer = new Answer($this->getUser(), null, 'DRAFT', $company);
$em->persist($answer);
$em->flush();
} else {
$answer = $existAnswer;
}
} else {
$answer = new Answer($this->getUser(), null, 'DRAFT', $company);
$em->persist($answer);
$em->flush();
}
$em->persist($answer);
$em->flush();
$user = $this->getUser();
$mustLogin = false;
if (!$user->hasRole('ROLE_TALENT')) {
$mustLogin = true;
}
$route_videotheque = $this->generateUrl("answer_create_company_step2", array('id' => $company->getId(), 'type' => 'videotheque'));
$this->get('twig')->addGlobal('destination_login', $route_videotheque);
// $securityContext = $this->container->get('security.authorization_checker');
// if (!$securityContext->isGranted('IS_AUTHENTICATED_FULLY')) {
// $this->createAnonymousUser();
// }
// $em = $this->getDoctrine()->getManager();
// $existAnswer = $em->getRepository('AppBundle:Answer')->findOneBy(array('user' => $this->getUser(), 'company' => $company));
// if ($existAnswer) {
// if ($existAnswer->getStatus() == "SENDED") {
// $answer = new Answer($this->getUser(), null, 'DRAFT', $company);
// $em->persist($answer);
// $em->flush();
// } else {
// $answer = $existAnswer;
// }
// } else {
// $answer = new Answer($this->getUser(), null, 'DRAFT', $company);
// $em->persist($answer);
// $em->flush();
// }
// $em->persist($answer);
// $em->flush();
// $user = $this->getUser();
// $mustLogin = false;
// if (!$user->hasRole('ROLE_TALENT')) {
// $mustLogin = true;
// }
// $route_videotheque = $this->generateUrl("answer_create_company_step2", array('id' => $company->getId(), 'type' => 'videotheque'));
// $this->get('twig')->addGlobal('destination_login', $route_videotheque);
return $this->render('answer/answer_create_step1.html.twig', array(
'typeObject' => 'Company',
'answer' => $answer,
'object' => $company,
'mustLogin' => $mustLogin,
'route_videotheque' => $route_videotheque,
));
return $this->render('answer/answer_create_step1.html.twig'
);
}
/**
@@ -100,6 +100,7 @@ class SecurityController extends FOSRestController
$alias = $slugService->slugify($user->getId() . "-" . $user->getFirstname() . "-" . $user->getLastname());
$company->setAlias($alias);
$company->setType("TALENT");
$company->setDescription("Annonce consultée : ".$adId);
$user->setCompany($company);
$userManager->updateUser($user);
}
@@ -338,4 +338,26 @@ class AnswerRepository extends AbstractRepository
"countResult" => $countResult
);
}
public function getMedias()
{
$qb = $this
->createQueryBuilder('a')
->select(['a','video'])
->leftJoin('a.video', 'video')
->andWhere('video.status = :status')
->setParameter(':status', "TO_MODERATE")
->orderBy('video.id', 'DESC');
$medias = $qb->getQuery()->getResult();
return $medias;
}
}
@@ -2,12 +2,44 @@
namespace AppBundle\Repository;
use Doctrine\ORM\EntityRepository;
/**
* MediaRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class MediaRepository extends \Doctrine\ORM\EntityRepository
class MediaRepository extends AbstractRepository
{
public function getMedias()
{
$qb = $this
->createQueryBuilder('m')
->andWhere('m.status = :status')
->setParameter(':status', "TO_MODERATE")
->orderBy('m.id', 'DESC');
$medias = $qb->getQuery()->getResult();
$rawSql = "SELECT m.id as mediaid, m.title as title, m.original_url as original_url , u.* , a.id as answerId, a.send_time as sendtime, ad.title as adTitle
FROM media AS m
JOIN fos_user AS u ON (u.id=m.creator_id)
LEFT JOIN answer AS a ON (a.video_id=m.id)
LEFT JOIN ad AS ad ON (ad.id=a.ad_id)
WHERE m.status='TO_MODERATE'
ORDER by m.id DESC";
$stmt = $this->getEntityManager()->getConnection()->prepare($rawSql);
$stmt->execute([]);
return $stmt->fetchAll();
//return $medias;
}
}
+57
View File
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<!-- created with Free Online Sitemap Generator www.xml-sitemaps.com -->
<url>
<loc>https://recruteur.talentstube.com/</loc>
<lastmod>2020-11-18T16:05:39+00:00</lastmod>
<priority>1.00</priority>
</url>
<url>
<loc>https://recruteur.talentstube.com/offre-emploi-video</loc>
<lastmod>2020-11-18T16:05:39+00:00</lastmod>
<priority>0.80</priority>
</url>
<url>
<loc>https://recruteur.talentstube.com/marque-employeur-video</loc>
<lastmod>2020-11-18T16:05:39+00:00</lastmod>
<priority>0.80</priority>
</url>
<url>
<loc>https://recruteur.talentstube.com/candidatures-video</loc>
<lastmod>2020-11-18T16:05:39+00:00</lastmod>
<priority>0.80</priority>
</url>
<url>
<loc>https://recruteur.talentstube.com/mentions-legales</loc>
<lastmod>2020-11-18T16:05:39+00:00</lastmod>
<priority>0.80</priority>
</url>
<url>
<loc>https://recruteur.talentstube.com/cgu</loc>
<lastmod>2020-11-18T16:05:39+00:00</lastmod>
<priority>0.80</priority>
</url>
<url>
<loc>https://recruteur.talentstube.com/politique-confidentialite</loc>
<lastmod>2020-11-18T16:05:39+00:00</lastmod>
<priority>0.80</priority>
</url>
<url>
<loc>https://recruteur.talentstube.com/abonnement</loc>
<lastmod>2020-11-18T16:05:39+00:00</lastmod>
<priority>0.80</priority>
</url>
<url>
<loc>https://recruteur.talentstube.com/register/</loc>
<lastmod>2020-11-18T16:05:39+00:00</lastmod>
<priority>0.80</priority>
</url>
</urlset>