Compare commits

...

8 Commits

Author SHA1 Message Date
Thomas MONCHICOURT feca14ae4d Fix : ajouter au menu et changement status direct #7177 @0h10 2018-09-05 12:26:58 +02:00
Thomas MONCHICOURT 33c1221cb2 Feat : lister les candidatures en admin #7177 @1h 2018-09-05 12:16:56 +02:00
Thomas MONCHICOURT b13ebb9d0f Fix: birtday date error on save 2018-08-29 14:20:53 +02:00
Maxime Thévenot 76f557501e Fix : update registration template to fix button 2018-08-28 15:27:09 +02:00
Maxime Thévenot 2eb399776b Fix : hover color on territory title 2018-08-28 11:44:22 +02:00
Maxime Thévenot 8986ae738a Fix : typo in wording and redirect castre mazamet 2018-08-28 11:29:07 +02:00
Thomas MONCHICOURT 7dfaf01705 Fix : correction template pour message direct au talent 2018-08-27 12:22:26 +02:00
Thomas MONCHICOURT a4631872e0 Fix : https on graph picture facebook 2018-08-24 12:24:04 +02:00
12 changed files with 183 additions and 13 deletions
+2 -1
View File
@@ -11,4 +11,5 @@ rewrite ^/page/presentation-talent$ https://www.talentstube.com/cv-video perma
rewrite ^/page/la-plateforme$ https://www.talentstube.com/ permanent;
rewrite ^/tarifs$ https://www.talentstube.com/accompagnement-entreprise permanent;
rewrite ^/annonce/38-charge-de-projets-developpement-h-f$ https://www.talentstube.com/annonce/38-charge-de-projets-developpement-cosmetique-h-f permanent;
rewrite ^/annonce/recherche/$ https://www.talentstube.com/annonce/recherche permanent;
rewrite ^/annonce/recherche/$ https://www.talentstube.com/annonce/recherche permanent;
rewrite ^/territoire/1573-communaute-d-agglomeration-castres-mazamet/$ https://www.talentstube.com/territoire/1573-castres-mazamet/ permanent;
@@ -15,7 +15,7 @@
</p>
{% endif %}
<br/><br/>
{% if app.request.cookies.get('redirect_register')is defined %}
{% if app.request.cookies.get('redirect_register') is defined and app.request.cookies.get('redirect_register') is not null %}
<div class="center">
<a href="{{ app.request.cookies.get('redirect_register') }}" class="btn btn-default">Poursuivre votre candidature</a>
</div>
@@ -0,0 +1,104 @@
{% extends 'admin/base_admin.html.twig' %}
{% block contentHeader %}
<h1>
Liste des Candidatures
</h1>
<ol class="breadcrumb">
<li><a href="{{ path('admin_dashboard') }}"><i class="fa fa-dashboard"></i> Dashboard</a></li>
<li class="active">Annonces</li>
</ol>
{% endblock %}
{% block content %}
<div class="box box-primary">
<div class="box-body">
<table id="answer_list_table" class="table table-hover table-bordered">
<thead>
<tr>
<th class="col-xs-2">Date d'envoi</th>
<th>Utilisateur</th>
<th>Annonce / Entreprise</th>
<th>video</th>
<th>Status</th>
<th>action</th>
</tr>
</thead>
<tbody>
{% for answer in answers if answer.status != "DRAFT" %}
<tr>
<td data-order="{{ answer.sendTime|date('U') }}">{{ answer.sendTime|date('d/m/Y') }}</td>
<td>{{ answer.user.firstname }} {{ answer.user.lastname }}</td>
{% if answer.ad %}
<td>{{ answer.ad.company.brandname }} - {{ answer.ad.title }}</td>
{% else %}
<td>{{ answer.company.brandname }}</td>
{% endif %}
<td>
<iframe src="https://player.vimeo.com/video/{{ answer.video.cdnUrl|replace({ "/videos/": ""}) }}"
width="auto" height="auto" frameborder="0" webkitallowfullscreen mozallowfullscreen
allowfullscreen></iframe>
</td>
<td class="status">{{ answer.status }}</td>
<td>
Actions :
<select class="changeStatus" name="changeStatus" data-id="{{ answer.id }}">
<option value="null">choisir</option>
<option value="DRAFT">Brouillon</option>
<option value="REFUSED">Refuser</option>
</select>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endblock %}
{% block javascripts %}
<script>
$(function () {
$('.changeStatus').change(function(e){
e.preventDefault();
var idAnswer = $(this).data('id');
var value = $(this).val();
var route = '/app_dev.php/admin/config/answer/' + idAnswer + '/status/' + value;
var select = $(this);
$.ajax({
type: "POST",
url: route,
dataType: "json",
success: function (msg) {
console.log("ok");
select.parent().prev('.status').html(value);
}
});
});
$('#answer_list_table').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"info": true,
"autoWidth": false,
"language": {
"url": "http://cdn.datatables.net/plug-ins/1.10.11/i18n/French.json"
},
"columnDefs": [
{"targets": 1, "searchable": true, "orderable": true},
{"targets": 2, "searchable": true, "orderable": true},
{"targets": 4, "searchable": true, "orderable": true, "className": "text-center"},
],
"order": [[ 0, "desc" ]]
});
});
</script>
{% endblock %}
@@ -28,6 +28,11 @@
<i class="fa fa-file-video-o" aria-hidden="true"></i> <span>Vidéos Talent</span>
</a>
</li>
<li>
<a href="{{ path('admin_anwser_moderation_list') }}">
<i class="fa fa-file-video-o" aria-hidden="true"></i> <span>Candidatures</span>
</a>
</li>
</ul>
<ul class="sidebar-menu">
<li class="header">ENTITEES</li>
@@ -133,7 +133,7 @@
{% if t.extra.terType is defined %}
<div class="m-t-15 fs-12 text-100">{{ t.extra.terType|upper }}</div>
{% endif %}
<div class="m-t-5">
<div class="m-t-5 hover-none">
<a href="{{ path('territory_show',{'alias': t.alias }) }}" class="color-white td-none">{{ t.brandName|upper }}</a>
</div>
</div>
@@ -0,0 +1,48 @@
<?php
namespace AppBundle\Controller\Admin;
use AppBundle\Entity\Answer;
use AppBundle\Entity\Ad;
use AppBundle\Form\Admin\AdType;
use AppBundle\Form\Admin\ModerationDeclineType;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\JsonResponse;
class AnswerController extends Controller
{
/***********************
* MODERATION
***********************/
/**
* @Route("/admin/moderation/anwser/list", name="admin_anwser_moderation_list")
*/
public function adminAnswerModerationListAction()
{
$em = $this->getDoctrine()->getManager();
$answers = $em->getRepository('AppBundle:Answer')->findAll();
return $this->render('admin/answer_list_moderation.html.twig', array(
'answers' => $answers,
));
}
/**
* @Route("/admin/config/answer/{id}/status/{status}", name="admin_answer_status")
*/
public function adminStatusAnswerAction(Answer $answer, $status)
{
$em = $this->getDoctrine()->getManager();
$answer->setStatus($status);
$em->persist($answer);
$em->flush();
$result = array("msg" => "toggle ok");
return new JsonResponse($result);
}
}
@@ -56,7 +56,7 @@ class TalentController extends Controller
$form = $this->createForm(TalentProfileType::class, $user);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$birthday = new \DateTime($form->getData()->getBirthday());
$birthday = \DateTime::createFromFormat('d/m/Y', $form->getData()->getBirthday());
$user->setBirthday($birthday);
$companyManager = $this->get('app.company_manager');
$companyManager->updateTalent($user);
@@ -218,12 +218,12 @@ class TalentController extends Controller
if ($form->isSubmitted() && $form->isValid()) {
$userCompany = $this->getUser();
$message = $form['message']->getData();
$htmlView = $this->renderView('email/contact_talent.html.twig', array(
$htmlView = $this->renderView('email/contact_default.html.twig', array(
'type' => 'html',
'message' => $message,
'user' => $user{0},
));
$plainView = $this->renderView('email/contact_talent.html.twig', array(
$plainView = $this->renderView('email/contact_default.html.twig', array(
'type' => 'plain',
'message' => $message,
'user' => $user{0},
@@ -107,7 +107,7 @@ class TerritoryAdminType extends AbstractType
'data' => $terType,
'choices' => array(
'Région' => 'Région',
'Communauté d\'aglgomération' => 'Communauté d\'aglgomération',
'Communauté d\'agglomération' => 'Communauté d\'agglomération',
'Communauté de commune' => 'Communauté de commune',
'Commune' => 'Commune',
'Département' => 'Département',
@@ -146,7 +146,7 @@ class FOSUBUserProvider extends BaseFOSUBProvider
$lastname = $data['lastName'];
} else {
$userPhoto = 'http://graph.facebook.com/'.$data['id'].'/picture?height=200';
$userPhoto = 'https://graph.facebook.com/'.$data['id'].'/picture?height=200';
if(isset($data['birthday'])){
$birthday = \DateTime::createFromFormat ('m/d/Y', $data['birthday']);
} else {
+4 -1
View File
@@ -2800,11 +2800,14 @@
.overlay-hover {
opacity: 0.7;
transition: .5s ease;
transition: 0.5s ease;
backface-visibility: hidden; }
.overlay-hover:hover {
opacity: 1; }
.hover-none a:hover {
color: #ffffff; }
.color-white {
color: #FFFFFF; }
+4 -3
View File
@@ -13159,11 +13159,14 @@ coloring of icons.
.overlay-hover {
opacity: 0.7;
transition: .5s ease;
transition: 0.5s ease;
backface-visibility: hidden; }
.overlay-hover:hover {
opacity: 1; }
.hover-none a:hover {
color: #ffffff; }
.color-white {
color: #FFFFFF; }
@@ -16658,5 +16661,3 @@ tbody td {
#talent-show .recommendation-user-infos .recommendation-date {
font-size: 14px;
color: #1E2327; }
/*# sourceMappingURL=styles.css.map */
@@ -472,9 +472,17 @@
.overlay-hover {
opacity: 0.7;
transition: .5s ease;
transition: 0.5s ease;
backface-visibility: hidden;
&:hover {
opacity: 1;
}
}
.hover-none {
a {
&:hover {
color: #ffffff;
}
}
}