Compare commits
108 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| feca14ae4d | |||
| 33c1221cb2 | |||
| b13ebb9d0f | |||
| 76f557501e | |||
| 2eb399776b | |||
| 8986ae738a | |||
| 7dfaf01705 | |||
| a4631872e0 | |||
| ddc6b18d0a | |||
| 6033516273 | |||
| 73a44a011d | |||
| 57299b841e | |||
| fb11613b7c | |||
| e13ef32197 | |||
| e70c1c7f5e | |||
| 0c9c4f0fc2 | |||
| 5cd78b272a | |||
| f3597146ad | |||
| f52f49ce9a | |||
| 0b6a04e8d0 | |||
| 0dfc9af863 | |||
| fc548bc74c | |||
| 5d78b30bef | |||
| 7372b03e5c | |||
| eadb2a397f | |||
| 6f5118e500 | |||
| 85abb49683 | |||
| 6fb0ad4d40 | |||
| 1ab9cf6703 | |||
| e8ab042fe5 | |||
| 009bea43ef | |||
| 0abfa0dca8 | |||
| 7510b8022a | |||
| 69e6f6c16b | |||
| 4981a3d310 | |||
| 13ec5f3d34 | |||
| a08b13591a | |||
| a470518403 | |||
| 64e76b29f5 | |||
| 983e0b03be | |||
| 45cb8896de | |||
| 9bf7065984 | |||
| 243d1e3945 | |||
| 16951ee895 | |||
| e5ce4c7127 | |||
| 18c12c3b3a | |||
| 13adc1b87c | |||
| 75e0f4b99e | |||
| 9d659eea7e | |||
| 8a987d48c1 | |||
| e6d9c72f62 | |||
| a92ab7f3cc | |||
| d1c37dfd23 | |||
| a9b16a7a84 | |||
| 962b9f0633 | |||
| d413fee495 | |||
| 058763fdbb | |||
| b19184b11b | |||
| 642958639c | |||
| 353151a440 | |||
| 4bb64ce3e2 | |||
| c9d52ed240 | |||
| 0c808e2513 | |||
| 7e22a202c2 | |||
| 8907b9232a | |||
| 1f588171ef | |||
| 681e5add11 | |||
| 16145c81c0 | |||
| 8a3f502129 | |||
| aad4dcb110 | |||
| 129dd22cbb | |||
| 2387b1c922 | |||
| c43a7655e7 | |||
| 55e8eaf6cd | |||
| db9f554792 | |||
| 820cc048eb | |||
| 1c99889e89 | |||
| 552c9ecf9e | |||
| 8bb8afbee7 | |||
| daee96533d | |||
| c09f6f0b62 | |||
| 7494173cde | |||
| 0dcc5111f4 | |||
| 4cdd9dc256 | |||
| 00f38cf4f7 | |||
| 5ab04175b8 | |||
| ce3eda07b4 | |||
| 3b4ebf343a | |||
| c9b4a2b30f | |||
| acb87af087 | |||
| 8a14b86f03 | |||
| c05edac0fd | |||
| 7a2be30f15 | |||
| e183729687 | |||
| ce498eb526 | |||
| 4d09bf2ddf | |||
| d8ee626298 | |||
| 50e9f45369 | |||
| c9663ab0d9 | |||
| 33fc07121b | |||
| a71e6692a6 | |||
| 2ef6707342 | |||
| 728f16ee06 | |||
| 05d9bcced2 | |||
| 7d2f3353eb | |||
| 5d4249984d | |||
| d7114a0219 | |||
| 672d2148c2 |
@@ -0,0 +1,13 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
nginx:
|
||||
networks:
|
||||
- default
|
||||
- frontnginx_front
|
||||
|
||||
networks:
|
||||
default:
|
||||
driver: bridge
|
||||
frontnginx_front:
|
||||
external: true
|
||||
@@ -1,44 +1,22 @@
|
||||
|
||||
upstream website_php-preprod {
|
||||
server tt.website-preprod:9000;
|
||||
server tt-website.php.preprod:9000;
|
||||
}
|
||||
|
||||
upstream store_php-preprod {
|
||||
server tt.store-preprod:9000;
|
||||
server tt-website.store-php.preprod:9000;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name pp.talentstube.com;
|
||||
return 301 https://pp.talentstube.com$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen 80;
|
||||
server_name pp.talentstube.com;
|
||||
|
||||
client_max_body_size 500M;
|
||||
root /home/www/website/www/web;
|
||||
|
||||
root /home/www/pp.talentstube.com/www/web;
|
||||
access_log /home/www/website/log/access.log vhosts;
|
||||
error_log /home/www/website/log/error.log;
|
||||
|
||||
access_log /home/www/pp.talentstube.com/log/access.log vhosts;
|
||||
error_log /home/www/pp.talentstube.com/log/error.log;
|
||||
|
||||
ssl on;
|
||||
ssl_certificate /etc/ssl/private/talentstube.com.chain.crt;
|
||||
ssl_certificate_key /etc/ssl/private/talentstube.com.key;
|
||||
|
||||
ssl_session_timeout 24h;
|
||||
ssl_session_cache shared:SSL:10m;
|
||||
|
||||
ssl_dhparam /etc/ssl/dhparam.pem;
|
||||
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||||
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
location / {
|
||||
# try to serve file directly, fallback to app.php
|
||||
try_files $uri /app.php$is_args$args;
|
||||
}
|
||||
|
||||
@@ -85,7 +63,7 @@ server {
|
||||
# ---- PRESTASHOP ----
|
||||
location ^~ /store/ {
|
||||
|
||||
root /home/www/pp.talentstube.com;
|
||||
root /home/www/website;
|
||||
index index.php;
|
||||
try_files $uri $uri/ /www/index.php;
|
||||
|
||||
@@ -115,6 +93,6 @@ server {
|
||||
|
||||
sendfile off;
|
||||
|
||||
include /home/www/pp.talentstube.com/conf/redirect.conf;
|
||||
include /home/www/pp.talentstube.com/conf/expires.conf;
|
||||
include /home/www/website/conf/redirect.conf;
|
||||
include /home/www/website/conf/expires.conf;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
+1
-1
@@ -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>
|
||||
|
||||
+14
-7
@@ -9,13 +9,20 @@
|
||||
{% set text_accept_button = fairlane_cookie_consent.twig.text_accept_button %}
|
||||
{% endif %}
|
||||
<div id="fairlane-cookie-consent" {% if fairlane_cookie_consent.useBootstrap == true %}class="navbar navbar-fixed-top"{% endif %}>
|
||||
<p>
|
||||
{{ text_info }}
|
||||
{% if fairlane_cookie_consent.twig.url_additional_info| length > 1 and text_additional_info_link | length > 1 %}
|
||||
<a href="{{ fairlane_cookie_consent.twig.url_additional_info }}" target="_blank">{{ text_additional_info_link }}</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
<button class="btn btn-default">{{ text_accept_button }}</button>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col s8">
|
||||
<p>{{ text_info }}
|
||||
{% if fairlane_cookie_consent.twig.url_additional_info| length > 1 and text_additional_info_link | length > 1 %}
|
||||
<a href="{{ fairlane_cookie_consent.twig.url_additional_info }}" target="_blank">{{ text_additional_info_link }}</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
<div class="col s4">
|
||||
<button class="btn btn-default">{{ text_accept_button }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if fairlane_cookie_consent.useJquery %}
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -59,6 +59,34 @@
|
||||
<trans-unit id="DECLINED">
|
||||
<source>DECLINED</source>
|
||||
<target>Refusée</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="NEW">
|
||||
<source>NEW</source>
|
||||
<target>Nouveau</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VIEWED">
|
||||
<source>VIEWED</source>
|
||||
<target>Visionnée</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="NEGATIVE">
|
||||
<source>NEGATIVE</source>
|
||||
<target>Négatif</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="POSITIVE">
|
||||
<source>POSITIVE</source>
|
||||
<target>Positif</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="INFOS">
|
||||
<source>INFOS</source>
|
||||
<target>Demande d’informations</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="CONTACTED">
|
||||
<source>CONTACTED</source>
|
||||
<target>Demande d’informations</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="CONTACTED.RDV">
|
||||
<source>CONTACTED.RDV</source>
|
||||
<target>Convocation entretien</target>
|
||||
</trans-unit>
|
||||
<!-- MENU COMPANY-->
|
||||
<trans-unit id="profile.territory.brandname">
|
||||
@@ -79,7 +107,11 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="company.menu.ads.label">
|
||||
<source>company.menu.ads.label</source>
|
||||
<target>Mes annonces</target>
|
||||
<target>Espace offres d'emploi</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="company.title.ads.label">
|
||||
<source>company.title.ads.label</source>
|
||||
<target>Mes offres d'emploi</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="company.menu.bookmark.label">
|
||||
<source>company.menu.bookmark.label</source>
|
||||
@@ -87,7 +119,11 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="company.menu.answers.label">
|
||||
<source>company.menu.answers.label</source>
|
||||
<target>Réponses</target>
|
||||
<target>Candidatures</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="company.menu.spontaneous.label">
|
||||
<source>company.menu.spontaneous.label</source>
|
||||
<target>Candidatures spontanées</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="company.menu.videotheque.label">
|
||||
<source>company.menu.videotheque.label</source>
|
||||
@@ -193,7 +229,7 @@
|
||||
<!-- ANNONCE-->
|
||||
<trans-unit id="ad.company.add.label">
|
||||
<source>ad.company.add.label</source>
|
||||
<target>Ajouter une annonce</target>
|
||||
<target>Ajouter une offre</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="ad.company.video.edit.label">
|
||||
<source>ad.company.video.edit.label</source>
|
||||
@@ -233,7 +269,7 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="ad.company.list.status">
|
||||
<source>ad.company.list.status</source>
|
||||
<target>Statuts</target>
|
||||
<target>Statut</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="ad.save.extension.title">
|
||||
<source>ad.save.extension.title</source>
|
||||
@@ -260,6 +296,14 @@
|
||||
<trans-unit id="profile.talent.account.title">
|
||||
<source>profile.talent.account.title</source>
|
||||
<target>Informations de compte</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="talent.menu.answers.label">
|
||||
<source>talent.menu.answers.label</source>
|
||||
<target>Mes candidatures</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="talent.menu.recommandations.label">
|
||||
<source>talent.menu.recommandations.label</source>
|
||||
<target>Mes recommandations</target>
|
||||
</trans-unit>
|
||||
<!-- TALENT -->
|
||||
<trans-unit id="ad.talent.answer.label">
|
||||
@@ -394,7 +438,122 @@
|
||||
|
||||
Talents Tube
|
||||
</target>
|
||||
</trans-unit>
|
||||
</trans-unit>
|
||||
<!-- Recommendations -->
|
||||
<trans-unit id="label.recommendations">
|
||||
<source>label.recommendations</source>
|
||||
<target>Recommandations</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="label.button.recommendation">
|
||||
<source>label.button.recommendation</source>
|
||||
<target>Je recommande</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="label.link.readmore">
|
||||
<source>label.link.readmore</source>
|
||||
<target>Lire la suite</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="label.choice.imtheboss">
|
||||
<source>label.choice.imtheboss</source>
|
||||
<target>%{name} était sous votre responsabilité</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="label.choice.sheistheboss">
|
||||
<source>label.choice.sheistheboss</source>
|
||||
<target>Vous étiez sous la responsabilité de %{name} </target>
|
||||
</trans-unit>
|
||||
<trans-unit id="label.choice.sheismyscollege">
|
||||
<source>label.choice.sheismyscollege</source>
|
||||
<target>Vous avez travaillé avec %{name} dans la même entreprise</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="label.front.imtheboss">
|
||||
<source>label.front.imtheboss</source>
|
||||
<target>%{name2} était responsable de %{name}</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="label.front.sheistheboss">
|
||||
<source>label.front.sheistheboss</source>
|
||||
<target>%{name2} était sous la responsabilité de %{name}</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="label.front.sheismyscollege">
|
||||
<source>label.front.sheismyscollege</source>
|
||||
<target>%{name} et %{name2} étaient collègues</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="recommendation.email.message.html">
|
||||
<source>recommendation.email.message.html</source>
|
||||
<target><![CDATA[
|
||||
<div style="margin:0 auto;max-width:600px;background:#FFFFFF;"><table class="" cellpadding="0" cellspacing="0" style="width:100%;font-size:0px;background:#FFFFFF;" align="center"><tbody><tr><td style="text-align:center;vertical-align:top;font-size:0;padding:0px;"><!--[if mso]>
|
||||
<table border="0" cellpadding="0" cellspacing="0"><tr><td style="width:600px;">
|
||||
<![endif]--><div style="vertical-align:top;display:inline-block;font-size:13px;text-align:left;width:100%;" class="mj-column-per-100" aria-labelledby="mj-column-per-100"><table width="100%"><tbody><tr><td style="font-size:0;padding:40px 35px 20px 35px;" align="left"><div class="mj-content" style="cursor:auto;color:#534F4F;font-family:Trebuchet,Helvetica,sans-serif;font-size:14px;line-height:22px;"><p>Bonjour %firstname% %lastname%,</p>
|
||||
<p>Vous avez reçu une recommandation vidéo de %firstname_sender% %lastname_sender%.</p>
|
||||
<p>La recommandation est inactive par défaut, vous pouvez l’activer dans votre espace recommandations.</p>
|
||||
</div></td></tr></tbody></table></div><!--[if mso]>
|
||||
</td></tr></table>
|
||||
<![endif]--></td></tr></tbody></table></div>
|
||||
<div style="margin:0 auto;max-width:600px;background:#FFFFFF;"><table class="" cellpadding="0" cellspacing="0" style="width:100%;font-size:0px;background:#FFFFFF;" align="center"><tbody><tr><td style="text-align:center;vertical-align:top;font-size:0;padding:0px;"><!--[if mso]>
|
||||
<table border="0" cellpadding="0" cellspacing="0"><tr><td style="width:600px;">
|
||||
<![endif]--><div style="vertical-align:top;display:inline-block;font-size:13px;text-align:left;width:100%;" class="mj-column-per-100" aria-labelledby="mj-column-per-100"><table width="100%"><tbody><tr><td style="font-size:0;padding:15px 30px;" align="center"><table cellpadding="0" cellspacing="0" style="border:none;border-radius:30px;" align="center"><tbody><tr><td style="background:#1689FB;border-radius:30px;color:#FFFFFF;cursor:auto;" align="center" valign="middle" bgcolor="#1689FB"><a class="mj-content" href="%recommendationUrl%" style="display:inline-block;text-decoration:none;background:#1689FB;border:1px solid #1689FB;border-radius:30px;color:#FFFFFF;font-family:Trebuchet,Helvetica,sans-serif;font-size:14px;font-weight:normal;padding:15px 30px;" target="_blank">Voir la recommandation</a></td></tr></tbody></table></td></tr></tbody></table></div><!--[if mso]>
|
||||
</td></tr></table>
|
||||
]]>
|
||||
</target>
|
||||
</trans-unit>
|
||||
<!-- Dashboard -->
|
||||
<trans-unit id="global.datereception.label">
|
||||
<source>global.datereception.label</source>
|
||||
<target>Date de reception </target>
|
||||
</trans-unit>
|
||||
<!-- Réponse en vidéo -->
|
||||
<trans-unit id="label.message">
|
||||
<source>label.message</source>
|
||||
<target>MESSAGE : </target>
|
||||
</trans-unit>
|
||||
<trans-unit id="label.noMessage">
|
||||
<source>label.noMessage</source>
|
||||
<target>Aucun message</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="label.offers">
|
||||
<source>label.offers</source>
|
||||
<target>Offres d'emploi</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="label.answer">
|
||||
<source>label.answer</source>
|
||||
<target>Réponse : </target>
|
||||
</trans-unit>
|
||||
<trans-unit id="label.sended">
|
||||
<source>label.sended</source>
|
||||
<target>Envoyé : </target>
|
||||
</trans-unit>
|
||||
<trans-unit id="label.received">
|
||||
<source>label.received</source>
|
||||
<target>Recu : </target>
|
||||
</trans-unit>
|
||||
<trans-unit id="label.history.link">
|
||||
<source>label.history.link</source>
|
||||
<target>Afficher l'historique</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="label.history.talent.link">
|
||||
<source>label.history.talent.link</source>
|
||||
<target>Historique des message recus</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="label.webcam.answer.step1">
|
||||
<source>label.webcam.answer.step1</source>
|
||||
<target>Enregistrer ma vidéo</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="label.webcam.answer.step2">
|
||||
<source>label.webcam.answer.step2</source>
|
||||
<target>Importer ma vidéo</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="label.webcam.answer.step3">
|
||||
<source>label.webcam.answer.step3</source>
|
||||
<target>Définir le type de réponse</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="label.webcam.answer.videotheque">
|
||||
<source>label.webcam.answer.videotheque</source>
|
||||
<target>Choisir une vidéo de réponse</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="label.answer.history.title">
|
||||
<source>label.answer.history.title</source>
|
||||
<target>Historique des messages envoyés</target>
|
||||
</trans-unit>
|
||||
|
||||
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
||||
+104
@@ -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 %}
|
||||
@@ -16,6 +16,7 @@
|
||||
<link rel="stylesheet" href="{{ asset('admin/AdminLTE/plugins/datatables/dataTables.bootstrap.css') }}">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.2/jquery-confirm.min.css">
|
||||
<script type="text/javascript" defer="defer" src="https://extend.vimeocdn.com/ga/64189815.js"></script>
|
||||
<link href="https://gitcdn.github.io/bootstrap-toggle/2.2.2/css/bootstrap-toggle.min.css" rel="stylesheet">
|
||||
|
||||
{% block css %}
|
||||
|
||||
@@ -71,6 +72,7 @@ output='assetic/admin.backend.js' filter='?uglifyjs2' %}
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
</script>
|
||||
<script src="https://gitcdn.github.io/bootstrap-toggle/2.2.2/js/bootstrap-toggle.min.js"></script>
|
||||
{% block javascripts %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
+176
@@ -0,0 +1,176 @@
|
||||
{% extends 'admin/base_admin.html.twig' %}
|
||||
|
||||
{% block contentHeader %}
|
||||
<h1>
|
||||
Recommandations
|
||||
<small>Liste</small>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="{{ path('admin_dashboard') }}">
|
||||
<i class="fa fa-dashboard"></i>
|
||||
Dashboard</a>
|
||||
</li>
|
||||
<li class="active">Recommandations</li>
|
||||
</ol>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<table id="reco_list_table" class="table table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-xs-2">Date de création</th>
|
||||
<th>De</th>
|
||||
<th>Pour</th>
|
||||
<th>Status</th>
|
||||
<th>Player</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for r in recos %}
|
||||
<tr>
|
||||
<td data-order="{{ r.cTime|date('U') }}">{{ r.cTime|date('d/m/Y') }}</td>
|
||||
<td>
|
||||
{{ r.sender.lastname }}
|
||||
{{ r.sender.firstname }}
|
||||
</td>
|
||||
<td>
|
||||
{{ r.user.lastname }}
|
||||
{{ r.user.firstname }}
|
||||
</td>
|
||||
<td>
|
||||
{% if r.isRemoved %}
|
||||
<span class="label pull-right bg-red">supprimée</span>
|
||||
{% elseif r.isEnabled %}
|
||||
<span class="label pull-right bg-green">Visible</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if r.video != null %}
|
||||
<i class="fa fa-eye modalBtn c-pointer hover-blue1" data-url="{{ r.video.cdnUrl }}"></i>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<input class="visibilityToggle" {% if r.isVisible == false %} checked="checked" {% endif %} type="checkbox" data-toggle="toggle" data-size="mini" data-onstyle="danger" data-on="Desactivée" data-off="Activée" data-recid="{{ r.id }}">
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# <div id="modal_video" class="modal">
|
||||
<div class="modal-content">
|
||||
<h4>Vidéo de la recommendation</h4>
|
||||
<div class="videoContainer" style="text-align:center;">Loading...</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="modal-action modal-close waves-effect waves-green btn-flat">Fermer</button>
|
||||
</div>
|
||||
</div> #}
|
||||
|
||||
<div id="modal_video" class="modal fade" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document" style="width:800px;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">Vidéo de la recommendation</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="videoContainer" style="text-align:center;">Loading...</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Fermer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
<script>
|
||||
$(function () {
|
||||
$('#reco_list_table').DataTable({
|
||||
"paging": true,
|
||||
"lengthChange": true,
|
||||
"searching": true,
|
||||
"ordering": true,
|
||||
"info": true,
|
||||
"autoWidth": false,
|
||||
"language": {
|
||||
"url": "https://cdn.datatables.net/plug-ins/1.10.11/i18n/French.json"
|
||||
},
|
||||
"columnDefs": [
|
||||
{
|
||||
"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": 5,
|
||||
"searchable": true,
|
||||
"orderable": true,
|
||||
"className": "text-center"
|
||||
}
|
||||
],
|
||||
"order": [
|
||||
[0, "desc"]
|
||||
]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<script src="https://player.vimeo.com/api/player.js"></script>
|
||||
<script type="text/javascript">
|
||||
$('.modalBtn').click(function () {
|
||||
$('.videoContainer').html('');
|
||||
$('#modal_video').modal();
|
||||
var urlVideo = $(this).data("url");
|
||||
urlVideo = urlVideo.replace('videos', 'video');
|
||||
var player = '<div data-vimeo-url="https://vimeo.com' + urlVideo + '" id="player_vimeo"></div>';
|
||||
$('.videoContainer').html(player);
|
||||
var player_vimeo = new Vimeo.Player('player_vimeo');
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$('.visibilityToggle').change(function () {
|
||||
var recId = $(this).data('recid');
|
||||
var route = '/admin/config/recommandation/' + recId + '/toggle';
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: route,
|
||||
dataType: "json",
|
||||
success: function (msg) {
|
||||
console.log(msg);
|
||||
}
|
||||
});
|
||||
});
|
||||
</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>
|
||||
@@ -53,9 +58,14 @@
|
||||
<i class="fa fa-user-circle" aria-hidden="true"></i><span>Talents</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('admin_config_recommendations') }}">
|
||||
<i class="fa fa-thumbs-up" aria-hidden="true"></i><span>Recommandations</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('admin_config_territory') }}">
|
||||
<i class="fa fa-map-marker" aria-hidden="true"></i><span>Territoire</span>
|
||||
<i class="fa fa-map-marker" aria-hidden="true"></i><span>Territoires</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
{{ form_row(form.emphasis) }}
|
||||
{{ form_row(form.emphasisOrder) }}
|
||||
{{ form_row(form.brandName) }}
|
||||
{{ form_row(form.terType) }}
|
||||
{{ form_row(form.description) }}
|
||||
{{ form_row(form.descriptionAdmin) }}
|
||||
{{ form_row(form.website) }}
|
||||
|
||||
@@ -54,9 +54,7 @@
|
||||
{% endif %}
|
||||
{# CSS #}
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css?family=Raleway:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i&subset=latin-ext"
|
||||
rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css?family=Varela+Round" : rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css?family=Raleway:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i|Varela+Round" rel="stylesheet">
|
||||
<link rel="stylesheet" href="{{ asset('css/styles.css') }}">
|
||||
{% block stylesheets %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -35,8 +35,7 @@
|
||||
href="{% block urlCanonical %}{{ url(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) }}"{% endblock %}>
|
||||
{# CSS #}
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css?family=Raleway:300,300i,400,400i,700,700i" rel=“stylesheet”>
|
||||
<link href="https://fonts.googleapis.com/css?family=Varela+Round" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css?family=Raleway:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i|Varela+Round" rel="stylesheet">
|
||||
<link rel="stylesheet" href="{{ asset('css/styles.css') }}">
|
||||
{% block stylesheets %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -2,41 +2,58 @@
|
||||
|
||||
|
||||
{% block dashContent %}
|
||||
{% if type == "spontaneous" %}
|
||||
{% include 'company/job_submenu.html.twig' with {
|
||||
'tab' : 3
|
||||
} %}
|
||||
{% else %}
|
||||
{% include 'company/job_submenu.html.twig' with {
|
||||
'tab' : 2
|
||||
} %}
|
||||
{% endif %}
|
||||
<div class="row bg-bordered p-20">
|
||||
{% set first = answers|first %}
|
||||
<h1 class="alttitle">Réponses pour : {{ first.ad.title }}</h1>
|
||||
{% include 'company/tabs.html.twig' with {'tab':2} %}
|
||||
{% include 'company/ad_breadcrumb.html.twig' with {'step': 2,'ad': ad} %}
|
||||
<div id="reponses" class="col s12">
|
||||
<table id="table-answers" class="bordered highlight responsive-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> {{ 'profile.talent.firstname'|trans }} - {{ 'profile.talent.lastname'|trans }}</th>
|
||||
<th>{{ 'global.intitule.label'|trans }}</th>
|
||||
<th>{{ 'global.date.label'|trans }}</th>
|
||||
<th>{{ 'note.title'|trans }}</th>
|
||||
<th>{{ 'profile.talent.lastname'|trans }} {{ 'profile.talent.firstname'|trans }}</th>
|
||||
<th>{{ 'global.datereception.label'|trans }}</th>
|
||||
<th>{{ 'ad.company.list.status'|trans }}</th>
|
||||
<th class="center-align">{{ 'ad.company.list.actions'|trans }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for answer in answers %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ path('company_answer_show',{'id':answer.id }) }}">{{ answer.user.firstname }} {{ answer.user.lastname }}</a>
|
||||
<a href="{{ path('company_answer_show',{'id':answer.id }) }}">{{ answer.user.lastname }} {{ answer.user.firstname }}</a>
|
||||
</td>
|
||||
<td>{{ answer.ad.title }}</td>
|
||||
<td>{{ answer.uTime()|date('d-m-Y') }}</td>
|
||||
<td>
|
||||
{#{% if answer.notes|length <= 0 %}#}
|
||||
<a href="#" class="note-action c-pointer" data-func="add" data-answer="{{ answer.id }}">
|
||||
<i class="fa fa-plus " aria-hidden="true"></i>
|
||||
<td>{{ answer.sendTime()|date('d/m/Y') }}</td>
|
||||
{% if answer.firstMessage %}
|
||||
<td>{{ answer.firstMessage.status|trans }}</td>
|
||||
{% else %}
|
||||
{% if answer.isViewed %}
|
||||
{% if answer.isViewed.status == "DRAFT" %}
|
||||
<td>{{ 'VIEWED'|trans }}</td>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<td>{{ 'NEW'|trans }}</td>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<td class="center-align">
|
||||
<a title="{{ad.title}}" href="{{ path('company_answer_show',{'id':answer.id }) }}">
|
||||
<i class="fa fa-eye"></i>
|
||||
</a>
|
||||
<a href="#" class="note-action c-pointer" data-func="add" data-answer="{{ answer.id }}">
|
||||
<i class="fa fa-sticky-note"></i>
|
||||
</a>
|
||||
{#{% else %}#}
|
||||
{% for note in answer.notes %}
|
||||
<a class="tooltipped note-action c-pointer" data-position="top" data-delay="50"
|
||||
data-tooltip="{{ note.content }}" data-note="{{ note.id }}" data-func="edit">
|
||||
<i class="fa fa-commenting" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endfor %}
|
||||
{#{% endif %}#}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<div class="col s12" id="breadcrumb">
|
||||
<a href="{{ path('company_ad') }}">
|
||||
<span>{% trans %}label.offers{% endtrans %}</span>
|
||||
</a>
|
||||
{% if step > 1 %}
|
||||
<span class="sepa-breadcrumb">></span>
|
||||
<a href="{{ path('company_ad_answer_list',{'id':ad.id}) }}">
|
||||
<span {% if step == 2 %}class="active"{% endif %}>{{ ad.title }}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if step > 2 %}
|
||||
<span class="sepa-breadcrumb">></span>
|
||||
<span class="active">{{ firstname }} {{ lastname }}</span>
|
||||
{% endif %}
|
||||
<div class="border-breadcrumb"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -1,16 +1,20 @@
|
||||
{% extends 'company/base_dashboard_company.html.twig' %}
|
||||
|
||||
{% block title %} Mes annonces {% endblock %}
|
||||
{% block title %}
|
||||
Mes annonces
|
||||
{% endblock %}
|
||||
|
||||
{% block dashContent %}
|
||||
{% include 'default/flash_message.html.twig' %}
|
||||
|
||||
{#<h1 class="alttitle">Espace offres d'emploi</h1>#}
|
||||
<div class="bg-bordered p-20">
|
||||
{% include 'company/tabs.html.twig' with {'tab':1} %}
|
||||
{% include 'company/ad_table_listing.html.twig' with {'ads':ads} %}
|
||||
<p class="center-align">
|
||||
<a href="{{ path('company_ad_create') }}" class="btn btn-default">{{ 'ad.company.add.label'|trans }}</a>
|
||||
</p>
|
||||
{% include 'company/job_submenu.html.twig' with {
|
||||
'tab' : 1
|
||||
} %}
|
||||
|
||||
<div class="row bg-bordered p-20">
|
||||
{% include 'company/ad_breadcrumb.html.twig' with {'step': 1} %}
|
||||
{% include 'company/ad_table_listing.html.twig' with {
|
||||
'ads' : ads
|
||||
} %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
@@ -1,5 +1,5 @@
|
||||
<table id="ads-table" class="bordered highlight responsive-table">
|
||||
<thead>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'ad.company.list.title'|trans }}</th>
|
||||
<th class="tdCount">{{ 'ad.company.list.answers'|trans }}</th>
|
||||
@@ -7,15 +7,23 @@
|
||||
<th>{{ 'ad.company.list.status'|trans }}</th>
|
||||
<th>{{ 'ad.company.list.actions'|trans }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for ad in ads %}
|
||||
<tr>
|
||||
<td>{{ ad.title }}</td>
|
||||
<td>
|
||||
{% if ad.countAnswers > 0 %}
|
||||
<a href="{{ path('company_ad_answer_list',{'id':ad.id}) }}">
|
||||
{{ ad.title }}
|
||||
</a>
|
||||
{% else %}
|
||||
{{ ad.title }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="tdCount">
|
||||
{% if ad.countAnswers > 0 %}
|
||||
<a href="{{ path('company_ad_answer_list',{'id':ad.id}) }}">
|
||||
{{ ad.countAnswers }}
|
||||
<i class="fa fa-eye"></i> {{ ad.countAnswers }}
|
||||
</a>
|
||||
{% else %}
|
||||
0
|
||||
@@ -23,13 +31,12 @@
|
||||
</td>
|
||||
<td class="tdCount">
|
||||
{% if arrayByAds is defined %}
|
||||
{{ arrayByAds[ad.id]["count"] }}
|
||||
{{ arrayByAds[ad.id]["count"] }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td align="center" valign="center">
|
||||
{% if ad.getStatus() == "DECLINED" %}
|
||||
<div class="tooltipped" data-position="top" data-delay="50"
|
||||
data-tooltip="{{ ad.moderationText }}">
|
||||
<div class="tooltipped" data-position="top" data-delay="50" data-tooltip="{{ ad.moderationText }}">
|
||||
<span class="">{{ ad.getStatus()|trans }}</span>
|
||||
<i class="c-pointer fa fa-info-circle color-red" aria-hidden="true"></i>
|
||||
</div>
|
||||
@@ -40,57 +47,43 @@
|
||||
<td>
|
||||
{% if ad.getStatus() == "DRAFT" or ad.getStatus() == "DECLINED" %}
|
||||
{#Edit#}
|
||||
<a class="tooltipped td-none" data-position="top" data-delay="0"
|
||||
data-tooltip="{{ 'ad.company.edit.label'|trans }}"
|
||||
href="{{ path('company_ad_edit', { 'id': ad.id }) }}" style="margin-right: 10px">
|
||||
<a class="tooltipped td-none" data-position="top" data-delay="0" data-tooltip="{{ 'ad.company.edit.label'|trans }}" href="{{ path('company_ad_edit', { 'id': ad.id }) }}" style="margin-right: 10px">
|
||||
<i class="fa fa-pencil-square-o" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% else %}
|
||||
{#Soft Edit#}
|
||||
<a class="tooltipped td-none" data-position="top" data-delay="0"
|
||||
data-tooltip="{{ 'ad.company.edit.label'|trans }}"
|
||||
href="{{ path('company_ad_soft_edit', { 'id': ad.id }) }}"
|
||||
style="margin-right: 10px">
|
||||
<a class="tooltipped td-none" data-position="top" data-delay="0" data-tooltip="{{ 'ad.company.edit.label'|trans }}" href="{{ path('company_ad_soft_edit', { 'id': ad.id }) }}" style="margin-right: 10px">
|
||||
<i class="fa fa-pencil-square-o" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if ad.getStatus() == "DRAFT" or ad.getStatus() == "DECLINED" %}
|
||||
{#Video#}
|
||||
<a class="tooltipped td-none" data-position="top" data-delay="0"
|
||||
data-tooltip="{{ 'ad.company.video.edit.label'|trans }}"
|
||||
href="{{ path('create_media', { 'id': ad.id }) }}">
|
||||
<a class="tooltipped td-none" data-position="top" data-delay="0" data-tooltip="{{ 'ad.company.video.edit.label'|trans }}" href="{{ path('create_media', { 'id': ad.id }) }}">
|
||||
<i class="fa fa-video-camera" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if ad.getStatus() == "PUBLISHED" %}
|
||||
{% if ad.getStatus() == "PUBLISHED" %}
|
||||
{#Extension#}
|
||||
<a class="tooltipped td-none" data-position="top" data-delay="0"
|
||||
data-tooltip="{{ 'ad.company.dates.extension.label'|trans }}"
|
||||
href="{{ path('company_ad_extension', { 'id': ad.id }) }}"
|
||||
style="margin-right: 10px">
|
||||
<a class="tooltipped td-none" data-position="top" data-delay="0" data-tooltip="{{ 'ad.company.dates.extension.label'|trans }}" href="{{ path('company_ad_extension', { 'id': ad.id }) }}" style="margin-right: 10px">
|
||||
<i class="fa fa-calendar" aria-hidden="true"></i>
|
||||
</a>
|
||||
{#Force ending#}
|
||||
<a class="tooltipped td-none" data-position="top" data-delay="0"
|
||||
data-tooltip="{{ 'ad.company.closed.label'|trans }}"
|
||||
href="{{ path('company_ad_closed', { 'id': ad.id }) }}" style="margin-right: 10px">
|
||||
<a class="tooltipped td-none" data-position="top" data-delay="0" data-tooltip="{{ 'ad.company.closed.label'|trans }}" href="{{ path('company_ad_closed', { 'id': ad.id }) }}" style="margin-right: 10px">
|
||||
<i class="fa fa-window-close-o" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if ad.getStatus() == "TO_PUBLISH" or ad.getStatus() == "VALIDATED" or ad.getStatus() == "CLOSED" or ad.getStatus() == "EXPIRED" %}
|
||||
{#Edit Dates#}
|
||||
<a class="tooltipped td-none" data-position="top" data-delay="0"
|
||||
data-tooltip="{{ 'ad.company.dates.edit.label'|trans }}"
|
||||
href="{{ path('company_ad_step3', { 'id': ad.id }) }}" style="margin-right: 10px">
|
||||
<a class="tooltipped td-none" data-position="top" data-delay="0" data-tooltip="{{ 'ad.company.dates.edit.label'|trans }}" href="{{ path('company_ad_step3', { 'id': ad.id }) }}" style="margin-right: 10px">
|
||||
<i class="fa fa-calendar" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -1,53 +1,86 @@
|
||||
{% extends 'company/base_dashboard_company.html.twig' %}
|
||||
|
||||
|
||||
{% block dashContent %}
|
||||
{% include 'company/job_submenu.html.twig' with {'tab' : 2} %}
|
||||
<div class="row bg-bordered p-20">
|
||||
|
||||
{% if type == "spontaneous" %}
|
||||
{% include 'company/tabs.html.twig' with {'tab':3} %}
|
||||
{% else %}
|
||||
{% include 'company/tabs.html.twig' with {'tab':2} %}
|
||||
{% endif %}
|
||||
|
||||
<div id="reponses" class="col s12">
|
||||
<table id="table-answers" class="bordered highlight responsive-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> {{ 'profile.talent.firstname'|trans }} - {{ 'profile.talent.lastname'|trans }}</th>
|
||||
<th>{{ 'global.intitule.label'|trans }}</th>
|
||||
<th>{{ 'global.date.label'|trans }}</th>
|
||||
<th>{{ 'note.title'|trans }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for answer in answers %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ path('company_answer_show',{'id':answer.id }) }}">{{ answer.user.firstname }} {{ answer.user.lastname }}</a>
|
||||
</td>
|
||||
<td>{% if answer.ad != null %}{{ answer.ad.title }} {% endif %}</td>
|
||||
<td>{{ answer.cTime()|date('d-m-Y') }}</td>
|
||||
<td>
|
||||
{#{% if answer.notes|length <= 0 %}#}
|
||||
<a href="#" class="note-action c-pointer" data-func="add" data-answer="{{ answer.id }}">
|
||||
<i class="fa fa-plus " aria-hidden="true"></i>
|
||||
</a>
|
||||
{#{% else %}#}
|
||||
{% for note in answer.notes %}
|
||||
<a class="tooltipped note-action c-pointer" data-position="top" data-delay="50"
|
||||
data-tooltip="{{ note.content }}" data-note="{{ note.id }}" data-func="edit">
|
||||
<i class="fa fa-commenting" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endfor %}
|
||||
{#{% endif %}#}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
<div class="col s12">
|
||||
<h4 class="title-table">{{ 'company.menu.answers.label'|trans }}</h4>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="note-modal"></div>
|
||||
{% endblock %}
|
||||
|
||||
<div id="reponses" class="col s12">
|
||||
<table id="table-answers" class="bordered highlight responsive-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'profile.talent.lastname'|trans }} {{ 'profile.talent.firstname'|trans }}</th>
|
||||
<th>{{ 'global.datereception.label'|trans }}</th>
|
||||
<th>{{ 'ad.company.list.title'|trans }}</th>
|
||||
<th class="center-align">{{ 'ad.company.list.actions'|trans }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for answer in answers %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ path('company_answer_show',{'id':answer.id }) }}">{{ answer.user.lastname }} {{ answer.user.firstname }}</a>
|
||||
</td>
|
||||
<td>{{ answer.sendTime()|date('d/m/Y') }}</td>
|
||||
<td>{{ answer.ad.title }}</td>
|
||||
<td class="center-align">
|
||||
<a title="{{answer.ad.title}}" href="{{ path('company_answer_show',{'id':answer.id }) }}">
|
||||
<i class="fa fa-eye"></i>
|
||||
</a>
|
||||
<a href="#" class="note-action c-pointer" data-func="add" data-answer="{{ answer.id }}">
|
||||
<i class="fa fa-sticky-note"></i>
|
||||
</a>
|
||||
{% for note in answer.notes %}
|
||||
<a class="tooltipped note-action c-pointer" data-position="top" data-delay="50"
|
||||
data-tooltip="{{ note.content }}" data-note="{{ note.id }}" data-func="edit">
|
||||
<i class="fa fa-commenting" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row bg-bordered p-20">
|
||||
<div class="col s12">
|
||||
<h4 class="title-table">{{ 'company.menu.spontaneous.label'|trans }}</h4>
|
||||
</div>
|
||||
<div id="spontaneous" class="col s12">
|
||||
<table id="table-answers" class="bordered highlight responsive-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'profile.talent.lastname'|trans }} {{ 'profile.talent.firstname'|trans }}</th>
|
||||
<th>{{ 'global.datereception.label'|trans }}</th>
|
||||
<th class="center-align">{{ 'ad.company.list.actions'|trans }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for answer in spontaneous %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ path('company_answer_show',{'id':answer.id }) }}">{{ answer.user.lastname }} {{ answer.user.firstname }}</a>
|
||||
</td>
|
||||
<td>{{ answer.sendTime()|date('d/m/Y') }}</td>
|
||||
<td class="center-align">
|
||||
<a title="" href="{{ path('company_answer_show',{'id':answer.id }) }}">
|
||||
<i class="fa fa-eye"></i>
|
||||
</a>
|
||||
<a href="#" class="note-action c-pointer" data-func="add" data-answer="{{ answer.id }}">
|
||||
<i class="fa fa-sticky-note"></i>
|
||||
</a>
|
||||
{% for note in answer.notes %}
|
||||
<a class="tooltipped note-action c-pointer" data-position="top" data-delay="50"
|
||||
data-tooltip="{{ note.content }}" data-note="{{ note.id }}" data-func="edit">
|
||||
<i class="fa fa-commenting" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div id="note-modal"></div>
|
||||
{% endblock %}
|
||||
@@ -2,95 +2,245 @@
|
||||
|
||||
|
||||
{% block dashContent %}
|
||||
{% if type == "spontaneous" %}
|
||||
{% include 'company/job_submenu.html.twig' with {
|
||||
'tab' : 3
|
||||
} %}
|
||||
{% else %}
|
||||
{% include 'company/job_submenu.html.twig' with {
|
||||
'tab' : 2
|
||||
} %}
|
||||
{% endif %}
|
||||
<div class="row bg-bordered p-20">
|
||||
<h1 class="alttitle">Réponse de {{ answer.user.firstname }} {{ answer.user.lastname }}</h1>
|
||||
{% if type == "spontaneous" %}
|
||||
{% include 'company/tabs.html.twig' with {'tab':3} %}
|
||||
{% else %}
|
||||
{% include 'company/tabs.html.twig' with {'tab':2} %}
|
||||
{% endif %}
|
||||
|
||||
<div class="col s12 m6 l6 col-padding-right">
|
||||
<div class="bg-bordered inside-m">
|
||||
<span>Réponse émise le : {{ answer.cTime|date('d-m-Y') }}</span><br/>
|
||||
{% include 'company/ad_breadcrumb.html.twig' with {'step': 3,'ad': answer.ad,'firstname':answer.user.firstname ,'lastname':answer.user.lastname} %}
|
||||
<div class="col s12 m6">
|
||||
<div id="mini-profil-block">
|
||||
{% include 'talent/talent_picture.html.twig' with {
|
||||
'user' : answer.user
|
||||
} %}
|
||||
<div>
|
||||
<iframe src="https://player.vimeo.com/video/{{ answer.video.cdnUrl|replace({ "/videos/": ""}) }}"
|
||||
width="100%" height="300" frameborder="0" webkitallowfullscreen mozallowfullscreen
|
||||
allowfullscreen></iframe>
|
||||
<div class="mini-profil-picture-name">{{ answer.user.firstname }} {{ answer.user.lastname }}</div>
|
||||
<div>Recu le {{ answer.sendTime|date('d/m/Y') }}</div>
|
||||
</div>
|
||||
<div>
|
||||
{% if answer.comment %}
|
||||
<strong>Message du talent :</strong>
|
||||
<p>{{ answer.comment }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<h3>Profil du talent : </h3>
|
||||
<div class="profil">
|
||||
<p class="profil-picture">
|
||||
{% if answer.user.getWebPath() %}
|
||||
<img src="{{ answer.user.getWebPath() | imagine_filter('profile_square') }}"
|
||||
alt="{{ answer.user.firstname }} {{ answer.user.lastname }}"
|
||||
class="circle responsive-img"/>
|
||||
{% endif %}
|
||||
</p>
|
||||
<i class="fa fa-user-circle"
|
||||
aria-hidden="true"></i> {{ answer.user.firstname }} {{ answer.user.lastname }}
|
||||
{% if answer.user.gender == "female" %}
|
||||
<i class="fa fa-mars" aria-hidden="true"></i>
|
||||
{% else %}
|
||||
<i class="fa fa-venus" aria-hidden="true"></i>
|
||||
{% endif %}
|
||||
<br/>
|
||||
<i class="fa fa-birthday-cake" aria-hidden="true"></i> {{ answer.user.birthday|date('d-m-Y') }}<br/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="embed-responsive embed-responsive-16by9">
|
||||
<iframe src="https://player.vimeo.com/video/{{ answer.video.cdnUrl|replace({ "/videos/": ""}) }}"
|
||||
width="100%" height="auto" frameborder="0" webkitallowfullscreen mozallowfullscreen
|
||||
allowfullscreen></iframe>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col s12 m6 l6 col-padding-left">
|
||||
<div class="col s12 m12 l12">
|
||||
<div class="bg-bordered inside-m">
|
||||
<h4 class="no-margin-top">
|
||||
Contacter le talent
|
||||
</h4>
|
||||
<p>
|
||||
Expéditeur : {{ app.user.firstname }} {{ app.user.lastname }}
|
||||
</p>
|
||||
<div class="col s12 m6">
|
||||
{% if answer.comment %}
|
||||
<strong>{% trans %}label.message{% endtrans %}</strong>
|
||||
<p class="message-answer">{{ answer.comment }}</p>
|
||||
{% else %}
|
||||
{% trans %}label.noMessage{% endtrans %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col s12">
|
||||
<h4 class="no-margin-top bordered">Contacter {{ answer.user.firstname }} {{ answer.user.lastname }} par : </h4>
|
||||
</div>
|
||||
<div class="col s12 col-actions">
|
||||
<a class="btn btn-default btn-active bnt-choice-message" data-value="message">Message</a><a class="btn btn-default bnt-choice-message" data-value="video">Vidéo</a>
|
||||
</div>
|
||||
<div class="col s12">
|
||||
<div class="col-bordered">
|
||||
<div class="blockanswer blockanswer-video">
|
||||
<a class="btn btn-default bnt-choice-video" data-value="webcam" href="#">Enregistrer une vidéo</a>
|
||||
<a class="btn btn-default bnt-choice-video" data-value="upload" href="#">Importer une vidéo</a>
|
||||
<a class="btn btn-default bnt-choice-video" data-value="videotheque" ref="#">Choisir depuis la videothèque</a>
|
||||
</div>
|
||||
<div class="blockanswer blockanswer-message">
|
||||
<div class="sender">De : {{ app.user.firstname }} {{ app.user.lastname }}</div>
|
||||
{{ form_start(form) }}
|
||||
{{ form_rest(form) }}
|
||||
<button type="submit" class="btn btn-default">Envoyer</button>
|
||||
<div class="bottom-form">
|
||||
<button type="submit" class="btn btn-default disabled">Envoyer</button>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
</div>
|
||||
{{ form_start(formVideo) }}
|
||||
<div id="blockanswer-video-webcam" class="panel-hide">
|
||||
{% include 'message/message_create_webcam.twig' %}
|
||||
</div>
|
||||
<div id="blockanswer-video-upload" class="panel-hide">
|
||||
{% include 'message/message_create_import.twig' %}
|
||||
</div>
|
||||
<div id="blockanswer-video-videotheque" class="panel-hide">
|
||||
{% include 'message/message_create_videotheque.twig' %}
|
||||
</div>
|
||||
<div id="validFormVideo" class="panel-hide">
|
||||
{{ form_widget(formVideo._token, { 'id': 'token_video' }) }}
|
||||
{{ form_widget(formVideo.status, { 'id': 'contact_talent_status_video' }) }}
|
||||
{{ form_rest(formVideo) }}
|
||||
<div class="bottom-form">
|
||||
<button type="submit" class="btn btn-default disabled">Envoyer</button>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(formVideo) }}
|
||||
</div>
|
||||
{#{% if answer.contactMessage %}
|
||||
|
||||
<div class="col s12 m12 l12 m-t-20">
|
||||
<div class="bg-bordered inside-m">
|
||||
<h4 class="no-margin-top">
|
||||
Réponse
|
||||
</h4>
|
||||
<p>
|
||||
{{ answer.contactMessage|nl2br }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}#}
|
||||
|
||||
</div>
|
||||
<div class="col s12">
|
||||
<h4 class="no-margin-top bordered">{% trans %}label.answer.history.title{% endtrans %}</h4>
|
||||
</div>
|
||||
<div class="col s12">
|
||||
{% if answer.messages %}
|
||||
{% for message in answer.messages %}
|
||||
<div class="col s12 m12 l12 m-t-20">
|
||||
<div class="bg-bordered inside-m">
|
||||
<h4 class="no-margin-top">
|
||||
Réponse : {{ message.status }}
|
||||
</h4>
|
||||
<p>
|
||||
{{ message.content|nl2br }}
|
||||
</p>
|
||||
</div>
|
||||
{% for message in answer.messages if message.status != "DRAFT" %}
|
||||
{% set class = '' %}
|
||||
{% if loop.index > 1 %}
|
||||
{% set class = 'history-hidden' %}
|
||||
{% endif %}
|
||||
<div class="blockanswer-answer {{class}}">
|
||||
<div class="title-answer">
|
||||
{% trans %}label.answer{% endtrans %}{{ message.status|trans }}
|
||||
<span class="date-answer">{% trans %}label.sended{% endtrans %}{{ message.uTime|date('d-m-Y') }}</span>
|
||||
</div>
|
||||
<div class="description-answer">
|
||||
{% if message.video %}
|
||||
<div class="embed-responsive embed-responsive-16by9">
|
||||
<iframe src="https://player.vimeo.com/video/{{ message.video.cdnUrl|replace({ "/videos/": ""}) }}"
|
||||
width="100%" height="300" frameborder="0" webkitallowfullscreen mozallowfullscreen
|
||||
allowfullscreen></iframe>
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ message.content|nl2br }}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col s12 center-align m-t-30">
|
||||
<a class="bnt btn-round btn-grey-2 link-history-more" href="#" title="{% trans %}label.history.link{% endtrans %}">{% trans %}label.history.link{% endtrans %}</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
<script type="text/javascript">
|
||||
var urlDropzone = '{{ path("upload_media_message", {"id": message.getId()}) }}';
|
||||
var urlDelete = '{{ path("delete_media_message", {"id": message.getId() }) }}'
|
||||
var idObject = null;
|
||||
var typeObject = "answer";
|
||||
var videoExist = false;
|
||||
</script>
|
||||
<script src="{{ asset('/js/dropzone.js') }}"></script>
|
||||
<script src="{{ asset('/js/vendors/video.min.js') }}"></script>
|
||||
<script src="{{ asset('/js/vendors/RecordRTC.js') }}"></script>
|
||||
<script src="{{ asset('/js/vendors/videojs.record.js') }}"></script>
|
||||
<script src="{{ asset('/js/vendors/jquery.browser.min.js') }}"></script>
|
||||
<script src="{{ asset('/js/vendors/readmore.min.js') }}"></script>
|
||||
<script src="{{ asset('/js/answer.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$(".card-action").click(function(){
|
||||
var idVideo = $(this).data("id");
|
||||
var titleVideo = $(this).data("title");
|
||||
var imgVideo = $(this).data("img");
|
||||
var urlVideo = $(this).data("url");
|
||||
var elem = $(this);
|
||||
form['contact_talent_video'] = 1;
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '{{ path("link_media_message", {"id": message.getId()}) }}',
|
||||
data: "idVideo="+idVideo,
|
||||
dataType: 'html',
|
||||
success: function (response) {
|
||||
$(".card-action").removeClass('active');
|
||||
elem.addClass('active');
|
||||
Materialize.toast('Vidéo bien associé à la réponse', 4000);
|
||||
if($("#submit").hasClass('disabled')){
|
||||
$("#submit").removeClass('disabled');
|
||||
$("#submit").addClass('pulse');
|
||||
}
|
||||
},
|
||||
error: function (response, xhr, ajaxOptions, thrownError) {
|
||||
Materialize.toast('Erreur lors de l\'association de la vidéo!', 4000);
|
||||
}
|
||||
});
|
||||
});
|
||||
$('.bnt-choice-message').on('click',function(){
|
||||
var type = $(this).data('value');
|
||||
$('.bnt-choice-message').removeClass('btn-active');
|
||||
$('.bnt-choice-video').removeClass('active');
|
||||
$(this).addClass('btn-active');
|
||||
$(".panel-hide").removeClass('active');
|
||||
$(".panel-hide").stop().fadeOut();
|
||||
$('.blockanswer').stop().fadeOut('normal',function(){
|
||||
$('.blockanswer-'+type).stop().fadeIn();
|
||||
if(type == 'video'){
|
||||
$('.bnt-choice-video:first').click();
|
||||
}
|
||||
});
|
||||
});
|
||||
$('.blockanswer-video').css('display','none');
|
||||
$('.bnt-choice-video').on('click',function(e){
|
||||
e.preventDefault();
|
||||
var type = $(this).data('value');
|
||||
$('.bnt-choice-video').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
$(".panel-hide").removeClass('active');
|
||||
$('#blockanswer-video-'+type).addClass('active');
|
||||
$(".panel-hide").not(".active").stop().fadeOut('normal',function(){
|
||||
$('#blockanswer-video-'+type).stop().fadeIn('fast');
|
||||
if(type=="webcam"){
|
||||
$('#blockanswer-video-upload').stop().fadeIn('fast');
|
||||
}
|
||||
$('#validFormVideo').stop().fadeIn('fast');
|
||||
|
||||
});
|
||||
});
|
||||
$('.link-history-more').on('click',function(e) {
|
||||
e.preventDefault();
|
||||
$('.history-hidden').fadeIn();
|
||||
$(this).fadeOut();
|
||||
});
|
||||
|
||||
document.getElementsByName("contact_talent[message]")[0].addEventListener('change', verifySubmitButton);
|
||||
$('#contact_talent_status').on('change',verifySubmitButton);
|
||||
|
||||
var form = [];
|
||||
form['contact_talent_message'] = 0;
|
||||
form['contact_talent_video'] = 0;
|
||||
form['contact_talent_status_video'] = 0;
|
||||
form['contact_talent_status'] = 0;
|
||||
function verifySubmitButton(){
|
||||
if(this.value && this.value != 0){
|
||||
form[this.id] = 1;
|
||||
} else {
|
||||
form[this.id] = 0;
|
||||
}
|
||||
if(form['contact_talent_message'] + form['contact_talent_status'] >= 2){
|
||||
$('.blockanswer-message .btn').removeClass('disabled');
|
||||
} else {
|
||||
$('.blockanswer-message .btn').addClass('disabled');
|
||||
}
|
||||
}
|
||||
|
||||
$('#contact_talent_status_video').on('change',verifyVideoSubmitButton);
|
||||
function verifyVideoSubmitButton(){
|
||||
if(this.value && this.value != 0){
|
||||
form[this.id] = 1;
|
||||
} else {
|
||||
form[this.id] = 0;
|
||||
}
|
||||
if(form['contact_talent_video'] + form['contact_talent_status_video'] >= 2){
|
||||
$('#validFormVideo .btn').removeClass('disabled');
|
||||
} else {
|
||||
$('#validFormVideo .btn').addClass('disabled');
|
||||
}
|
||||
}
|
||||
|
||||
$('.message-answer').readmore({
|
||||
speed: 75,
|
||||
lessLink: '<a href="#" class="link-message-more">Fermer</a>',
|
||||
moreLink: '<a href="#" class="link-message-more">{% trans %}label.link.readmore{% endtrans %}</a>',
|
||||
blockProcessed: function(element,collapsable){
|
||||
console.log(element);
|
||||
console.log(collapsable);
|
||||
if(collapsable == false){
|
||||
$('.message-answer').readmore('destroy');
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
|
||||
{% block content %}
|
||||
<div class="fluid-container bg-grey-3 dashboardWrapper">
|
||||
<div class="fluid-container bg-grey-3 dashboardWrapper dashboardCompanyWrapper">
|
||||
<div class="container">
|
||||
<div class="row flexcontainer">
|
||||
{% include "company/menu.html.twig" ignore missing %}
|
||||
|
||||
@@ -130,20 +130,18 @@
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="col-content p-30">
|
||||
{% if popup_answer_already_send is not empty and popup_answer_already_send[0] == true %}
|
||||
<h3 class="color-blue1 center-align">Votre candidature a bien été envoyée à {{ company.brandname }} !</h3>
|
||||
<div class="col offset-s2 s8 center-align">
|
||||
<div class="embed-responsive embed-responsive-16by9">
|
||||
<div class="col s12">
|
||||
<iframe src="https://player.vimeo.com/video/249822507"
|
||||
width="100%" height="640" frameborder="0"></iframe>
|
||||
</div>
|
||||
<h3 class="color-blue1 center-align">Votre candidature a bien été envoyée à {{ company.brandname }} !</h3>
|
||||
<div class="col offset-s2 s8 center-align">
|
||||
<div class="embed-responsive embed-responsive-16by9">
|
||||
<div class="col s12">
|
||||
<iframe src="https://player.vimeo.com/video/249822507"
|
||||
width="100%" height="640" frameborder="0"></iframe>
|
||||
</div>
|
||||
<a href="{{ path('talent_dashboard') }}" class="btn btn-default m-t-20">Accéder à mon profil</a>
|
||||
<br /><br />
|
||||
<a class="text modal-action modal-close">Fermer</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<a href="{{ path('talent_dashboard') }}" class="btn btn-default m-t-20">Accéder à mon profil</a>
|
||||
<br /><br />
|
||||
<a class="text modal-action modal-close">Fermer</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
<div class="row bg-bordered p-0">
|
||||
<ul class="nav-tabs">
|
||||
<li class="{% if tab == 1 %} active {% endif %} col s3">
|
||||
<a {% if tab == 1 %}class="active"{% endif %} target="_self"
|
||||
href="{{ path('company_ad') }}">
|
||||
{{ 'company.title.ads.label'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="{% if tab == 2 %} active {% endif %} col s3">
|
||||
<a {% if tab == 2 %}class="active"{% endif %} target="_self" href="{{ path('company_answer_list') }}">
|
||||
{{ 'company.menu.answers.label'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="col s4 right m-t-10">
|
||||
<a class="btn-square" target="_self" href="{{ path('company_ad_create') }}">
|
||||
<i class="fa fa-plus"></i> {{ 'ad.company.add.label'|trans }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -100,7 +100,7 @@
|
||||
{% elseif not is_granted('ROLE_COMPANY') %}
|
||||
{% if not ad.isPromoted %}
|
||||
<p class="item-detail-reply">
|
||||
<a href="{{ path('talent_answer_create',{'id': ad.getId()}) }}"
|
||||
<a title="postuler-bottom" href="{{ path('talent_answer_create',{'id': ad.getId()}) }}"
|
||||
class="btn btn-default">
|
||||
Postuler
|
||||
</a>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
{% elseif not is_granted('ROLE_COMPANY') %}
|
||||
{% if not ad.isPromoted %}
|
||||
<p class="item-detail-reply">
|
||||
<a href="{{ path('talent_answer_create',{'id': ad.getId()}) }}"
|
||||
<a title="postuler-side" href="{{ path('talent_answer_create',{'id': ad.getId()}) }}"
|
||||
class="btn btn-default">
|
||||
Postuler
|
||||
</a>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
<li><a href="{{ path('page_cvVideo') }}" title="Le Cv vidéo">Le CV vidéo</a></li>
|
||||
<li><a href="{{ path('page_reussirCVvideo') }}" title="Comment faire son CV Vidéo ?">Comment faire son CV Vidéo ?</a></li>
|
||||
<li><a href="{{ path('page_accompagnementTalent') }}" title="Accompagnement talent">Accompagnement</a></li>
|
||||
<li><a href="{{ path('talent_cv_import') }}" title="Créer mon CV vidéo">Créer mon CV vidéo</a></li>
|
||||
</ul>
|
||||
<ul id='dropdown_company' class='dropdown-content'>
|
||||
<li><a href="{{ path('company_list') }}" title="Les entreprises qui recrutent">Les entreprises qui recrutent</a></li>
|
||||
|
||||
@@ -9,16 +9,17 @@
|
||||
{# VIDEO #}
|
||||
<div class="col l12 m12 s12 home-content col-noPadding">
|
||||
<div id="homeTeaser" class="valign-wrapper">
|
||||
<h1 class="white-text center-align">1ère plateforme pour l’emploi <span>100% vidéo</span></h1><br />
|
||||
<h1 class="white-text center-align">1ère plateforme pour l’emploi
|
||||
<span>100% vidéo</span></h1><br/>
|
||||
<div class="link-home-head">
|
||||
<a data-target="modal_concept" href="#!" class="btn btn-default btn-round btn-concept modal-trigger">
|
||||
Le concept en vidéo
|
||||
<img src="{{asset('img/bouton-play.png')}}" />
|
||||
<img src="{{asset('img/bouton-play.png')}}"/>
|
||||
</a>
|
||||
</div>
|
||||
<div class="header-video-inner">
|
||||
<video loop="" preload="metadata" autoplay="" id="vid" muted>
|
||||
<source src="/img/home_video.mp4" type="video/mp4">
|
||||
<video loop="" preload="metadata" autoplay="" id="vid" muted="muted">
|
||||
<source src="/img/home_video.mp4" type="video/mp4">
|
||||
</video>
|
||||
</div>
|
||||
|
||||
@@ -26,7 +27,9 @@
|
||||
{# RECHERCHE #}
|
||||
<div class="fluid-container bg-grey-3 homeSearchWrapper">
|
||||
<div id="homeSearch" class="container">
|
||||
{% include 'form/search_form.html.twig' with {'searchform': searchform } %}
|
||||
{% include 'form/search_form.html.twig' with {
|
||||
'searchform' : searchform
|
||||
} %}
|
||||
</div>
|
||||
</div>
|
||||
{# BLOC OFFRE EMPLOI CARDS #}
|
||||
@@ -41,16 +44,17 @@
|
||||
<div class="row">
|
||||
<div class="col s12 col-noPadding">
|
||||
<div class="owl-carousel owl-carousel-home">
|
||||
{% if ads|length > 0 %}
|
||||
{% include 'default/ad_card.html.twig' with {'ads': ads } %}
|
||||
{% if ads | length > 0 %}
|
||||
{% include 'default/ad_card.html.twig' with {
|
||||
'ads' : ads
|
||||
} %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row center-align">
|
||||
<div class="col s12">
|
||||
<a href="{{ path('ad_search_result') }}" title="Découvrir toutes les offres d'emploi"
|
||||
class="btn btn-default btn-round btn-all-jobs">Voir les offres
|
||||
<a href="{{ path('ad_search_result') }}" title="Découvrir toutes les offres d'emploi" class="btn btn-default btn-round btn-all-jobs">Voir les offres
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -70,8 +74,10 @@
|
||||
<div class="row">
|
||||
<div class="col s12 col-noPadding">
|
||||
<div class="owl-carousel owl-carousel-home home-company-carousel">
|
||||
{% if companies|length > 0 %}
|
||||
{% include 'default/company_card.html.twig' with {'companies': companies } %}
|
||||
{% if companies | length > 0 %}
|
||||
{% include 'default/company_card.html.twig' with {
|
||||
'companies' : companies
|
||||
} %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -86,19 +92,22 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{# TALENTS #}
|
||||
<div id="liste-talents" class="bg-dark2 button-plus">
|
||||
<div class="container">
|
||||
<div class="container">
|
||||
<div class="row center-align">
|
||||
<div class="col s12"><h2 class="blue-text no-margin-top">Les talents</h2></div>
|
||||
<div class="col s12">
|
||||
<h2 class="blue-text no-margin-top">Les talents</h2>
|
||||
</div>
|
||||
<h3 class="subtitles-homepage">Découvrez leurs CV vidéo et vidéo de motivation.</h3>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="owl-carousel owl-carousel-home home-talent-carousel">
|
||||
{% if talents|length > 0 %}
|
||||
{% include 'default/talent_card.html.twig' with {'talents': talents } %}
|
||||
{% if talents | length > 0 %}
|
||||
{% include 'default/talent_card.html.twig' with {
|
||||
'talents' : talents
|
||||
} %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -112,25 +121,31 @@
|
||||
<h2 class="blue-text no-margin-top">Les territoires</h2>
|
||||
<h3 class="subtitles-homepage">Venez vivre et travailler chez nous.</h3>
|
||||
{% if territories %}
|
||||
<div class="owl-carousel owl-carousel-home territory-carousel">
|
||||
{% for territory in territories if territory.presentationVideo and territory.isPrivate != true %}
|
||||
<div class="item">
|
||||
<div class="embed-responsive embed-responsive-16by9">
|
||||
<div class="col s12">
|
||||
<iframe src="https://player.vimeo.com/video/{{ territory.presentationVideo.cdnUrl|replace({ "/videos/": ""}) }}"
|
||||
width="100%" height="640" frameborder="0" webkitallowfullscreen mozallowfullscreen
|
||||
allowfullscreen></iframe>
|
||||
<div class="owl-carousel owl-carousel-home territory-carousel">
|
||||
{% for t in territories if t.presentationVideo and t.isPrivate != true %}
|
||||
<div class="item">
|
||||
{% if t.presentationVideo.thumbnails.0. sizes is defined %}
|
||||
<a href="{{ path('territory_show',{'alias': t.alias }) }}" title="{{ t.brandname }}">
|
||||
<img src="{{ t.presentationVideo.thumbnails.0.sizes.4.link }}" alt="{{ t.brandName }}" class="overlay-hover"/>
|
||||
<span class="playerbtn" style="margin-top: -55px;"></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% 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 hover-none">
|
||||
<a href="{{ path('territory_show',{'alias': t.alias }) }}" class="color-white td-none">{{ t.brandName|upper }}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="m-t-30">
|
||||
<a title="Voir les territoires" class="btn btn-default" href="{{ path('territory_list') }}">
|
||||
Voir les territoires</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="m-t-30">
|
||||
<a title="Voir les territoires" class="btn btn-default" href="{{ path('territory_list') }}">
|
||||
<span>
|
||||
Voir les territoires</span>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -140,23 +155,23 @@
|
||||
<div class="container">
|
||||
<div class="blocs-texte-video">
|
||||
<div class="row center-align">
|
||||
<div class="col s12"><h2 class="blue-text no-margin-top no-margin-bottom">Les conseils de votre
|
||||
<span>talentstubeuse</span></h2></div>
|
||||
<div class="col s12">
|
||||
<h2 class="blue-text no-margin-top no-margin-bottom">Les conseils de votre
|
||||
<span>talentstubeuse</span></h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row flexcontainer row-bloc-video-1 row-noMargin">
|
||||
<div class="col l6 m12 s12 col-noPadding">
|
||||
<a href="#!" data-video="#video2" class="img_content embed-responsive embed-responsive-16by9" style="background:url(/img-cnt/cv_video.jpg);background-size:cover;">
|
||||
<span class="playerbtn"></span>
|
||||
</a>
|
||||
<iframe style="display:block;" class="hide" id="video2" src="https://player.vimeo.com/video/215657518?title=0&byline=0&portrait=0" width="100%"
|
||||
height="344" frameborder="0" webkitallowfullscreen mozallowfullscreen
|
||||
allowfullscreen></iframe>
|
||||
<iframe style="display:block;" class="hide" id="video2" src="https://player.vimeo.com/video/286344340?title=0&byline=0&portrait=0" width="100%" height="344" frameborder="0" webkitallowfullscreen="webkitallowfullscreen" mozallowfullscreen="mozallowfullscreen" allowfullscreen="allowfullscreen"></iframe>
|
||||
</div>
|
||||
<div class="col l6 m12 s12 valign-wrapper">
|
||||
<div class="inside-m valign">
|
||||
<h2 class="no-margin-top">CV vidéo
|
||||
</h2>
|
||||
<p>Devenez acteur de vos talents, montrez qui vous êtes !</p>
|
||||
<p>Devenez acteur de vos talents, montrez qui vous êtes !</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
@@ -174,9 +189,7 @@
|
||||
<a href="#!" data-video="#video1" class="img_content embed-responsive embed-responsive-16by9" style="background:url(/img-cnt/offre_emploi.jpg);background-size:cover;">
|
||||
<span class="playerbtn"></span>
|
||||
</a>
|
||||
<iframe style="display:block;" class="hide" id="video1" src="https://player.vimeo.com/video/215657499?title=0&byline=0&portrait=0" width="100%"
|
||||
height="344" frameborder="0" webkitallowfullscreen mozallowfullscreen
|
||||
allowfullscreen></iframe>
|
||||
<iframe style="display:block;" class="hide" id="video1" src="https://player.vimeo.com/video/215657499?title=0&byline=0&portrait=0" width="100%" height="344" frameborder="0" webkitallowfullscreen="webkitallowfullscreen" mozallowfullscreen="mozallowfullscreen" allowfullscreen="allowfullscreen"></iframe>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
@@ -185,9 +198,7 @@
|
||||
<a href="#!" data-video="#video3" class="img_content embed-responsive embed-responsive-16by9" style="background:url(https://i.vimeocdn.com/video/653721887_1024x573.jpg);background-size:cover;">
|
||||
<span class="playerbtn"></span>
|
||||
</a>
|
||||
<iframe style="display:block;" class="hide" id="video3" src="https://player.vimeo.com/video/232618030" width="100%"
|
||||
height="344" frameborder="0" webkitallowfullscreen mozallowfullscreen
|
||||
allowfullscreen></iframe>
|
||||
<iframe style="display:block;" class="hide" id="video3" src="https://player.vimeo.com/video/232618030" width="100%" height="344" frameborder="0" webkitallowfullscreen="webkitallowfullscreen" mozallowfullscreen="mozallowfullscreen" allowfullscreen="allowfullscreen"></iframe>
|
||||
</div>
|
||||
<div class="col l6 m12 s12 valign-wrapper">
|
||||
<div class="inside-m valign">
|
||||
@@ -207,8 +218,7 @@
|
||||
<div id="modal_concept" class="modal modal-fixed-footer">
|
||||
<div class="modal-content">
|
||||
<div class="video-container">
|
||||
<iframe id="iframe_concept" src="https://player.vimeo.com/video/215638758?title=0&byline=0&portrait=0" frameborder="0" webkitallowfullscreen mozallowfullscreen
|
||||
allowfullscreen></iframe>
|
||||
<iframe id="iframe_concept" src="https://player.vimeo.com/video/215638758?title=0&byline=0&portrait=0" frameborder="0" webkitallowfullscreen="webkitallowfullscreen" mozallowfullscreen="mozallowfullscreen" allowfullscreen="allowfullscreen"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
@@ -9,9 +9,8 @@
|
||||
{% elseif user.photo %}
|
||||
<img class="circle z-depth-3" src="{{ user.webPath | imagine_filter('profile_square') }}" alt="{{ user.firstname }} {{ user.lastname }}"/>
|
||||
{% else %}
|
||||
<img class="circle z-depth-3"
|
||||
src="{{ asset('/img/portrait-carre.png') }}"
|
||||
alt="{{ user.firstname }} {{ user.lastname }}"/>
|
||||
<div class="circle-letters font-2">{{ user.firstname|first|upper }}{{ user.lastname|first|upper }}</div>
|
||||
|
||||
{% endif %}
|
||||
</a>
|
||||
<p class="item-list-job item-list-name center-align">
|
||||
|
||||
@@ -3,8 +3,21 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title></title>
|
||||
<!--[if !mso]><!-->
|
||||
<style type="text/css">
|
||||
|
||||
@import url(https://fonts.googleapis.com/css?family=Raleway);
|
||||
</style>
|
||||
<style type="text/css">
|
||||
@media only screen and (max-width:480px) {
|
||||
@-ms-viewport { width:320px; }
|
||||
@viewport { width:320px; }
|
||||
}
|
||||
</style>
|
||||
<link href="https://fonts.googleapis.com/css?family=Raleway" rel="stylesheet" type="text/css">
|
||||
<style type="text/css">
|
||||
*{
|
||||
font-family: 'Raleway';
|
||||
}
|
||||
#outlook a { padding: 0; }
|
||||
.ReadMsgBody { width: 100%; }
|
||||
.ExternalClass { width: 100%; }
|
||||
@@ -16,25 +29,31 @@
|
||||
display: block;
|
||||
margin: 13px 0;
|
||||
}
|
||||
.btn-default {
|
||||
padding: 12px 30px;
|
||||
border-radius: 30px;
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
background: #1689fb;
|
||||
font-size: 16px;
|
||||
color: #FFF;
|
||||
text-decoration: none;
|
||||
}
|
||||
.btn-white {
|
||||
background: #FFF;
|
||||
color: #1689fb;
|
||||
border: 1px solid #1689fb;
|
||||
padding: 10px 29px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<!--[if !mso]><!-->
|
||||
<style type="text/css">
|
||||
@import url(https://fonts.googleapis.com/css?family=Ubuntu:400,500,700,300);
|
||||
</style>
|
||||
<style type="text/css">
|
||||
@media only screen and (max-width:480px) {
|
||||
@-ms-viewport { width:320px; }
|
||||
@viewport { width:320px; }
|
||||
}
|
||||
</style>
|
||||
<link href="https://fonts.googleapis.com/css?family=Ubuntu:400,500,700,300" rel="stylesheet" type="text/css">
|
||||
|
||||
<!--<![endif]-->
|
||||
<style type="text/css">
|
||||
@media only screen and (min-width:480px) {
|
||||
.mj-column-per-100, * [aria-labelledby="mj-column-per-100"] { width:100%!important; }
|
||||
}</style></head>
|
||||
<body id="YIELD_MJML" style="background: #F2F2F2;"><div class="mj-body" style="background-color:#F2F2F2;"><!--[if mso]>
|
||||
<body id="YIELD_MJML" style="background: #F2F2F2;font-family:'Raleway';"><div class="mj-body" style="background-color:#F2F2F2;"><!--[if mso]>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="600" align="center" style="width:600px;"><tr><td>
|
||||
<![endif]--><div style="margin:0 auto;max-width:600px;background:#F2F2F2;"><table class="" cellpadding="0" cellspacing="0" style="width:100%;font-size:0px;background:#F2F2F2;" align="center"><tbody><tr><td style="text-align:center;vertical-align:top;font-size:0;padding:0px;"><!--[if mso]>
|
||||
<table border="0" cellpadding="0" cellspacing="0"><tr><td style="width:600px;">
|
||||
@@ -57,7 +76,7 @@
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="600" align="center" style="width:600px;"><tr><td>
|
||||
<![endif]--><div style="margin:0 auto;max-width:600px;background:#FFFFFF;"><table class="" cellpadding="0" cellspacing="0" style="width:100%;font-size:0px;background:#FFFFFF;" align="center"><tbody><tr><td style="text-align:center;vertical-align:top;font-size:0;padding:0px;"><!--[if mso]>
|
||||
<table border="0" cellpadding="0" cellspacing="0"><tr><td style="width:600px;">
|
||||
<![endif]--><div style="vertical-align:top;display:inline-block;font-size:13px;text-align:left;width:100%;" class="mj-column-per-100" aria-labelledby="mj-column-per-100"><table width="100%"><tbody><tr><td style="font-size:0;padding:20px 35px 20px 35px;" align="left"><div class="mj-content" style="cursor:auto;color:#534F4F;font-family:Trebuchet,Helvetica,sans-serif;font-size:14px;line-height:22px;">
|
||||
<![endif]--><div style="vertical-align:top;display:inline-block;font-size:13px;text-align:left;width:100%;" class="mj-column-per-100" aria-labelledby="mj-column-per-100"><table width="100%"><tbody><tr><td style="font-size:0;padding:20px 35px 20px 35px;" align="left"><div class="mj-content" style="cursor:auto;color:#534F4F;font-family:Raleway;font-size:14px;line-height:22px;">
|
||||
{% block content %}{% endblock %}<!--[if mso]>
|
||||
</td></tr></table>
|
||||
<![endif]--></td></tr></tbody></table></div><!--[if mso]>
|
||||
@@ -67,7 +86,7 @@
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="600" align="center" style="width:600px;"><tr><td>
|
||||
<![endif]--><div style="margin:0 auto;max-width:600px;background:#FFFFFF;"><table class="" cellpadding="0" cellspacing="0" style="width:100%;font-size:0px;background:#FFFFFF;" align="center"><tbody><tr><td style="text-align:center;vertical-align:top;font-size:0;padding:0px;"><!--[if mso]>
|
||||
<table border="0" cellpadding="0" cellspacing="0"><tr><td style="width:600px;">
|
||||
<![endif]--><div style="vertical-align:top;display:inline-block;font-size:13px;text-align:left;width:100%;" class="mj-column-per-100" aria-labelledby="mj-column-per-100"><table width="100%"><tbody><tr><td style="font-size:0;padding:0px 35px 0px 35px;" align="center"><div class="mj-content" style="cursor:auto;color:#534F4F;font-family:Trebuchet,Helvetica,sans-serif;font-size:14px;line-height:22px;"><p>Suivez-nous !</p>
|
||||
<![endif]--><div style="vertical-align:top;display:inline-block;font-size:13px;text-align:left;width:100%;" class="mj-column-per-100" aria-labelledby="mj-column-per-100"><table width="100%"><tbody><tr><td style="font-size:0;padding:0px 35px 0px 35px;" align="center"><div class="mj-content" style="cursor:auto;color:#534F4F;font-family:Raleway;font-size:14px;line-height:22px;"><p>Suivez-nous !</p>
|
||||
<p>
|
||||
<a style="margin:10px 20px 22px 20px;" href="https://www.facebook.com/TalentsTuber/"><img src="{{ absolute_url(asset('img/mail/facebook.png')) }}" alt="Facebook"></a>
|
||||
<a style="margin:10px 20px 22px 20px;" href="https://twitter.com/TalentsTuber"><img src="{{ absolute_url(asset('img/mail/twitter.png')) }}" alt="Twitter"></a>
|
||||
@@ -81,7 +100,7 @@
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="600" align="center" style="width:600px;"><tr><td>
|
||||
<![endif]--><div style="margin:0 auto;max-width:600px;background:#F2F2F2;"><table class="" cellpadding="0" cellspacing="0" style="width:100%;font-size:0px;background:#F2F2F2;" align="center"><tbody><tr><td style="text-align:center;vertical-align:top;font-size:0;padding:0px;"><!--[if mso]>
|
||||
<table border="0" cellpadding="0" cellspacing="0"><tr><td style="width:600px;">
|
||||
<![endif]--><div style="vertical-align:top;display:inline-block;font-size:13px;text-align:left;width:100%;" class="mj-column-per-100" aria-labelledby="mj-column-per-100"><table width="100%"><tbody><tr><td style="font-size:0;padding:20px 35px 20px 35px;" align="center"><div class="mj-content" style="cursor:auto;color:#7E7878;font-family:Trebuchet,Helvetica,sans-serif;font-size:14px;line-height:22px;"><p style="font-weight:bold;">Talents Tube</p>
|
||||
<![endif]--><div style="vertical-align:top;display:inline-block;font-size:13px;text-align:left;width:100%;" class="mj-column-per-100" aria-labelledby="mj-column-per-100"><table width="100%"><tbody><tr><td style="font-size:0;padding:20px 35px 20px 35px;" align="center"><div class="mj-content" style="cursor:auto;color:#7E7878;font-family:Raleway;font-size:14px;line-height:22px;"><p style="font-weight:bold;">Talents Tube</p>
|
||||
<p>Place Albert Einstein 6 Le Prisme CP60 PIBS 6 CS 72001 - 56038 VANNES</p>
|
||||
<p><a style="text-decoration:none;color:#7E7878;font-weight:bold;" href="mailto:contact@talentstube.com">contact@talentstube.com</a></p></div></td></tr></tbody></table></div><!--[if mso]>
|
||||
</td></tr></table>
|
||||
|
||||
@@ -2,17 +2,47 @@
|
||||
|
||||
{% block content %}
|
||||
{% if type == 'html' %}
|
||||
<p>{{ user.getCivility()|trans }} {{ user.lastname }} {{ user.firstname }}</p>
|
||||
<p>{{ message|nl2br}}</p>
|
||||
<br><br>
|
||||
<p>Informations : La personne qui vous à contacté ne connaîtra pas votre email tant que vous ne lui aurez pas
|
||||
répondu</p>
|
||||
|
||||
<p>Pensez également à bien vérifier l'identité de votre correspondant pour éviter toute tentative de phishing</p>
|
||||
|
||||
{% if video is not null %}
|
||||
<div style="margin-left: -35px; margin-right: -35px;margin-top: -20px;">
|
||||
{% if video.thumbnails.0.sizes is defined %}
|
||||
<img width="100%" src="{{ video.thumbnails.0.sizes.4.link }}"
|
||||
alt="réponse vidéo"/>
|
||||
{% endif %}
|
||||
</div>
|
||||
<br />
|
||||
Bonjour {{ user.firstname }} {{ user.lastname }},<br /><br />
|
||||
<strong>Vous avez reçu une réponse vidéo de l’entreprise {{ message.sender.company.brandname }}.</strong><br />
|
||||
Découvez la réponse vidéo en cliquant sur le bouton ci-dessous.
|
||||
<br/>
|
||||
<br/>
|
||||
<div style="text-align:center;">
|
||||
<a class="btn btn-default" href="{{ path('talent_ad_detail',{'alias': answer.ad.alias,'id': answer.id }) }}">Visionner la réponse vidéo</a>
|
||||
</div>
|
||||
{% else %}
|
||||
<br />
|
||||
Bonjour {{ user.firstname }} {{ user.lastname }},<br /><br />
|
||||
<strong>Vous avez reçu une réponse de l’entreprise {{ message.sender.company.brandname }}.</strong><br />
|
||||
Découvez la réponse en cliquant sur le bouton ci-dessous.
|
||||
<br/>
|
||||
<br/>
|
||||
<div style="text-align:center;">
|
||||
<a class="btn btn-default" href="{{ path('talent_ad_detail',{'alias': answer.ad.alias,'id': answer.id }) }}">Consulter la réponse</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<br>
|
||||
<strong>Vous souhaitez contacter l’entreprise ?</strong><br /><br />
|
||||
Cliquez sur le bouton ci-dessous pour envoyer un email à la personne en charge du recrutement.
|
||||
<br/>
|
||||
<br/>
|
||||
<div style="text-align:center;">
|
||||
<a class="btn-default btn-white" href="mailto:{{ message.sender.email }}">Répondre à {{ message.sender.firstname }} {{ message.sender.lastname }}</a>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
L’équipe Talents Tube
|
||||
{% elseif type == 'plain' %}
|
||||
{{ user.getCivility()|trans }} {{ user.lastname }} {{ user.firstname }}
|
||||
{{ message}}
|
||||
{{ messageText}}
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
@@ -6,8 +6,10 @@
|
||||
<div id="template" class="file-row">
|
||||
<div class="dz-preview">
|
||||
<div id="preview_video">
|
||||
{% if video %}
|
||||
<iframe src="https://player.vimeo.com{{ video.getCdnUrl()|replace({ "videos": "video"}) }}" width="100%" height="300px" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
|
||||
{% if video is defined %}
|
||||
{% if video is not null %}
|
||||
<iframe src="https://player.vimeo.com{{ video.getCdnUrl()|replace({ "videos": "video"}) }}" width="100%" height="300px" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="progress">
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% block content %}
|
||||
<div class="fluid-container bg-grey-3">
|
||||
<div class="container contentWrapper contentPage" id="answerPage">
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="center-align bg-grey-3 m-t-20">
|
||||
<h3 class="color-blue1 m-t-10">Importer</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="col-content bg-arrow z-depth-2 p-20">
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<h4 class="color-blue1 p-0">
|
||||
<span class="title-bubble">1</span>
|
||||
Importez votre CV Vidéo</h4>
|
||||
</div>
|
||||
<div class="col s10 offset-s1 answer-dropzone">
|
||||
{% include 'media/dropzone.html.twig' with {
|
||||
'deleting' : true
|
||||
} %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-t-40">
|
||||
<div id="form_media" class="col s10 offset-s1 center-align">
|
||||
<button id="submit" class=" btn btn-large btn-default disabled" type="submit">
|
||||
Envoyer mon CV
|
||||
</button><br/><br/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
<script type="text/javascript">
|
||||
var urlDropzone = '{{ path("upload_media_default", {"id": app.user.getId()}) }}';
|
||||
var urlDelete = 'null'
|
||||
var idObject = '{{ app.user.getId() }}';
|
||||
var typeObject = "user";
|
||||
var videoExist = false;
|
||||
</script>
|
||||
<script src="{{ asset('/js/dropzone.js') }}"></script>
|
||||
<script src="{{ asset('/js/answer.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
{% if mustLogin == true %}
|
||||
$('#submit').on('click', function (event) {
|
||||
event.preventDefault();
|
||||
$('#modal_login').modal('open');
|
||||
});
|
||||
{% endif %}
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,39 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% block content %}
|
||||
|
||||
{% set title = 'Importer son CV Vidéo' %}
|
||||
{% set route = "media_import_cv" %}
|
||||
|
||||
<div class="fluid-container bg-grey-3">
|
||||
<div class="container contentWrapper contentPage">
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="col-content center-align m-t-20">
|
||||
<h3 class="color-blue1 m-0 m-t-10">{{ title }}</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<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>
|
||||
<p>Suivez nos conseils puis enregistrez votre CV vidéo directement depuis votre webcam.</p>
|
||||
<a href="{{ path(route,{'type': 'webcam' }) }}" class="btn btn-default white">Enregistrer mon CV vidéo</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col s12 m6">
|
||||
<div class="col-content p-15 center-align z-depth-2 choice-answer-item bg-white">
|
||||
<img src="{{ asset('img/img_popupcv/videotheque_cv_video.svg')}}">
|
||||
<h3>Je possède un CV vidéo !</h3>
|
||||
<p>Importez une vidéo</p>
|
||||
<a href="{{ path(route,{'type': 'import'}) }}" class="btn btn btn-default">Importer mon CV vidéo</a><br/><br/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,105 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% block content %}
|
||||
<div class="fluid-container bg-grey-3">
|
||||
<div class="container contentWrapper contentPage" id="answerPage">
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="center-align bg-grey-3 m-t-20">
|
||||
<h3 class="color-blue1 m-t-10">J'enregistre mon CV vidéo</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="col-content bg-arrow z-depth-2 p-20">
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<h4 class="color-blue1 p-0">
|
||||
<span class="title-bubble">1</span>
|
||||
Enregistrez votre cv vidéo</h4>
|
||||
</div>
|
||||
<div class="col m4 offset-m1 s12">
|
||||
<video id="myCvVideo" class="video-js vjs-default-skin"></video>
|
||||
<div class="video-informations-card center-align">
|
||||
<p>Merci de cliquer sur l'icône
|
||||
<span class="vjs-icon-device-perm"></span>
|
||||
afin d'activer votre webcam.</p>
|
||||
<p>Votre webcam activée, lancez l'enregistrement en cliquant sur le bouton rond en bas à gauche du lecteur.</p>
|
||||
<p>Si vous n'êtes pas satisfait(e) de votre CV vidéo après un enregistrement, vous pouvez à tout moment recommencer l'enregistrement.</p>
|
||||
<p>
|
||||
<a class="view-tuto">Revoir le tutoriel</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col m2 hide-on-small-only">
|
||||
<div class="valign-wrapper" style="align-items:center;justify-content: center;height: 300px;width:100%;">
|
||||
<div style="font-size:40px;">
|
||||
<i class="fa fa-arrow-right center-align" aria-hidden="true"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col m4 s12">
|
||||
<video id="preview" controls="true">
|
||||
<span class="vjs-control-text">Play Video</span>
|
||||
</video>
|
||||
<div class="btnContainer center-align" style="display:none;">
|
||||
<a id="saveRecord" href="#!" class="saveVideo btn btn-default">
|
||||
<i class="fa fa-floppy-o" aria-hidden="true"></i> Télécharger mon CV Vidéo
|
||||
</a>
|
||||
<div class="video-informations-card">
|
||||
<p>Une fois téléchargé vous pouvez glisser-déposer votre CV vidéo dans la zone prévue pour lancer le téléchargement.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-content bg-arrow z-depth-2 p-20">
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<h4 class="color-blue1 p-0">
|
||||
<span class="title-bubble">2</span>
|
||||
Importez votre CV Vidéo</h4>
|
||||
</div>
|
||||
<div class="col s10 offset-s1 answer-dropzone">
|
||||
{% include 'media/dropzone.html.twig' with {
|
||||
'deleting' : true
|
||||
} %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-t-40">
|
||||
<div id="form_media" class="col s10 offset-s1 center-align">
|
||||
<button id="submit" class=" btn btn-large btn-default disabled" type="submit">
|
||||
Envoyer mon CV vidéo
|
||||
</button><br/><br/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
<script type="text/javascript">
|
||||
var urlDropzone = '{{ path("upload_media_default", {"id": app.user.getId()}) }}';
|
||||
var urlDelete = 'null';
|
||||
var idObject = '{{ app.user.getId() }}';
|
||||
var typeObject = "user";
|
||||
var videoExist = false;
|
||||
</script>
|
||||
<script src="{{ asset('/js/dropzone.js') }}"></script>
|
||||
<script src="{{ asset('/js/vendors/video.min.js') }}"></script>
|
||||
<script src="{{ asset('/js/vendors/RecordRTC.js') }}"></script>
|
||||
<script src="{{ asset('/js/vendors/videojs.record.js') }}"></script>
|
||||
<script src="{{ asset('/js/vendors/jquery.browser.min.js') }}"></script>
|
||||
<script src="{{ asset('/js/answer.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
{% if mustLogin == true %}
|
||||
$('#submit').on('click', function (event) {
|
||||
event.preventDefault();
|
||||
$('#modal_login').modal('open');
|
||||
});
|
||||
{% endif %}
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,10 @@
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<h4>{% trans %}label.webcam.answer.step2{% endtrans %}</h4>
|
||||
</div>
|
||||
<div class="col s10 offset-s1 answer-dropzone">
|
||||
{% include 'media/dropzone.html.twig' with {'deleting': true } %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,28 @@
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<h4>{% trans %}label.webcam.answer.videotheque{% endtrans %}</h4>
|
||||
</div>
|
||||
{% for vid in videos %}
|
||||
{% set img = "" %}
|
||||
{% if vid.thumbnails.0 is defined %}
|
||||
{% set img = vid.thumbnails.0.sizes.4.link %}
|
||||
{% endif %}
|
||||
<div class="col s4">
|
||||
<div class="card">
|
||||
<div class="card-image">
|
||||
<div class="embed-responsive embed-responsive-16by9">
|
||||
<iframe src="https://player.vimeo.com{{ vid.getCdnUrl()|replace({ "videos": "video"}) }}" width="100%" height="auto" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
|
||||
</div>
|
||||
</div>
|
||||
<div style="cursor:pointer;" class="card-action" data-url="https://player.vimeo.com{{ vid.getCdnUrl()|replace({ "videos": "video"}) }}" data-img="{{ img }}" data-position="top" data-tooltip="Choisir cette vidéo" href="#" data-title="{{ vid.getTitle() }}" data-id="{{ vid.getId() }}">
|
||||
<a class="addExistingVideo" >
|
||||
<span>{{ vid.getTitle() }}</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,35 @@
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<h4>{% trans %}label.webcam.answer.step1{% endtrans %}</h4>
|
||||
</div>
|
||||
<div class="col s5">
|
||||
<video id="myCvVideo" class="video-js vjs-default-skin"></video>
|
||||
<div class="video-informations-card center-align">
|
||||
<p>Merci de cliquer sur l'icône <span class="vjs-icon-device-perm"></span> afin d'activer votre webcam.</p>
|
||||
<p>Votre webcam activée, lancez l'enregistrement en cliquant sur le bouton rond en bas à gauche du lecteur.</p>
|
||||
<p>Si vous n'êtes pas satisfait(e) de votre vidéo après un enregistrement, vous pouvez à tout moment recommencer l'enregistrement.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col s2 hide-on-small-only">
|
||||
<div class="valign-wrapper" style="align-items:center;justify-content: center;height: 300px;width:100%;">
|
||||
<div style="font-size:40px;">
|
||||
<i class="fa fa-arrow-right center-align" aria-hidden="true"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col s5">
|
||||
<video id="preview" controls="true">
|
||||
<span class="vjs-control-text">Play Video</span>
|
||||
</video>
|
||||
<div class="btnContainer center-align" style="display:none;">
|
||||
<a id="saveRecord" href="#!" class="saveVideo btn btn-default">
|
||||
<i class="fa fa-floppy-o" aria-hidden="true"></i> Télécharger ma vidéo
|
||||
</a>
|
||||
<div class="video-informations-card">
|
||||
<p>Une fois téléchargé vous pouvez glisser-déposer votre vidéo dans la zone prévue pour lancer le téléchargement.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% block content %}
|
||||
{% set subtitle = 'Déposer une recommandation pour :' %}
|
||||
{% set title = userTalent.firstname ~" "~ userTalent.lastname %}
|
||||
<div class="fluid-container bg-grey-3">
|
||||
<div class="container contentWrapper contentPage" id="answerPage">
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="center-align bg-grey-3 m-t-20">
|
||||
<strong>{{ subtitle }}</strong>
|
||||
<h3 class="color-blue1 m-t-10">{{ title }}</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="col-content bg-arrow z-depth-2 p-20">
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<h4 class="color-blue1 p-0"><span class="title-bubble">1</span> Enregistrez votre vidéo de recommandation</h4>
|
||||
</div>
|
||||
<div class="col m4 offset-m1 s12">
|
||||
<video id="myCvVideo" class="video-js vjs-default-skin"></video>
|
||||
<div class="video-informations-card center-align">
|
||||
<p>Merci de cliquer sur l'icône <span class="vjs-icon-device-perm"></span> afin d'activer votre webcam.</p>
|
||||
<p>Votre webcam activée, lancez l'enregistrement en cliquant sur le bouton rond en bas à gauche du lecteur.</p>
|
||||
<p>Si vous n'êtes pas satisfait(e) de votre vidéo après un enregistrement, vous pouvez à tout moment recommencer l'enregistrement.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col m2 hide-on-small-only">
|
||||
<div class="valign-wrapper" style="align-items:center;justify-content: center;height: 300px;width:100%;">
|
||||
<div style="font-size:40px;">
|
||||
<i class="fa fa-arrow-right center-align" aria-hidden="true"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col m4 s12">
|
||||
<video id="preview" controls="true">
|
||||
<span class="vjs-control-text">Play Video</span>
|
||||
</video>
|
||||
<div class="btnContainer center-align" style="display:none;">
|
||||
<a id="saveRecord" href="#!" class="saveVideo btn btn-default">
|
||||
<i class="fa fa-floppy-o" aria-hidden="true"></i> Télécharger ma Vidéo de recommandation
|
||||
</a>
|
||||
<div class="video-informations-card">
|
||||
<p>Une fois téléchargé vous pouvez glisser-déposer votre vidéo dans la zone prévue pour lancer le téléchargement.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-content bg-arrow z-depth-2 p-20">
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<h4 class="color-blue1 p-0"><span class="title-bubble">2</span> Importez votre Vidéo de recommandation</h4>
|
||||
</div>
|
||||
<div class="col s10 offset-s1 answer-dropzone">
|
||||
{% include 'media/dropzone.html.twig' with {'deleting': true } %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_start(form, {'attr': { 'id': 'form_media' } }) }}
|
||||
<div class="col-content z-depth-2 p-20">
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<h4 class="color-blue1 p-0"><span class="title-bubble">3</span> Choix de relation</h4>
|
||||
</div>
|
||||
<div class="col s10 offset-s1 answer-dropzone">
|
||||
{{ form_row(form.relationType) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-t-40">
|
||||
<div class="col s10 offset-s1 center-align">
|
||||
<button id="submit" class=" btn btn-large btn-default disabled" type="submit">
|
||||
Envoyer ma recommandation
|
||||
</button><br /><br />
|
||||
<a class="color-grey5" href="{{ routeReturn }}">Annuler</a>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
<script type="text/javascript">
|
||||
var urlDropzone = '{{ path("upload_media_recommendation", {"id": recommendation.getId()}) }}';
|
||||
var urlDelete = '{{ path("delete_media_recommendation", {"id": recommendation.getId() }) }}'
|
||||
var idObject = '{{ recommendation.getId() }}';
|
||||
var typeObject = "recommendation";
|
||||
{% if video %}
|
||||
if($("#form_media").length){
|
||||
$("#submit").removeClass('disabled');
|
||||
$("#submit").addClass('pulse');
|
||||
}
|
||||
var videoExist = true;
|
||||
var videoOriginal = "{{video.getOriginalUrl()}}";
|
||||
var mockFile = { name: '{{video.getTitle()}}', size: '181818181', type: 'mp4', serverID: 0, accepted: true };
|
||||
{% else %}
|
||||
var videoExist = false;
|
||||
{% endif %}
|
||||
</script>
|
||||
<script src="{{ asset('/js/dropzone.js') }}"></script>
|
||||
<script src="{{ asset('/js/vendors/video.min.js') }}"></script>
|
||||
<script src="{{ asset('/js/vendors/RecordRTC.js') }}"></script>
|
||||
<script src="{{ asset('/js/vendors/videojs.record.js') }}"></script>
|
||||
<script src="{{ asset('/js/vendors/jquery.browser.min.js') }}"></script>
|
||||
<script src="{{ asset('/js/answer.js') }}"></script>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,13 @@
|
||||
<div class="col s12" id="breadcrumb">
|
||||
<a href="{{ path('talent_ad_space')}}">
|
||||
<span {% if step == 1 %}class="active"{% endif %}>{% trans %}talent.menu.answers.label{% endtrans %}</span>
|
||||
</a>
|
||||
{% if step >= 2 %}
|
||||
<span class="sepa-breadcrumb">></span>
|
||||
<span {% if step == 2 %}class="active"{% endif %}>{{ title }}</span>
|
||||
{% endif %}
|
||||
<div class="border-breadcrumb"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
{% extends 'talent/base_dashboard_talent.html.twig' %}
|
||||
|
||||
{% block dashContent %}
|
||||
{% include 'talent/job_submenu.html.twig' with {
|
||||
'tab' : 1
|
||||
} %}
|
||||
|
||||
<div class="row bg-bordered p-20">
|
||||
{% if answer.ad is not null %}
|
||||
{% set titleAnswer = answer.ad.title %}
|
||||
{% else %}
|
||||
{% set titleAnswer = answer.company.brandname %}
|
||||
{% endif %}
|
||||
{% include 'talent/ad_breadcrumb.html.twig' with {'step': 2,'title': titleAnswer,'firstname':answer.user.firstname ,'lastname':answer.user.lastname} %}
|
||||
<div class="col s12 m6">
|
||||
<div id="mini-profil-block">
|
||||
{% include 'talent/talent_picture.html.twig' with {
|
||||
'user' : answer.user
|
||||
} %}
|
||||
<div>
|
||||
<div class="mini-profil-picture-name">{{ answer.user.firstname }} {{ answer.user.lastname }}</div>
|
||||
<div>Envoyé le {{ answer.sendTime|date('d/m/Y') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if answer.video is not null %}
|
||||
<div class="embed-responsive embed-responsive-16by9">
|
||||
<iframe src="https://player.vimeo.com/video/{{ answer.video.cdnUrl|replace({ "/videos/": ""}) }}"
|
||||
width="100%" height="auto" frameborder="0" webkitallowfullscreen mozallowfullscreen
|
||||
allowfullscreen></iframe>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col s12 m6">
|
||||
{% if answer.comment %}
|
||||
<strong>{% trans %}label.message{% endtrans %}</strong>
|
||||
<p class="message-answer">{{ answer.comment }}</p>
|
||||
<a href="#" class="link-message-more">{% trans %}label.link.readmore{% endtrans %}</a>
|
||||
{% else %}
|
||||
{% trans %}label.noMessage{% endtrans %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col s12">
|
||||
<h4 class="no-margin-top bordered">HISTORIQUE DES MESSAGES RECUS</h4>
|
||||
</div>
|
||||
<div class="col s12">
|
||||
{% if answer.messages %}
|
||||
{% set nbMessage = 0 %}
|
||||
{% for message in answer.messages if message.status != "DRAFT" %}
|
||||
{% set class = '' %}
|
||||
{% if loop.index > 1 %}
|
||||
{% set class = 'history-hidden' %}
|
||||
{% endif %}
|
||||
<div class="blockanswer-answer {{class}}">
|
||||
<div class="title-answer">
|
||||
{{ message.sender.lastname }} {{ message.sender.firstname }}
|
||||
<span class="date-answer">{% trans %}label.received{% endtrans %}{{ message.uTime|date('d-m-Y') }}</span>
|
||||
</div>
|
||||
<div class="description-answer">
|
||||
{% if message.video %}
|
||||
<div class="embed-responsive embed-responsive-16by9">
|
||||
<iframe src="https://player.vimeo.com/video/{{ message.video.cdnUrl|replace({ "/videos/": ""}) }}"
|
||||
width="100%" height="300" frameborder="0" webkitallowfullscreen mozallowfullscreen
|
||||
allowfullscreen></iframe>
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ message.content|nl2br }}
|
||||
</div>
|
||||
</div>
|
||||
{% set nbMessage = nbMessage + 1 %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if nbMessage > 1 %}
|
||||
<div class="col s12 center-align m-t-30">
|
||||
<a class="bnt btn-round btn-grey-2 link-history-more" href="#" title="{% trans %}label.history.talent.link{% endtrans %}">{% trans %}label.history.talent.link{% endtrans %}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
|
||||
<script type="text/javascript">
|
||||
$('.link-message-more').on('click',function(e) {
|
||||
e.preventDefault();
|
||||
$('.message-answer').animate({
|
||||
'height': '100%'
|
||||
})
|
||||
});
|
||||
$('.link-history-more').on('click',function(e) {
|
||||
e.preventDefault();
|
||||
$('.history-hidden').fadeIn();
|
||||
$(this).fadeOut();
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -1,49 +1,50 @@
|
||||
{% extends 'talent/base_dashboard_talent.html.twig' %}
|
||||
|
||||
|
||||
{% block dashContent %}
|
||||
{#<h1 class="alttitle">Espace offres d'emploi</h1>#}
|
||||
{% include 'talent/job_submenu.html.twig' with {
|
||||
'tab' : 1
|
||||
} %}
|
||||
<div class=" row bg-bordered p-20">
|
||||
<ul class="tabs">
|
||||
<li class="tab col s4"><a class="active" href="#reponses">Mes candidatures</a></li>
|
||||
</ul>
|
||||
<div id="reponses" class="col s12">
|
||||
<table class="bordered highlight responsive-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Intitulé de l'annonce</th>
|
||||
<th>Date de réponse</th>
|
||||
<th>Réponses</th>
|
||||
<th>État</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for a in answers %}
|
||||
<tr>
|
||||
<td>
|
||||
{% if a.ad != null %}{{ a.ad.title }}{% else %}{{ a.company.brandname }}{% endif %}<br />
|
||||
{% if a.video is not null %}
|
||||
<a class="waves-effect waves-light btn btn-default modalBtn" href="#" data-url="{{ a.video.cdnUrl }}">Voir la vidéo</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ a.uTime|date('d/m/Y') }}</td>
|
||||
<td>
|
||||
{% if a.ad != null %} {{ a.ad.countAnswers }}{% endif %}
|
||||
|
||||
</td>
|
||||
<td>
|
||||
{% if a.status == "DRAFT" and a.ad != null %}
|
||||
<a href="{{ path('talent_answer_create',{id:a.ad.id}) }}">
|
||||
<i class="fa fa-pencil-square-o" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{{ a.status|trans }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="center-align"></p>
|
||||
{% include 'talent/ad_breadcrumb.html.twig' with {'step': 1} %}
|
||||
<div id="reponses" class="col s12">
|
||||
<table id="table-answers" class="bordered highlight responsive-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Intitulé de l'annonce</th>
|
||||
<th>Date de réponse</th>
|
||||
<th>Nombre de candidats</th>
|
||||
<th>Message recus</th>
|
||||
<th>État</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for a in answers %}
|
||||
<tr>
|
||||
<td>
|
||||
{% if a.ad != null %}
|
||||
<a href="{{ path('talent_ad_detail',{alias: a.ad.alias, id: a.id })}}">
|
||||
{{ a.ad.title }}
|
||||
{% else %}
|
||||
<a href="{{ path('talent_ad_detail',{alias: a.company.alias, id: a.id })}}">
|
||||
{{ a.company.brandname }} - {{ 'company.menu.spontaneous.label'|trans }}
|
||||
{% endif %}
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ a.sendTime|date('d/m/Y') }}</td>
|
||||
<td> {% if a.ad != null %}{{ a.ad.countAnswers }}{% else %} - {% endif %}</td>
|
||||
<td>{{ a.mineMessages|length }}</td>
|
||||
<td style="min-width: 100px;">
|
||||
{% if a.status == "DRAFT" and a.ad != null %}
|
||||
<a href="{{ path('talent_answer_create',{id:a.ad.id}) }}">
|
||||
<i class="fa fa-pencil-square-o" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}{{ a.status|trans }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="center-align"></p>
|
||||
</div>
|
||||
<div id="modal_video" class="modal">
|
||||
<div class="modal-content">
|
||||
@@ -51,24 +52,23 @@
|
||||
<div class="videoContainer" style="text-align:center;">Loading...</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat">Fermer</a>
|
||||
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat">Fermer</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
<script src="https://player.vimeo.com/api/player.js"></script>
|
||||
<script type="text/javascript">
|
||||
$('.modalBtn').click(function(){
|
||||
$('.modalBtn').click(function () {
|
||||
$('.videoContainer').html('');
|
||||
$('#modal_video').modal('open');
|
||||
var urlVideo = $(this).data("url");
|
||||
urlVideo = urlVideo.replace('videos', 'video');
|
||||
var player = '<div data-vimeo-url="https://vimeo.com'+urlVideo+'" id="player_vimeo"></div>';
|
||||
var player = '<div data-vimeo-url="https://vimeo.com' + urlVideo + '" id="player_vimeo"></div>';
|
||||
$('.videoContainer').html(player);
|
||||
var player_vimeo = new Vimeo.Player('player_vimeo');
|
||||
});
|
||||
|
||||
@@ -19,6 +19,29 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDYV8IJGtIoWLfXJQQvIuDQ88n2aEuRgpg&libraries=places"></script>
|
||||
{% javascripts
|
||||
'@vendors'
|
||||
'@global'
|
||||
'@talents'
|
||||
output='assetic/main.dash.talent.js' filter='?uglifyjs2' %}
|
||||
<script src="{{ asset_url }}"></script>
|
||||
{% endjavascripts %}
|
||||
<script type="text/javascript">
|
||||
$.fn.datepicker.languages['fr-FR'] = {
|
||||
format: 'dd/mm/yyyy',
|
||||
days: ['Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi'],
|
||||
daysShort: ['Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam'],
|
||||
daysMin: ['Di', 'Lu', 'Ma', 'Me', 'Je', 'Ve', 'Sa'],
|
||||
weekStart: 1,
|
||||
months: ['Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Aout', 'Septembre', 'Octobre', 'Novembre', 'Décembre'],
|
||||
monthsShort: ['Jan', 'Fev', 'Mar', 'Avr', 'Mai', 'Jun', 'Jui', 'Aou', 'Sep', 'Oct', 'Nov', 'Dec']
|
||||
};
|
||||
|
||||
$('.datepicker').datepicker({
|
||||
language: 'fr-FR'
|
||||
});
|
||||
|
||||
$('form[name="talent_profile"]').validate();
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,10 @@
|
||||
<div class="row bg-bordered p-0">
|
||||
<ul class="nav-tabs">
|
||||
<li class="{% if tab == 1 %} active {% endif %} col s3">
|
||||
<a {% if tab == 1 %}class="active"{% endif %} href="{{ path('talent_ad_space') }}">{{'talent.menu.answers.label'|trans}}</a>
|
||||
</li>
|
||||
<li class="{% if tab == 2 %} active {% endif %} col s3">
|
||||
<a {% if tab == 2 %}class="active"{% endif %} href="{{path('recommandation_list')}}">{{'talent.menu.recommandations.label'|trans}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -198,6 +198,5 @@
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,27 @@
|
||||
{% extends 'talent/base_dashboard_talent.html.twig' %}
|
||||
|
||||
{% block dashContent %}
|
||||
{% include 'talent/job_submenu.html.twig' with {
|
||||
'tab' : 2
|
||||
} %}
|
||||
<div class=" row bg-bordered p-20">
|
||||
<div class="col s12 bb-grey p-b-10">
|
||||
<span class="bg-blue-1 text-gradient font-2 text-upper text-bold">Supprimer votre recommandation</span>
|
||||
</div>
|
||||
<div id="recommendation" class="col s12 p-t-20">
|
||||
{{form_start(form)}}
|
||||
{{form_rest(form)}}
|
||||
<button id="submit" class="btn btn-large btn-default" type="submit">
|
||||
Supprimer votre recommandation
|
||||
</button>
|
||||
|
||||
{{form_end(form)}}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,136 @@
|
||||
{% extends 'talent/base_dashboard_talent.html.twig' %}
|
||||
|
||||
{% block dashContent %}
|
||||
{% include 'talent/job_submenu.html.twig' with {
|
||||
'tab' : 2
|
||||
} %}
|
||||
<div class=" row bg-bordered p-20">
|
||||
<div class="col s12 bb-grey p-b-10">
|
||||
<span class="bg-blue-1 text-gradient font-2 text-upper text-bold">recommandations reçues</span>
|
||||
</div>
|
||||
<div id="reponses" class="col s12">
|
||||
<table class="bordered responsive-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nom Prénom</th>
|
||||
<th class="center-align">Date</th>
|
||||
<th class="center-align">Action</th>
|
||||
<th>Visibilité</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for r in received %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ r.sender.lastname }}
|
||||
{{ r.sender.firstname }}
|
||||
</td>
|
||||
<td class="center-align">
|
||||
{{ r.uTime|date('d/m/Y') }}
|
||||
</td>
|
||||
<td class="center-align">
|
||||
<i class="fa fa-eye modalBtn c-pointer hover-blue1" data-url="{{ r.video.cdnUrl }}"></i>
|
||||
</td>
|
||||
<td>
|
||||
{% if r.isVisible == false %}
|
||||
<span class="color-red">Désactivée</span>
|
||||
{% else %}
|
||||
<div class="switch d-inblock">
|
||||
<label>
|
||||
<input class="visibilityToggle" type="checkbox" {% if r.isEnabled %} checked="checked" {% endif %} data-id="{{r.id}}">
|
||||
<span class="lever"></span>
|
||||
</label>
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="center-align"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" row bg-bordered p-20">
|
||||
<div class="col s12 bb-grey p-b-10">
|
||||
<span class="bg-blue-1 text-gradient font-2 text-upper text-bold">recommandations envoyées</span>
|
||||
</div>
|
||||
<div id="reponses" class="col s12">
|
||||
<table class="bordered responsive-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nom Prénom</th>
|
||||
<th class="center-align">Date</th>
|
||||
<th class="center-align">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for r in sended %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ r.user.lastname }}
|
||||
{{ r.user.firstname }}
|
||||
</td>
|
||||
<td class="center-align">
|
||||
{{ r.uTime|date('d/m/Y') }}
|
||||
</td>
|
||||
<td class="center-align">
|
||||
{% if r.video.cdnUrl is defined %}
|
||||
<i class="fa fa-eye modalBtn c-pointer hover-blue1" data-url="{{ r.video.cdnUrl }}"></i>
|
||||
{% endif %}
|
||||
<a href="{{ path('delete_recommendation',{id:r.id}) }}">
|
||||
<i class="fa fa-trash hover-red c-pointer color-black"></i>
|
||||
</a>
|
||||
{% if r.isVisible == false %}
|
||||
<span class="color-red">Désactivée</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="center-align"></p>
|
||||
</div>
|
||||
|
||||
<div id="modal_video" class="modal">
|
||||
<div class="modal-content">
|
||||
<h4>Vidéo de la recommandation</h4>
|
||||
<div class="videoContainer" style="text-align:center;">Loading...</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="modal-action modal-close waves-effect waves-green btn-flat">Fermer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
<script src="https://player.vimeo.com/api/player.js"></script>
|
||||
<script type="text/javascript">
|
||||
$('.modalBtn').click(function () {
|
||||
$('.videoContainer').html('');
|
||||
$('#modal_video').modal('open');
|
||||
var urlVideo = $(this).data("url");
|
||||
urlVideo = urlVideo.replace('videos', 'video');
|
||||
var player = '<div data-vimeo-url="https://vimeo.com' + urlVideo + '" id="player_vimeo"></div>';
|
||||
$('.videoContainer').html(player);
|
||||
var player_vimeo = new Vimeo.Player('player_vimeo');
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$('.visibilityToggle').change(function () {
|
||||
var recId = $(this).data('id');
|
||||
var route = '/talent/me/recommandation/' + recId + '/toggle';
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: route,
|
||||
dataType: "json",
|
||||
success: function (msg) {
|
||||
console.log(msg);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -1,13 +1,6 @@
|
||||
{% for t in talents %}
|
||||
{% if t.users[0] is defined %}
|
||||
{% set user = t.users[0] %}
|
||||
{#{% if user.photo %}#}
|
||||
{#<img src="/{{ user.webPath }}" alt="{{ user.firstname }} {{ user.lastname }}"/>#}
|
||||
{#<span class="playerbtn"></span>#}
|
||||
{#{% endif %}#}
|
||||
|
||||
|
||||
|
||||
<div class="row item-list-bis">
|
||||
<div class="col s12 m12 l4 col-padding-right">
|
||||
<a href="{{ path('talent_show',{'alias': t.alias }) }}"
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
<div class="profil-picture mini-profil-picture">
|
||||
{% if answer.user.getWebPath() %}
|
||||
{% if user.socialPicture is not null and user.photo is null %}
|
||||
<img class="circle responsive-img" src="{{ user.socialPicture }}" alt="{{ user.firstname }} {{ user.lastname|first|upper }}"/>
|
||||
{% elseif user.photo %}
|
||||
<img class="circle responsive-img" src="{{ user.webPath | imagine_filter('profile_square') }}" alt="{{ user.firstname }} {{ user.lastname }}"/>
|
||||
{% else %}
|
||||
<div class="circle-letters font-2">{{ user.firstname|first|upper }}{{ user.lastname|first|upper }}</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<div class="circle-letters font-2">{{ user.firstname|first|upper }}{{ user.lastname|first|upper }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
@@ -1,64 +1,71 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Recruter un(e) employé(e) spécialisé(e) {% for t in user.company.publicTag %}{{ t }} {% endfor %}| Talents Tube{% endblock %}
|
||||
{% block title %}Recruter un(e) employé(e) spécialisé(e)
|
||||
{% for t in user.company.publicTag %}{{ t }}
|
||||
{% endfor %}| Talents Tube{% endblock %}
|
||||
|
||||
{% block description %}Découvrez le CV vidéo de {{ user.firstname }}. Trouvez le prochain talent de votre équipe sur Talents Tube.{% endblock %}
|
||||
{% block description %}Découvrez le CV vidéo de
|
||||
{{ user.firstname }}. Trouvez le prochain talent de votre équipe sur Talents Tube.{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% include 'default/flash_message.html.twig' %}
|
||||
|
||||
<div class="fluid-container bg-grey-3 ">
|
||||
<div class="fluid-container bg-grey-3" id="talent-show">
|
||||
<div class="container contentWrapper contentPage">
|
||||
<div class="row">
|
||||
<div class="col s12 m4 l3" id="sidebar">
|
||||
<div class="profil center-align">
|
||||
{% set company = user.company %}
|
||||
<div class="profil-picture">
|
||||
{% if user.socialPicture is not null and user.photo is null %}
|
||||
<img class="circle responsive-img" src="{{ user.socialPicture }}" alt="{{ user.firstname }} {{ user.lastname|first|upper }}"/>
|
||||
{% elseif user.photo %}
|
||||
<img class="circle responsive-img" src="{{ user.webPath | imagine_filter('profile_square') }}" alt="{{ user.firstname }} {{ user.lastname }}"/>
|
||||
{% else %}
|
||||
<div class="circle-letters font-2">{{ user.firstname|first|upper }}{{ user.lastname|first|upper }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<p class="profil-name"><b>{{ user.firstname }} {{ user.lastname|upper }}</b></p>
|
||||
<div class="profil-picture">
|
||||
{% if user.socialPicture is not null and user.photo is null %}
|
||||
<img class="circle responsive-img" src="{{ user.socialPicture }}" alt="{{ user.firstname }} {{ user.lastname|first|upper }}"/>
|
||||
{% elseif user.photo %}
|
||||
<img class="circle responsive-img" src="{{ user.webPath | imagine_filter('profile_square') }}" alt="{{ user.firstname }} {{ user.lastname }}"/>
|
||||
{% else %}
|
||||
<div class="circle-letters font-2">{{ user.firstname|first|upper }}{{ user.lastname|first|upper }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<p class="profil-name">
|
||||
<b>{{ user.firstname }}
|
||||
{{ user.lastname|upper }}</b>
|
||||
</p>
|
||||
{% if company.addresses.billing is defined %}
|
||||
<p class="profil-city">{{ company.addresses.billing.city }}
|
||||
- {{ company.addresses.billing.country|country }}</p>
|
||||
-
|
||||
{{ company.addresses.billing.country|country }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col s12 profil-links">
|
||||
{% if talent.extra.linkedin %}
|
||||
<a target="_blank" href="{{ talent.extra.linkedin }}" class="td-none">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x z-depth-2"></i>
|
||||
<i class="fa fa-linkedin fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x z-depth-2"></i>
|
||||
<i class="fa fa-linkedin fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if talent.extra.twitter %}
|
||||
<a target="_blank" href="{{ talent.extra.twitter }}" class="td-none">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x z-depth-2"></i>
|
||||
<i class="fa fa-twitter fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x z-depth-2"></i>
|
||||
<i class="fa fa-twitter fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if talent.website %}
|
||||
<a target="_blank" href="{{ talent.website }}" class="td-none">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x z-depth-2"></i>
|
||||
<i class="fa fa-link fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x z-depth-2"></i>
|
||||
<i class="fa fa-link fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col s12 center-align">
|
||||
<div class="divider"></div>
|
||||
<br />
|
||||
<br/>
|
||||
{% if is_granted("ROLE_COMPANY") %}
|
||||
<a class="btn btn-default contact-talent" href="#modal1">Contacter le talent</a>
|
||||
<a class="btn btn-default contact-talent" href="#modal1">Contacter le talent</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -67,26 +74,81 @@
|
||||
<div class="col s12 detail-item-video">
|
||||
{% if talent.presentationVideo %}
|
||||
<div class="video-responsive">
|
||||
<iframe src="https://player.vimeo.com/video/{{ talent.presentationVideo.cdnUrl|replace({ "/videos/": ""}) }}"
|
||||
width="100%" height="640" frameborder="0" webkitallowfullscreen mozallowfullscreen
|
||||
allowfullscreen></iframe>
|
||||
<iframe src="https://player.vimeo.com/video/{{ talent.presentationVideo.cdnUrl|replace({ "/videos/": ""}) }}" width="100%" height="640" frameborder="0" webkitallowfullscreen="webkitallowfullscreen" mozallowfullscreen="mozallowfullscreen" allowfullscreen="allowfullscreen"></iframe>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row bg-bordered">
|
||||
<div class="col s12">
|
||||
<h3 class="blue-text no-margin-top"> Le Cv vidéo de {{ user.firstname }} {{ user.lastname }}</h3>
|
||||
<h3 class="blue-text no-margin-top">
|
||||
Le Cv vidéo de
|
||||
{{ user.firstname }}
|
||||
{{ user.lastname }}</h3>
|
||||
{% for tag in talent.publicTag %}
|
||||
<div class="chip">{{ tag }}</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row bg-bordered">
|
||||
<div class="col s12 header-recommendations">
|
||||
<h3 class="blue-text no-margin-top">{% trans %}label.recommendations{% endtrans %}</h3>
|
||||
{% if showRecommendation %}
|
||||
<a title="Recommander {{ user.firstname }} {{ user.lastname }}" href="{{urlRecommendation}}" id="recommendation" class=" btn btn-large btn-default" type="submit">
|
||||
{% trans %}label.button.recommendation{% endtrans %}
|
||||
{{ user.firstname }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if recommendations is not null %}
|
||||
<div class="recommendations-list">
|
||||
{% for recommendation in recommendations if recommendation.isVisible != false %}
|
||||
<div class="col s6 recommendation-block">
|
||||
<div class="video-responsive">
|
||||
<iframe src="https://player.vimeo.com/video/{{ recommendation.video.cdnUrl|replace({ "/videos/": ""}) }}" width="100%" height="640" frameborder="0" webkitallowfullscreen="webkitallowfullscreen" mozallowfullscreen="mozallowfullscreen" allowfullscreen="allowfullscreen"></iframe>
|
||||
</div>
|
||||
<div class="recommendation-user-infos">
|
||||
<div class="profil-picture">
|
||||
{% if recommendation.sender.socialPicture is not null and recommendation.sender.photo is null %}
|
||||
<img class="circle responsive-img" src="{{ recommendation.sender.socialPicture }}" alt="{{ recommendation.sender.firstname }} {{ recommendation.sender.lastname|first|upper }}"/>
|
||||
{% elseif user.photo %}
|
||||
<img class="circle responsive-img" src="{{ recommendation.sender.webPath | imagine_filter('profile_square') }}" alt="{{ recommendation.sender.firstname }} {{ recommendation.sender.lastname }}"/>
|
||||
{% else %}
|
||||
<div class="circle-letters font-2">{{ recommendation.sender.firstname|first|upper }}{{ recommendation.sender.lastname|first|upper }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div>
|
||||
<span class="recommendation-user-name">{{ recommendation.sender.firstname }}
|
||||
{{ recommendation.sender.lastname }}</span>
|
||||
<br/>
|
||||
<span class="recommendation-date">{{ recommendation.ctime|localizeddate('medium', 'none', 'fr_FR') }}, {{ recommendation.relationType|replace({'choice': 'front'})|trans({'%{name}' : user.firstname,'%{name2}' : recommendation.sender.firstname})}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% set popup_recommendation = app.session.flashbag.get('popup_recommendation') %}
|
||||
{% if popup_recommendation is not empty %}
|
||||
{% if popup_recommendation == true %}
|
||||
<div id="modal-recommendation" class="modal">
|
||||
<div class="modal-content">
|
||||
<div class="col-content center-align">
|
||||
<span class="color-blue1">Votre recommandation a bien été envoyée à <br />{{ user.firstname }} {{ user.lastname }}</span>
|
||||
<hr />
|
||||
<a class="btn btn-default modal-action modal-close text-center">Fermer</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if is_granted("ROLE_COMPANY") %}
|
||||
<div id="modal1" class="modal">
|
||||
<div class="col s12 m12 l12">
|
||||
@@ -94,8 +156,10 @@
|
||||
<h4 class="no-margin-top">
|
||||
Contacter le talent
|
||||
</h4>
|
||||
<p>
|
||||
Expéditeur : {{ app.user.firstname }} {{ app.user.lastname }}
|
||||
Ex <p>
|
||||
péditeur :
|
||||
{{ app.user.firstname }}
|
||||
{{ app.user.lastname }}
|
||||
</p>
|
||||
{{ form_start(form) }}
|
||||
{{ form_rest(form) }}
|
||||
@@ -113,10 +177,24 @@
|
||||
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$.get( "{{ path('talent_ajaxRecStat',{'id': talent.id }) }}", function( data ) {
|
||||
<script type="text/javascript">
|
||||
{% if mustLogin == true %}
|
||||
$('#recommendation').on('click', function (event) {
|
||||
event.preventDefault();
|
||||
$('#modal_login').modal('open');
|
||||
});
|
||||
{% endif %}
|
||||
</script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$.get("{{ path('talent_ajaxRecStat',{'id': talent.id }) }}", function (data) {});
|
||||
if ($('#modal-recommendation').length > 0) {
|
||||
$('#modal-recommendation').modal({
|
||||
dismissible: false,
|
||||
ready: function (modal, trigger) {}
|
||||
});
|
||||
$('#modal-recommendation').modal('open');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -19,6 +19,7 @@ assetic:
|
||||
- 'js/vendors/jquery-confirm.min.js'
|
||||
- 'js/vendors/sly.min.js'
|
||||
- 'js/vendors/tooltipster.bundle.min.js'
|
||||
- 'js/vendors/readmore.min.js'
|
||||
global:
|
||||
inputs:
|
||||
- 'js/global.js'
|
||||
@@ -29,6 +30,10 @@ assetic:
|
||||
- 'js/company.js'
|
||||
- 'js/vendors/moment.min.js'
|
||||
- 'js/vendors/jquery.daterangepicker.min.js'
|
||||
talents:
|
||||
inputs:
|
||||
- 'js/vendors/datepicker.min.js'
|
||||
- 'js/vendors/jquery.validate.min.js'
|
||||
admin:
|
||||
inputs:
|
||||
- 'admin/AdminLTE/plugins/jQuery/jquery-2.2.3.min.js'
|
||||
|
||||
@@ -112,8 +112,8 @@ fos_user:
|
||||
# Edeclic Prestashop Bridge
|
||||
edeclic_prestashop_bridge:
|
||||
prestashop:
|
||||
cookie_key: "%prestashop_key%"
|
||||
presta_path: "%prestashop_path%"
|
||||
cookie_key: %prestashop_key%
|
||||
presta_path: %prestashop_path%
|
||||
shop_id: %prestashop_id%
|
||||
avoid_mode: %prestashop_avoid%
|
||||
ad_product_id: %prestashop_ad_id%
|
||||
|
||||
@@ -11,6 +11,11 @@ web_profiler:
|
||||
toolbar: true
|
||||
intercept_redirects: false
|
||||
|
||||
services:
|
||||
twig.extension.debug:
|
||||
class: Twig_Extension_Debug
|
||||
tags: [{ name: 'twig.extension' }]
|
||||
|
||||
monolog:
|
||||
handlers:
|
||||
main:
|
||||
|
||||
@@ -3,8 +3,8 @@ security:
|
||||
in_memory:
|
||||
memory: ~
|
||||
fos_userbundle:
|
||||
id: fos_user.user_provider.username_email
|
||||
#id: app.user_provider
|
||||
#id: fos_user.user_provider.username_email
|
||||
id: app.user_provider
|
||||
|
||||
firewalls:
|
||||
dev:
|
||||
|
||||
@@ -39,7 +39,11 @@ services:
|
||||
class: AppBundle\Twig\AppExtension
|
||||
tags:
|
||||
- { name: twig.extension }
|
||||
|
||||
|
||||
twig.extension.intl:
|
||||
class: Twig_Extensions_Extension_Intl
|
||||
tags:
|
||||
- { name: twig.extension }
|
||||
# Listeners
|
||||
user.registration_listener:
|
||||
class: AppBundle\Utils\EventListener\RegistrationListener
|
||||
|
||||
@@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace AppBundle\Controller\Admin;
|
||||
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use AppBundle\Entity\Recommendation;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
|
||||
class RecommendationController extends Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* @Route("/admin/config/recommandations/list", name="admin_config_recommendations")
|
||||
*/
|
||||
public function listeRecommendationAdminAction()
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$recos = $em->getRepository('AppBundle:Recommendation')->findAll();
|
||||
return $this->render('admin/recommendation_list.html.twig', array(
|
||||
'recos' => $recos,
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/admin/config/recommandation/{id}/toggle", name="admin_recommendation_toggle")
|
||||
*/
|
||||
public function adminToggleRecommendationAction(Recommendation $recommendation)
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$value = ($recommendation->getIsVisible() ? false : true);
|
||||
$recommendation->setIsVisible($value);
|
||||
$em->persist($recommendation);
|
||||
$em->flush();
|
||||
$result = array("msg" => "toggle ok");
|
||||
return new JsonResponse($result);
|
||||
$result = array("msg" => "toggle error");
|
||||
return new JsonResponse($result);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,17 +4,14 @@ namespace AppBundle\Controller\Admin;
|
||||
|
||||
use AppBundle\Entity\Company;
|
||||
use AppBundle\Entity\TerritoryAd;
|
||||
use AppBundle\Form\Admin\TalentAdminType;
|
||||
use AppBundle\Form\Admin\TerritoryAdminType;
|
||||
use AppBundle\Form\Admin\TerritoryAdType;
|
||||
use AppBundle\Form\Admin\TerritoryCompanyRemoveType;
|
||||
use AppBundle\Form\Admin\TerritoryCompanyType;
|
||||
use AppBundle\Form\Admin\TerritoryListAdType;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
|
||||
class TerritoryController extends Controller
|
||||
{
|
||||
|
||||
@@ -39,6 +36,14 @@ class TerritoryController extends Controller
|
||||
$form = $this->createForm(TerritoryAdminType::class, $territory);
|
||||
$form->handleRequest($request);
|
||||
if ($form->isSubmitted() && $form->isValid()) {
|
||||
$type = $form['terType']->getData();
|
||||
$arrayExtra = $territory->getExtra();
|
||||
if (is_array($arrayExtra)) {
|
||||
$arrayExtra['terType'] = $type;
|
||||
} else {
|
||||
$arrayExtra = array('terType' => $type);
|
||||
}
|
||||
$territory->setExtra($arrayExtra);
|
||||
$companyManager = $this->get('app.company_manager');
|
||||
$companyManager->updateCompany($territory);
|
||||
return $this->redirectToRoute('admin_config_territory');
|
||||
|
||||
@@ -17,6 +17,7 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Session\Session;
|
||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
|
||||
use AppBundle\Entity\Media;
|
||||
|
||||
class AnswerController extends Controller
|
||||
{
|
||||
@@ -87,6 +88,7 @@ class AnswerController extends Controller
|
||||
$session = new Session();
|
||||
$session->getFlashBag()->add('popup_answer_already_send', false);
|
||||
$answer->setStatus('SENDED');
|
||||
$answer->setSendTime(new \DateTime('NOW'));
|
||||
$em->persist($answer);
|
||||
|
||||
$mediaManager = $this->get('media_manager');
|
||||
@@ -130,6 +132,7 @@ class AnswerController extends Controller
|
||||
|
||||
/**
|
||||
* @Route("/annonce/{id}/repondre/{type}", name="answer_create_ad_step2")
|
||||
* @security("type == 'webcam' or type == 'import' or type == 'videotheque'")
|
||||
*/
|
||||
public function createAnswerAdAction(Request $request, Ad $ad, $type = 'default')
|
||||
{
|
||||
@@ -138,6 +141,7 @@ class AnswerController extends Controller
|
||||
|
||||
/**
|
||||
* @Route("/entreprise/{id}/repondre/{type}", name="answer_create_company_step2")
|
||||
* @security("type == 'webcam' or type == 'import' or type == 'videotheque'")
|
||||
*/
|
||||
public function createAnswerCompanyAction(Request $request, Company $company, $type = 'default')
|
||||
{
|
||||
@@ -330,15 +334,41 @@ class AnswerController extends Controller
|
||||
$user = $this->getUser();
|
||||
$form = $this->createForm(ContactTalentType::class);
|
||||
$form->handleRequest($request);
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$videos = $em->getRepository('AppBundle:Media')->findBy(array('creator' => $this->getUser()));
|
||||
$existMessage = $em->getRepository('AppBundle:Message')->findOneBy(
|
||||
array(
|
||||
'sender' => $user,
|
||||
'recipient' => $answer->getUser(),
|
||||
'status' => 'DRAFT'
|
||||
)
|
||||
);
|
||||
if ($existMessage) {
|
||||
$message = $existMessage;
|
||||
} else {
|
||||
$message = new message('Draft', 'Draft', $this->getUser(), $answer->getUser(), 'DRAFT', $answer);
|
||||
$em->persist($message);
|
||||
$em->flush();
|
||||
}
|
||||
|
||||
if ($form->isSubmitted() && $form->isValid()) {
|
||||
$message = $form['message']->getData();
|
||||
$messageText = $form['message']->getData();
|
||||
if(!$messageText){
|
||||
$messageText = "";
|
||||
}
|
||||
$mediaManager = $this->get('media_manager');
|
||||
$mediaManager->getThumbnails($message);
|
||||
$htmlView = $this->renderView('email/contact_talent.html.twig', array(
|
||||
'type' => 'html',
|
||||
'message' => $message,
|
||||
'answer' => $answer,
|
||||
'messageText' => $messageText,
|
||||
'user' => $answer->getUser(),
|
||||
));
|
||||
$plainView = $this->renderView('email/contact_talent_plain.html.twig', array(
|
||||
'video' => $message->getVideo(),
|
||||
'message' => $message,
|
||||
));
|
||||
|
||||
$plainView = $this->renderView('email/contact_talent_plain.html.twig', array(
|
||||
'message' => $messageText,
|
||||
'user' => $answer->getUser(),
|
||||
));
|
||||
$email = \Swift_Message::newInstance()
|
||||
@@ -350,15 +380,25 @@ class AnswerController extends Controller
|
||||
->addPart($plainView, 'text/plain');
|
||||
$this->get('mailer')->send($email);
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$messageObj = new message('Candidature : ' . $title, $message, $user, $answer->getUser(), $form['status']->getData(), $answer);
|
||||
$em->persist($messageObj);
|
||||
$message->setSubject('Candidature : ' . $title);
|
||||
$message->setContent($messageText);
|
||||
$message->setStatus($form['status']->getData());
|
||||
$em->persist($message);
|
||||
$em->flush();
|
||||
return $this->redirectToRoute('company_answer_show', ['id' => $answer->getId()]);
|
||||
}
|
||||
|
||||
$formMessage = $form->createView();
|
||||
$formVideo = $form;
|
||||
$formVideo->remove('message');
|
||||
|
||||
return $this->render('company/answer_show.html.twig', [
|
||||
'answer' => $answer,
|
||||
'form' => $form->createView(),
|
||||
'form' => $formMessage,
|
||||
'formVideo' => $formVideo->createView(),
|
||||
'type' => $type,
|
||||
'videos' => $videos,
|
||||
'message' => $message
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -370,9 +410,20 @@ class AnswerController extends Controller
|
||||
$user = $this->getUser();
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$answers = $em->getRepository('AppBundle:Answer')->getAnswerByCompany($user->getCompany()->getId());
|
||||
$spontaneous = $em->getRepository('AppBundle:Answer')->findBy(
|
||||
array(
|
||||
'company' => $user->getCompany()->getId(),
|
||||
'status' => 'SENDED'
|
||||
),
|
||||
array(
|
||||
'uTime' => 'DESC'
|
||||
)
|
||||
);
|
||||
|
||||
return $this->render('company/answer_list.html.twig', [
|
||||
'answers' => $answers,
|
||||
'type' => 'answer',
|
||||
'spontaneous' => $spontaneous,
|
||||
'type' => 'answer'
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -399,9 +450,11 @@ class AnswerController extends Controller
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$answers = $em->getRepository('AppBundle:Answer')->findBy(array('ad' => $ad, 'status' => 'SENDED'));
|
||||
$answers = $em->getRepository('AppBundle:Answer')->findBy(array('ad' => $ad, 'status' => 'SENDED'),array('sendTime' => 'DESC'));
|
||||
return $this->render('company/ad_answer_list.html.twig', [
|
||||
'answers' => $answers,
|
||||
'type' => 'annonce',
|
||||
'ad' => $ad
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -451,4 +504,30 @@ class AnswerController extends Controller
|
||||
return new JsonResponse(array('success' => "true"));
|
||||
}
|
||||
|
||||
/**
|
||||
* UPLOAD de Media
|
||||
*/
|
||||
|
||||
/**
|
||||
* @Route("/importer-son-cv", name="talent_cv_import")
|
||||
*/
|
||||
public function talentCVImportrAction(Request $request)
|
||||
{
|
||||
$securityContext = $this->container->get('security.authorization_checker');
|
||||
if (!$securityContext->isGranted('IS_AUTHENTICATED_FULLY')) {
|
||||
$this->createAnonymousUser();
|
||||
}
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$user = $this->getUser();
|
||||
$mustLogin = false;
|
||||
if (!$user->hasRole('ROLE_TALENT')) {
|
||||
$mustLogin = true;
|
||||
}
|
||||
|
||||
return $this->render('media/media_create_step1.html.twig', array(
|
||||
'mustLogin' => $mustLogin,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -12,9 +12,8 @@ use Edeclic\PrestashopBridgeBundle\Event\UserEvent;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
class CompanyController extends Controller
|
||||
{
|
||||
@@ -31,7 +30,7 @@ class CompanyController extends Controller
|
||||
$records = $stats->getCompanyDashboard($this->getUser()->getCompany()->getId(), null);
|
||||
return $this->render('company/dashboard.html.twig', [
|
||||
'ads' => $ads,
|
||||
'arrayByAds' => $records['arrayByAds']
|
||||
'arrayByAds' => $records['arrayByAds'],
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -41,7 +40,7 @@ class CompanyController extends Controller
|
||||
public function companyAjaxDashboardAction(Request $request)
|
||||
{
|
||||
$stats = $this->get("app.stats_manager");
|
||||
if( ($request->request->get('date1') != 0) && ($request->request->get('date2') != 0) ) {
|
||||
if (($request->request->get('date1') != 0) && ($request->request->get('date2') != 0)) {
|
||||
$dateBegin = new \DateTime();
|
||||
$dateEnd = new \DateTime();
|
||||
$dateBegin->setTimestamp(strtotime($request->request->get('date1')));
|
||||
@@ -109,7 +108,7 @@ class CompanyController extends Controller
|
||||
$this->get('translator')->trans('company.account.save.title')
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
$formFactory = $this->container->get('fos_user.change_password.form.factory');
|
||||
$formPw = $formFactory->createForm();
|
||||
$formPw->setData($user);
|
||||
@@ -174,9 +173,7 @@ class CompanyController extends Controller
|
||||
return $this->redirect($this->getParameter('prestashop_url') . 'index.php?controller=order');
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* @Route("/company_ajaxRecStat/{id}", name="company_ajaxRecStat")
|
||||
*/
|
||||
public function companyAjaxRecStatAction(Request $request, Company $company)
|
||||
@@ -206,8 +203,8 @@ class CompanyController extends Controller
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$companyAds = $em->getRepository('AppBundle:Ad')->findBy(array(
|
||||
'company' => $company,
|
||||
'status' => "PUBLISHED"
|
||||
));
|
||||
'status' => "PUBLISHED",
|
||||
), array('isPromoted' => 'ASC'));
|
||||
$mediaManager = $this->get('media_manager');
|
||||
foreach ($companyAds as $ad) {
|
||||
$mediaManager->getThumbnails($ad);
|
||||
@@ -215,7 +212,7 @@ class CompanyController extends Controller
|
||||
|
||||
return $this->render('company/company_show.html.twig', [
|
||||
'company' => $company,
|
||||
'companyAds' => $companyAds
|
||||
'companyAds' => $companyAds,
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,13 +2,9 @@
|
||||
|
||||
namespace AppBundle\Controller;
|
||||
|
||||
use AppBundle\Entity\Ad;
|
||||
use AppBundle\Entity\Company;
|
||||
use AppBundle\Form\AdSearchType;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
|
||||
class DefaultController extends Controller
|
||||
{
|
||||
@@ -19,13 +15,13 @@ class DefaultController extends Controller
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$ads = $em->getRepository('AppBundle:Ad')->findBy(array("status" => "PUBLISHED", "emphasis" => true, "isPromoted" => false), array('emphasisOrder' => 'DESC'));
|
||||
if(!$ads) {
|
||||
$ads = $em->getRepository('AppBundle:Ad')->findBy(array("status" => "PUBLISHED", "isPromoted" => false), array('id' => 'DESC'));
|
||||
if (!$ads) {
|
||||
$ads = $em->getRepository('AppBundle:Ad')->findBy(array("status" => "PUBLISHED", "isPromoted" => false), array('id' => 'DESC'));
|
||||
}
|
||||
$talents = $em->getRepository('AppBundle:Company')->findBy(array("type" => "TALENT", "emphasis" => true), array('emphasisOrder' => 'ASC'));
|
||||
$companies = $em->getRepository('AppBundle:Company')->findBy(array("type" => "COMPANY", "emphasis" => true), array('emphasisOrder' => 'ASC'));
|
||||
$territories = $em->getRepository('AppBundle:Company')->findBy(array("type" => "TERRITORY"));
|
||||
|
||||
$territories = $em->getRepository('AppBundle:Company')->findBy(array("type" => "TERRITORY", "emphasis" => true), array('emphasisOrder' => 'ASC'));
|
||||
|
||||
$arrayTalents = array();
|
||||
foreach ($talents as $talent) {
|
||||
if ($talent->getPresentationVideo()) {
|
||||
@@ -36,15 +32,10 @@ class DefaultController extends Controller
|
||||
$arrayCompany = array();
|
||||
foreach ($companies as $company) {
|
||||
if ($company->getPresentationVideo()) {
|
||||
$arrayCompany[] = $company;
|
||||
$arrayCompany[] = $company;
|
||||
}
|
||||
}
|
||||
|
||||
$arrayTerritory = array();
|
||||
foreach ($territories as $territory) {
|
||||
$arrayTerritory[] = $territory;
|
||||
}
|
||||
|
||||
$mediaManager = $this->get('media_manager');
|
||||
foreach ($ads as $ad) {
|
||||
$mediaManager->getThumbnails($ad);
|
||||
@@ -54,15 +45,19 @@ class DefaultController extends Controller
|
||||
$mediaManager->getThumbnails($company);
|
||||
}
|
||||
|
||||
foreach ($territories as $t) {
|
||||
$mediaManager->getThumbnails($t);
|
||||
}
|
||||
|
||||
$form = $this->createForm(AdSearchType::class);
|
||||
|
||||
return $this->render(
|
||||
'default/index.html.twig', [
|
||||
'ads' => $ads,
|
||||
'companies' => $arrayCompany,
|
||||
'talents' => $arrayTalents,
|
||||
'territories' => $arrayTerritory,
|
||||
'searchform' => $form->createView()
|
||||
'ads' => $ads,
|
||||
'companies' => $arrayCompany,
|
||||
'talents' => $arrayTalents,
|
||||
'territories' => $territories,
|
||||
'searchform' => $form->createView(),
|
||||
]
|
||||
);
|
||||
}
|
||||
@@ -73,9 +68,9 @@ class DefaultController extends Controller
|
||||
public function redirect_dashboard()
|
||||
{
|
||||
$user = $this->getUser();
|
||||
if($user){
|
||||
if ($user) {
|
||||
if ($user->hasRole('ROLE_TALENT')) {
|
||||
|
||||
|
||||
return $this->redirectToRoute('talent_dashboard');
|
||||
} elseif ($user->hasRole('ROLE_COMPANY')) {
|
||||
|
||||
|
||||
@@ -14,10 +14,11 @@ use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
use Symfony\Component\HttpFoundation\Cookie;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
use Symfony\Component\HttpFoundation\Session\Session;
|
||||
|
||||
class MediaController extends Controller
|
||||
{
|
||||
@@ -120,7 +121,7 @@ class MediaController extends Controller
|
||||
$form = $this->createFormBuilder($video)
|
||||
->add('title', TextType::class, array(
|
||||
'label' => 'Titre de la vidéo',
|
||||
'required' => true
|
||||
'required' => true,
|
||||
))
|
||||
->getForm();
|
||||
$form->handleRequest($request);
|
||||
@@ -135,7 +136,7 @@ class MediaController extends Controller
|
||||
'form' => $form->createView(),
|
||||
'ad' => $ad,
|
||||
'video' => $video,
|
||||
'videos' => $videos
|
||||
'videos' => $videos,
|
||||
));
|
||||
}
|
||||
|
||||
@@ -150,7 +151,7 @@ class MediaController extends Controller
|
||||
{
|
||||
$message = array('success' => 200,
|
||||
'filename' => null,
|
||||
'originalFilename' => null
|
||||
'originalFilename' => null,
|
||||
);
|
||||
foreach ($request->files as $uploadedFile) {
|
||||
$mediaManager = $this->get('media_manager');
|
||||
@@ -167,7 +168,7 @@ class MediaController extends Controller
|
||||
{
|
||||
$message = array('success' => 200,
|
||||
'filename' => null,
|
||||
'originalFilename' => null
|
||||
'originalFilename' => null,
|
||||
);
|
||||
foreach ($request->files as $uploadedFile) {
|
||||
$mediaManager = $this->get('media_manager');
|
||||
@@ -184,7 +185,7 @@ class MediaController extends Controller
|
||||
{
|
||||
$message = array('success' => 200,
|
||||
'filename' => null,
|
||||
'originalFilename' => null
|
||||
'originalFilename' => null,
|
||||
);
|
||||
foreach ($request->files as $uploadedFile) {
|
||||
$mediaManager = $this->get('media_manager');
|
||||
@@ -261,7 +262,7 @@ class MediaController extends Controller
|
||||
$user = $em->getRepository('AppBundle:User')->findOneBy(array('id' => $idUser));
|
||||
$video = $em->getRepository('AppBundle:Media')->findOneBy(array('id' => $idVideo));
|
||||
$company = $user->getCompany();
|
||||
if ($user->hasRole('ROLE_TALENT') || $user->hasRole('ROLE_TERRITORY') || ($user->hasRole('ROLE_COMPANY') && $company->hasCompanyVideo()) ) {
|
||||
if ($user->hasRole('ROLE_TALENT') || $user->hasRole('ROLE_TERRITORY') || ($user->hasRole('ROLE_COMPANY') && $company->hasCompanyVideo())) {
|
||||
$company->setPresentationVideo($video);
|
||||
}
|
||||
}
|
||||
@@ -299,7 +300,7 @@ class MediaController extends Controller
|
||||
return $this->redirect($this->generateUrl('talent_dashboard'));
|
||||
}
|
||||
return $this->render('profile/form_picture.html.twig', [
|
||||
'form' => $form->createView()
|
||||
'form' => $form->createView(),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -322,7 +323,39 @@ class MediaController extends Controller
|
||||
return $this->redirect($this->generateUrl('company_dashboard'));
|
||||
}
|
||||
return $this->render('profile/form_logo.html.twig', [
|
||||
'form' => $form->createView()
|
||||
'form' => $form->createView(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/media/import/cv/{type}", name="media_import_cv")
|
||||
* @security("type == 'webcam' or type == 'import'")
|
||||
*/
|
||||
public function importCVAction(Request $request, $type = 'webcam')
|
||||
{
|
||||
$securityContext = $this->container->get('security.authorization_checker');
|
||||
if (!$securityContext->isGranted('IS_AUTHENTICATED_FULLY')) {
|
||||
return $this->redirectToRoute('talent_cv_import');
|
||||
}
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$user = $this->getUser();
|
||||
$mustLogin = false;
|
||||
if (!$user->hasRole('ROLE_TALENT')) {
|
||||
$mustLogin = true;
|
||||
}
|
||||
|
||||
/*Definition des urls de destination pour oauth login et register*/
|
||||
$destination_login = $this->generateUrl('talent_media');
|
||||
$this->get('twig')->addGlobal('destination_login', $destination_login);
|
||||
$session = new Session();
|
||||
$session->set('registration_destination', $destination_login);
|
||||
|
||||
$res = $this->render('media/media_create_' . $type . '.twig', array(
|
||||
'video' => null,
|
||||
'mustLogin' => $mustLogin,
|
||||
));
|
||||
$res->headers->setCookie(new Cookie('redirect_register', $destination_login));
|
||||
return $res;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
namespace AppBundle\Controller;
|
||||
|
||||
use AppBundle\Entity\Message;
|
||||
use AppBundle\Entity\Media;
|
||||
use AppBundle\Entity\User;
|
||||
use AppBundle\Form\MediaType;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
|
||||
class MessageController extends Controller
|
||||
{
|
||||
/***********************
|
||||
* Ajax / Webservices
|
||||
***********************/
|
||||
|
||||
/**
|
||||
* @Route("/media/deleteMessage/{id}", name="delete_media_message")
|
||||
*/
|
||||
public function removeFileMessageAction(Message $message)
|
||||
{
|
||||
$mediaManager = $this->get('media_manager');
|
||||
$return = $mediaManager->remove($message);
|
||||
|
||||
return new JsonResponse($return);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/media/uploadMessage/{id}", name="upload_media_message")
|
||||
*/
|
||||
public function uploadMessageAction(Request $request, Message $message)
|
||||
{
|
||||
$return = array('success' => 200,
|
||||
'filename' => null,
|
||||
'originalFilename' => null,
|
||||
);
|
||||
foreach ($request->files as $uploadedFile) {
|
||||
$mediaManager = $this->get('media_manager');
|
||||
$return = $mediaManager->upload($message, $uploadedFile, $message->getSender());
|
||||
}
|
||||
|
||||
return new JsonResponse($return);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/media/linkMessage/{id}", name="link_media_message")
|
||||
*/
|
||||
public function mediaMessageAction(Request $request, Message $message)
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$video = $em->getRepository('AppBundle:Media')->find($request->request->get('idVideo'));
|
||||
$message->setVideo($video);
|
||||
$em->persist($message);
|
||||
$em->flush();
|
||||
|
||||
return new JsonResponse(array('success' => "true"));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,228 @@
|
||||
<?php
|
||||
|
||||
namespace AppBundle\Controller;
|
||||
|
||||
use AppBundle\Entity\Company;
|
||||
use AppBundle\Entity\Recommendation;
|
||||
use AppBundle\Form\RecommendationDeleteType;
|
||||
use AppBundle\Form\RecommendationType;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Session\Session;
|
||||
use Symfony\Component\Translation\Translator;
|
||||
use Symfony\Component\Translation\Loader\ArrayLoader;
|
||||
|
||||
class RecommendationController extends Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* @Route("/talent/me/recommandations", name="recommandation_list")
|
||||
*/
|
||||
public function listeRecommendationAction()
|
||||
{
|
||||
$user = $this->getUser();
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$received = $em->getRepository('AppBundle:Recommendation')->findBy(array('user' => $user, 'isRemoved' => false));
|
||||
$sended = $em->getRepository('AppBundle:Recommendation')->findBy(array('sender' => $user, 'isRemoved' => false));
|
||||
return $this->render('talent/recommendations_list.html.twig', [
|
||||
'received' => $received,
|
||||
'sended' => $sended,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/talent/me/recommandation/{id}/toggle", name="recommendation_toggle")
|
||||
*/
|
||||
public function toggleRecommendationAction(Recommendation $recommendation)
|
||||
{
|
||||
$user = $this->getUser();
|
||||
if ($recommendation->getUser() == $user) {
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$value = ($recommendation->getIsEnabled() ? false : true);
|
||||
$recommendation->setIsEnabled($value);
|
||||
$em->persist($recommendation);
|
||||
$em->flush();
|
||||
$result = array("msg" => "toggle ok");
|
||||
return new JsonResponse($result);
|
||||
}
|
||||
$result = array("msg" => "toggle 403");
|
||||
return new JsonResponse($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/recommandation/{alias}/", name="recommandation_create")
|
||||
* @ParamConverter("company", options={"mapping": {"alias": "alias"}})
|
||||
*/
|
||||
public function createRecommendationAction(Request $request, Company $talent)
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
if (!$this->getUser()) {
|
||||
return $this->redirectToRoute('talent_show', array('alias' => $talent->getAlias()));
|
||||
}
|
||||
if ($this->getUser() && ($this->getUser()->getCompany()->getId() == $talent->getId())) {
|
||||
return $this->redirectToRoute('talent_show', array('alias' => $talent->getAlias()));
|
||||
}
|
||||
$existRecommendation = $em->getRepository('AppBundle:Recommendation')->findOneBy(array('status' => 'DRAFT', 'sender' => $this->getUser(), 'user' => $talent->getMainUser()));
|
||||
if ($existRecommendation) {
|
||||
$recommendation = $existRecommendation;
|
||||
//return $this->redirectToRoute('talent_show', array('alias' => $talent->getAlias()));
|
||||
} else {
|
||||
$recommendation = new Recommendation($talent->getMainUser(), $this->getUser());
|
||||
$recommendation->setStatus('DRAFT');
|
||||
$em->persist($recommendation);
|
||||
$em->flush();
|
||||
}
|
||||
$video = $recommendation->getVideo();
|
||||
$firstname = $recommendation->getUser()->getFirstname();
|
||||
|
||||
$relations = array(
|
||||
$this->get('translator')->trans('label.choice.imtheboss', array('%{name}' => $firstname)) => 'label.choice.imtheboss',
|
||||
$this->get('translator')->trans('label.choice.sheistheboss', array('%{name}' => $firstname)) => 'label.choice.sheistheboss',
|
||||
$this->get('translator')->trans('label.choice.sheismyscollege', array('%{name}' => $firstname)) => 'label.choice.sheismyscollege'
|
||||
);
|
||||
$form = $this->createForm(RecommendationType::class, $recommendation, array('extra_fields_message' => $relations));
|
||||
//$form->remove('relationType');
|
||||
$form->handleRequest($request);
|
||||
|
||||
if ($form->isSubmitted() && $form->isValid()) {
|
||||
$relationType = $form->getData()->getRelationType();
|
||||
$recommendation->setRelationType($relationType);
|
||||
$em->persist($recommendation);
|
||||
$em->flush();
|
||||
return $this->redirect($this->generateUrl('finishRecommendation', array('talent' => $talent->getId(), 'recommendation' => $recommendation->getId())));
|
||||
}
|
||||
|
||||
return $this->render('recommendation/recommendation_create_webcam.twig', array(
|
||||
'routeReturn' => $this->generateUrl('talent_show', array('alias' => $talent->getAlias())),
|
||||
'typeObject' => 'Recommendation',
|
||||
'object' => $recommendation,
|
||||
'recommendation' => $recommendation,
|
||||
'form' => $form->createView(),
|
||||
'userTalent' => $talent->getMainUser(),
|
||||
'talent' => $talent,
|
||||
'video' => $video,
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/recommendation/submit/{talent}/{recommendation}", name="finishRecommendation")
|
||||
* @Security("recommendation.getSender().getId() == user.getId()")
|
||||
*/
|
||||
public function finishRecommendationAction(Request $request, Company $talent, Recommendation $recommendation)
|
||||
{
|
||||
$securityContext = $this->container->get('security.authorization_checker');
|
||||
if (false === $this->get('security.authorization_checker')->isGranted('ROLE_TALENT')) {
|
||||
return $this->redirect($this->generateUrl('talent_show', array('alias' => $talent->getAlias())));
|
||||
}
|
||||
if ($recommendation) {
|
||||
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$recommendation->setStatus('SENDED');
|
||||
$session = new Session();
|
||||
$contact = $recommendation->getUser();
|
||||
$session->getFlashBag()->add('popup_recommendation', true);
|
||||
$mailManager = $this->get('app.mail_manager');
|
||||
$link = $this->generateUrl('recommandation_list');
|
||||
$mailManager->sendMail(
|
||||
'Recommendation TalentsTube ',
|
||||
$this->get('translator')->trans('recommendation.email.message.html',
|
||||
array(
|
||||
'%lastname%' => $contact->getLastname(),
|
||||
'%firstname%' => $contact->getFirstname(),
|
||||
'%firstname_sender%' => $recommendation->getSender()->getFirstname(),
|
||||
'%lastname_sender%' => $recommendation->getSender()->getLastname(),
|
||||
'%recommendationUrl%' => $link
|
||||
)
|
||||
),
|
||||
$contact,
|
||||
'contact_default'
|
||||
);
|
||||
|
||||
}
|
||||
$em->persist($recommendation);
|
||||
$em->flush();
|
||||
|
||||
return $this->redirect($this->generateUrl('talent_show', array('alias' => $talent->getAlias())));
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/talent/me/recommendation/{id}/delete", name="delete_recommendation")
|
||||
* @Security("recommendation.getSender().getId() == user.getId()")
|
||||
*/
|
||||
public function deleteRecommendationAction(Recommendation $recommendation, Request $request)
|
||||
{
|
||||
$form = $this->createForm(RecommendationDeleteType::class, $recommendation);
|
||||
$form->handleRequest($request);
|
||||
if ($form->isSubmitted() && $form->isValid()) {
|
||||
$recommendation->setIsRemoved(true);
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em->persist($recommendation);
|
||||
$contact = $recommendation->getUser();
|
||||
$sender = $recommendation->getSender();
|
||||
$mailManager = $this->get('app.mail_manager');
|
||||
$mailManager->sendMail(
|
||||
'Recommendation TalentsTube ',
|
||||
'<div style="margin:0 auto;max-width:600px;background:#FFFFFF;"><table class="" cellpadding="0" cellspacing="0" style="width:100%;font-size:0px;background:#FFFFFF;" align="center"><tbody><tr><td style="text-align:center;vertical-align:top;font-size:0;padding:0px;"><!--[if mso]>
|
||||
<table border="0" cellpadding="0" cellspacing="0"><tr><td style="width:600px;">
|
||||
<![endif]--><div style="vertical-align:top;display:inline-block;font-size:13px;text-align:left;width:100%;" class="mj-column-per-100" aria-labelledby="mj-column-per-100"><table width="100%"><tbody><tr><td style="font-size:0;padding:0px;" align="center"><table cellpadding="0" cellspacing="0" style="border-collapse:collapse;border-spacing:0px;" align="center"><tbody><tr><td></td></tr></tbody></table></td></tr></tbody></table></div><!--[if mso]>
|
||||
</td></tr></table>
|
||||
<![endif]--></td></tr></tbody></table></div>
|
||||
|
||||
<div style="margin:0 auto;max-width:600px;background:#FFFFFF;"><table class="" cellpadding="0" cellspacing="0" style="width:100%;font-size:0px;background:#FFFFFF;" align="center"><tbody><tr><td style="text-align:center;vertical-align:top;font-size:0;padding:0px;"><!--[if mso]>
|
||||
<table border="0" cellpadding="0" cellspacing="0"><tr><td style="width:600px;">
|
||||
<![endif]--><div style="vertical-align:top;display:inline-block;font-size:13px;text-align:left;width:100%;" class="mj-column-per-100" aria-labelledby="mj-column-per-100"><table width="100%"><tbody><tr><td style="font-size:0;padding:20px 35px 20px 35px;" align="left"><div class="mj-content" style="cursor:auto;color:#534F4F;font-family:Trebuchet,Helvetica,sans-serif;font-size:14px;line-height:22px;"><p>Bonjour ' . $contact->getLastname() . ' ' . $contact->getFirstname() . ',</p>
|
||||
<p> Nous vous informons que la recommendation effectuée par M/Mme ' . $sender->getLastname() . ' ' . $sender->getFirstname() . ' à été supprimée à la demande de cette personne. Vous trouverez ci-après le message lié à cette suppression :<br /><br /><br> '. $recommendation->getMessage() .'</p></div></td></tr></tbody></table></div><!--[if mso]>
|
||||
</td></tr></table>
|
||||
<![endif]--></td></tr></tbody></table></div>
|
||||
|
||||
<div style="margin:0 auto;max-width:600px;background:#FFFFFF;"><table class="" cellpadding="0" cellspacing="0" style="width:100%;font-size:0px;background:#FFFFFF;" align="center"><tbody><tr><td style="text-align:center;vertical-align:top;font-size:0;padding:0px 0px 40px 0px;"><!--[if mso]>
|
||||
',
|
||||
$contact,
|
||||
'contact_default'
|
||||
);
|
||||
$em->flush();
|
||||
return $this->redirect($this->generateUrl('recommandation_list'));
|
||||
}
|
||||
|
||||
return $this->render('talent/recommendation_delete.html.twig', array(
|
||||
'form' => $form->createView(),
|
||||
));
|
||||
}
|
||||
|
||||
/***********************
|
||||
* Ajax / Webservices
|
||||
***********************/
|
||||
|
||||
/**
|
||||
* @Route("/media/deleteRecommendation/{id}", name="delete_media_recommendation")
|
||||
*/
|
||||
public function removeFileRecommendationAction(Recommendation $recommendation)
|
||||
{
|
||||
$mediaManager = $this->get('media_manager');
|
||||
$message = $mediaManager->remove($recommendation);
|
||||
|
||||
return new JsonResponse($message);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/media/uploadRecommendation/{id}", name="upload_media_recommendation")
|
||||
*/
|
||||
public function uploadRecommendationAction(Request $request, Recommendation $recommendation)
|
||||
{
|
||||
$message = array('success' => 200,
|
||||
'filename' => null,
|
||||
'originalFilename' => null,
|
||||
);
|
||||
foreach ($request->files as $uploadedFile) {
|
||||
$mediaManager = $this->get('media_manager');
|
||||
$message = $mediaManager->upload($recommendation, $uploadedFile, $recommendation->getUser());
|
||||
}
|
||||
|
||||
return new JsonResponse($message);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,7 +4,9 @@ namespace AppBundle\Controller;
|
||||
|
||||
use AppBundle\Entity\Ad;
|
||||
use AppBundle\Entity\Company;
|
||||
use AppBundle\Entity\Answer;
|
||||
use AppBundle\Entity\Message;
|
||||
use AppBundle\Entity\Recommendation;
|
||||
use AppBundle\Form\ContactTalentType;
|
||||
use AppBundle\Form\MediaType;
|
||||
use AppBundle\Form\TalentProfileType;
|
||||
@@ -12,9 +14,14 @@ use Edeclic\PrestashopBridgeBundle\Event\PrestashopBridgeEvents;
|
||||
use Edeclic\PrestashopBridgeBundle\Event\UserEvent;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Cookie;
|
||||
use Symfony\Component\HttpFoundation\Session\Session;
|
||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
|
||||
|
||||
|
||||
class TalentController extends Controller
|
||||
@@ -49,6 +56,8 @@ class TalentController extends Controller
|
||||
$form = $this->createForm(TalentProfileType::class, $user);
|
||||
$form->handleRequest($request);
|
||||
if ($form->isSubmitted() && $form->isValid()) {
|
||||
$birthday = \DateTime::createFromFormat('d/m/Y', $form->getData()->getBirthday());
|
||||
$user->setBirthday($birthday);
|
||||
$companyManager = $this->get('app.company_manager');
|
||||
$companyManager->updateTalent($user);
|
||||
$event = new UserEvent($user);
|
||||
@@ -107,6 +116,19 @@ class TalentController extends Controller
|
||||
return $this->render('talent/ad_space.html.twig', ['answers' => $answers]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/talent/me/espace-oe/candidature/{alias}/{id}", name="talent_ad_detail")
|
||||
* @ParamConverter("answer", options={"mapping": {"id": "id"}})
|
||||
* @Security("answer.getUser().getId() == user.getId()")
|
||||
*/
|
||||
public function talentOeDetailAction(Request $request, $alias, Answer $answer)
|
||||
{
|
||||
|
||||
return $this->render('talent/ad_detail.html.twig', [
|
||||
'answer' => $answer
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/talent/me/mes-recherches", name="talent_my_searches")
|
||||
*/
|
||||
@@ -188,7 +210,7 @@ class TalentController extends Controller
|
||||
*/
|
||||
public function talentShowAction(Request $request, Company $talent)
|
||||
{
|
||||
|
||||
setlocale(LC_ALL, 'fr_FR.utf-8');
|
||||
$user = $talent->getUsers();
|
||||
$subject = "Demande de contact";
|
||||
$form = $this->createForm(ContactTalentType::class, array("subject" => false));
|
||||
@@ -196,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},
|
||||
@@ -224,10 +246,40 @@ class TalentController extends Controller
|
||||
$em->close();
|
||||
return $this->redirectToRoute('talent_show', ['alias' => $talent->getAlias()]);
|
||||
}
|
||||
return $this->render('talent/talent_show.html.twig', [
|
||||
$mustLogin = true;
|
||||
if ($this->getUser() && $this->getUser()->hasRole('ROLE_TALENT')) {
|
||||
$mustLogin = false;
|
||||
if ($this->getUser() && ($this->getUser()->getCompany()->getId() == $talent->getId())) {
|
||||
$showRecommendation = false;
|
||||
}
|
||||
}
|
||||
|
||||
$showRecommendation = true;
|
||||
if ($this->getUser() && !$this->getUser()->hasRole('ROLE_TALENT')) {
|
||||
$showRecommendation = false;
|
||||
}
|
||||
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$recommendations = $em->getRepository('AppBundle:Recommendation')->findBy(
|
||||
array('isEnabled'=>true, 'status'=> 'SENDED', 'user'=> $talent->getMainUser()),
|
||||
array('uTime' => 'DESC')
|
||||
);
|
||||
/*Definition des urls de destination pour oauth login et register pour la recommandation vidéo*/
|
||||
$destination = $this->generateUrl('recommandation_create', array('alias' => $talent->getAlias()));
|
||||
$this->get('twig')->addGlobal('destination_login', $destination);
|
||||
$session = $request->getSession();
|
||||
$session->set('registration_destination', $destination);
|
||||
$res = $this->render('talent/talent_show.html.twig', [
|
||||
'talent' => $talent,
|
||||
'user' => $user{0},
|
||||
'form' => $form->createView()
|
||||
'form' => $form->createView(),
|
||||
'mustLogin' => $mustLogin,
|
||||
'showRecommendation' => $showRecommendation,
|
||||
'urlRecommendation' => $destination,
|
||||
'recommendations' => $recommendations
|
||||
]);
|
||||
$res->headers->setCookie(new Cookie('redirect_register', $destination));
|
||||
|
||||
return $res;
|
||||
}
|
||||
}
|
||||
@@ -181,6 +181,7 @@ class Ad
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="AppBundle\Entity\Answer", mappedBy="ad", cascade={"persist", "remove"})
|
||||
* @ORM\OrderBy({"sendTime" = "DESC"})
|
||||
*/
|
||||
private $answers;
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ use AppBundle\Utils\Traits\IsVisibleTrait;
|
||||
use AppBundle\Utils\Traits\StatusTrait;
|
||||
use AppBundle\Utils\Traits\TimestampableTrait;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Doctrine\Common\Collections\Criteria as Criteria;
|
||||
|
||||
/**
|
||||
* Answer
|
||||
@@ -66,6 +67,13 @@ class Answer
|
||||
*/
|
||||
private $comment;
|
||||
|
||||
/**
|
||||
* @var \DateTime $sendTime
|
||||
*
|
||||
* @ORM\Column(name="send_time", type="datetime", nullable=true)
|
||||
*/
|
||||
private $sendTime;
|
||||
|
||||
/***********************
|
||||
* OneToMany Array's
|
||||
***********************/
|
||||
@@ -77,6 +85,7 @@ class Answer
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="AppBundle\Entity\Message", mappedBy="answer", cascade={"persist", "remove"})
|
||||
* @ORM\OrderBy({"uTime" = "DESC"})
|
||||
*/
|
||||
private $messages;
|
||||
|
||||
@@ -115,6 +124,32 @@ class Answer
|
||||
|
||||
}
|
||||
|
||||
public function getMineMessages()
|
||||
{
|
||||
$criteria = Criteria::create()
|
||||
->where(Criteria::expr()->neq('status', "DRAFT"));
|
||||
|
||||
return $this->messages->matching($criteria);
|
||||
}
|
||||
|
||||
public function getFirstMessage(){
|
||||
$criteria = Criteria::create()
|
||||
->where(Criteria::expr()->neq('status', "DRAFT"));
|
||||
|
||||
return $this->messages->matching($criteria)->last();
|
||||
}
|
||||
|
||||
public function getIsViewed(){
|
||||
if($this->messages->count() <= 1){
|
||||
|
||||
return $this->messages->last();
|
||||
} else {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/***********************
|
||||
* Getters & Setters
|
||||
***********************/
|
||||
@@ -344,4 +379,28 @@ class Answer
|
||||
{
|
||||
return $this->company;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set sendTime.
|
||||
*
|
||||
* @param \DateTime|null $sendTime
|
||||
*
|
||||
* @return Answer
|
||||
*/
|
||||
public function setSendTime($sendTime = null)
|
||||
{
|
||||
$this->sendTime = $sendTime;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get sendTime.
|
||||
*
|
||||
* @return \DateTime|null
|
||||
*/
|
||||
public function getSendTime()
|
||||
{
|
||||
return $this->sendTime;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,6 +57,11 @@ class Message
|
||||
*/
|
||||
private $answer;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="AppBundle\Entity\Media", inversedBy="answers", cascade={"persist"})
|
||||
*/
|
||||
private $video;
|
||||
|
||||
/***********************
|
||||
* Constructor
|
||||
***********************/
|
||||
@@ -253,4 +258,28 @@ class Message
|
||||
{
|
||||
return $this->answer->removeElement($answer);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set video.
|
||||
*
|
||||
* @param \AppBundle\Entity\Media|null $video
|
||||
*
|
||||
* @return Message
|
||||
*/
|
||||
public function setVideo(\AppBundle\Entity\Media $video = null)
|
||||
{
|
||||
$this->video = $video;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get video.
|
||||
*
|
||||
* @return \AppBundle\Entity\Media|null
|
||||
*/
|
||||
public function getVideo()
|
||||
{
|
||||
return $this->video;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,295 @@
|
||||
<?php
|
||||
|
||||
namespace AppBundle\Entity;
|
||||
|
||||
use AppBundle\Utils\Traits\IsVisibleTrait;
|
||||
use AppBundle\Utils\Traits\StatusTrait;
|
||||
use AppBundle\Utils\Traits\TimestampableTrait;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* Recommendation
|
||||
*
|
||||
* @ORM\Table(name="recommendation")
|
||||
* @ORM\Entity()
|
||||
* @ORM\HasLifecycleCallbacks()
|
||||
*/
|
||||
class Recommendation
|
||||
{
|
||||
|
||||
use TimestampableTrait;
|
||||
use StatusTrait;
|
||||
use IsVisibleTrait;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="AppBundle\Entity\User", inversedBy="sendedRecommendations", cascade={"persist"})
|
||||
*/
|
||||
private $sender;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="AppBundle\Entity\User", inversedBy="recommendations", cascade={"persist"})
|
||||
*/
|
||||
private $user;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="AppBundle\Entity\Media", inversedBy="answers", cascade={"persist"})
|
||||
*/
|
||||
private $video;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="message", type="text", nullable=true)
|
||||
*/
|
||||
private $message;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="relation_type", type="string", length=255, nullable=true)
|
||||
*/
|
||||
private $relationType;
|
||||
|
||||
/**
|
||||
* @var boolean
|
||||
*
|
||||
* @ORM\Column(name="is_enabled", type="boolean", nullable=true, options={"comment":"visible sur la page du talent"})
|
||||
*/
|
||||
private $isEnabled;
|
||||
|
||||
/**
|
||||
* @var boolean
|
||||
*
|
||||
* @ORM\Column(name="is_removed", type="boolean", nullable=true, options={"comment":"supprimee par l'envoyeur"})
|
||||
*/
|
||||
private $isRemoved;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="remove_message", type="text", nullable=true)
|
||||
*/
|
||||
private $removeMessage;
|
||||
|
||||
/***********************
|
||||
* Constructor
|
||||
***********************/
|
||||
|
||||
public function __construct($user = null, $sender = null)
|
||||
{
|
||||
$this->user = $user;
|
||||
$this->sender = $sender;
|
||||
$this->isVisible = true;
|
||||
$this->isRemoved = false;
|
||||
$this->isEnabled = false;
|
||||
}
|
||||
|
||||
/***********************
|
||||
* Custom Functions
|
||||
***********************/
|
||||
|
||||
//Write custom function here
|
||||
|
||||
/***********************
|
||||
* Getters & Setters
|
||||
***********************/
|
||||
|
||||
/**
|
||||
* Get id.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the value of sender
|
||||
*/
|
||||
public function getSender()
|
||||
{
|
||||
return $this->sender;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of sender
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setSender($sender)
|
||||
{
|
||||
$this->sender = $sender;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the value of user
|
||||
*/
|
||||
public function getUser()
|
||||
{
|
||||
return $this->user;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of user
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setUser($user)
|
||||
{
|
||||
$this->user = $user;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the value of video
|
||||
*/
|
||||
public function getVideo()
|
||||
{
|
||||
return $this->video;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of video
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setVideo($video)
|
||||
{
|
||||
$this->video = $video;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the value of message
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMessage()
|
||||
{
|
||||
return $this->message;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of message
|
||||
*
|
||||
* @param string $message
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setMessage(string $message)
|
||||
{
|
||||
$this->message = $message;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the value of relationType
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getRelationType()
|
||||
{
|
||||
return $this->relationType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of relationType
|
||||
*
|
||||
* @param string $relationType
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setRelationType(string $relationType)
|
||||
{
|
||||
$this->relationType = $relationType;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the value of isEnabled
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getIsEnabled()
|
||||
{
|
||||
return $this->isEnabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of isEnabled
|
||||
*
|
||||
* @param boolean $isEnabled
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setIsEnabled($isEnabled)
|
||||
{
|
||||
$this->isEnabled = $isEnabled;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the value of isRemoved
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getIsRemoved()
|
||||
{
|
||||
return $this->isRemoved;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of isRemoved
|
||||
*
|
||||
* @param boolean $isRemoved
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setIsRemoved($isRemoved)
|
||||
{
|
||||
$this->isRemoved = $isRemoved;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the value of removeMessage
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getRemoveMessage()
|
||||
{
|
||||
return $this->removeMessage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of removeMessage
|
||||
*
|
||||
* @param string $removeMessage
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setRemoveMessage(string $removeMessage)
|
||||
{
|
||||
$this->removeMessage = $removeMessage;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
@@ -75,6 +75,7 @@ class User extends BaseUser
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="AppBundle\Entity\Answer",mappedBy="user", cascade={"persist", "remove"})
|
||||
* @ORM\OrderBy({"sendTime" = "DESC"})
|
||||
*/
|
||||
private $answers;
|
||||
|
||||
@@ -113,6 +114,16 @@ class User extends BaseUser
|
||||
*/
|
||||
private $receivedMessages;
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="AppBundle\Entity\Recommendation",mappedBy="user", cascade={"persist", "remove"})
|
||||
*/
|
||||
private $recommendations;
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="AppBundle\Entity\Recommendation",mappedBy="sender", cascade={"persist", "remove"})
|
||||
*/
|
||||
private $sendedRecommendations;
|
||||
|
||||
/************************
|
||||
* Social Network
|
||||
************************/
|
||||
@@ -163,6 +174,8 @@ class User extends BaseUser
|
||||
$this->sharedBookmarks = new ArrayCollection();
|
||||
$this->medias = new ArrayCollection();
|
||||
$this->products = new ArrayCollection();
|
||||
$this->recommendations = new ArrayCollection();
|
||||
$this->sendedRecommendations = new ArrayCollection();
|
||||
}
|
||||
|
||||
/***********************
|
||||
@@ -856,4 +869,70 @@ class User extends BaseUser
|
||||
{
|
||||
return $this->linkedinAccessToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the value of recommendations
|
||||
*/
|
||||
public function getRecommendations()
|
||||
{
|
||||
return $this->recommendations;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add Recommendation.
|
||||
*
|
||||
* @param \AppBundle\Entity\Recommendation $reco
|
||||
*
|
||||
* @return User
|
||||
*/
|
||||
public function addRecommendation(\AppBundle\Entity\Recommendation $reco)
|
||||
{
|
||||
$this->recommendations[] = $reco;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove Recommendation.
|
||||
*
|
||||
* @param \AppBundle\Entity\Recommendation $reco
|
||||
*
|
||||
*/
|
||||
public function removeRecommendation(\AppBundle\Entity\Recommendation $reco)
|
||||
{
|
||||
return $this->recommendations->removeElement($reco);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the value of sendedRecommendations
|
||||
*/
|
||||
public function getSendedRecommendations()
|
||||
{
|
||||
return $this->sendedRecommendations;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add sendedRecommendations.
|
||||
*
|
||||
* @param \AppBundle\Entity\Recommendation $reco
|
||||
*
|
||||
* @return User
|
||||
*/
|
||||
public function addSendedRecommendations(\AppBundle\Entity\Recommendation $reco)
|
||||
{
|
||||
$this->sendedRecommendations[] = $reco;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove sendedRecommendations.
|
||||
*
|
||||
* @param \AppBundle\Entity\Recommendation $reco
|
||||
*
|
||||
*/
|
||||
public function removeSendedRecommendations(\AppBundle\Entity\Recommendation $reco)
|
||||
{
|
||||
return $this->sendedRecommendations->removeElement($reco);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,15 +13,16 @@ namespace AppBundle\Form\Admin;
|
||||
|
||||
use AppBundle\Entity\Company;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CountryType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\FileType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\UrlType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Form\Extension\Core\Type\UrlType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\FileType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CountryType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
|
||||
class TerritoryAdminType extends AbstractType
|
||||
{
|
||||
@@ -29,6 +30,15 @@ class TerritoryAdminType extends AbstractType
|
||||
{
|
||||
$company = $options['data'];
|
||||
$company->init();
|
||||
|
||||
$terType = "";
|
||||
$extra = $company->getExtra();
|
||||
if ($extra != null) {
|
||||
if (is_array($extra)) {
|
||||
$terType = (isset($extra['terType'])) ? $extra['terType'] : '';
|
||||
}
|
||||
}
|
||||
|
||||
// Common fields
|
||||
$builder
|
||||
->add('brandName', TextType::class, array('label' => 'Nom'))
|
||||
@@ -38,35 +48,35 @@ class TerritoryAdminType extends AbstractType
|
||||
'label' => 'profile.company.website',
|
||||
'required' => false,
|
||||
'attr' => array(
|
||||
'placeholder' => 'http://...'
|
||||
'placeholder' => 'http://...',
|
||||
)));
|
||||
// Addresses fields
|
||||
$builder
|
||||
->add('address', TextType::class, array(
|
||||
'label' => 'Adresse',
|
||||
'required' => false
|
||||
'required' => false,
|
||||
))
|
||||
->add('addressComp', TextType::class, array(
|
||||
'label' => 'Complément Adresse',
|
||||
'required' => false
|
||||
'required' => false,
|
||||
))
|
||||
->add('zipcode', TextType::class, array(
|
||||
'label' => 'Code postal',
|
||||
'required' => false
|
||||
'required' => false,
|
||||
))
|
||||
->add('city', TextType::class, array(
|
||||
'label' => 'Ville',
|
||||
'required' => false
|
||||
'required' => false,
|
||||
))
|
||||
->add('country', CountryType::class, array(
|
||||
'label' => 'Pays',
|
||||
'required' => false
|
||||
'required' => false,
|
||||
));
|
||||
//Tags field
|
||||
$builder
|
||||
->add('tagsComma', TextType::class, array(
|
||||
'label' => 'profile.company.tags',
|
||||
'required' => false
|
||||
'required' => false,
|
||||
));
|
||||
// File fields
|
||||
$builder
|
||||
@@ -74,22 +84,34 @@ class TerritoryAdminType extends AbstractType
|
||||
'label' => 'profile.company.logo',
|
||||
'required' => false,
|
||||
'attr' => array(
|
||||
'class' => 'file-path validate'
|
||||
)
|
||||
'class' => 'file-path validate',
|
||||
),
|
||||
));
|
||||
// Emphasis
|
||||
$builder
|
||||
->add('emphasis', CheckboxType::class, array(
|
||||
'label' => 'A la une',
|
||||
'required' => false
|
||||
'required' => false,
|
||||
))
|
||||
->add('emphasisOrder', IntegerType::class, array(
|
||||
'label' => 'Ordre',
|
||||
'required' => false
|
||||
'required' => false,
|
||||
));
|
||||
$builder->add('isPrivate', CheckboxType::class, array(
|
||||
'label' => 'Page territoire privé ( non listée en front )',
|
||||
'required' => false
|
||||
'required' => false,
|
||||
));
|
||||
$builder->add('terType', ChoiceType::class, array(
|
||||
'mapped' => false,
|
||||
'label' => 'Type ',
|
||||
'data' => $terType,
|
||||
'choices' => array(
|
||||
'Région' => 'Région',
|
||||
'Communauté d\'agglomération' => 'Communauté d\'agglomération',
|
||||
'Communauté de commune' => 'Communauté de commune',
|
||||
'Commune' => 'Commune',
|
||||
'Département' => 'Département',
|
||||
),
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -13,22 +13,24 @@ class ContactTalentType extends AbstractType
|
||||
{
|
||||
$builder
|
||||
->add('message', TextareaType::class, array(
|
||||
'label' => 'Message',
|
||||
'label' => false,
|
||||
'required' => true,
|
||||
'attr' => array(
|
||||
'class' => 'materialize-textarea'
|
||||
'placeholder' => 'Rédigez un message de réponse'
|
||||
)
|
||||
));
|
||||
if(!isset($options['data']['subject']) || ($options['data']['subject'] == true)){
|
||||
$arraySubjects = array(
|
||||
'Répondu' => 'CONTACTED',
|
||||
'Répondu - Négatif' => 'NEGATIVE',
|
||||
'Répondu - Demande d\'infos' => 'INFOS',
|
||||
'Répondu - Positif' => 'POSITIVE',
|
||||
'Choisir un statut' => null,
|
||||
'POSITIVE' => 'POSITIVE',
|
||||
'INFOS' => 'INFOS',
|
||||
'CONTACTED.RDV' => 'CONTACTED.RDV',
|
||||
'NEGATIVE' => 'NEGATIVE'
|
||||
);
|
||||
$builder
|
||||
->add('status', ChoiceType::class, array(
|
||||
'label' => 'Status',
|
||||
'label' => false,
|
||||
'required' => true,
|
||||
'choices' => $arraySubjects
|
||||
));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
namespace AppBundle\Form;
|
||||
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class RecommendationDeleteType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
$builder
|
||||
->add('message', TextareaType::class, array(
|
||||
'label' => 'Message pour la personne concernée',
|
||||
'required' => true,
|
||||
'attr' => array(
|
||||
'class' => 'materialize-textarea',
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
namespace AppBundle\Form;
|
||||
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\Translation\Translator;
|
||||
|
||||
class RecommendationType extends AbstractType
|
||||
{
|
||||
|
||||
private $translator;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->translator = new Translator('fr');
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
$builder
|
||||
->add('relationType', ChoiceType::class, array(
|
||||
'label' => 'Sélectionnez la relation',
|
||||
'choices' => $options['extra_fields_message'],
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,7 @@ use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\DateType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
@@ -26,7 +27,10 @@ class TalentProfileType extends AbstractType
|
||||
{
|
||||
$user = $options['data'];
|
||||
$user->getCompany()->init();
|
||||
|
||||
$birthday = $options['data']->getBirthday();
|
||||
if(!empty($birthday)){
|
||||
$options['data']->setBirthday($birthday->format('d/m/Y'));
|
||||
}
|
||||
$builder
|
||||
->add('firstname', null, array(
|
||||
'label' => 'Prénom',
|
||||
@@ -36,11 +40,12 @@ class TalentProfileType extends AbstractType
|
||||
'label' => 'Nom',
|
||||
'required' => true,
|
||||
))
|
||||
->add('birthday', DateType::class, array(
|
||||
'widget' => 'single_text',
|
||||
->add('birthday', TextType::class, array(
|
||||
'label' => 'Date de naissance',
|
||||
'attr' => array(
|
||||
'class' => 'calendar'
|
||||
'class' => 'datepicker',
|
||||
'data-date-format' => "dd/mm/yyyy",
|
||||
'data-toggle'=>"datepicker"
|
||||
)
|
||||
))
|
||||
->add('gender', ChoiceType::class, array(
|
||||
|
||||
@@ -23,7 +23,8 @@ class AnswerRepository extends \Doctrine\ORM\EntityRepository
|
||||
)')
|
||||
->setParameter(':id', $id)
|
||||
->andWhere('a.status = :status')
|
||||
->setParameter(':status', 'SENDED');
|
||||
->setParameter(':status', 'SENDED')
|
||||
->orderBy('a.uTime','DESC');
|
||||
|
||||
return $qb
|
||||
->getQuery()
|
||||
|
||||
@@ -2,19 +2,11 @@
|
||||
|
||||
namespace AppBundle\Security\Core\User;
|
||||
|
||||
|
||||
use FOS\UserBundle\Model\UserInterface as FOSUserInterface;
|
||||
use AppBundle\Entity\Company;
|
||||
use HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface;
|
||||
use HWI\Bundle\OAuthBundle\Security\Core\User\FOSUBUserProvider as BaseFOSUBProvider;
|
||||
use AppBundle\Entity\Company;
|
||||
use AppBundle\Entity\Answer;
|
||||
use AppBundle\Entity\Media;
|
||||
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
|
||||
use Symfony\Component\Security\Core\User\UserInterface;
|
||||
use Symfony\Component\HttpFoundation\Session\Session;
|
||||
|
||||
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
|
||||
use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
|
||||
use Symfony\Component\Security\Core\User\UserInterface;
|
||||
|
||||
class FOSUBUserProvider extends BaseFOSUBProvider
|
||||
{
|
||||
@@ -22,20 +14,19 @@ class FOSUBUserProvider extends BaseFOSUBProvider
|
||||
|
||||
public function __construct($userManager, $em, $slug, $container, array $properties)
|
||||
{
|
||||
parent::__construct($userManager,$properties);
|
||||
parent::__construct($userManager, $properties);
|
||||
$this->em = $em;
|
||||
$this->slugService = $slug;
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function connect(UserInterface $user, UserResponseInterface $response)
|
||||
{
|
||||
$isTmpUser = false;
|
||||
if($this->container->get('security.token_storage')->getToken()){
|
||||
if ($this->container->get('security.token_storage')->getToken()) {
|
||||
$userConnected = $this->container->get('security.token_storage')->getToken()->getUser();
|
||||
if ($userConnected->hasRole('ROLE_TALENT_TMP')) {
|
||||
$isTmpUser = true;
|
||||
@@ -46,7 +37,7 @@ class FOSUBUserProvider extends BaseFOSUBProvider
|
||||
$property = $this->getProperty($response);
|
||||
$username = $response->getUsername(); // get the unique user identifier
|
||||
$serviceName = $response->getResourceOwner()->getName();
|
||||
$propertyQuery = str_replace('_', '', lcfirst(ucwords($property, '_')));
|
||||
$propertyQuery = str_replace('_', '', lcfirst(ucwords($property, '_')));
|
||||
$setter = 'set' . ucfirst($serviceName) . 'Id';
|
||||
$setterToken = 'set' . ucfirst($serviceName) . 'AccessToken';
|
||||
$existingUser = $this->userManager->findUserBy(array($propertyQuery => $username));
|
||||
@@ -56,7 +47,7 @@ class FOSUBUserProvider extends BaseFOSUBProvider
|
||||
}
|
||||
if (null !== $existingUser) {
|
||||
$this->disconnect($existingUser, $response);
|
||||
if($isTmpUser){
|
||||
if ($isTmpUser) {
|
||||
$this->assignToRealAccount($userConnected, $existingUser);
|
||||
$user = $existingUser;
|
||||
$token = new UsernamePasswordToken($user, null, "main", $user->getRoles());
|
||||
@@ -66,7 +57,7 @@ class FOSUBUserProvider extends BaseFOSUBProvider
|
||||
$existingUser->$setterToken($response->getAccessToken());
|
||||
$this->userManager->updateUser($existingUser);
|
||||
} else {
|
||||
if($isTmpUser){
|
||||
if ($isTmpUser) {
|
||||
$existingUser = $this->loadUserByOAuthUserResponse($response);
|
||||
$this->assignToRealAccount($userConnected, $existingUser);
|
||||
$existingUser->$setter($username);
|
||||
@@ -81,9 +72,17 @@ class FOSUBUserProvider extends BaseFOSUBProvider
|
||||
}
|
||||
}
|
||||
|
||||
public function assignToRealAccount($userConnected, $existingUser) {
|
||||
/**
|
||||
* This function is meant to reassign data from a temporary account to a real account
|
||||
*
|
||||
* @param $userConnected
|
||||
* @param $existingUser
|
||||
* @return void
|
||||
*/
|
||||
public function assignToRealAccount($userConnected, $existingUser)
|
||||
{
|
||||
$answers = $this->em->getRepository('AppBundle:Answer')->findBy(array('user' => $userConnected));
|
||||
$medias = $this->em->getRepository('AppBundle:Media')->findBy(array('creator'=> $userConnected));
|
||||
$medias = $this->em->getRepository('AppBundle:Media')->findBy(array('creator' => $userConnected));
|
||||
foreach ($medias as $key => $media) {
|
||||
$media->setCreator($existingUser);
|
||||
}
|
||||
@@ -95,46 +94,59 @@ class FOSUBUserProvider extends BaseFOSUBProvider
|
||||
$this->userManager->deleteUser($userConnected);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load a user by username.
|
||||
*
|
||||
* @param string $username
|
||||
*
|
||||
* @return UserInterface|null
|
||||
*/
|
||||
public function loadUserByUsername($username)
|
||||
{
|
||||
$existingUser = $this->userManager->findUserByEmail($username);
|
||||
if($this->container->get('security.token_storage')->getToken()){
|
||||
$existingUser = $this->userManager->findUserByUsername($username);
|
||||
if($existingUser == null){
|
||||
$existingUser = $this->userManager->findUserByEmail($username);
|
||||
}
|
||||
|
||||
//Used to assign data from temporry account to real account
|
||||
if ($this->container->get('security.token_storage')->getToken()) {
|
||||
$userConnected = $this->container->get('security.token_storage')->getToken()->getUser();
|
||||
if ($userConnected->hasRole('ROLE_TALENT_TMP')) {
|
||||
|
||||
$this->assignToRealAccount($userConnected, $existingUser);
|
||||
}
|
||||
}
|
||||
|
||||
return $existingUser;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
* Used to create or load user when linkedin or Facebook Oauth is used
|
||||
*
|
||||
* @param UserResponseInterface $response
|
||||
* @return $user
|
||||
*/
|
||||
public function loadUserByOAuthUserResponse(UserResponseInterface $response)
|
||||
{
|
||||
{
|
||||
$serviceName = $response->getResourceOwner()->getName();
|
||||
$data = $response->getData();
|
||||
$userConnected = null;
|
||||
if($this->container->get('security.token_storage')->getToken()){
|
||||
if ($this->container->get('security.token_storage')->getToken()) {
|
||||
$userConnected = $this->container->get('security.token_storage')->getToken()->getUser();
|
||||
|
||||
}
|
||||
$userEmail = $response->getEmail();
|
||||
$user = $this->userManager->findUserByEmail($userEmail);
|
||||
|
||||
if($serviceName == "linkedin"){
|
||||
if ($serviceName == "linkedin") {
|
||||
$id = $data['id'];
|
||||
$birthday = null;
|
||||
$gender = null;
|
||||
$userPhoto = $data['pictureUrls']['values'][0];
|
||||
$username = $data['firstName']."-".$data['lastName'];
|
||||
$username = $data['firstName'] . "-" . $data['lastName'];
|
||||
$firstname = $data['firstName'];
|
||||
$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 {
|
||||
@@ -150,9 +162,9 @@ class FOSUBUserProvider extends BaseFOSUBProvider
|
||||
$lastname = $data['last_name'];
|
||||
}
|
||||
|
||||
if (null === $user) {
|
||||
if (null === $user) {
|
||||
$user = $this->userManager->createUser();
|
||||
$user->setUsername($firstname."-".$lastname);
|
||||
$user->setUsername($firstname . "-" . $lastname);
|
||||
$user->setFirstname($firstname);
|
||||
$user->setLastname($lastname);
|
||||
$user->setEmail($userEmail);
|
||||
@@ -162,10 +174,10 @@ class FOSUBUserProvider extends BaseFOSUBProvider
|
||||
$user->setRoles(array('ROLE_TALENT'));
|
||||
$user->setBirthday($birthday);
|
||||
$user->setGender($gender);
|
||||
if($serviceName == "linkedin"){
|
||||
if ($serviceName == "linkedin") {
|
||||
$user->setLinkedinId($id);
|
||||
}
|
||||
if($serviceName == "facebook"){
|
||||
if ($serviceName == "facebook") {
|
||||
$user->setFacebookId($id);
|
||||
}
|
||||
$this->userManager->updateUser($user);
|
||||
@@ -184,10 +196,10 @@ class FOSUBUserProvider extends BaseFOSUBProvider
|
||||
|
||||
return $user;
|
||||
} else {
|
||||
if($userConnected) {
|
||||
if ($userConnected) {
|
||||
$userConnected->hasRole('ROLE_TALENT_TMP');
|
||||
if ($userConnected->hasRole('ROLE_TALENT_TMP')) {
|
||||
$user->setUsername($firstname."-".$lastname);
|
||||
$user->setUsername($firstname . "-" . $lastname);
|
||||
$user->setFirstname($firstname);
|
||||
$user->setLastname($lastname);
|
||||
$user->setEmail($userEmail);
|
||||
@@ -197,10 +209,10 @@ class FOSUBUserProvider extends BaseFOSUBProvider
|
||||
$user->setRoles(array('ROLE_TALENT'));
|
||||
$user->setBirthday($birthday);
|
||||
$user->setGender($gender);
|
||||
if($serviceName == "linkedin"){
|
||||
if ($serviceName == "linkedin") {
|
||||
$user->setLinkedinId($id);
|
||||
}
|
||||
if($serviceName == "facebook"){
|
||||
if ($serviceName == "facebook") {
|
||||
$user->setFacebookId($id);
|
||||
}
|
||||
$token = new UsernamePasswordToken($user, null, "main", $user->getRoles());
|
||||
@@ -213,7 +225,6 @@ class FOSUBUserProvider extends BaseFOSUBProvider
|
||||
$serviceName = $response->getResourceOwner()->getName();
|
||||
$setter = 'set' . ucfirst($serviceName) . 'AccessToken';
|
||||
$user->$setter($response->getAccessToken());
|
||||
|
||||
return $user;
|
||||
return $user;
|
||||
}
|
||||
}
|
||||
@@ -35,10 +35,17 @@ class CompanyManager
|
||||
$company->setAddresses($addrs);
|
||||
$publicTags = explode(',', $company->getTagsComma());
|
||||
$company->setPublicTag($publicTags);
|
||||
$extra = array(
|
||||
'size' => $company->getSize(),
|
||||
'siren' => $company->getSiren(),
|
||||
);
|
||||
$extra = $company->getExtra();
|
||||
if (is_array($extra)) {
|
||||
$extra['size'] = $company->getSize();
|
||||
$extra['siren'] = $company->getSiren();
|
||||
} else {
|
||||
$extra = array(
|
||||
'size' => $company->getSize(),
|
||||
'siren' => $company->getSiren(),
|
||||
);
|
||||
}
|
||||
|
||||
$company->setExtra($extra);
|
||||
$company->upload();
|
||||
}
|
||||
@@ -123,8 +130,8 @@ class CompanyManager
|
||||
};
|
||||
$result = array();
|
||||
$result['count'] = count($complete);
|
||||
$result['steps'] = array_merge($complete,$incomplete);
|
||||
$result['steps'] = array_merge($complete, $incomplete);
|
||||
return $result;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ namespace AppBundle\Utils\Services;
|
||||
|
||||
use AppBundle\Entity\Ad;
|
||||
use AppBundle\Entity\Answer;
|
||||
use AppBundle\Entity\Recommendation;
|
||||
use AppBundle\Entity\Message;
|
||||
use AppBundle\Entity\Company;
|
||||
use AppBundle\Entity\Media;
|
||||
use AppBundle\Entity\User;
|
||||
@@ -57,6 +59,8 @@ class MediaManager
|
||||
$video = $entity->getPresentationVideo();
|
||||
} elseif ($entity instanceof Answer) {
|
||||
$video = $entity->getVideo();
|
||||
} elseif ($entity instanceof Message) {
|
||||
$video = $entity->getVideo();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
@@ -130,9 +134,9 @@ class MediaManager
|
||||
$thumbnails = array();
|
||||
//PUSH VIDEO TO Vimeo
|
||||
if ($this->env == "dev") {
|
||||
$uriVimeo = "/videos/215657518";
|
||||
$uriVimeo = "/videos/217844541";
|
||||
$nameVimeo = "name";
|
||||
$linkVimeo = "/videos/215657518";
|
||||
$linkVimeo = "/videos/217844541";
|
||||
} else {
|
||||
$urlToPull = $this->mediaVideoUrl . $fileName;
|
||||
$response = $this->vimeo->request('/me/videos', array('type' => 'pull', 'link' => $urlToPull), 'POST');
|
||||
@@ -171,9 +175,18 @@ class MediaManager
|
||||
$company = $entity->getCompany();
|
||||
$company->setPresentationVideo($media);
|
||||
$this->em->persist($entity);
|
||||
} elseif ($entity instanceof Recommendation) {
|
||||
$media->setTitle("Video de recommendation");
|
||||
$entity->setVideo($media);
|
||||
$this->em->persist($entity);
|
||||
} elseif ($entity instanceof Message) {
|
||||
$media->setTitle("Video de réponse");
|
||||
$entity->setVideo($media);
|
||||
$this->em->persist($entity);
|
||||
}
|
||||
} else {
|
||||
$media->setTitle("Vidéo " . $creator->getLastname() . " " . $creator->getFirstname());
|
||||
$date = new \DateTime('now');
|
||||
$media->setTitle("Vidéo du " . $date->format('d-m-Y'));
|
||||
}
|
||||
if ($creator->getCompany()->getType() == "TALENT") {
|
||||
$media->setStatus("TO_MODERATE");
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
namespace Tests\AppBundle;
|
||||
|
||||
use Doctrine\Common\Persistence\ObjectManager;
|
||||
use Doctrine\Common\Persistence\ObjectRepository;
|
||||
use AppBundle\Entity\Ad;
|
||||
use Symfony\Bundle\FrameworkBundle\TestCase;
|
||||
|
||||
class AdControllerTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var EntityManager
|
||||
*/
|
||||
private $manager;
|
||||
|
||||
public function testAdShowAction()
|
||||
{
|
||||
|
||||
$ad = new Ad();
|
||||
$ad->setReference('test');
|
||||
$adRepository = $this->createMock(ObjectRepository::class);
|
||||
|
||||
$adRepository->expects($this->any())
|
||||
->method('find')
|
||||
->willReturn($ad);
|
||||
|
||||
$objectManager = $this->createMock(ObjectManager::class);
|
||||
$objectManager->expects($this->any())
|
||||
->method('getRepository')
|
||||
->willReturn($adRepository);
|
||||
|
||||
$client = static::createClient();
|
||||
|
||||
$crawler = $client->request('GET', '/annonce/32-chef-de-projet-industriel-h-f');
|
||||
|
||||
$this->assertGreaterThan(
|
||||
0,
|
||||
$crawler->filter('html:contains("Chef de projet industriel (H/F)")')->count()
|
||||
);
|
||||
}
|
||||
}
|
||||
Executable → Regular
+25
-10
@@ -1,18 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\AppBundle\Controller;
|
||||
namespace App\Tests\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
use Symfony\Component\BrowserKit\Cookie;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
|
||||
|
||||
class DefaultControllerTest extends WebTestCase
|
||||
{
|
||||
public function testIndex()
|
||||
private $client = null;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$client = static::createClient();
|
||||
|
||||
$crawler = $client->request('GET', '/');
|
||||
|
||||
$this->assertEquals(200, $client->getResponse()->getStatusCode());
|
||||
$this->assertContains('Welcome to Symfony', $crawler->filter('#container h1')->text());
|
||||
$this->client = static::createClient();
|
||||
}
|
||||
}
|
||||
|
||||
public function testSecuredLogin()
|
||||
{
|
||||
$crawler = $this->client->request('GET', '/login');
|
||||
$buttonCrawlerNode = $crawler->selectButton('Se connecter');
|
||||
$form = $buttonCrawlerNode->form();
|
||||
$data = array('_username' => 'thomas.monchicourt@gmail.com','_password' => 'toto');
|
||||
$this->client->submit($form,$data);
|
||||
$crawler = $this->client->followRedirect();
|
||||
$this->assertEquals(200, $this->client->getResponse()->getStatusCode());
|
||||
$crawler = $this->client->request('GET', '/talent/me/');
|
||||
$this->assertGreaterThan(
|
||||
0,
|
||||
$crawler->filter('html:contains("Thomas MONCHICOURT")')->count()
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
d69519d102c499875bda7a7188f5cd85
|
||||
phpspec/prophecy symfony/yaml
|
||||
Binary file not shown.
@@ -0,0 +1,4 @@
|
||||
/build export-ignore
|
||||
|
||||
*.php diff=php
|
||||
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
# Contributor Code of Conduct
|
||||
|
||||
As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
||||
|
||||
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery
|
||||
* Personal attacks
|
||||
* Trolling or insulting/derogatory comments
|
||||
* Public or private harassment
|
||||
* Publishing other's private information, such as physical or electronic
|
||||
addresses, without explicit permission
|
||||
* Other unethical or unprofessional conduct
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project maintainer at sebastian@phpunit.de. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. Maintainers are obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.3.0, available at [http://contributor-covenant.org/version/1/3/0/][version]
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/3/0/
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
# Contributing to PHPUnit
|
||||
|
||||
## Contributor Code of Conduct
|
||||
|
||||
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
|
||||
|
||||
## Workflow
|
||||
|
||||
* Fork the project.
|
||||
* Make your bug fix or feature addition.
|
||||
* Add tests for it. This is important so we don't break it in a future version unintentionally.
|
||||
* Send a pull request. Bonus points for topic branches.
|
||||
|
||||
Please make sure that you have [set up your user name and email address](http://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup) for use with Git. Strings such as `silly nick name <root@localhost>` look really stupid in the commit history of a project.
|
||||
|
||||
Pull requests for bug fixes must be based on the current stable branch whereas pull requests for new features must be based on the `master` branch.
|
||||
|
||||
We are trying to keep backwards compatibility breaks in PHPUnit to an absolute minimum. Please take this into account when proposing changes.
|
||||
|
||||
Due to time constraints, we are not always able to respond as quickly as we would like. Please do not take delays personal and feel free to remind us if you feel that we forgot to respond.
|
||||
|
||||
## Coding Guidelines
|
||||
|
||||
This project comes with a configuration file for [php-cs-fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) (`.php_cs`) that you can use to (re)format your sourcecode for compliance with this project's coding guidelines:
|
||||
|
||||
```bash
|
||||
$ wget http://cs.sensiolabs.org/download/php-cs-fixer-v2.phar -O php-cs-fixer.phar
|
||||
|
||||
$ php php-cs-fixer.phar fix
|
||||
```
|
||||
|
||||
## Using PHPUnit from a Git checkout
|
||||
|
||||
The following commands can be used to perform the initial checkout of PHPUnit:
|
||||
|
||||
```bash
|
||||
$ git clone git://github.com/sebastianbergmann/phpunit.git
|
||||
|
||||
$ cd phpunit
|
||||
```
|
||||
|
||||
Retrieve PHPUnit's dependencies using [Composer](https://getcomposer.org/):
|
||||
|
||||
```bash
|
||||
$ composer install
|
||||
```
|
||||
|
||||
The `phpunit` script can be used to invoke the PHPUnit test runner:
|
||||
|
||||
```bash
|
||||
$ ./phpunit --version
|
||||
```
|
||||
|
||||
## Running PHPUnit's own test suite
|
||||
|
||||
After following the steps shown above, PHPUnit's own test suite is run like this:
|
||||
|
||||
```bash
|
||||
$ ./phpunit
|
||||
```
|
||||
|
||||
## Reporting issues
|
||||
|
||||
Please use the most specific issue tracker to search for existing tickets and to open new tickets:
|
||||
|
||||
* [General problems](https://github.com/sebastianbergmann/phpunit/issues)
|
||||
* [Code Coverage](https://github.com/sebastianbergmann/php-code-coverage/issues)
|
||||
* [Stub and Mock Objects](https://github.com/sebastianbergmann/phpunit-mock-objects/issues)
|
||||
* [DbUnit](https://github.com/sebastianbergmann/dbunit/issues)
|
||||
* [Documentation](https://github.com/sebastianbergmann/phpunit-documentation/issues)
|
||||
* [Website](https://github.com/sebastianbergmann/phpunit-website/issues)
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
| Q | A
|
||||
| --------------------| ---------------
|
||||
| PHPUnit version | x.y.z
|
||||
| PHP version | x.y.z
|
||||
| Installation Method | Composer / PHAR
|
||||
|
||||
<!--
|
||||
- Please fill in this template according to your issue.
|
||||
- Please keep the table shown above at the top of your issue.
|
||||
- Please include the output of "composer info | sort" if you installed PHPUnit using Composer.
|
||||
- Please post code as text (using proper markup). Do not post screenshots of code.
|
||||
- Visit https://phpunit.de/support.html if you are looking for support.
|
||||
- Otherwise, replace this comment by the description of your issue.
|
||||
-->
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
/.ant_targets
|
||||
/.idea
|
||||
/.php_cs
|
||||
/.php_cs.cache
|
||||
/build/documentation
|
||||
/build/logfiles
|
||||
/build/phar
|
||||
/build/phpdox
|
||||
/build/*.phar
|
||||
/build/*.phar.asc
|
||||
/build/binary-phar-autoload.php
|
||||
/cache.properties
|
||||
/composer.lock
|
||||
/tests/TextUI/*.diff
|
||||
/tests/TextUI/*.exp
|
||||
/tests/TextUI/*.log
|
||||
/tests/TextUI/*.out
|
||||
/tests/TextUI/*.php
|
||||
/vendor
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
$header = <<<'EOF'
|
||||
This file is part of PHPUnit.
|
||||
|
||||
(c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
|
||||
For the full copyright and license information, please view the LICENSE
|
||||
file that was distributed with this source code.
|
||||
EOF;
|
||||
|
||||
return PhpCsFixer\Config::create()
|
||||
->setRiskyAllowed(true)
|
||||
->setRules(
|
||||
[
|
||||
'array_syntax' => ['syntax' => 'short'],
|
||||
'binary_operator_spaces' => [
|
||||
'align_double_arrow' => true,
|
||||
'align_equals' => true
|
||||
],
|
||||
'blank_line_after_namespace' => true,
|
||||
'blank_line_before_return' => true,
|
||||
'braces' => true,
|
||||
'cast_spaces' => true,
|
||||
'concat_space' => ['spacing' => 'one'],
|
||||
'elseif' => true,
|
||||
'encoding' => true,
|
||||
'full_opening_tag' => true,
|
||||
'function_declaration' => true,
|
||||
'header_comment' => ['header' => $header, 'separate' => 'none'],
|
||||
'indentation_type' => true,
|
||||
'line_ending' => true,
|
||||
'lowercase_constants' => true,
|
||||
'lowercase_keywords' => true,
|
||||
'method_argument_space' => true,
|
||||
'no_alias_functions' => true,
|
||||
'no_blank_lines_after_class_opening' => true,
|
||||
'no_blank_lines_after_phpdoc' => true,
|
||||
'no_closing_tag' => true,
|
||||
'no_empty_phpdoc' => true,
|
||||
'no_empty_statement' => true,
|
||||
'no_extra_consecutive_blank_lines' => true,
|
||||
'no_leading_namespace_whitespace' => true,
|
||||
'no_singleline_whitespace_before_semicolons' => true,
|
||||
'no_spaces_after_function_name' => true,
|
||||
'no_spaces_inside_parenthesis' => true,
|
||||
'no_trailing_comma_in_list_call' => true,
|
||||
'no_trailing_whitespace' => true,
|
||||
'no_unused_imports' => true,
|
||||
'no_whitespace_in_blank_line' => true,
|
||||
'phpdoc_align' => true,
|
||||
'phpdoc_indent' => true,
|
||||
'phpdoc_no_access' => true,
|
||||
'phpdoc_no_empty_return' => true,
|
||||
'phpdoc_no_package' => true,
|
||||
'phpdoc_scalar' => true,
|
||||
'phpdoc_separation' => true,
|
||||
'phpdoc_to_comment' => true,
|
||||
'phpdoc_trim' => true,
|
||||
'phpdoc_types' => true,
|
||||
'phpdoc_var_without_name' => true,
|
||||
'self_accessor' => true,
|
||||
'simplified_null_return' => true,
|
||||
'single_blank_line_at_eof' => true,
|
||||
'single_import_per_statement' => true,
|
||||
'single_line_after_imports' => true,
|
||||
'single_quote' => true,
|
||||
'ternary_operator_spaces' => true,
|
||||
'trim_array_spaces' => true,
|
||||
'visibility_required' => true,
|
||||
]
|
||||
)
|
||||
->setFinder(
|
||||
PhpCsFixer\Finder::create()
|
||||
->files()
|
||||
->in(__DIR__ . '/build')
|
||||
->in(__DIR__ . '/src')
|
||||
->in(__DIR__ . '/tests/Framework')
|
||||
->in(__DIR__ . '/tests/Runner')
|
||||
->in(__DIR__ . '/tests/Util')
|
||||
->name('*.php')
|
||||
);
|
||||
@@ -0,0 +1,3 @@
|
||||
linters:
|
||||
phpcs:
|
||||
standard: 'build/phpcs.xml'
|
||||
@@ -0,0 +1,55 @@
|
||||
language: php
|
||||
|
||||
sudo: false
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libxml2-utils
|
||||
|
||||
php:
|
||||
- 5.6
|
||||
- 7.0
|
||||
- 7.1
|
||||
- 7.2
|
||||
- master
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- php: 7.2
|
||||
- php: master
|
||||
fast_finish: true
|
||||
|
||||
env:
|
||||
matrix:
|
||||
- DEPENDENCIES="high"
|
||||
- DEPENDENCIES="low"
|
||||
global:
|
||||
- DEFAULT_COMPOSER_FLAGS="--no-interaction --no-ansi --no-progress --no-suggest"
|
||||
|
||||
before_install:
|
||||
- composer self-update
|
||||
- composer clear-cache
|
||||
|
||||
install:
|
||||
- if [[ "$DEPENDENCIES" = 'high' ]]; then travis_retry composer update $DEFAULT_COMPOSER_FLAGS; fi
|
||||
- if [[ "$DEPENDENCIES" = 'low' ]]; then travis_retry composer update $DEFAULT_COMPOSER_FLAGS --prefer-lowest; fi
|
||||
|
||||
before_script:
|
||||
- echo 'zend.assertions=1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
|
||||
- echo 'assert.exception=On' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
|
||||
|
||||
script:
|
||||
- ./phpunit --coverage-clover=coverage.xml
|
||||
- ./phpunit --configuration ./build/travis-ci-fail.xml > /dev/null; if [ $? -eq 0 ]; then echo "SHOULD FAIL"; false; else echo "fail checked"; fi;
|
||||
- xmllint --noout --schema phpunit.xsd phpunit.xml
|
||||
- xmllint --noout --schema phpunit.xsd tests/_files/configuration.xml
|
||||
- xmllint --noout --schema phpunit.xsd tests/_files/configuration_empty.xml
|
||||
- xmllint --noout --schema phpunit.xsd tests/_files/configuration_xinclude.xml -xinclude
|
||||
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
|
||||
@@ -0,0 +1,242 @@
|
||||
# Changes in PHPUnit 5.7
|
||||
|
||||
All notable changes of the PHPUnit 5.7 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
|
||||
|
||||
## [5.7.27] - 2018-02-01
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2236](https://github.com/sebastianbergmann/phpunit/issues/2236): Exceptions in `tearDown()` do not affect `getStatus()`
|
||||
* Fixed [#2950](https://github.com/sebastianbergmann/phpunit/issues/2950): Class extending `PHPUnit\Framework\TestSuite` does not extend `PHPUnit\FrameworkTestCase`
|
||||
* Fixed [#2972](https://github.com/sebastianbergmann/phpunit/issues/2972): PHPUnit crashes when test suite contains both `.phpt` files and unconventionally named tests
|
||||
|
||||
## [5.7.26] - 2017-12-17
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2472](https://github.com/sebastianbergmann/phpunit/issues/2472): `PHPUnit\Util\Getopt` uses deprecated `each()` function
|
||||
* Fixed [#2833](https://github.com/sebastianbergmann/phpunit/issues/2833): Test class loaded during data provider execution is not discovered
|
||||
* Fixed [#2922](https://github.com/sebastianbergmann/phpunit/issues/2922): Test class is not discovered when there is a test class with `@group` and provider throwing exception in it, tests are run with `--exclude-group` for that group, there is another class called later (after the class from above), and the name of that another class does not match its filename
|
||||
|
||||
## [5.7.25] - 2017-11-14
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2859](https://github.com/sebastianbergmann/phpunit/issues/2859): Regression caused by fix for [#2833](https://github.com/sebastianbergmann/phpunit/issues/2833)
|
||||
|
||||
## [5.7.24] - 2017-11-14
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2833](https://github.com/sebastianbergmann/phpunit/issues/2833): Test class loaded during data provider execution is not discovered
|
||||
|
||||
## [5.7.23] - 2017-10-15
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2731](https://github.com/sebastianbergmann/phpunit/issues/2731): Empty exception message cannot be expected
|
||||
|
||||
## [5.7.22] - 2017-09-24
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2769](https://github.com/sebastianbergmann/phpunit/issues/2769): Usage of `setUseErrorHandler()` produces `Undefined variable` error
|
||||
|
||||
## [5.7.21] - 2017-06-21
|
||||
|
||||
### Added
|
||||
|
||||
* Added `PHPUnit\Framework\AssertionFailedError`, `PHPUnit\Framework\Test`, and `PHPUnit\Framework\TestSuite` to the forward compatibility layer for PHPUnit 6
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2705](https://github.com/sebastianbergmann/phpunit/issues/2705): `stderr` parameter in `phpunit.xml` always considered `true`
|
||||
|
||||
## [5.7.20] - 2017-05-22
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2563](https://github.com/sebastianbergmann/phpunit/pull/2563): `phpunit --version` does not display version when running unsupported PHP
|
||||
|
||||
## [5.7.19] - 2017-04-03
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2638](https://github.com/sebastianbergmann/phpunit/pull/2638): Regression in `PHPUnit\Framework\TestCase:registerMockObjectsFromTestArguments()`
|
||||
|
||||
## [5.7.18] - 2017-04-02
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2145](https://github.com/sebastianbergmann/phpunit/issues/2145): `--stop-on-failure` fails to stop on PHP 7
|
||||
* Fixed [#2572](https://github.com/sebastianbergmann/phpunit/issues/2572): `PHPUnit\Framework\TestCase:registerMockObjectsFromTestArguments()` does not correctly handle arrays that reference themselves
|
||||
|
||||
## [5.7.17] - 2017-03-19
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2016](https://github.com/sebastianbergmann/phpunit/issues/2016): `prophesize()` does not work when static attributes are backed up
|
||||
* Fixed [#2568](https://github.com/sebastianbergmann/phpunit/issues/2568): `ArraySubsetConstraint` uses invalid cast to array
|
||||
* Fixed [#2573](https://github.com/sebastianbergmann/phpunit/issues/2573): `getMockFromWsdl()` does not handle URLs with query parameters
|
||||
* `PHPUnit\Util\Test::getDataFromTestWithAnnotation()` raises notice when docblock contains Windows line endings
|
||||
|
||||
## [5.7.16] - 2017-03-15
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2547](https://github.com/sebastianbergmann/phpunit/issues/2547): Code Coverage data is collected for test annotated with `@coversNothing`
|
||||
* Fixed [#2558](https://github.com/sebastianbergmann/phpunit/issues/2558): `countOf()` function is missing
|
||||
|
||||
## [5.7.15] - 2017-03-02
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1999](https://github.com/sebastianbergmann/phpunit/issues/1999): Handler is inherited from previous custom option with handler
|
||||
* Fixed [#2149](https://github.com/sebastianbergmann/phpunit/issues/2149): `assertCount()` does not handle generators properly
|
||||
* Fixed [#2478](https://github.com/sebastianbergmann/phpunit/issues/2478): Tests that take too long are not reported as risky test
|
||||
|
||||
## [5.7.14] - 2017-02-19
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2489](https://github.com/sebastianbergmann/phpunit/issues/2489): `processUncoveredFilesFromWhitelist` is not handled correctly
|
||||
* Fixed default values for `addUncoveredFilesFromWhitelist` and `processUncoveredFilesFromWhitelist` in `phpunit.xsd`
|
||||
|
||||
## [5.7.13] - 2017-02-10
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2493](https://github.com/sebastianbergmann/phpunit/issues/2493): Fix for [#2475](https://github.com/sebastianbergmann/phpunit/pull/2475) does not apply to PHPUnit 5.7
|
||||
|
||||
## [5.7.12] - 2017-02-08
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2475](https://github.com/sebastianbergmann/phpunit/pull/2475): Defining a test suite with only one file does not work
|
||||
|
||||
## [5.7.11] - 2017-02-05
|
||||
|
||||
### Fixed
|
||||
|
||||
* Deprecation errors when used with PHP 7.2
|
||||
|
||||
## [5.7.10] - 2017-02-04
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2462](https://github.com/sebastianbergmann/phpunit/issues/2462): Code Coverage whitelist is filled even if no code coverage data is to be collected
|
||||
|
||||
## [5.7.9] - 2017-01-28
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2447](https://github.com/sebastianbergmann/phpunit/issues/2447): Reverted backwards incompatible change to handling of boolean environment variable values specified in XML
|
||||
|
||||
## [5.7.8] - 2017-01-26
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2446](https://github.com/sebastianbergmann/phpunit/issues/2446): Reverted backwards incompatible change to exit code in case of warnings
|
||||
|
||||
## [5.7.7] - 2017-01-25
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1896](https://github.com/sebastianbergmann/phpunit/issues/1896): Wrong test location when `@depends` and `@dataProvider` are combined
|
||||
* Fixed [#1983](https://github.com/sebastianbergmann/phpunit/pull/1983): Tests with `@expectedException` annotation cannot be skipped
|
||||
* Fixed [#2137](https://github.com/sebastianbergmann/phpunit/issues/2137): Warnings for invalid data providers are suppressed when test execution is filtered
|
||||
* Fixed [#2275](https://github.com/sebastianbergmann/phpunit/pull/2275): Invalid UTF-8 characters can lead to missing output
|
||||
* Fixed [#2299](https://github.com/sebastianbergmann/phpunit/issues/2299): `expectExceptionMessage()` and `expectExceptionCode()` do not work without `expectException()`
|
||||
* Fixed [#2328](https://github.com/sebastianbergmann/phpunit/issues/2328): `TestListener` callbacks `startTest()` and `endTest()` are not called when test is skipped due to `@depends`
|
||||
* Fixed [#2331](https://github.com/sebastianbergmann/phpunit/issues/2331): Boolean environment variable values specified in XML get mangled
|
||||
* Fixed [#2333](https://github.com/sebastianbergmann/phpunit/issues/2333): `assertContains()` and `assertNotContains()` do not handle UTF-8 strings correctly
|
||||
* Fixed [#2340](https://github.com/sebastianbergmann/phpunit/pull/2340): Data providers that use `yield` or implement `Iterator` cannot be combined
|
||||
* Fixed [#2349](https://github.com/sebastianbergmann/phpunit/pull/2349): `PHPUnit_TextUI_Command` does not `exit()` when it should
|
||||
* Fixed [#2392](https://github.com/sebastianbergmann/phpunit/issues/2392): Empty (but valid) data provider should skip the test
|
||||
* Fixed [#2431](https://github.com/sebastianbergmann/phpunit/issues/2431): `assertArraySubset()` does not support `ArrayAccess`
|
||||
* Fixed [#2435](https://github.com/sebastianbergmann/phpunit/issues/2435): Empty `@group` annotation causes error on PHP 7.2+
|
||||
|
||||
## [5.7.6] - 2017-01-22
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2424](https://github.com/sebastianbergmann/phpunit/issues/2424): `TestCase::getStatus()` returns `STATUS_PASSED` instead of `STATUS_RISKY` for risky test
|
||||
* Fixed [#2427](https://github.com/sebastianbergmann/phpunit/issues/2427): TestDox group configuration is not handled
|
||||
* Fixed [#2428](https://github.com/sebastianbergmann/phpunit/pull/2428): Nested arrays specificied in XML configuration file are not handled correctly
|
||||
|
||||
## [5.7.5] - 2016-12-28
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2404](https://github.com/sebastianbergmann/phpunit/pull/2404): `assertDirectoryNotIsWriteable()` calls itself
|
||||
|
||||
## [5.7.4] - 2016-12-13
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2394](https://github.com/sebastianbergmann/phpunit/issues/2394): Do not treat `AssertionError` as assertion failure on PHP 5
|
||||
|
||||
## [5.7.3] - 2016-12-09
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2384](https://github.com/sebastianbergmann/phpunit/pull/2384): Handle `PHPUnit_Framework_Exception` correctly when expecting exceptions
|
||||
|
||||
## [5.7.2] - 2016-12-03
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2382](https://github.com/sebastianbergmann/phpunit/issues/2382): Uncloneable test doubles passed via data provider do not work
|
||||
|
||||
## [5.7.1] - 2016-12-02
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2380](https://github.com/sebastianbergmann/phpunit/issues/2380): Data Providers cannot be generators anymore
|
||||
|
||||
## [5.7.0] - 2016-12-02
|
||||
|
||||
### Added
|
||||
|
||||
* Merged [#2223](https://github.com/sebastianbergmann/phpunit/pull/2223): Add support for multiple data providers
|
||||
* Added `extensionsDirectory` configuration directive to configure a directory from which all `.phar` files are loaded as PHPUnit extensions
|
||||
* Added `--no-extensions` commandline option to suppress loading of extensions (from configured extension directory)
|
||||
* Added `PHPUnit\Framework\Assert` as an alias for `PHPUnit_Framework_Assert` for forward compatibility
|
||||
* Added `PHPUnit\Framework\BaseTestListener` as an alias for `PHPUnit_Framework_BaseTestListener` for forward compatibility
|
||||
* Added `PHPUnit\Framework\TestListener` as an alias for `PHPUnit_Framework_TestListener` for forward compatibility
|
||||
|
||||
### Changed
|
||||
|
||||
* The `--log-json` commandline option has been deprecated
|
||||
* The `--tap` and `--log-tap` commandline options have been deprecated
|
||||
* The `--self-update` and `--self-upgrade` commandline options have been deprecated (PHAR binary only)
|
||||
|
||||
[5.7.27]: https://github.com/sebastianbergmann/phpunit/compare/5.7.26...5.7.27
|
||||
[5.7.26]: https://github.com/sebastianbergmann/phpunit/compare/5.7.25...5.7.26
|
||||
[5.7.25]: https://github.com/sebastianbergmann/phpunit/compare/5.7.24...5.7.25
|
||||
[5.7.24]: https://github.com/sebastianbergmann/phpunit/compare/5.7.23...5.7.24
|
||||
[5.7.23]: https://github.com/sebastianbergmann/phpunit/compare/5.7.22...5.7.23
|
||||
[5.7.22]: https://github.com/sebastianbergmann/phpunit/compare/5.7.21...5.7.22
|
||||
[5.7.21]: https://github.com/sebastianbergmann/phpunit/compare/5.7.20...5.7.21
|
||||
[5.7.20]: https://github.com/sebastianbergmann/phpunit/compare/5.7.19...5.7.20
|
||||
[5.7.19]: https://github.com/sebastianbergmann/phpunit/compare/5.7.18...5.7.19
|
||||
[5.7.18]: https://github.com/sebastianbergmann/phpunit/compare/5.7.17...5.7.18
|
||||
[5.7.17]: https://github.com/sebastianbergmann/phpunit/compare/5.7.16...5.7.17
|
||||
[5.7.16]: https://github.com/sebastianbergmann/phpunit/compare/5.7.15...5.7.16
|
||||
[5.7.15]: https://github.com/sebastianbergmann/phpunit/compare/5.7.14...5.7.15
|
||||
[5.7.14]: https://github.com/sebastianbergmann/phpunit/compare/5.7.13...5.7.14
|
||||
[5.7.13]: https://github.com/sebastianbergmann/phpunit/compare/5.7.12...5.7.13
|
||||
[5.7.12]: https://github.com/sebastianbergmann/phpunit/compare/5.7.11...5.7.12
|
||||
[5.7.11]: https://github.com/sebastianbergmann/phpunit/compare/5.7.10...5.7.11
|
||||
[5.7.10]: https://github.com/sebastianbergmann/phpunit/compare/5.7.9...5.7.10
|
||||
[5.7.9]: https://github.com/sebastianbergmann/phpunit/compare/5.7.8...5.7.9
|
||||
[5.7.8]: https://github.com/sebastianbergmann/phpunit/compare/5.7.7...5.7.8
|
||||
[5.7.7]: https://github.com/sebastianbergmann/phpunit/compare/5.7.6...5.7.7
|
||||
[5.7.6]: https://github.com/sebastianbergmann/phpunit/compare/5.7.5...5.7.6
|
||||
[5.7.5]: https://github.com/sebastianbergmann/phpunit/compare/5.7.4...5.7.5
|
||||
[5.7.4]: https://github.com/sebastianbergmann/phpunit/compare/5.7.3...5.7.4
|
||||
[5.7.3]: https://github.com/sebastianbergmann/phpunit/compare/5.7.2...5.7.3
|
||||
[5.7.2]: https://github.com/sebastianbergmann/phpunit/compare/5.7.1...5.7.2
|
||||
[5.7.1]: https://github.com/sebastianbergmann/phpunit/compare/5.7.0...5.7.1
|
||||
[5.7.0]: https://github.com/sebastianbergmann/phpunit/compare/5.6...5.7.0
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
PHPUnit
|
||||
|
||||
Copyright (c) 2001-2018, Sebastian Bergmann <sebastian@phpunit.de>.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
* Neither the name of Sebastian Bergmann nor the names of his
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,46 @@
|
||||
# PHPUnit
|
||||
|
||||
PHPUnit is a programmer-oriented testing framework for PHP. It is an instance of the xUnit architecture for unit testing frameworks.
|
||||
|
||||
[](https://packagist.org/packages/phpunit/phpunit)
|
||||
[](https://php.net/)
|
||||
[](https://phpunit.de/build-status.html)
|
||||
|
||||
## Installation
|
||||
|
||||
We distribute a [PHP Archive (PHAR)](https://php.net/phar) that has all required (as well as some optional) dependencies of PHPUnit bundled in a single file:
|
||||
|
||||
```bash
|
||||
$ wget https://phar.phpunit.de/phpunit.phar
|
||||
|
||||
$ chmod +x phpunit.phar
|
||||
|
||||
$ mv phpunit.phar /usr/local/bin/phpunit
|
||||
```
|
||||
|
||||
You can also immediately use the PHAR after you have downloaded it, of course:
|
||||
|
||||
```bash
|
||||
$ wget https://phar.phpunit.de/phpunit.phar
|
||||
|
||||
$ php phpunit.phar
|
||||
```
|
||||
|
||||
Alternatively, you may use [Composer](https://getcomposer.org/) to download and install PHPUnit as well as its dependencies. Please refer to the [documentation](https://phpunit.de/documentation.html) for details on how to do this.
|
||||
|
||||
## Contribute
|
||||
|
||||
Please refer to [CONTRIBUTING.md](https://github.com/sebastianbergmann/phpunit/blob/master/.github/CONTRIBUTING.md) for information on how to contribute to PHPUnit and its related projects.
|
||||
|
||||
## List of Contributors
|
||||
|
||||
Thanks to everyone who has contributed to PHPUnit! You can find a detailed list of contributors on every PHPUnit related package on GitHub. This list shows only the major components:
|
||||
|
||||
* [PHPUnit](https://github.com/sebastianbergmann/phpunit/graphs/contributors)
|
||||
* [PHP_CodeCoverage](https://github.com/sebastianbergmann/php-code-coverage/graphs/contributors)
|
||||
* [PHPUnit_MockObject](https://github.com/sebastianbergmann/phpunit-mock-objects/graphs/contributors)
|
||||
|
||||
A very special thanks to everyone who has contributed to the documentation and helps maintain the translations:
|
||||
|
||||
* [PHPUnit Documentation](https://github.com/sebastianbergmann/phpunit-documentation/graphs/contributors)
|
||||
|
||||
@@ -0,0 +1,418 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project name="phpunit" default="setup">
|
||||
<target name="setup" depends="clean,install-dependencies"/>
|
||||
<target name="validate" depends="php-syntax-check,validate-composer-json,validate-phpunit-xsd"/>
|
||||
|
||||
<target name="clean" unless="clean.done" description="Cleanup build artifacts">
|
||||
<delete dir="${basedir}/bin"/>
|
||||
<delete dir="${basedir}/vendor"/>
|
||||
<delete file="${basedir}/composer.lock"/>
|
||||
<delete dir="${basedir}/build/documentation"/>
|
||||
<delete dir="${basedir}/build/logfiles"/>
|
||||
<delete dir="${basedir}/build/phar"/>
|
||||
<delete>
|
||||
<fileset dir="${basedir}/build">
|
||||
<include name="**/phpunit*.phar"/>
|
||||
<include name="**/phpunit*.phar.asc"/>
|
||||
</fileset>
|
||||
</delete>
|
||||
|
||||
<property name="clean.done" value="true"/>
|
||||
</target>
|
||||
|
||||
<target name="prepare" unless="prepare.done" depends="clean" description="Prepare for build">
|
||||
<mkdir dir="${basedir}/build/documentation"/>
|
||||
<mkdir dir="${basedir}/build/logfiles"/>
|
||||
<property name="prepare.done" value="true"/>
|
||||
</target>
|
||||
|
||||
<target name="validate-composer-json" unless="validate-composer-json.done" description="Validate composer.json">
|
||||
<exec executable="${basedir}/build/tools/composer" failonerror="true" taskname="composer">
|
||||
<arg value="validate"/>
|
||||
<arg value="--no-check-lock"/>
|
||||
<arg value="--strict"/>
|
||||
<arg value="${basedir}/composer.json"/>
|
||||
</exec>
|
||||
|
||||
<property name="validate-composer-json.done" value="true"/>
|
||||
</target>
|
||||
|
||||
<target name="-dependencies-installed">
|
||||
<available file="${basedir}/composer.lock" property="dependencies-installed"/>
|
||||
</target>
|
||||
|
||||
<target name="install-dependencies" unless="dependencies-installed" depends="-dependencies-installed,validate-composer-json" description="Install dependencies with Composer">
|
||||
<exec executable="${basedir}/build/tools/composer" taskname="composer">
|
||||
<arg value="update"/>
|
||||
<arg value="--no-interaction"/>
|
||||
<arg value="--no-progress"/>
|
||||
<arg value="--no-ansi"/>
|
||||
<arg value="--no-suggest"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="php-syntax-check" unless="php-syntax-check.done" description="Perform syntax check on PHP files">
|
||||
<apply executable="php" failonerror="true" taskname="lint">
|
||||
<arg value="-l"/>
|
||||
|
||||
<fileset dir="${basedir}/src">
|
||||
<include name="**/*.php"/>
|
||||
<modified/>
|
||||
</fileset>
|
||||
|
||||
<fileset dir="${basedir}/tests">
|
||||
<include name="**/*.php"/>
|
||||
<modified/>
|
||||
</fileset>
|
||||
</apply>
|
||||
|
||||
<property name="php-syntax-check.done" value="true"/>
|
||||
</target>
|
||||
|
||||
<target name="validate-phpunit-xsd" unless="validate-phpunit-xsd.done" description="Validate phpunit.xsd">
|
||||
<exec executable="xmllint" failonerror="true" taskname="xmllint">
|
||||
<arg value="--noout"/>
|
||||
<arg path="${basedir}/phpunit.xsd"/>
|
||||
</exec>
|
||||
|
||||
<property name="validate-phpunit-xsd.done" value="true"/>
|
||||
</target>
|
||||
|
||||
<target name="test" depends="validate,install-dependencies" description="Run tests">
|
||||
<exec executable="${basedir}/phpunit" taskname="phpunit"/>
|
||||
</target>
|
||||
|
||||
<target name="signed-phar" depends="phar" description="Create signed PHAR archive of PHPUnit and all its dependencies">
|
||||
<exec executable="gpg" failonerror="true">
|
||||
<arg value="--local-user"/>
|
||||
<arg value="sb@sebastian-bergmann.de"/>
|
||||
<arg value="--armor"/>
|
||||
<arg value="--detach-sign"/>
|
||||
<arg path="${basedir}/build/phpunit-library-${version}.phar"/>
|
||||
</exec>
|
||||
|
||||
<exec executable="gpg" failonerror="true">
|
||||
<arg value="--local-user"/>
|
||||
<arg value="sb@sebastian-bergmann.de"/>
|
||||
<arg value="--armor"/>
|
||||
<arg value="--detach-sign"/>
|
||||
<arg path="${basedir}/build/phpunit-${version}.phar"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="phar" depends="-phar-determine-version,-phar-prepare" description="Create PHAR archive of PHPUnit and all its dependencies">
|
||||
<antcall target="-phar-build">
|
||||
<param name="type" value="release"/>
|
||||
</antcall>
|
||||
</target>
|
||||
|
||||
<target name="phar-nightly" depends="-phar-prepare" description="Create PHAR archive of PHPUnit and all its dependencies (nightly)">
|
||||
<antcall target="-phar-build">
|
||||
<param name="type" value="nightly"/>
|
||||
</antcall>
|
||||
</target>
|
||||
|
||||
<target name="-phar-prepare" depends="clean,install-dependencies">
|
||||
<mkdir dir="${basedir}/build/phar"/>
|
||||
<copy file="${basedir}/composer.json" tofile="${basedir}/composer.json.bak"/>
|
||||
|
||||
<exec executable="${basedir}/build/tools/composer">
|
||||
<arg value="require"/>
|
||||
<arg value="phpunit/dbunit:~2.0"/>
|
||||
<arg value="phpunit/php-invoker:~1.1"/>
|
||||
</exec>
|
||||
|
||||
<move file="${basedir}/composer.json.bak" tofile="${basedir}/composer.json"/>
|
||||
|
||||
<exec executable="${basedir}/build/phar-manifest.php" output="${basedir}/build/phar/manifest.txt"/>
|
||||
<copy todir="${basedir}/build/phar" file="${basedir}/build/ca.pem" />
|
||||
|
||||
<copy file="${basedir}/vendor/phpunit/php-code-coverage/LICENSE" tofile="${basedir}/build/phar/php-code-coverage/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/php-code-coverage">
|
||||
<fileset dir="${basedir}/vendor/phpunit/php-code-coverage/src">
|
||||
<include name="**/*" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/phpunit/php-file-iterator/LICENSE" tofile="${basedir}/build/phar/php-file-iterator/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/php-file-iterator">
|
||||
<fileset dir="${basedir}/vendor/phpunit/php-file-iterator/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/phpunit/php-text-template/LICENSE" tofile="${basedir}/build/phar/php-text-template/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/php-text-template">
|
||||
<fileset dir="${basedir}/vendor/phpunit/php-text-template/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/phpunit/php-timer/LICENSE" tofile="${basedir}/build/phar/php-timer/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/php-timer">
|
||||
<fileset dir="${basedir}/vendor/phpunit/php-timer/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/phpunit/php-token-stream/LICENSE" tofile="${basedir}/build/phar/php-token-stream/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/php-token-stream">
|
||||
<fileset dir="${basedir}/vendor/phpunit/php-token-stream/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/phpunit/phpunit-mock-objects/LICENSE" tofile="${basedir}/build/phar/phpunit-mock-objects/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/phpunit-mock-objects">
|
||||
<fileset dir="${basedir}/vendor/phpunit/phpunit-mock-objects/src">
|
||||
<include name="**/*" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/sebastian/code-unit-reverse-lookup/LICENSE" tofile="${basedir}/build/phar/sebastian-code-unit-reverse-lookup/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/sebastian-code-unit-reverse-lookup">
|
||||
<fileset dir="${basedir}/vendor/sebastian/code-unit-reverse-lookup/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/sebastian/comparator/LICENSE" tofile="${basedir}/build/phar/sebastian-comparator/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/sebastian-comparator">
|
||||
<fileset dir="${basedir}/vendor/sebastian/comparator/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/sebastian/diff/LICENSE" tofile="${basedir}/build/phar/sebastian-diff/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/sebastian-diff">
|
||||
<fileset dir="${basedir}/vendor/sebastian/diff/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/sebastian/environment/LICENSE" tofile="${basedir}/build/phar/sebastian-environment/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/sebastian-environment">
|
||||
<fileset dir="${basedir}/vendor/sebastian/environment/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/sebastian/exporter/LICENSE" tofile="${basedir}/build/phar/sebastian-exporter/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/sebastian-exporter">
|
||||
<fileset dir="${basedir}/vendor/sebastian/exporter/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/sebastian/recursion-context/LICENSE" tofile="${basedir}/build/phar/sebastian-recursion-context/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/sebastian-recursion-context">
|
||||
<fileset dir="${basedir}/vendor/sebastian/recursion-context/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/sebastian/resource-operations/LICENSE" tofile="${basedir}/build/phar/sebastian-resource-operations/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/sebastian-resource-operations">
|
||||
<fileset dir="${basedir}/vendor/sebastian/resource-operations/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/sebastian/global-state/LICENSE" tofile="${basedir}/build/phar/sebastian-global-state/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/sebastian-global-state">
|
||||
<fileset dir="${basedir}/vendor/sebastian/global-state/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/sebastian/object-enumerator/LICENSE" tofile="${basedir}/build/phar/object-enumerator/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/sebastian-object-enumerator">
|
||||
<fileset dir="${basedir}/vendor/sebastian/object-enumerator/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/sebastian/version/LICENSE" tofile="${basedir}/build/phar/sebastian-version/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/sebastian-version">
|
||||
<fileset dir="${basedir}/vendor/sebastian/version/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/doctrine/instantiator/LICENSE" tofile="${basedir}/build/phar/doctrine-instantiator/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/doctrine-instantiator">
|
||||
<fileset dir="${basedir}/vendor/doctrine/instantiator/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/symfony/yaml/LICENSE" tofile="${basedir}/build/phar/symfony/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/symfony">
|
||||
<fileset dir="${basedir}/vendor/symfony">
|
||||
<include name="**/*.php" />
|
||||
<exclude name="**/Command/*.php" />
|
||||
<exclude name="**/Tests/**" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy todir="${basedir}/build/phar/dbunit">
|
||||
<fileset dir="${basedir}/vendor/phpunit/dbunit/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy todir="${basedir}/build/phar/php-invoker">
|
||||
<fileset dir="${basedir}/vendor/phpunit/php-invoker/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/phpdocumentor/reflection-common/LICENSE" tofile="${basedir}/build/phar/phpdocumentor-reflection-common/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/phpdocumentor-reflection-common">
|
||||
<fileset dir="${basedir}/vendor/phpdocumentor/reflection-common/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/phpdocumentor/reflection-docblock/LICENSE" tofile="${basedir}/build/phar/phpdocumentor-reflection-docblock/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/phpdocumentor-reflection-docblock">
|
||||
<fileset dir="${basedir}/vendor/phpdocumentor/reflection-docblock/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/phpdocumentor/type-resolver/LICENSE" tofile="${basedir}/build/phar/phpdocumentor-type-resolver/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/phpdocumentor-type-resolver">
|
||||
<fileset dir="${basedir}/vendor/phpdocumentor/type-resolver/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/phpspec/prophecy/LICENSE" tofile="${basedir}/build/phar/phpspec-prophecy/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/phpspec-prophecy">
|
||||
<fileset dir="${basedir}/vendor/phpspec/prophecy/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/myclabs/deep-copy/LICENSE" tofile="${basedir}/build/phar/myclabs-deep-copy/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/myclabs-deep-copy">
|
||||
<fileset dir="${basedir}/vendor/myclabs/deep-copy/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/webmozart/assert/LICENSE" tofile="${basedir}/build/phar/webmozart-assert/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/webmozart-assert">
|
||||
<fileset dir="${basedir}/vendor/webmozart/assert/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="-phar-build" depends="-phar-determine-version">
|
||||
<copy todir="${basedir}/build/phar/phpunit">
|
||||
<fileset dir="${basedir}/src">
|
||||
<include name="**/*.php"/>
|
||||
<include name="**/*.tpl*"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<exec executable="${basedir}/build/phar-version.php" outputproperty="_version">
|
||||
<arg value="${version}"/>
|
||||
<arg value="${type}"/>
|
||||
</exec>
|
||||
|
||||
<exec executable="${basedir}/build/tools/phpab" taskname="phpab">
|
||||
<arg value="--all" />
|
||||
<arg value="--static" />
|
||||
<arg value="--once" />
|
||||
<arg value="--phar" />
|
||||
<arg value="--hash" />
|
||||
<arg value="SHA-1" />
|
||||
<arg value="--output" />
|
||||
<arg path="${basedir}/build/phpunit-library-${_version}.phar" />
|
||||
<arg value="--template" />
|
||||
<arg path="${basedir}/build/library-phar-autoload.php.in" />
|
||||
<arg path="${basedir}/build/phar" />
|
||||
</exec>
|
||||
|
||||
<copy file="${basedir}/build/binary-phar-autoload.php.in" tofile="${basedir}/build/binary-phar-autoload.php"/>
|
||||
<replace file="${basedir}/build/binary-phar-autoload.php" token="X.Y.Z" value="${_version}"/>
|
||||
|
||||
<exec executable="${basedir}/build/tools/phpab" taskname="phpab">
|
||||
<arg value="--all" />
|
||||
<arg value="--nolower" />
|
||||
<arg value="--static" />
|
||||
<arg value="--phar" />
|
||||
<arg value="--hash" />
|
||||
<arg value="SHA-1" />
|
||||
<arg value="--output" />
|
||||
<arg path="${basedir}/build/phpunit-${_version}.phar" />
|
||||
<arg value="--template" />
|
||||
<arg path="${basedir}/build/binary-phar-autoload.php" />
|
||||
<arg path="${basedir}/build/phar" />
|
||||
</exec>
|
||||
|
||||
<chmod file="${basedir}/build/phpunit-${_version}.phar" perm="ugo+rx"/>
|
||||
|
||||
<delete dir="${basedir}/build/phar"/>
|
||||
<delete file="${basedir}/build/binary-phar-autoload.php"/>
|
||||
</target>
|
||||
|
||||
<target name="-phar-determine-version">
|
||||
<exec executable="${basedir}/build/version.php" outputproperty="version" />
|
||||
</target>
|
||||
|
||||
<target name="generate-project-documentation" depends="-phploc,-phpcs,-phpmd,-phpunit">
|
||||
<exec executable="${basedir}/build/tools/phpdox" dir="${basedir}/build" taskname="phpdox"/>
|
||||
</target>
|
||||
|
||||
<target name="-phploc" depends="prepare">
|
||||
<exec executable="${basedir}/build/tools/phploc" output="/dev/null" taskname="phploc">
|
||||
<arg value="--count-tests"/>
|
||||
<arg value="--log-xml"/>
|
||||
<arg path="${basedir}/build/logfiles/phploc.xml"/>
|
||||
<arg path="${basedir}/src"/>
|
||||
<arg path="${basedir}/tests"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="phpcs">
|
||||
<exec executable="${basedir}/build/tools/phpcs" taskname="phpcs">
|
||||
<arg value="--standard=${basedir}/build/phpcs.xml"/>
|
||||
<arg value="--extensions=php"/>
|
||||
<arg value="--cache"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="-phpcs" depends="prepare">
|
||||
<exec executable="${basedir}/build/tools/phpcs" output="/dev/null" taskname="phpcs">
|
||||
<arg value="--standard=${basedir}/build/phpcs.xml"/>
|
||||
<arg value="--extensions=php"/>
|
||||
<arg value="--cache"/>
|
||||
<arg value="--report=checkstyle"/>
|
||||
<arg value="--report-file=${basedir}/build/logfiles/checkstyle.xml"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="-phpmd" depends="prepare">
|
||||
<exec executable="${basedir}/build/tools/phpmd" taskname="phpmd">
|
||||
<arg path="${basedir}/src"/>
|
||||
<arg value="xml"/>
|
||||
<arg path="${basedir}/build/phpmd.xml"/>
|
||||
<arg value="--reportfile"/>
|
||||
<arg path="${basedir}/build/logfiles/pmd.xml"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="-phpunit" depends="setup">
|
||||
<exec executable="${basedir}/phpunit" taskname="phpunit">
|
||||
<arg value="--coverage-xml"/>
|
||||
<arg path="${basedir}/build/logfiles/coverage"/>
|
||||
<arg value="--log-junit"/>
|
||||
<arg path="${basedir}/build/logfiles/junit.xml"/>
|
||||
</exec>
|
||||
</target>
|
||||
</project>
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"description": "The PHP Unit Testing framework.",
|
||||
"type": "library",
|
||||
"keywords": [
|
||||
"phpunit",
|
||||
"xunit",
|
||||
"testing"
|
||||
],
|
||||
"homepage": "https://phpunit.de/",
|
||||
"license": "BSD-3-Clause",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/phpunit/issues"
|
||||
},
|
||||
"prefer-stable": true,
|
||||
"require": {
|
||||
"php": "^5.6 || ^7.0",
|
||||
"ext-dom": "*",
|
||||
"ext-json": "*",
|
||||
"ext-libxml": "*",
|
||||
"ext-mbstring": "*",
|
||||
"ext-xml": "*",
|
||||
"myclabs/deep-copy": "~1.3",
|
||||
"phpunit/php-code-coverage": "^4.0.4",
|
||||
"phpunit/php-file-iterator": "~1.4",
|
||||
"phpunit/php-text-template": "~1.2",
|
||||
"phpunit/php-timer": "^1.0.6",
|
||||
"phpunit/phpunit-mock-objects": "^3.2",
|
||||
"sebastian/comparator": "^1.2.4",
|
||||
"sebastian/diff": "^1.4.3",
|
||||
"sebastian/environment": "^1.3.4 || ^2.0",
|
||||
"sebastian/exporter": "~2.0",
|
||||
"sebastian/global-state": "^1.1",
|
||||
"sebastian/object-enumerator": "~2.0",
|
||||
"sebastian/resource-operations": "~1.0",
|
||||
"sebastian/version": "^1.0.6|^2.0.1",
|
||||
"symfony/phpunit-bridge": "*@dev"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-PDO": "*"
|
||||
},
|
||||
"conflict": {
|
||||
"phpdocumentor/reflection-docblock": "3.0.2"
|
||||
},
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "5.6.0"
|
||||
},
|
||||
"optimize-autoloader": true,
|
||||
"sort-packages": true
|
||||
},
|
||||
"suggest": {
|
||||
"phpunit/php-invoker": "~1.1",
|
||||
"ext-xdebug": "*"
|
||||
},
|
||||
"bin": [
|
||||
"phpunit"
|
||||
],
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"autoload-dev": {
|
||||
"classmap": [
|
||||
"tests/"
|
||||
],
|
||||
"files": [
|
||||
"src/Framework/Assert/Functions.php",
|
||||
"tests/_files/CoveredFunction.php"
|
||||
]
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "5.7.x-dev"
|
||||
}
|
||||
},
|
||||
"repositories": {
|
||||
"phpunit-bridge": {
|
||||
"type": "path",
|
||||
"url": "/home/www/website/www/vendor/symfony/phpunit-bridge"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
define('PHPUNIT_COMPOSER_INSTALL', __DIR__.'/vendor/autoload.php');
|
||||
require PHPUNIT_COMPOSER_INSTALL;
|
||||
|
||||
if (!class_exists('SymfonyBlacklistPhpunit', false)) {
|
||||
class SymfonyBlacklistPhpunit {}
|
||||
}
|
||||
if (class_exists('PHPUnit_Util_Blacklist')) {
|
||||
PHPUnit_Util_Blacklist::$blacklistedClassNames['SymfonyBlacklistPhpunit'] = 1;
|
||||
PHPUnit_Util_Blacklist::$blacklistedClassNames['SymfonyBlacklistSimplePhpunit'] = 1;
|
||||
} else {
|
||||
PHPUnit\Util\Blacklist::$blacklistedClassNames['SymfonyBlacklistPhpunit'] = 1;
|
||||
PHPUnit\Util\Blacklist::$blacklistedClassNames['SymfonyBlacklistSimplePhpunit'] = 1;
|
||||
}
|
||||
|
||||
Symfony\Bridge\PhpUnit\TextUI\Command::main();
|
||||
@@ -0,0 +1,254 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:annotation>
|
||||
<xs:documentation source="https://phpunit.de/manual/5.7/en/appendixes.configuration.html">
|
||||
This Schema file defines the rules by which the XML configuration file of PHPUnit 5.7 may be structured.
|
||||
</xs:documentation>
|
||||
<xs:appinfo source="https://phpunit.de/manual/5.7/en/appendixes.configuration.html"/>
|
||||
</xs:annotation>
|
||||
<xs:element name="phpunit" type="phpUnitType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Root Element</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:complexType name="filtersType">
|
||||
<xs:sequence>
|
||||
<xs:element name="whitelist" type="whiteListType" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="filterType">
|
||||
<xs:sequence>
|
||||
<xs:group ref="pathGroup"/>
|
||||
<xs:element name="exclude" maxOccurs="unbounded" minOccurs="0">
|
||||
<xs:complexType>
|
||||
<xs:group ref="pathGroup"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="whiteListType">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="filterType">
|
||||
<xs:attribute name="addUncoveredFilesFromWhitelist" default="true" type="xs:boolean"/>
|
||||
<xs:attribute name="processUncoveredFilesFromWhitelist" default="false" type="xs:boolean"/>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="groupsType">
|
||||
<xs:choice>
|
||||
<xs:sequence>
|
||||
<xs:element name="include" type="groupType"/>
|
||||
<xs:element name="exclude" type="groupType" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
<xs:sequence>
|
||||
<xs:element name="exclude" type="groupType"/>
|
||||
</xs:sequence>
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="groupType">
|
||||
<xs:sequence>
|
||||
<xs:element name="group" type="xs:string" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="listenersType">
|
||||
<xs:sequence>
|
||||
<xs:element name="listener" type="objectType" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="objectType">
|
||||
<xs:sequence>
|
||||
<xs:element name="arguments" minOccurs="0">
|
||||
<xs:complexType>
|
||||
<xs:group ref="argumentsGroup"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="class" type="xs:string" use="required"/>
|
||||
<xs:attribute name="file" type="xs:anyURI"/>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="arrayType">
|
||||
<xs:sequence>
|
||||
<xs:element name="element" type="argumentType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="argumentType">
|
||||
<xs:group ref="argumentChoice"/>
|
||||
<xs:attribute name="key" use="required"/>
|
||||
</xs:complexType>
|
||||
<xs:group name="argumentsGroup">
|
||||
<xs:sequence>
|
||||
<xs:element name="array" type="arrayType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="integer" type="xs:integer" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="string" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="double" type="xs:double" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="null" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="object" type="objectType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="file" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="directory" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:group>
|
||||
<xs:group name="argumentChoice">
|
||||
<xs:choice>
|
||||
<xs:element name="array" type="arrayType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="integer" type="xs:integer" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="string" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="double" type="xs:double" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="null" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="object" type="objectType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="file" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="directory" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:choice>
|
||||
</xs:group>
|
||||
<xs:complexType name="loggersType">
|
||||
<xs:sequence>
|
||||
<xs:element name="log" type="loggerType" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="loggerType">
|
||||
<xs:attribute name="type">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="coverage-html"/>
|
||||
<xs:enumeration value="coverage-text"/>
|
||||
<xs:enumeration value="coverage-clover"/>
|
||||
<xs:enumeration value="coverage-crap4j"/>
|
||||
<xs:enumeration value="coverage-xml"/>
|
||||
<xs:enumeration value="json"/>
|
||||
<xs:enumeration value="plain"/>
|
||||
<xs:enumeration value="tap"/>
|
||||
<xs:enumeration value="teamcity"/>
|
||||
<xs:enumeration value="junit"/>
|
||||
<xs:enumeration value="testdox-html"/>
|
||||
<xs:enumeration value="testdox-text"/>
|
||||
<xs:enumeration value="testdox-xml"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="target" type="xs:anyURI"/>
|
||||
<xs:attribute name="lowUpperBound" type="xs:nonNegativeInteger" default="35"/>
|
||||
<xs:attribute name="highLowerBound" type="xs:nonNegativeInteger" default="70"/>
|
||||
<xs:attribute name="logIncompleteSkipped" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="showUncoveredFiles" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="threshold" type="xs:nonNegativeInteger" default="30"/>
|
||||
</xs:complexType>
|
||||
<xs:group name="pathGroup">
|
||||
<xs:sequence>
|
||||
<xs:element name="directory" type="directoryFilterType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="file" type="fileFilterType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:group>
|
||||
<xs:complexType name="directoryFilterType">
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:anyURI">
|
||||
<xs:attribute type="xs:string" name="suffix" default="Test.php"/>
|
||||
<xs:attributeGroup ref="phpVersionGroup"/>
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="fileFilterType">
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:anyURI">
|
||||
<xs:attributeGroup ref="phpVersionGroup"/>
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
<xs:attributeGroup name="phpVersionGroup">
|
||||
<xs:attribute name="phpVersion" type="xs:string" default="5.3.0"/>
|
||||
<xs:attribute name="phpVersionOperator" type="xs:string" default=">="/>
|
||||
</xs:attributeGroup>
|
||||
<xs:complexType name="phpType">
|
||||
<xs:sequence>
|
||||
<xs:choice maxOccurs="unbounded">
|
||||
<xs:element name="includePath" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="ini" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="const" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="var" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="env" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="post" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="get" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="cookie" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="server" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="files" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="request" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:choice>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="namedValueType">
|
||||
<xs:attribute name="name" use="required" type="xs:string"/>
|
||||
<xs:attribute name="value" use="required" type="xs:anySimpleType"/>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="phpUnitType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The main type specifying the document structure</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:group ref="configGroup"/>
|
||||
<xs:attributeGroup ref="configAttributeGroup"/>
|
||||
</xs:complexType>
|
||||
<xs:attributeGroup name="configAttributeGroup">
|
||||
<xs:attribute name="backupGlobals" type="xs:boolean" default="true"/>
|
||||
<xs:attribute name="backupStaticAttributes" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="bootstrap" type="xs:anyURI"/>
|
||||
<xs:attribute name="cacheTokens" type="xs:boolean"/>
|
||||
<xs:attribute name="colors" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="columns" type="xs:integer" default="80"/>
|
||||
<xs:attribute name="convertErrorsToExceptions" type="xs:boolean" default="true"/>
|
||||
<xs:attribute name="convertNoticesToExceptions" type="xs:boolean" default="true"/>
|
||||
<xs:attribute name="convertWarningsToExceptions" type="xs:boolean" default="true"/>
|
||||
<xs:attribute name="forceCoversAnnotation" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="printerClass" type="xs:string" default="PHPUnit_TextUI_ResultPrinter"/>
|
||||
<xs:attribute name="printerFile" type="xs:anyURI"/>
|
||||
<xs:attribute name="processIsolation" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="stopOnError" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="stopOnFailure" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="stopOnWarning" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="stopOnIncomplete" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="stopOnRisky" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="stopOnSkipped" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="failOnRisky" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="failOnWarning" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="beStrictAboutChangesToGlobalState" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="beStrictAboutOutputDuringTests" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="beStrictAboutResourceUsageDuringSmallTests" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="beStrictAboutTestsThatDoNotTestAnything" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="beStrictAboutTodoAnnotatedTests" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="beStrictAboutCoversAnnotation" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="checkForUnintentionallyCoveredCode" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="enforceTimeLimit" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="timeoutForSmallTests" type="xs:integer" default="1"/>
|
||||
<xs:attribute name="timeoutForMediumTests" type="xs:integer" default="10"/>
|
||||
<xs:attribute name="timeoutForLargeTests" type="xs:integer" default="60"/>
|
||||
<xs:attribute name="testSuiteLoaderClass" type="xs:string" default="PHPUnit_Runner_StandardTestSuiteLoader"/>
|
||||
<xs:attribute name="testSuiteLoaderFile" type="xs:anyURI"/>
|
||||
<xs:attribute name="verbose" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="stderr" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="reverseDefectList" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="registerMockObjectsFromTestArgumentsRecursively" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="extensionsDirectory" type="xs:string"/>
|
||||
</xs:attributeGroup>
|
||||
<xs:group name="configGroup">
|
||||
<xs:all>
|
||||
<xs:element ref="testSuiteFacet" minOccurs="0"/>
|
||||
<xs:element name="groups" type="groupsType" minOccurs="0"/>
|
||||
<xs:element name="testdoxGroups" type="groupsType" minOccurs="0"/>
|
||||
<xs:element name="filter" type="filtersType" minOccurs="0"/>
|
||||
<xs:element name="logging" type="loggersType" minOccurs="0"/>
|
||||
<xs:element name="listeners" type="listenersType" minOccurs="0"/>
|
||||
<xs:element name="php" type="phpType" minOccurs="0"/>
|
||||
</xs:all>
|
||||
</xs:group>
|
||||
<xs:element name="testSuiteFacet" abstract="true"/>
|
||||
<xs:element name="testsuite" type="testSuiteType" substitutionGroup="testSuiteFacet"/>
|
||||
<xs:element name="testsuites" type="testSuitesType" substitutionGroup="testSuiteFacet"/>
|
||||
<xs:complexType name="testSuitesType">
|
||||
<xs:sequence>
|
||||
<xs:element name="testsuite" type="testSuiteType" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="testSuiteType">
|
||||
<xs:sequence>
|
||||
<xs:group ref="pathGroup"/>
|
||||
<xs:element name="exclude" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="name" type="xs:string" use="required"/>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Marker interface for PHPUnit exceptions.
|
||||
*/
|
||||
interface PHPUnit_Exception
|
||||
{
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/**
|
||||
* We have a TestSuite object A.
|
||||
* In TestSuite object A we have Tests tagged with @group.
|
||||
* We want a TestSuite object B that contains TestSuite objects C, D, ...
|
||||
* for the Tests tagged with @group C, @group D, ...
|
||||
* Running the Tests from TestSuite object B results in Tests tagged with both
|
||||
*
|
||||
* @group C and @group D in TestSuite object A to be run twice .
|
||||
*
|
||||
* <code>
|
||||
* $suite = new PHPUnit_Extensions_GroupTestSuite($A, array('C', 'D'));
|
||||
* </code>
|
||||
*/
|
||||
class PHPUnit_Extensions_GroupTestSuite extends PHPUnit_Framework_TestSuite
|
||||
{
|
||||
public function __construct(PHPUnit_Framework_TestSuite $suite, array $groups)
|
||||
{
|
||||
$groupSuites = [];
|
||||
$name = $suite->getName();
|
||||
|
||||
foreach ($groups as $group) {
|
||||
$groupSuites[$group] = new PHPUnit_Framework_TestSuite($name . ' - ' . $group);
|
||||
$this->addTest($groupSuites[$group]);
|
||||
}
|
||||
|
||||
$tests = new RecursiveIteratorIterator(
|
||||
new PHPUnit_Util_TestSuiteIterator($suite),
|
||||
RecursiveIteratorIterator::LEAVES_ONLY
|
||||
);
|
||||
|
||||
foreach ($tests as $test) {
|
||||
if ($test instanceof PHPUnit_Framework_TestCase) {
|
||||
$testGroups = PHPUnit_Util_Test::getGroups(
|
||||
get_class($test),
|
||||
$test->getName(false)
|
||||
);
|
||||
|
||||
foreach ($groups as $group) {
|
||||
foreach ($testGroups as $testGroup) {
|
||||
if ($group == $testGroup) {
|
||||
$groupSuites[$group]->addTest($test);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+430
@@ -0,0 +1,430 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Runner for PHPT test cases.
|
||||
*/
|
||||
class PHPUnit_Extensions_PhptTestCase implements PHPUnit_Framework_Test, PHPUnit_Framework_SelfDescribing
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $filename;
|
||||
|
||||
/**
|
||||
* @var PHPUnit_Util_PHP
|
||||
*/
|
||||
private $phpUtil;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $settings = [
|
||||
'allow_url_fopen=1',
|
||||
'auto_append_file=',
|
||||
'auto_prepend_file=',
|
||||
'disable_functions=',
|
||||
'display_errors=1',
|
||||
'docref_root=',
|
||||
'docref_ext=.html',
|
||||
'error_append_string=',
|
||||
'error_prepend_string=',
|
||||
'error_reporting=-1',
|
||||
'html_errors=0',
|
||||
'log_errors=0',
|
||||
'magic_quotes_runtime=0',
|
||||
'output_handler=',
|
||||
'open_basedir=',
|
||||
'output_buffering=Off',
|
||||
'report_memleaks=0',
|
||||
'report_zend_debug=0',
|
||||
'safe_mode=0',
|
||||
'xdebug.default_enable=0'
|
||||
];
|
||||
|
||||
/**
|
||||
* Constructs a test case with the given filename.
|
||||
*
|
||||
* @param string $filename
|
||||
* @param PHPUnit_Util_PHP $phpUtil
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
public function __construct($filename, $phpUtil = null)
|
||||
{
|
||||
if (!is_string($filename)) {
|
||||
throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
|
||||
}
|
||||
|
||||
if (!is_file($filename)) {
|
||||
throw new PHPUnit_Framework_Exception(
|
||||
sprintf(
|
||||
'File "%s" does not exist.',
|
||||
$filename
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$this->filename = $filename;
|
||||
$this->phpUtil = $phpUtil ?: PHPUnit_Util_PHP::factory();
|
||||
}
|
||||
|
||||
/**
|
||||
* Counts the number of test cases executed by run(TestResult result).
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function count()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $sections
|
||||
* @param string $output
|
||||
*/
|
||||
private function assertPhptExpectation(array $sections, $output)
|
||||
{
|
||||
$assertions = [
|
||||
'EXPECT' => 'assertEquals',
|
||||
'EXPECTF' => 'assertStringMatchesFormat',
|
||||
'EXPECTREGEX' => 'assertRegExp',
|
||||
];
|
||||
|
||||
$actual = preg_replace('/\r\n/', "\n", trim($output));
|
||||
|
||||
foreach ($assertions as $sectionName => $sectionAssertion) {
|
||||
if (isset($sections[$sectionName])) {
|
||||
$sectionContent = preg_replace('/\r\n/', "\n", trim($sections[$sectionName]));
|
||||
$assertion = $sectionAssertion;
|
||||
$expected = $sectionName == 'EXPECTREGEX' ? "/{$sectionContent}/" : $sectionContent;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
PHPUnit_Framework_Assert::$assertion($expected, $actual);
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs a test and collects its result in a TestResult instance.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestResult $result
|
||||
*
|
||||
* @return PHPUnit_Framework_TestResult
|
||||
*/
|
||||
public function run(PHPUnit_Framework_TestResult $result = null)
|
||||
{
|
||||
$sections = $this->parse();
|
||||
$code = $this->render($sections['FILE']);
|
||||
|
||||
if ($result === null) {
|
||||
$result = new PHPUnit_Framework_TestResult;
|
||||
}
|
||||
|
||||
$skip = false;
|
||||
$xfail = false;
|
||||
$time = 0;
|
||||
$settings = $this->settings;
|
||||
|
||||
$result->startTest($this);
|
||||
|
||||
if (isset($sections['INI'])) {
|
||||
$settings = array_merge($settings, $this->parseIniSection($sections['INI']));
|
||||
}
|
||||
|
||||
if (isset($sections['ENV'])) {
|
||||
$env = $this->parseEnvSection($sections['ENV']);
|
||||
$this->phpUtil->setEnv($env);
|
||||
}
|
||||
|
||||
// Redirects STDERR to STDOUT
|
||||
$this->phpUtil->setUseStderrRedirection(true);
|
||||
|
||||
if ($result->enforcesTimeLimit()) {
|
||||
$this->phpUtil->setTimeout($result->getTimeoutForLargeTests());
|
||||
}
|
||||
|
||||
if (isset($sections['SKIPIF'])) {
|
||||
$jobResult = $this->phpUtil->runJob($sections['SKIPIF'], $settings);
|
||||
|
||||
if (!strncasecmp('skip', ltrim($jobResult['stdout']), 4)) {
|
||||
if (preg_match('/^\s*skip\s*(.+)\s*/i', $jobResult['stdout'], $message)) {
|
||||
$message = substr($message[1], 2);
|
||||
} else {
|
||||
$message = '';
|
||||
}
|
||||
|
||||
$result->addFailure($this, new PHPUnit_Framework_SkippedTestError($message), 0);
|
||||
|
||||
$skip = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($sections['XFAIL'])) {
|
||||
$xfail = trim($sections['XFAIL']);
|
||||
}
|
||||
|
||||
if (!$skip) {
|
||||
if (isset($sections['STDIN'])) {
|
||||
$this->phpUtil->setStdin($sections['STDIN']);
|
||||
}
|
||||
|
||||
if (isset($sections['ARGS'])) {
|
||||
$this->phpUtil->setArgs($sections['ARGS']);
|
||||
}
|
||||
|
||||
PHP_Timer::start();
|
||||
|
||||
$jobResult = $this->phpUtil->runJob($code, $settings);
|
||||
$time = PHP_Timer::stop();
|
||||
|
||||
try {
|
||||
$this->assertPhptExpectation($sections, $jobResult['stdout']);
|
||||
} catch (PHPUnit_Framework_AssertionFailedError $e) {
|
||||
if ($xfail !== false) {
|
||||
$result->addFailure(
|
||||
$this,
|
||||
new PHPUnit_Framework_IncompleteTestError(
|
||||
$xfail,
|
||||
0,
|
||||
$e
|
||||
),
|
||||
$time
|
||||
);
|
||||
} else {
|
||||
$result->addFailure($this, $e, $time);
|
||||
}
|
||||
} catch (Throwable $t) {
|
||||
$result->addError($this, $t, $time);
|
||||
} catch (Exception $e) {
|
||||
$result->addError($this, $e, $time);
|
||||
}
|
||||
|
||||
if ($result->allCompletelyImplemented() && $xfail !== false) {
|
||||
$result->addFailure(
|
||||
$this,
|
||||
new PHPUnit_Framework_IncompleteTestError(
|
||||
'XFAIL section but test passes'
|
||||
),
|
||||
$time
|
||||
);
|
||||
}
|
||||
|
||||
$this->phpUtil->setStdin('');
|
||||
$this->phpUtil->setArgs('');
|
||||
|
||||
if (isset($sections['CLEAN'])) {
|
||||
$cleanCode = $this->render($sections['CLEAN']);
|
||||
|
||||
$this->phpUtil->runJob($cleanCode, $this->settings);
|
||||
}
|
||||
}
|
||||
|
||||
$result->endTest($this, $time);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of the test case.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the test case.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
return $this->filename;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
private function parse()
|
||||
{
|
||||
$sections = [];
|
||||
$section = '';
|
||||
|
||||
$allowExternalSections = [
|
||||
'FILE',
|
||||
'EXPECT',
|
||||
'EXPECTF',
|
||||
'EXPECTREGEX'
|
||||
];
|
||||
|
||||
$requiredSections = [
|
||||
'FILE',
|
||||
[
|
||||
'EXPECT',
|
||||
'EXPECTF',
|
||||
'EXPECTREGEX'
|
||||
]
|
||||
];
|
||||
|
||||
$unsupportedSections = [
|
||||
'REDIRECTTEST',
|
||||
'REQUEST',
|
||||
'POST',
|
||||
'PUT',
|
||||
'POST_RAW',
|
||||
'GZIP_POST',
|
||||
'DEFLATE_POST',
|
||||
'GET',
|
||||
'COOKIE',
|
||||
'HEADERS',
|
||||
'CGI',
|
||||
'EXPECTHEADERS',
|
||||
'EXTENSIONS',
|
||||
'PHPDBG'
|
||||
];
|
||||
|
||||
foreach (file($this->filename) as $line) {
|
||||
if (preg_match('/^--([_A-Z]+)--/', $line, $result)) {
|
||||
$section = $result[1];
|
||||
$sections[$section] = '';
|
||||
|
||||
continue;
|
||||
} elseif (empty($section)) {
|
||||
throw new PHPUnit_Framework_Exception('Invalid PHPT file');
|
||||
}
|
||||
|
||||
$sections[$section] .= $line;
|
||||
}
|
||||
|
||||
if (isset($sections['FILEEOF'])) {
|
||||
$sections['FILE'] = rtrim($sections['FILEEOF'], "\r\n");
|
||||
unset($sections['FILEEOF']);
|
||||
}
|
||||
|
||||
$testDirectory = dirname($this->filename) . DIRECTORY_SEPARATOR;
|
||||
|
||||
foreach ($allowExternalSections as $section) {
|
||||
if (isset($sections[$section . '_EXTERNAL'])) {
|
||||
// do not allow directory traversal
|
||||
$externalFilename = str_replace('..', '', trim($sections[$section . '_EXTERNAL']));
|
||||
|
||||
// only allow files from the test directory
|
||||
if (!is_file($testDirectory . $externalFilename) || !is_readable($testDirectory . $externalFilename)) {
|
||||
throw new PHPUnit_Framework_Exception(
|
||||
sprintf(
|
||||
'Could not load --%s-- %s for PHPT file',
|
||||
$section . '_EXTERNAL',
|
||||
$testDirectory . $externalFilename
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$sections[$section] = file_get_contents($testDirectory . $externalFilename);
|
||||
|
||||
unset($sections[$section . '_EXTERNAL']);
|
||||
}
|
||||
}
|
||||
|
||||
$isValid = true;
|
||||
|
||||
foreach ($requiredSections as $section) {
|
||||
if (is_array($section)) {
|
||||
$foundSection = false;
|
||||
|
||||
foreach ($section as $anySection) {
|
||||
if (isset($sections[$anySection])) {
|
||||
$foundSection = true;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$foundSection) {
|
||||
$isValid = false;
|
||||
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (!isset($sections[$section])) {
|
||||
$isValid = false;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$isValid) {
|
||||
throw new PHPUnit_Framework_Exception('Invalid PHPT file');
|
||||
}
|
||||
|
||||
foreach ($unsupportedSections as $section) {
|
||||
if (isset($sections[$section])) {
|
||||
throw new PHPUnit_Framework_Exception(
|
||||
'PHPUnit does not support this PHPT file'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return $sections;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $code
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function render($code)
|
||||
{
|
||||
return str_replace(
|
||||
[
|
||||
'__DIR__',
|
||||
'__FILE__'
|
||||
],
|
||||
[
|
||||
"'" . dirname($this->filename) . "'",
|
||||
"'" . $this->filename . "'"
|
||||
],
|
||||
$code
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse --INI-- section key value pairs and return as array.
|
||||
*
|
||||
* @param string
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function parseIniSection($content)
|
||||
{
|
||||
return preg_split('/\n|\r/', $content, -1, PREG_SPLIT_NO_EMPTY);
|
||||
}
|
||||
|
||||
protected function parseEnvSection($content)
|
||||
{
|
||||
$env = [];
|
||||
|
||||
foreach (explode("\n", trim($content)) as $e) {
|
||||
$e = explode('=', trim($e), 2);
|
||||
|
||||
if (!empty($e[0]) && isset($e[1])) {
|
||||
$env[$e[0]] = $e[1];
|
||||
}
|
||||
}
|
||||
|
||||
return $env;
|
||||
}
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Suite for .phpt test cases.
|
||||
*/
|
||||
class PHPUnit_Extensions_PhptTestSuite extends PHPUnit_Framework_TestSuite
|
||||
{
|
||||
/**
|
||||
* Constructs a new TestSuite for .phpt test cases.
|
||||
*
|
||||
* @param string $directory
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
public function __construct($directory)
|
||||
{
|
||||
if (is_string($directory) && is_dir($directory)) {
|
||||
$this->setName($directory);
|
||||
|
||||
$facade = new File_Iterator_Facade;
|
||||
$files = $facade->getFilesAsArray($directory, '.phpt');
|
||||
|
||||
foreach ($files as $file) {
|
||||
$this->addTestFile($file);
|
||||
}
|
||||
} else {
|
||||
throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'directory name');
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user