Compare commits

..

126 Commits

Author SHA1 Message Date
Thomas Berrod d6f8941e47 unknown deletes 2019-05-16 09:46:59 +02:00
Thomas Berrod 5474397f5f Merge branch 'feat/api-rest' of https://git.e-declic.net/talents-tube/website into feat/api-rest 2018-09-17 10:49:18 +02:00
Maxime Thévenot 44d0711dc1 Feat : Add company and answer api base 2018-09-17 10:15:12 +02:00
Thomas Berrod 9f6c1a740f Merge branch 'feat/api-rest' of https://git.e-declic.net/talents-tube/website into feat/api-rest 2018-09-17 09:04:25 +02:00
Thomas Berrod 8063c8479e feat:adding quotes to makefile 2018-09-10 09:53:07 +02:00
Maxime Thévenot 04229b0781 Feat : implement token generation with facebook id 2018-09-07 14:31:32 +02:00
Maxime Thévenot 4edfae9f1c Feat : implement JWT for api authentication 2018-09-07 08:57:44 +02:00
Maxime Thévenot 870654c850 Feat : update ads representation 2018-09-06 09:48:12 +02:00
Maxime Thévenot 9413202660 WIP : test authentication for api 2018-09-06 08:20:27 +02:00
Maxime Thévenot 215e325a8c Feat : configure and test api on add 2018-09-06 08:20:09 +02:00
Maxime Thévenot 9f8682c896 Feat : Install hateoas bundle 2018-09-06 08:19:16 +02:00
Maxime Thévenot c48fe53e6a Feat : install pagerfante bundle and update api 2018-08-31 16:44:42 +02:00
Maxime Thévenot d69f32c657 Feat : update config.yml for fosrest and add some api method 2018-08-31 12:07:29 +02:00
Maxime Thévenot dba776d15f Update : symfony to 3.4 + vendors 2018-08-31 11:26:11 +02:00
Maxime Thévenot bb3ed610ab WIP : testing api 2018-08-31 10:40:47 +02:00
Maxime Thévenot 75145d9e1c Feat : install FOSRestBundle 2018-08-29 15:26:50 +02:00
Maxime Thévenot b885e6866c Feat : install jmsserializer bundle 2018-08-29 14:42:12 +02:00
Maxime Thévenot 74f9c7b884 Fix : update registration template to fix button 2018-08-28 15:29:04 +02:00
Maxime Thévenot 2eb399776b Fix : hover color on territory title 2018-08-28 11:44:22 +02:00
Maxime Thévenot 8986ae738a Fix : typo in wording and redirect castre mazamet 2018-08-28 11:29:07 +02:00
Thomas MONCHICOURT 7dfaf01705 Fix : correction template pour message direct au talent 2018-08-27 12:22:26 +02:00
Thomas MONCHICOURT a4631872e0 Fix : https on graph picture facebook 2018-08-24 12:24:04 +02:00
Thomas MONCHICOURT ddc6b18d0a Fix : erreur 500 talent non connecté 2018-08-24 12:20:43 +02:00
Thomas MONCHICOURT 6033516273 Fix : erreur 500 sur talent en tant qu’admin 2018-08-23 17:10:11 +02:00
Thomas MONCHICOURT 73a44a011d Fix : double tags input 2018-08-23 16:39:01 +02:00
Thomas MONCHICOURT 57299b841e Fix : check birthday if empty talent 2018-08-23 16:09:03 +02:00
Thomas MONCHICOURT fb11613b7c Feat : rechargement de la dropzone au chargement de video sur les réponse 2018-08-23 15:31:54 +02:00
Thomas MONCHICOURT e13ef32197 Merge branch 'master' into develop 2018-08-23 15:23:18 +02:00
Thomas MONCHICOURT e70c1c7f5e Feat : dropzone reload 2018-08-23 15:19:46 +02:00
Thomas MONCHICOURT 0c9c4f0fc2 Fix : video vimeo pour dev 2018-08-23 15:19:37 +02:00
Thomas MONCHICOURT 5cd78b272a Fix : video égérie talent 2018-08-23 14:56:42 +02:00
Thomas MONCHICOURT f3597146ad Feat : ajout title analitycs annonce #7115 @0h10 2018-08-23 14:15:12 +02:00
Thomas MONCHICOURT f52f49ce9a Fix : css form parent probleme 2018-08-23 13:57:16 +02:00
Thomas MONCHICOURT 0b6a04e8d0 Feat : form validation talent + datepicker 2018-08-23 12:32:30 +02:00
Thomas MONCHICOURT 0dfc9af863 Feat : modification couleur cookie bar 2018-08-22 16:48:40 +02:00
Thomas MONCHICOURT fc548bc74c Fix: condition existance vidéo 2018-08-22 16:17:36 +02:00
Thomas MONCHICOURT 5d78b30bef Feat : generation css suite merge 2018-08-22 16:05:10 +02:00
Thomas MONCHICOURT 7372b03e5c Merge branch 'develop'
# Conflicts:
#	volume/www/website/www/web/css/styles.css
#	volume/www/website/www/web/css/styles.css.map
#	volume/www/website/www/web/sass/base/_variables.scss
#	volume/www/website/www/web/sass/modules/_app.scss
2018-08-22 16:04:32 +02:00
Thomas MONCHICOURT eadb2a397f Fix : probleme connexion apres login 2018-08-22 11:34:58 +02:00
Thomas MONCHICOURT 959dd61435 Feat : ajout lien modification menu et title 2018-08-21 14:33:38 +02:00
Thomas MONCHICOURT 6e63c1f2e8 feat : css pour la cookie bar en prod 2018-08-21 14:16:34 +02:00
Thomas MONCHICOURT 8a91476e86 Feat : css suite merge 2018-08-21 12:33:37 +02:00
Thomas MONCHICOURT 714bf6ad8e Feat : cookie bar #7105 @1h
# Conflicts:
#	volume/www/website/www/composer.json
#	volume/www/website/www/composer.lock
#	volume/www/website/www/vendor/composer/installed.json
#	volume/www/website/www/web/css/styles.css
#	volume/www/website/www/web/css/styles.css.map
#	volume/www/website/www/web/sass/modules/_app.scss
2018-08-21 12:33:20 +02:00
Thomas MONCHICOURT 6f5118e500 Feat : cookie bar #7105 @1h 2018-08-21 12:30:58 +02:00
Thomas MONCHICOURT 85abb49683 Feat : ajout readmore js 2018-08-16 14:38:26 +02:00
Thomas MONCHICOURT 6fb0ad4d40 Fix : message 2018-08-14 15:23:14 +02:00
Thomas MONCHICOURT 1ab9cf6703 Feat : ajout du twig intl extension 2018-08-14 14:50:20 +02:00
Thomas MONCHICOURT e8ab042fe5 Feat : modificaion recommandation 2018-08-14 14:40:44 +02:00
Thomas MONCHICOURT 009bea43ef feat: ajout champ type poste #6838 2018-08-13 17:23:35 +02:00
Thomas MONCHICOURT 0abfa0dca8 Feat : ajout du readmorejs pour les message de candidature #6945 @0h30 2018-08-13 11:04:12 +02:00
Thomas MONCHICOURT 7510b8022a Feat : correction recettage 2018-08-13 10:38:06 +02:00
Thomas MONCHICOURT 69e6f6c16b feat : Correction corentin reponse video #6945 @2h 2018-08-09 12:11:32 +02:00
Thomas MONCHICOURT 4981a3d310 Feat : test unitaire 2018-08-08 11:28:13 +02:00
Thomas MONCHICOURT 13ec5f3d34 Fix : condition territoire prefixe 2018-08-07 16:28:18 +02:00
Thomas MONCHICOURT a08b13591a Merge branch 'develop' of https://git.e-declic.net/talents-tube/website into develop 2018-08-07 16:24:21 +02:00
Thomas MONCHICOURT a470518403 Fix : erreur iframe 2018-08-07 16:24:15 +02:00
Maxime Thévenot 64e76b29f5 Fix : update conf for preprod rebuilding 2018-08-07 16:15:53 +02:00
Maxime Thévenot 983e0b03be Merge branch 'develop' of https://git.e-declic.net/talents-tube/website into develop
# Conflicts:
#	volume/www/website/www/app/Resources/views/default/index.html.twig
2018-08-07 15:44:43 +02:00
Maxime Thévenot 45cb8896de Feat : update territory carrousels 2018-08-07 15:42:21 +02:00
Thomas MONCHICOURT 9bf7065984 Fix : order réponse dashboard talent 2018-08-07 15:24:30 +02:00
Thomas MONCHICOURT 243d1e3945 Fix : img talent homepage 2018-08-07 15:13:35 +02:00
Thomas MONCHICOURT 16951ee895 Feat : design dashboard 2018-08-07 14:54:01 +02:00
Thomas MONCHICOURT e5ce4c7127 Feat: ajout nouveau champ sendTime #6945 @0h20 2018-08-07 14:27:25 +02:00
Thomas MONCHICOURT 18c12c3b3a Feat : modification design #6945 @2h 2018-08-07 10:45:45 +02:00
Thomas MONCHICOURT 13adc1b87c Fix : design retour corentin #6945 @1h15 2018-08-03 11:54:53 +02:00
Thomas MONCHICOURT 75e0f4b99e Fix : dropzone error 2018-08-03 11:53:59 +02:00
Thomas MONCHICOURT 9d659eea7e Fix : count pour candidature spontanée 2018-08-01 16:35:00 +02:00
Thomas MONCHICOURT 8a987d48c1 Feat : modification listing answer 2018-08-01 16:32:58 +02:00
Thomas MONCHICOURT e6d9c72f62 Feat : Candidature spontané talent #6945 @0h20 2018-08-01 15:13:10 +02:00
Thomas MONCHICOURT a92ab7f3cc Feat : Url candidature 2018-08-01 15:08:06 +02:00
Thomas MONCHICOURT d1c37dfd23 Merge branch 'develop' of https://git.e-declic.net/talents-tube/website into develop 2018-08-01 14:57:36 +02:00
Thomas MONCHICOURT a9b16a7a84 Feat : Ajout du détail d’une réponse pour le talent #6945 @1h 2018-08-01 14:57:31 +02:00
Thomas MONCHICOURT 962b9f0633 Fix : facebook connexion
# Conflicts:
#	volume/www/website/www/src/AppBundle/Security/Core/User/FOSUBUserProvider.php
2018-08-01 13:38:56 +02:00
Maxime Thévenot d413fee495 Merge branch 'develop' of https://git.e-declic.net/talents-tube/website into develop 2018-08-01 13:36:33 +02:00
Maxime Thévenot 058763fdbb Feat : update territory on index page 2018-08-01 13:36:28 +02:00
Thomas MONCHICOURT b19184b11b Fix : Correction dashboard recommendation 2018-08-01 11:26:20 +02:00
Thomas MONCHICOURT 642958639c Fix : admin dashboard 2018-08-01 11:24:30 +02:00
Thomas MONCHICOURT 353151a440 Merge branch 'feat/reponse-video' into develop
# Conflicts:
#	volume/www/website/www/app/Resources/views/company/ad_table_listing.html.twig
#	volume/www/website/www/app/Resources/views/company/answer_show.html.twig
#	volume/www/website/www/web/css/styles.css.map
2018-08-01 11:13:37 +02:00
Thomas MONCHICOURT 4bb64ce3e2 Feat : Tableau candidatures #6945 @0h15 2018-08-01 11:09:40 +02:00
Thomas MONCHICOURT c9d52ed240 Feat : Page candidature #6945 @1j 2018-08-01 10:41:09 +02:00
Thomas MONCHICOURT 0c808e2513 Feat : process annonce #6945 @2h 2018-08-01 09:36:46 +02:00
Thomas MONCHICOURT 7e22a202c2 feat : process réponse en vidéo style #6945 @2h30 2018-07-31 12:34:17 +02:00
Maxime Thévenot 8907b9232a Feat : update ad sort order on company_show 2018-07-31 09:58:30 +02:00
Thomas MONCHICOURT 1f588171ef Feat : réponse en vidéo #6945 @2h 2018-07-30 17:00:46 +02:00
Maxime Thévenot 681e5add11 Fix : update typo in nginx conf 2018-07-30 16:28:34 +02:00
Maxime Thévenot 16145c81c0 Conf : update preprod nginx conf 2018-07-30 16:25:30 +02:00
Maxime Thévenot 8a3f502129 Merge branch 'feat/recommandation' into develop 2018-07-30 15:58:54 +02:00
Maxime Thévenot aad4dcb110 Feat : add admin space for recommendation 2018-07-30 14:58:56 +02:00
Thomas MONCHICOURT 129dd22cbb Feat: réponses vidéo #6945 @1h 2018-07-30 12:23:34 +02:00
Thomas MONCHICOURT 2387b1c922 Feat: reponse #6945 @0h15 2018-07-27 17:33:28 +02:00
Thomas MONCHICOURT c43a7655e7 Feat : design page reponse #6945 @2h 2018-07-27 17:10:53 +02:00
Thomas MONCHICOURT 55e8eaf6cd Feat: Design page reponse #6945 @1h30 2018-07-27 12:25:40 +02:00
Thomas MONCHICOURT db9f554792 Merge branch 'feat/recommandation' into feat/reponse-video 2018-07-27 11:20:01 +02:00
Thomas MONCHICOURT 820cc048eb feat: reponse video #6945 @1h30 2018-07-26 16:12:08 +02:00
Maxime Thévenot 1c99889e89 Fix : add missing quote 2018-07-26 15:25:38 +02:00
Maxime Thévenot 552c9ecf9e Merge branch 'feat/upload-video-nologin' into develop
# Conflicts:
#	volume/www/website/www/web/css/styles.css.map
2018-07-26 15:17:54 +02:00
Maxime Thévenot 8bb8afbee7 Feat : add cv import page without answer 2018-07-26 15:17:30 +02:00
Thomas MONCHICOURT daee96533d feat: réponse en vidéo #6945 @3h 2018-07-26 12:24:11 +02:00
root c09f6f0b62 Conf : git erver side updated files 2018-07-26 10:05:47 +02:00
Maxime Thévenot 7494173cde Fix : set store in noindex nofollow 2018-07-26 09:25:06 +02:00
Maxime Thévenot 0dcc5111f4 Fix: set noindex on spontaneous answer 2018-07-25 16:11:44 +02:00
Maxime Thévenot 4cdd9dc256 WIP : cv import pages 2018-07-25 14:17:40 +02:00
Maxime Thévenot 00f38cf4f7 Fix : change fosuser provider and fix admin connection 2018-07-24 15:52:16 +02:00
Maxime Thévenot 5ab04175b8 Feat : update tabs in company dashboard 2018-07-23 16:55:48 +02:00
Maxime Thévenot ce3eda07b4 Feat : add link to answers on ad title in list 2018-07-23 16:24:19 +02:00
Maxime Thévenot 3b4ebf343a Feat : delete recommendation process 2018-07-23 14:50:35 +02:00
Thomas MONCHICOURT c9b4a2b30f Feat : Mise en place d’un message prevention sur safari #6307 @0h15 2018-07-20 14:33:38 +02:00
Thomas MONCHICOURT acb87af087 Merge branch 'feat/recommandation' of https://git.e-declic.net/talents-tube/website into feat/recommandation 2018-07-20 14:12:52 +02:00
Thomas MONCHICOURT 8a14b86f03 Feat : modification listing front 2018-07-20 14:12:48 +02:00
Maxime Thévenot c05edac0fd Fix : typo in modale naming 2018-07-20 09:19:53 +02:00
Thomas MONCHICOURT 7a2be30f15 Feat : style css merge 2018-07-19 17:34:43 +02:00
Thomas MONCHICOURT e183729687 Merge branch 'feat/recommandation' of https://git.e-declic.net/talents-tube/website into feat/recommandation
# Conflicts:
#	volume/www/website/www/src/AppBundle/Controller/RecommendationController.php
#	volume/www/website/www/web/css/styles.css
2018-07-19 17:28:10 +02:00
Thomas MONCHICOURT ce498eb526 Feat : Mise en place des recommandation en front #6838 @2h 2018-07-19 17:26:34 +02:00
Maxime Thévenot 4d09bf2ddf Feat : add modal to see recommendation video 2018-07-19 17:24:51 +02:00
Maxime Thévenot d8ee626298 Feat : add toggle for recommendation visibility 2018-07-19 15:56:57 +02:00
Maxime Thévenot 50e9f45369 Feat : Add tabs to navigate between pages - recommendations 2018-07-19 15:19:03 +02:00
Maxime Thévenot c9663ab0d9 Feat : update css, add link to recommendations 2018-07-19 14:56:27 +02:00
Thomas MONCHICOURT 33fc07121b Fix : suite merge 2018-07-19 11:31:01 +02:00
Thomas MONCHICOURT a71e6692a6 Merge branch 'feat/recommandation' of https://git.e-declic.net/talents-tube/website into feat/recommandation
# Conflicts:
#	volume/www/website/www/src/AppBundle/Controller/RecommendationController.php
2018-07-19 11:29:26 +02:00
Thomas MONCHICOURT 2ef6707342 Feat : Recommendation front #6838 @2h30 2018-07-19 11:27:20 +02:00
Maxime Thévenot 728f16ee06 Feat : add recommendation lsit pages for talent 2018-07-19 11:25:53 +02:00
Maxime Thévenot 05d9bcced2 Feat : add nullable to relationType field 2018-07-19 11:04:29 +02:00
Thomas MONCHICOURT 7d2f3353eb Merge branch 'feat/recommandation' of https://git.e-declic.net/talents-tube/website into feat/recommandation 2018-07-18 17:32:24 +02:00
Thomas MONCHICOURT 5d4249984d Feat : Mise en place controller et check talent #6838 @2h 2018-07-18 17:32:21 +02:00
Maxime Thévenot d7114a0219 Feat : add recommandation form 2018-07-18 14:48:14 +02:00
Maxime Thévenot 672d2148c2 Feat : add recommendation entity and relations 2018-07-18 14:32:54 +02:00
12212 changed files with 336708 additions and 66984 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ endif
DC_OVERRIDE := $(shell test -e conf/docker-compose.override.yml && echo "--file conf/docker-compose.override.yml")
DC_OVERRIDE_ENV := $(shell test -e conf/docker-compose.$(ENV).yml && echo "--file conf/docker-compose.$(ENV).yml")
DC=ENV=$(ENV) CLIENT=$(CLIENT) $(DOCKERCOMPOSE) --project-name "$(CLIENT)_$(ENV)" --file conf/docker-compose.yml $(DC_OVERRIDE) $(DC_OVERRIDE_ENV)
DC=ENV=$(ENV) CLIENT=$(CLIENT) "$(DOCKERCOMPOSE)" --project-name "$(CLIENT)_$(ENV)" --file conf/docker-compose.yml $(DC_OVERRIDE) $(DC_OVERRIDE_ENV)
default:
$(info $(USAGE))
+13
View File
@@ -0,0 +1,13 @@
version: '3'
services:
nginx:
networks:
- default
- frontnginx_front
networks:
default:
driver: bridge
frontnginx_front:
external: true
+9 -31
View File
@@ -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;
}
+2 -1
View File
@@ -11,4 +11,5 @@ rewrite ^/page/presentation-talent$ https://www.talentstube.com/cv-video perma
rewrite ^/page/la-plateforme$ https://www.talentstube.com/ permanent;
rewrite ^/tarifs$ https://www.talentstube.com/accompagnement-entreprise permanent;
rewrite ^/annonce/38-charge-de-projets-developpement-h-f$ https://www.talentstube.com/annonce/38-charge-de-projets-developpement-cosmetique-h-f permanent;
rewrite ^/annonce/recherche/$ https://www.talentstube.com/annonce/recherche permanent;
rewrite ^/annonce/recherche/$ https://www.talentstube.com/annonce/recherche permanent;
rewrite ^/territoire/1573-communaute-d-agglomeration-castres-mazamet/$ https://www.talentstube.com/territoire/1573-castres-mazamet/ permanent;
+10
View File
@@ -48,6 +48,16 @@ class AppKernel extends Kernel
//oAuth
new Http\HttplugBundle\HttplugBundle(),
new HWI\Bundle\OAuthBundle\HWIOAuthBundle(),
//CookieBar
new Fairlane\CookieConsentBundle\FairlaneCookieConsentBundle(),
//Api
new JMS\SerializerBundle\JMSSerializerBundle(),
new FOS\RestBundle\FOSRestBundle(),
new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
new Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle(),
new Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle(),
];
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
@@ -15,7 +15,7 @@
</p>
{% endif %}
<br/><br/>
{% if app.request.cookies.get('redirect_register')is defined %}
{% if app.request.cookies.get('redirect_register') is defined and app.request.cookies.get('redirect_register') is not null %}
<div class="center">
<a href="{{ app.request.cookies.get('redirect_register') }}" class="btn btn-default">Poursuivre votre candidature</a>
</div>
@@ -0,0 +1,46 @@
{% if fairlane_cookie_consent.active == true and app.request.cookies.get('fairlane-cookie-consent') != 'ok'%}
{% if fairlane_cookie_consent.translate == true %}
{% set text_info = fairlane_cookie_consent.twig.text_info | trans %}
{% set text_additional_info_link = fairlane_cookie_consent.twig.text_additional_info_link | trans %}
{% set text_accept_button = fairlane_cookie_consent.twig.text_accept_button | trans %}
{% else %}
{% set text_info = fairlane_cookie_consent.twig.text_info %}
{% set text_additional_info_link = fairlane_cookie_consent.twig.text_additional_info_link %}
{% 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 %}>
<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">
jQuery(document).ready(function() {
jQuery("#fairlane-cookie-consent button").click(function(){
jQuery.ajax({
async: true,
type: 'POST',
url: '{{ url('fairlane_cookie_consent_accept') }}',
data: JSON.stringify({'cookie-consent': 'ok'}),
success: function(data) {
jQuery("#fairlane-cookie-consent").fadeOut("fast");
},
contentType: "application/json",
dataType: 'json'
});
})
});
</script>
{% endif %}
{% endif %}
@@ -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 dinformations</target>
</trans-unit>
<trans-unit id="CONTACTED">
<source>CONTACTED</source>
<target>Demande dinformations</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 lactiver 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>
@@ -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 %}
@@ -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">&times;</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 %}
@@ -53,9 +53,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) }}
@@ -21,7 +21,7 @@
<script type="text/javascript" defer="defer" src="https://extend.vimeocdn.com/ga/64189815.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>{% block title %}Talents Tube : Le 1er job board 100% vidéo{% endblock %}</title>
<title>{% block title %}Talents Tube : La 1ère plateforme pour lemploi 100% vidéo{% endblock %}</title>
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}"/>
{% block metarobot %}<meta name="robots" content="index,follow">{% endblock %}
@@ -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&amp;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 %}
@@ -83,5 +81,6 @@
<script src="{{ asset_url }}"></script>
{% endjavascripts %}
{% endblock %}
{{ include('FairlaneCookieConsentBundle::cookie-info.html.twig') }}
</body>
</html>
@@ -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>&nbsp; {{ 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>
@@ -33,6 +33,9 @@
<li>
<a class="white-text" href="{{ path('service_cgu') }}">Conditions générales d'utilisation</a>
</li>
<li>
<a class="white-text" href="{{ path('page_Confidentialite') }}">Politique de confidentialité et protection des données</a>
</li>
</ul>
</div>
<div class="col xl3 l3 m6 s12 left-align">
@@ -7,9 +7,10 @@
<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="Listes entreprises">Listes entreprises</a></li>
<li><a href="{{ path('company_list') }}" title="Les entreprises qui recrutent">Les entreprises qui recrutent</a></li>
<li><a href="{{ path('page_OffreEmploi') }}" title="L'offre d'emploi en vidéo">L'offre d'emploi en vidéo</a></li>
<li><a href="{{ path('page_reussirOffrevideo') }}" title="Comment faire une offre en vidéo">Comment faire une offre en vidéo</a></li>
<li><a href="{{ path('page_MarqueEmployeur') }}" title="Vidéo Marque Employeur">Vidéo Marque Employeur</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 lemploi <span>100% vidéo</span></h1><br />
<h1 class="white-text center-align">1ère plateforme pour lemploi
<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 &nbsp;&nbsp;&nbsp;
<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&nbsp;!</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&nbsp;!</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 lentreprise {{ 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 lentreprise {{ 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 lentreprise ?</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>&nbsp; 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>&nbsp; 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 %}
@@ -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>&nbsp; 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'
+43 -3
View File
@@ -59,10 +59,26 @@ doctrine:
naming_strategy: doctrine.orm.naming_strategy.underscore
mappings:
AppBundle: ~
fairlane_cookie_consent:
active: true
use_bootstrap: true
use_jquery: true
translate: false
cookie_lifetime: 90 # days
twig:
text_info: 'Notre site utilise des cookies et recueille des informations vous concernant à des fins fonctionnelles et / ou publicitaires. Nous vous invitons à accepter la collecte ou configurer vos choix. Vous pouvez modifier vos paramètres à tout moment.'
text_accept_button: 'Accepter'
text_additional_info_link: 'En savoir plus'
url_additional_info: 'https://www.talentstube.com/confidentialite'
# Twig Configuration
twig:
debug: "%kernel.debug%"
strict_variables: "%kernel.debug%"
globals:
fairlane_cookie_consent: '@fairlane_cookie_consent.twig'
# Swiftmailer Configuration
swiftmailer:
@@ -96,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%
@@ -211,4 +227,28 @@ monolog:
level: debug
type: rotating_file
max_files: 15
path: '%kernel.logs_dir%/%kernel.environment%_debug.log'
path: '%kernel.logs_dir%/%kernel.environment%_debug.log'
#Api
fos_rest:
zone:
- { path: ^/api/* }
body_converter:
enabled: true
view:
formats: { json: true, xml: false, rss: false }
view_response_listener: true
mime_types:
json: ['application/json', 'application/json;version=1.0', 'application/json;version=2.0']
serializer:
serialize_null: true
format_listener:
rules:
- { path: '^/api/', priorities: ['json'], fallback_format: 'json' }
param_fetcher_listener: true
lexik_jwt_authentication:
secret_key: '%kernel.root_dir%/../app/config/jwt/private.pem' # required for token creation
public_key: '%kernel.root_dir%/../app/config/jwt/public.pem' # required for token verification
pass_phrase: 'talentstubeforever' # required for token creation, usage of an environment variable is recommended
token_ttl: 3600
@@ -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:
@@ -0,0 +1,54 @@
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-256-CBC,1B8B1CB3A64B49F820DD713907974037
0/ahxIYlJ0RiiOqRz78LbR7g+UvBC8r4RrMWFCIOuh/FPbTYyIc0VxRMObrTqvHv
B4oUMnTzHzkOimvLWncZSIA39TL2OuQMTT7g/Cp8uh7Exnf29js7Ywv8EAQA2trw
EsLXjH5St3vLhWLQdxVUBY6tWc5yuqTJ3ze9rFojiJ0mbIoeid7L8sI4mQAocfX2
2/aMWwhQX83AJaRC7liU18nZAP4gAxYjvLAaC6zj7M3wxPv1r3Ox2PuSUfYZFkYA
HbVYq6pi/Dw32CmCniufccSr2wd0f78fZdI/E20tdAviLN6awqrjM2aFgzqZ6zw/
UCD3L1hLfGxRk6uYAFgEiFQB7dT4ZzqjopKNsVuho+DTc55kmx8iPD3xXuTMbeUY
SgiV4KcGCbHRt1HGWWbJgyOkSaPQQQk5Bf63glS4nLVNqzIqzJmpVCKuwOpKCSnK
DTeWpw9MIHLHM4SD2OM8Hh8S8l6v+Y4ash6mEtUNh6a7N+TQ1vEn/wyt8wyM7/Fh
UY/97loUyu0HC2Ox89sP1y6VcNaRQlhNj9hZzLC/q5K+Z4zAQRnGPuTowZL7ztxZ
BD+MTnNZc+Akrti+3c1vAHxzuUoBd7h8NX2pnNNUY2Wme9JqfZnCx9fV4AwVOvx6
8mvTQL5YHOv8HpsGnDoOak1r+QzHM8IrL8SSrJ/DBXMIWmFefhcIDgrXZG8LV+ck
RlSuP5Lsyy3e8AQ6hrM06DXkhjGi7gCeHIHySbzw0AiFERQz0d7XgU75DL/ALPqh
0lyqlXdrx/+qqTc0wwjYIerNLNdVqN9kvLg+aqFSwZrfiZyEy6rYdUoqYXoInwle
QBt2uqcjVUhMwdQYaDWiqHidSpIMP5nuTKDm6Z8J/SLf4iy+It1qXUEcoRKhDavm
fy+dw3JvthpoNjP3Bq+moygP8J8msS5Ti3UgVug21Fsp89fmvUO8FO2JRXLXP8+U
3HG1Ij/KKk1dxC6PT7qu9gVeoKM+W8maCVV/O84Qx/N3aXY+sHm1HsSssg0cLEC7
zaEai16xhVGI8aagYwxBHVkVVXk/CBS7zq1JYBnZOIw56d1NTjvJ3YmTx619Hyek
PJuMNjGV4mM0jONzHJbI6deE2B+f1/ej1JwoeGyBhynrZjwtTCd3JAtwRK9WO1fq
owdoCAnDOV7yDcwfFEYaNV2ie/R/kQo/fIIanykQs59Op2M0yhLvmch+C3RghLVg
qfR3Jngbqjwz/uh5ZQShZtHFirdAyer/eLD0CteDt4TrAiQxiHqrEOdqwF/G/STq
+3SSkChf6uhqUUqfmJFwxaF6AiNTkdk0YyxucWY2JXYf3qyz7ADGnI/KZZ+1LchF
2bLUKjyjnFKQoaFtDd7qMGxrTD80egN/fFV4Nybt+DTsGjdUjvCFS69j+YvZ0vIP
8rZHK7etISTfiauP9SrIR9UKpNA8fGrUgJGOMo/5Wkz4YS6LmMceQkpDxj46p8Ia
Iv+pOKez6NsckP1OiDfTxLtXL1S3xQHP3V0dYI5UcWt8Bczi2VylZCcS8JiV8Cqy
+EYRaIB9Qi1X5uLQsbiyS70rJp9mJ3xUR2dIzD70njCIDtLPA2b9dXqXm1IyqdkB
46W0MOnyI699XgiywvPovwhzTH8uO5Xn5gnjEgD92pHdJ2iTVQDTC9qtKhODrhbC
ouOCbS/LPAnQMwlLD1rWAeJcBJ3PL1KdAlaxWq3Jd/iMhDh/hSboS88Lm88RYtBh
3DhMCyxY1gu6jyzuWN2pHKzCvZ1Aqqm1SMS/8nAPe/KtPJO7zTRQJIrrfPK1pt2B
u5tu1zupVKihoRkLZtV4FUwDBo8DE9V65b/LAJZtuId77ci7aWRoD5b1Lc9X9iyH
cFJTQbMxzA76/8F9/Y1h8D9mdP+N9Tfw6iOvRxszqciGAsUasqo4Xm3ZOQqCcOo5
djoywGnzqsfxrV733i2KHRqz7XUkLf8n6URloH2i1tSbHWl7fmYAC0N85IUs1PxQ
DB0LUtQgS03gjE4pRJSlgf8JX/0KrG8sYpcvz9R5CqMKrkM6rDy6ehe4P5xVQ+3m
WNCZFfGjCTcuEVLFDNx8CdF8qIV/BCcUSty7KXXoC3AMOAsVlZSwskmKN61GJmBS
Sz1bDwZO6QCZgXR2fH0UMEnCkpksS4xf3f0oq5/WzWzC4ZaDHnwt5NqKE8XXeYpn
isulqUFmCK2VhkqRX1rwND8E45yDG8+U5lyJSHp4y8Fe+AEQjxXUxXDefc80s09i
LMXM7iNUtESFge3BZvocdRrqvp21tkPElzaDoW0nMb0VoNI4Xfe113vBeBdEq0Hr
yuGvM8ZgvKjzl1T4h9PTaBu97kR1QjBSiY0PeEeSMtq/W1XbFO5jU4g/utVRluBm
z64kldtRW1RC8vosrN4sNbdVDAvL43Dynl0wYMI+jgIN3HP2QnOTDH1MLQ5BJZg4
aZFSMZ70e9kF2HXpFnfp+SsuT0lMhzZrSrLvKg0pkuD8jc7FtP/HoLcay2doBufd
fS4VheiaGm7om9Ggmkowld1CUpuzfyi7NDcymWH6J37Ypcvprn1Ts9iBcBDaOsbZ
T3pP0mU4glmRPFRq2IRZXOgTQFXIJKYFpnt0LCC2IuzbQLTKy0LVr6Ksc6ZD21j5
AR/xblSp8dZDS4ltrN44r+rtcio7dN9KlDctURpoqdw8oatwpk5QLFfYeMKPRn6j
yQA4tatWlTxr/UR8Xy8JNcJfg7JQIYjdf36atxpv5xYvnkf6Gs56xVnRthwNYawn
h44emyq/Tuflc9FZqptUDwEPKzLvH0NWxVkNvGG92H0OtES3q9OpGPTnqhIPUTme
Jrbu7knwD5sdzYRh64BhbXem8glPStYnW7B0dSdvyvGpArF1W2cKKURgnr7XokrB
DqbeSpdRf7fE5bw9jHJgcpUJOZ3o6kGA3l309Cdcbigm7gnK0KiY0y/P8MSWEu00
C4WZOFLxuaO1iVav+spACFbFkdVmLoRBPE2hFUc6BA3E/7qNHAjlVYXbUrIR3NA+
iioXf1XFM7K0LG02mMKEFSuWIpZacDyAfjHUlrid7cFBBXLk/EWcwNyGSlRdQl7w
rn7V+QfAdTxmk2FAyO80odbrdZQaBR6oLZaFgz/MzkT6dLJXwCjKG/qJrwwV/2sv
-----END RSA PRIVATE KEY-----
@@ -0,0 +1,14 @@
-----BEGIN PUBLIC KEY-----
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA0emZKHHTXLKphYp1XLeh
YApXdcWoZenqaFeE9pa3yzP888bsvka7t41JZy7+LOACkjnZj8VQNhMl/JIwtuv8
L276Tox94l1CeLSDvH0vxGAvCyZzpW4pgx2xAJk1xWndkEWcx/6A7/kgdePOFNJt
41JdDsefqRMlsMjw5vCxxX4V1mlebi6owKkxVBXii476xheX1M2k3cfVbC95h++h
Yd7h10DwA17SPbmIDN07QygKqRH7RGkEU5gK2Psc+NFstmYaYj4ew1NF4X9e2Erj
5M3RnYoUfkQBaigv+GSjefL6zdp+yZwjrPtZo+YDC/M1SQLEPAsoxQZvOISrLtkH
usqdvLB8rsVysZOipJyO3OClI+Vvqy9p4CggM3rHlpzMu+e+sgpZersaNxDEz/rX
J/rMXpPTfkVSRMddkQ/s0e0w4oop/tr2Zi4fYfmaJ2Ha49PFBPT7buZeyabLyAOk
utwRBkaGiUGmfVidlb0TMK2fQQOS5WottAJJOhEDzl7woCtCBgCeclsuM6v/EDd/
9KCeMcWrx7/PHBH2I8RGSfoqTKrZ8plOOPccaY2G6zZjvceExyBjewlzOm5zXI7Z
c/L5H9mghOdLjEJ+eRLZIYL9yw1LSDjY3Q0ENkxdvkMdVnZxmsf+UFMFdxBU3VjB
hqeH8T9lC2ZWC8OJ5kA4y4ECAwEAAQ==
-----END PUBLIC KEY-----
@@ -24,4 +24,4 @@ parameters:
media_photo_dir: '%kernel.root_dir%/../web/uploads/photos/'
elastic_host: tt-website.elasticsearch.dev
elastic_port: 9200
delivery_addresses: thomas@e-declic.com
delivery_addresses: maxime.thevenot@e-declic.com
@@ -38,4 +38,6 @@ parameters:
# Elastic
elastic_host: tt.search_db
elastic_port: 9200
elastic_port: 9200
delivery_addresses: maxime.thevenot@e-declic.com
@@ -19,4 +19,10 @@ hwi_oauth_connect:
hwi_oauth_redirect:
resource: "@HWIOAuthBundle/Resources/config/routing/redirect.xml"
prefix: /login
prefix: /login
fairlane_cookie_consent:
resource: "@FairlaneCookieConsentBundle/Resources/config/routing.yml"
api_login_check:
path: /api/login_check
+28 -3
View File
@@ -3,14 +3,33 @@ 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:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
api_login:
pattern: ^/api/login_check
stateless: true
anonymous: true
provider: fos_userbundle
json_login:
check_path: /api/login_check
success_handler: lexik_jwt_authentication.handler.authentication_success
failure_handler: lexik_jwt_authentication.handler.authentication_failure
api:
pattern: ^/api
stateless: true
anonymous: true
provider: fos_userbundle
guard:
authenticators:
- lexik_jwt_authentication.jwt_token_authenticator
main:
pattern: ^/
remember_me:
@@ -33,6 +52,8 @@ security:
anonymous: true
switch_user:
provider: fos_userbundle
access_control:
- { path: ^/login$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/register, roles: IS_AUTHENTICATED_ANONYMOUSLY }
@@ -44,6 +65,10 @@ security:
- { path: ^/talent/recherche/, roles: ROLE_COMPANY }
- { path: ^/entreprise/me/, roles: ROLE_COMPANY }
- { path: ^/territoire/me/, roles: ROLE_TERRITORY }
- { path: ^/api/login_check, roles: IS_AUTHENTICATED_ANONYMOUSLY}
- { path: ^/api/login_check_oauth, roles: IS_AUTHENTICATED_ANONYMOUSLY}
- { path: ^/api, roles: IS_AUTHENTICATED_FULLY, methods: [POST, PUT, DELETE, PATCH] }
- { path: ^/api, roles: IS_AUTHENTICATED_ANONYMOUSLY, methods: [GET]}
encoders:
FOS\UserBundle\Model\UserInterface: bcrypt
@@ -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
@@ -75,3 +79,6 @@ services:
app.user_provider:
class: AppBundle\Security\Core\User\FOSUBUserProvider
arguments: ["@fos_user.user_manager","@doctrine.orm.entity_manager","@mt.slug","@service_container", { facebook: facebookId, linkedin: linkedinId}]
app.api_key_authenticator:
class: AppBundle\Security\ApiKeyAuthenticator
+11 -4
View File
@@ -23,8 +23,8 @@
},
"require": {
"php": ">=5.5.9",
"symfony/symfony": "3.2.*",
"doctrine/orm": "2.6.*@dev",
"symfony/symfony": "3.4.*",
"doctrine/orm": "^2.6.2",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-cache-bundle": "^1.2",
"symfony/swiftmailer-bundle": "^2.3.10",
@@ -37,7 +37,6 @@
"friendsofsymfony/user-bundle": "~2.0",
"doctrine/mongodb-odm-bundle": "^3.0",
"doctrine/mongodb-odm": "^1.0",
"alcaeus/mongo-php-adapter": "^1.0",
"dunglas/doctrine-json-odm": "dev-master",
"php-ffmpeg/php-ffmpeg": "^0.5",
"requestlab/vimeo-bundle": "^0.0.3",
@@ -50,7 +49,15 @@
"php-http/httplug-bundle": "^1.8",
"symfony/assetic-bundle": "^2.8",
"friendsofsymfony/elastica-bundle": "4.1.*",
"liip/imagine-bundle": "^1.9"
"liip/imagine-bundle": "^1.9",
"twig/extensions": "^1.5",
"fairlane/cookie-consent-bundle": "^1.0",
"jms/serializer-bundle": "^2.4",
"friendsofsymfony/rest-bundle": "^2.4",
"symfony/twig-bundle": "^4.1",
"white-october/pagerfanta-bundle": "^1.2",
"willdurand/hateoas-bundle": "^1.4",
"lexik/jwt-authentication-bundle": "^2.5"
},
"require-dev": {
"sensio/generator-bundle": "^3.0",
+2048 -355
View File
File diff suppressed because it is too large Load Diff
@@ -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,
));
}
}
@@ -0,0 +1,86 @@
<?php
namespace AppBundle\Controller\Api;
use AppBundle\Entity\Ad;
use AppBundle\Representation\Ads;
use AppBundle\Representation\SingleAd;
use FOS\RestBundle\Controller\Annotations as Rest;
use FOS\RestBundle\Controller\Annotations\Get;
use FOS\RestBundle\Controller\Annotations\Post;
use FOS\RestBundle\Controller\Annotations\View;
use FOS\RestBundle\Controller\FOSRestController;
use FOS\RestBundle\Request\ParamFetcherInterface;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
class AdController extends FOSRestController
{
/**
* @Rest\Get(path="/api/ads/{id}", name="api_ad_show", requirements={"id"="\d+"})
* @Rest\View
*
*/
public function showAction(Ad $ad)
{
// return $ad;
return new SingleAd($ad);
}
/**
* @Rest\Get("/api/ads", name="api_ad_list")
* @Rest\QueryParam(
* name="keyword",
* requirements="[a-zA-Z0-9]",
* nullable=true,
* description="The keyword to search for."
* )
* @Rest\QueryParam(
* name="order",
* requirements="asc|desc",
* default="asc",
* description="Sort order (asc or desc)"
* )
* @Rest\QueryParam(
* name="limit",
* requirements="\d+",
* default="15",
* description="Max number of ads per page."
* )
* @Rest\QueryParam(
* name="offset",
* requirements="\d+",
* default="1",
* description="The pagination offset"
* )
* @Rest\View(StatusCode = 200)
*/
public function listAction(ParamFetcherInterface $paramFetcher)
{
$pager = $this->getDoctrine()->getRepository('AppBundle:Ad')->search(
$paramFetcher->get('keyword'),
$paramFetcher->get('order'),
$paramFetcher->get('limit'),
$paramFetcher->get('offset')
);
return new Ads($pager);
}
/**
* @Rest\Post("/api/ads", name="api_ad_create")
* @Rest\View(StatusCode = 201)
* @ParamConverter("ad", converter="fos_rest.request_body")
*/
public function createAction(Ad $ad)
{
$em = $this->getDoctrine()->getManager();
$em->persist($ad);
$em->flush();
return $this->view(
new SingleAd($ad),
Response::HTTP_CREATED,
['Location' => $this->generateUrl('api_ad_show', ['id' => $ad->getId(), UrlGeneratorInterface::ABSOLUTE_URL])]);
}
}
@@ -0,0 +1,79 @@
<?php
namespace AppBundle\Controller\Api;
use AppBundle\Entity\Answer;
use AppBundle\Representation\Answers;
use AppBundle\Representation\SingleAnswer;
use FOS\RestBundle\Controller\Annotations as Rest;
use FOS\RestBundle\Controller\Annotations\Get;
use FOS\RestBundle\Controller\Annotations\Post;
use FOS\RestBundle\Controller\Annotations\View;
use FOS\RestBundle\Controller\FOSRestController;
use FOS\RestBundle\Request\ParamFetcherInterface;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
class AnswerController extends FOSRestController
{
/**
* @Rest\Get(path="/api/answers/{id}", name="api_answer_show", requirements={"id"="\d+"})
* @Rest\View
*
*/
public function showAction(Answer $answer)
{
// return $answer;
return new SingleAnswer($answer);
}
/**
* @Rest\Get("/api/answers", name="api_answer_list")
* @Rest\QueryParam(
* name="order",
* requirements="asc|desc",
* default="asc",
* description="Sort order (asc or desc)"
* )
* @Rest\QueryParam(
* name="limit",
* requirements="\d+",
* default="15",
* description="Max number of answers per page."
* )
* @Rest\QueryParam(
* name="offset",
* requirements="\d+",
* default="1",
* description="The pagination offset"
* )
* @Rest\View(StatusCode = 200)
*/
public function listAction(ParamFetcherInterface $paramFetcher)
{
$pager = $this->getDoctrine()->getRepository('AppBundle:Answer')->search(
$paramFetcher->get('order'),
$paramFetcher->get('limit'),
$paramFetcher->get('offset')
);
return new Answers($pager);
}
/**
* @Rest\Post("/api/answers", name="api_answer_create")
* @Rest\View(StatusCode = 201)
* @ParamConverter("answer", converter="fos_rest.request_body")
*/
public function createAction(Answer $answer)
{
$em = $this->getDoctrine()->getManager();
$em->persist($answer);
$em->flush();
return $this->view(
new SingleAnswer($answer),
Response::HTTP_CREATED,
['Location' => $this->generateUrl('api_answer_show', ['id' => $answer->getId(), UrlGeneratorInterface::ABSOLUTE_URL])]);
}
}
@@ -0,0 +1,79 @@
<?php
namespace AppBundle\Controller\Api;
use AppBundle\Entity\Company;
use AppBundle\Representation\Companys;
use AppBundle\Representation\SingleCompany;
use FOS\RestBundle\Controller\Annotations as Rest;
use FOS\RestBundle\Controller\Annotations\Get;
use FOS\RestBundle\Controller\Annotations\Post;
use FOS\RestBundle\Controller\Annotations\View;
use FOS\RestBundle\Controller\FOSRestController;
use FOS\RestBundle\Request\ParamFetcherInterface;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
class CompanyController extends FOSRestController
{
/**
* @Rest\Get(path="/api/companies/{id}", name="api_company_show", requirements={"id"="\d+"})
* @Rest\View
*
*/
public function showAction(Company $company)
{
// return $company;
return new SingleCompany($company);
}
/**
* @Rest\Get("/api/companies", name="api_company_list")
* @Rest\QueryParam(
* name="order",
* requirements="asc|desc",
* default="asc",
* description="Sort order (asc or desc)"
* )
* @Rest\QueryParam(
* name="limit",
* requirements="\d+",
* default="15",
* description="Max number of companys per page."
* )
* @Rest\QueryParam(
* name="offset",
* requirements="\d+",
* default="1",
* description="The pagination offset"
* )
* @Rest\View(StatusCode = 200)
*/
public function listAction(ParamFetcherInterface $paramFetcher)
{
$pager = $this->getDoctrine()->getRepository('AppBundle:Company')->search(
$paramFetcher->get('order'),
$paramFetcher->get('limit'),
$paramFetcher->get('offset')
);
return new Companys($pager);
}
/**
* @Rest\Post("/api/companies", name="api_company_create")
* @Rest\View(StatusCode = 201)
* @ParamConverter("company", converter="fos_rest.request_body")
*/
public function createAction(Company $company)
{
$em = $this->getDoctrine()->getManager();
$em->persist($company);
$em->flush();
return $this->view(
new SingleCompany($company),
Response::HTTP_CREATED,
['Location' => $this->generateUrl('api_company_show', ['id' => $company->getId(), UrlGeneratorInterface::ABSOLUTE_URL])]);
}
}
@@ -0,0 +1,33 @@
<?php
namespace AppBundle\Controller\Api;
use FOS\RestBundle\Controller\Annotations as Rest;
use FOS\RestBundle\Controller\Annotations\Post;
use FOS\RestBundle\Controller\Annotations\View;
use FOS\RestBundle\Controller\FOSRestController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
class SecurityController extends FOSRestController
{
/**
* @Rest\Post(path="/api/login_check_oauth", name="api_oauth_login")
* @Rest\View
*/
public function OAuthLoginAction(Request $request)
{
$jwtManager = $this->container->get('lexik_jwt_authentication.jwt_manager');
$token = $request->request->get('oauth-token');
$type = $request->request->get('oauth-type');
if ($type == "facebook") {
$em = $this->getDoctrine()->getManager();
$user = $em->getRepository('AppBundle:User')->findOneByFacebookId($token);
}
return new JsonResponse(['token' => $jwtManager->create($user)]);
}
}
@@ -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"));
}
}
@@ -233,4 +233,17 @@ class PageController extends Controller
]);
}
/**
* @Route("/confidentialite", name="page_Confidentialite")
*/
public function ConfidentialiteAction()
{
$em = $this->getDoctrine()->getManager();
$page = $em->getRepository('AppBundle:Page')->findOneByRef('CONFIDENTIALITE');
return $this->render('default/page.html.twig', [
'page' => $page
]);
}
}
@@ -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 = new \DateTime($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;
}
}
@@ -8,6 +8,9 @@ use AppBundle\Utils\Traits\StatusTrait;
use AppBundle\Utils\Traits\TimestampableTrait;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use JMS\Serializer\Annotation\ExclusionPolicy;
use JMS\Serializer\Annotation\Expose;
use Hateoas\Configuration\Annotation as Hateoas;
/**
* Ad
@@ -15,6 +18,27 @@ use Symfony\Component\Validator\Constraints as Assert;
* @ORM\Table(name="ad")
* @ORM\Entity(repositoryClass="AppBundle\Repository\AdRepository")
* @ORM\HasLifecycleCallbacks()
*
* @ExclusionPolicy("all")
*
* @Hateoas\Relation(
* "self",
* href = @Hateoas\Route(
* "api_ad_show",
* parameters = { "id" = "expr(object.getId())" },
* absolute=true
* )
* )
*
* @Hateoas\Relation(
* "company",
* embedded = @Hateoas\Embedded("expr(object.getCompany())")
* )
*
* @Hateoas\Relation(
* "creator",
* embedded = @Hateoas\Embedded("expr(object.getCreator())")
* )
*/
class Ad
{
@@ -30,6 +54,7 @@ class Ad
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @Expose
*/
private $id;
@@ -37,6 +62,7 @@ class Ad
* @var string
*
* @ORM\Column(name="reference", type="string", length=255)
* @Expose
*/
private $reference;
@@ -44,6 +70,7 @@ class Ad
* @var string
*
* @ORM\Column(name="reference_tt", type="string", length=255)
* @Expose
*/
private $referenceTt;
@@ -51,6 +78,7 @@ class Ad
* @var string
*
* @ORM\Column(name="title", type="string", length=255)
* @Expose
*/
private $title;
@@ -58,6 +86,7 @@ class Ad
* @var string
*
* @ORM\Column(name="alias", type="string", length=255, unique=true, nullable=true)
* @Expose
*/
private $alias;
@@ -65,6 +94,7 @@ class Ad
* @var string
*
* @ORM\Column(name="description", type="text", nullable=true)
* @Expose
*/
private $description;
@@ -73,6 +103,7 @@ class Ad
*
* @ORM\Column(name="published_at", type="datetime", nullable=true)
* @Assert\GreaterThanOrEqual("today", groups={"dates"})
* @Expose
*/
private $publishedAt;
@@ -80,6 +111,7 @@ class Ad
* @var \DateTime
*
* @ORM\Column(name="unpublished_at", type="datetime", nullable=true)
* @Expose
*/
private $unpublishedAt;
@@ -87,6 +119,7 @@ class Ad
* @var boolean
*
* @ORM\Column(name="is_verified", type="boolean", nullable=true, options={"comment":"Etat de vérification"})
* @Expose
*/
private $isVerified;
@@ -94,6 +127,7 @@ class Ad
* @var boolean
*
* @ORM\Column(name="is_promoted", type="boolean", nullable=true, options={"comment":"Peux t'on répondre"})
* @Expose
*/
private $isPromoted;
@@ -101,6 +135,7 @@ class Ad
* @var boolean
*
* @ORM\Column(name="is_private", type="boolean", nullable=true, options={"comment":"Annonce privé, non listée en front"})
* @Expose
*/
private $isPrivate;
@@ -108,6 +143,7 @@ class Ad
* @var boolean
*
* @ORM\Column(name="is_answerable", type="boolean", nullable=true, options={"comment":"Annonce promu ?"})
* @Expose
*/
private $isAnswerable;
@@ -115,6 +151,7 @@ class Ad
* @var integer
*
* @ORM\Column(name="defcon", type="smallint", nullable=true, options={"comment":"Etat d'alerte de modération"})
*
*/
private $defcon;
@@ -122,6 +159,7 @@ class Ad
* @var array
*
* @ORM\Column(name="public_tag", type="json_document", nullable=true, options={"jsonb":true})
* @Expose
*/
private $publicTag;
@@ -129,6 +167,7 @@ class Ad
* @var array
*
* @ORM\Column(name="private_tag", type="json_document", nullable=true, options={"jsonb":true})
* @Expose
*/
private $privateTag;
@@ -136,6 +175,7 @@ class Ad
* @var array
*
* @ORM\Column(name="extra", type="json_document", nullable=true, options={"jsonb":true})
* @Expose
*/
private $extra;
@@ -148,6 +188,7 @@ class Ad
/**
* @ORM\ManyToOne(targetEntity="AppBundle\Entity\Media", inversedBy="ads", cascade={"persist"})
* @Expose
*/
private $video;
@@ -158,6 +199,7 @@ class Ad
/**
* @ORM\ManyToOne(targetEntity="AppBundle\Entity\User", inversedBy="ads")
*
*/
private $creator;
@@ -165,6 +207,7 @@ class Ad
* @var string
*
* @ORM\Column(name="emphasis", type="boolean", options={"comment":"A la une"}, nullable=true)
* @Expose
*/
private $emphasis;
@@ -172,6 +215,7 @@ class Ad
* @var string
*
* @ORM\Column(name="emphasis_order", type="integer", options={"comment":"Ordre"}, nullable=true)
* @Expose
*/
private $emphasisOrder;
@@ -181,6 +225,7 @@ class Ad
/**
* @ORM\OneToMany(targetEntity="AppBundle\Entity\Answer", mappedBy="ad", cascade={"persist", "remove"})
* @ORM\OrderBy({"sendTime" = "DESC"})
*/
private $answers;
@@ -6,6 +6,10 @@ 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;
use JMS\Serializer\Annotation\ExclusionPolicy;
use JMS\Serializer\Annotation\Expose;
use Hateoas\Configuration\Annotation as Hateoas;
/**
* Answer
@@ -13,6 +17,32 @@ use Doctrine\ORM\Mapping as ORM;
* @ORM\Table(name="answer")
* @ORM\Entity(repositoryClass="AppBundle\Repository\AnswerRepository")
* @ORM\HasLifecycleCallbacks()
*
* @ExclusionPolicy("all")
*
* @Hateoas\Relation(
* "self",
* href = @Hateoas\Route(
* "api_answer_show",
* parameters = { "id" = "expr(object.getId())" },
* absolute=true
* )
* )
*
* @Hateoas\Relation(
* "ad",
* embedded = @Hateoas\Embedded("expr(object.getAd())")
* )
*
* @Hateoas\Relation(
* "user",
* embedded = @Hateoas\Embedded("expr(object.getUser())")
* )
*
* @Hateoas\Relation(
* "company",
* embedded = @Hateoas\Embedded("expr(object.getCompany())")
* )
*/
class Answer
{
@@ -27,6 +57,7 @@ class Answer
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @Expose
*/
private $id;
@@ -49,6 +80,7 @@ class Answer
/**
* @ORM\ManyToOne(targetEntity="AppBundle\Entity\Media", inversedBy="answers", cascade={"persist"})
* @Expose
*/
private $video;
@@ -56,6 +88,7 @@ class Answer
* @var int
*
* @ORM\Column(name="vote", type="smallint", nullable=true)
* @Expose
*/
private $vote;
@@ -63,9 +96,18 @@ class Answer
* @var string
*
* @ORM\Column(name="comment", type="text", nullable=true)
* @Expose
*/
private $comment;
/**
* @var \DateTime $sendTime
*
* @ORM\Column(name="send_time", type="datetime", nullable=true)
* @Expose
*/
private $sendTime;
/***********************
* OneToMany Array's
***********************/
@@ -77,6 +119,7 @@ class Answer
/**
* @ORM\OneToMany(targetEntity="AppBundle\Entity\Message", mappedBy="answer", cascade={"persist", "remove"})
* @ORM\OrderBy({"uTime" = "DESC"})
*/
private $messages;
@@ -115,6 +158,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 +413,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;
}
}
@@ -8,6 +8,9 @@ use AppBundle\Utils\Traits\IsVisibleTrait;
use AppBundle\Utils\Traits\TagsJsonTrait;
use AppBundle\Utils\Traits\TimestampableTrait;
use Doctrine\ORM\Mapping as ORM;
use Hateoas\Configuration\Annotation as Hateoas;
use JMS\Serializer\Annotation\ExclusionPolicy;
use JMS\Serializer\Annotation\Expose;
use Symfony\Component\HttpFoundation\File\UploadedFile;
/**
@@ -16,6 +19,18 @@ use Symfony\Component\HttpFoundation\File\UploadedFile;
* @ORM\Table(name="company")
* @ORM\Entity(repositoryClass="AppBundle\Repository\CompanyRepository")
* @ORM\HasLifecycleCallbacks()
*
* @ExclusionPolicy("all")
*
* @Hateoas\Relation(
* "self",
* href = @Hateoas\Route(
* "api_company_show",
* parameters = { "id" = "expr(object.getId())" },
* absolute=true
* )
* )
*
*/
class Company
{
@@ -32,6 +47,7 @@ class Company
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @Expose
*/
private $id;
@@ -39,6 +55,7 @@ class Company
* @var string
*
* @ORM\Column(name="brand_name", type="string", length=255, options={"comment":"Nom commercial"}, nullable=true)
* @Expose
*/
private $brandName;
@@ -46,6 +63,7 @@ class Company
* @var string
*
* @ORM\Column(name="business_name", type="string", length=255, options={"comment":"Raison sociale"}, nullable=true)
* @Expose
*/
private $businessName;
@@ -53,6 +71,7 @@ class Company
* @var text
*
* @ORM\Column(name="description", type="text", length=255, nullable=true)
* @Expose
*/
private $description;
@@ -60,6 +79,7 @@ class Company
* @var text
*
* @ORM\Column(name="description_admin", type="text", length=255, nullable=true)
* @Expose
*/
private $descriptionAdmin;
@@ -67,6 +87,7 @@ class Company
* @var string
*
* @ORM\Column(name="logo", type="string", nullable=true)
* @Expose
*/
private $logo;
@@ -74,6 +95,7 @@ class Company
* @var string
*
* @ORM\Column(name="website", type="string", nullable=true)
* @Expose
*/
private $website;
@@ -81,12 +103,14 @@ class Company
* @var string
*
* @ORM\Column(name="alias", type="string", length=255, unique=true)
* @Expose
*/
private $alias;
/**
* @ORM\OneToOne(targetEntity="AppBundle\Entity\Media", cascade={"persist", "remove"})
* @ORM\JoinColumn(name="presentation_video_id", nullable=true)
* @Expose
*/
private $presentationVideo;
@@ -94,6 +118,7 @@ class Company
* @var string
*
* @ORM\Column(name="type", type="string", nullable=true)
* @Expose
*/
private $type;
@@ -103,6 +128,7 @@ class Company
* @var string
*
* @ORM\Column(name="emphasis", type="boolean", options={"comment":"A la une"}, nullable=true)
* @Expose
*/
private $emphasis;
@@ -110,6 +136,7 @@ class Company
* @var string
*
* @ORM\Column(name="emphasis_order", type="integer", options={"comment":"Ordre"}, nullable=true)
* @Expose
*/
private $emphasisOrder;
@@ -117,6 +144,7 @@ class Company
* @var bool
*
* @ORM\Column(name="searchable", type="boolean", nullable=true)
* @Expose
*/
private $searchable;
@@ -124,6 +152,7 @@ class Company
* @var boolean
*
* @ORM\Column(name="is_private", type="boolean", nullable=true, options={"comment":"Company privé, non listée en front"})
* @Expose
*/
private $isPrivate;
@@ -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;
}
}
@@ -95,6 +95,7 @@ class Page
$pages[] = 'MARQUEEMPLOYEUR';
$pages[] = 'VIDEOTERRITTORY';
$pages[] = 'ACCTERRITTORY';
$pages[] = 'CONFIDENTIALITE';
// $pages[] = '';
return $pages;
@@ -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;
}
}
@@ -6,10 +6,15 @@ use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use FOS\UserBundle\Model\User as BaseUser;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use JMS\Serializer\Annotation\ExclusionPolicy;
use JMS\Serializer\Annotation\Expose;
use Hateoas\Configuration\Annotation as Hateoas;
/**
* @ORM\Entity(repositoryClass="AppBundle\Repository\UserRepository")
* @ORM\Table(name="fos_user")
*
* @ExclusionPolicy("all")
*/
class User extends BaseUser
{
@@ -24,6 +29,7 @@ class User extends BaseUser
* @var string
*
* @ORM\Column(name="firstname", type="string", length=255, nullable=true)
* @Expose
*/
private $firstname;
@@ -31,6 +37,7 @@ class User extends BaseUser
* @var string
*
* @ORM\Column(name="lastname", type="string", length=255, nullable=true)
* @Expose
*/
private $lastname;
@@ -38,6 +45,7 @@ class User extends BaseUser
* @var \DateTime
*
* @ORM\Column(name="birthday", type="datetime", length=255, nullable=true)
* @Expose
*/
private $birthday;
@@ -52,6 +60,7 @@ class User extends BaseUser
* @var string
*
* @ORM\Column(name="gender", type="string", length=255, nullable=true)
* @Expose
*/
private $gender;
@@ -75,6 +84,7 @@ class User extends BaseUser
/**
* @ORM\OneToMany(targetEntity="AppBundle\Entity\Answer",mappedBy="user", cascade={"persist", "remove"})
* @ORM\OrderBy({"sendTime" = "DESC"})
*/
private $answers;
@@ -113,6 +123,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 +183,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 +878,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(
@@ -0,0 +1,25 @@
<?php
namespace AppBundle\Repository;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\QueryBuilder;
use Pagerfanta\Pagerfanta;
use Pagerfanta\Adapter\DoctrineORMAdapter;
abstract class AbstractRepository extends EntityRepository
{
protected function paginate(QueryBuilder $qb, $limit = 20, $offset = 0)
{
if (0 == $limit || 0 == $offset) {
throw new \LogicException('$limit & $offstet must be greater than 0.');
}
$pager = new Pagerfanta(new DoctrineORMAdapter($qb));
$currentPage = ceil(($offset + 1) / $limit);
$pager->setCurrentPage($currentPage);
$pager->setMaxPerPage((int) $limit);
return $pager;
}
}
@@ -2,14 +2,30 @@
namespace AppBundle\Repository;
use Doctrine\ORM\EntityRepository;
/**
* AdRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class AdRepository extends EntityRepository
class AdRepository extends AbstractRepository
{
public function search($term, $order = 'asc', $limit = 20, $offset = 0)
{
$qb = $this
->createQueryBuilder('a')
->select('a')
->orderBy('a.title', $order)
;
if ($term) {
$qb
->where('a.title LIKE ?1')
->setParameter(1, '%' . $term . '%')
;
}
return $this->paginate($qb, $limit, $offset);
}
}
@@ -8,9 +8,19 @@ namespace AppBundle\Repository;
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class AnswerRepository extends \Doctrine\ORM\EntityRepository
class AnswerRepository extends AbstractRepository
{
public function search($order = 'asc', $limit = 20, $offset = 0)
{
$qb = $this
->createQueryBuilder('a')
->select('a')
->orderBy('a.id', $order)
;
return $this->paginate($qb, $limit, $offset);
}
public function getAnswerByCompany($id)
{
$qb = $this
@@ -23,7 +33,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()
@@ -10,7 +10,7 @@ use Doctrine\ORM\EntityRepository;
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class CompanyRepository extends EntityRepository
class CompanyRepository extends AbstractRepository
{
public function getCompanySortByAds()
{
@@ -75,4 +75,21 @@ class CompanyRepository extends EntityRepository
return $qb;
}
public function search($term, $order = 'asc', $limit = 20, $offset = 0)
{
$qb = $this
->createQueryBuilder('c')
->select('c')
->orderBy('c.id', $order)
;
if ($term) {
$qb
->where('c.title LIKE ?1')
->setParameter(1, '%' . $term . '%')
;
}
return $this->paginate($qb, $limit, $offset);
}
}
@@ -0,0 +1,46 @@
<?php
namespace AppBundle\Representation;
use Hateoas\Configuration\Annotation as Hateoas;
use JMS\Serializer\Annotation\Type;
use Pagerfanta\Pagerfanta;
/**
* @Hateoas\Relation(
* "authenticated_user",
* embedded = @Hateoas\Embedded("expr(service('security.token_storage').getToken().getUser())")
* )
*/
class Ads
{
/**
* @Type("array<AppBundle\Entity\Ad>")
*/
public $data;
public $meta;
public function __construct(Pagerfanta $data)
{
$this->data = $data;
$this->addMeta('limit', $data->getMaxPerPage());
$this->addMeta('current_items', count($data->getCurrentPageResults()));
$this->addMeta('total_items', $data->getNbResults());
$this->addMeta('offset', $data->getCurrentPageOffsetStart());
}
public function addMeta($name, $value)
{
if (isset($this->meta[$name])) {
throw new \LogicException(sprintf('This meta already exists. You are trying to override this meta, use the setMeta method instead for the %s meta.', $name));
}
$this->setMeta($name, $value);
}
public function setMeta($name, $value)
{
$this->meta[$name] = $value;
}
}
@@ -0,0 +1,46 @@
<?php
namespace AppBundle\Representation;
use Hateoas\Configuration\Annotation as Hateoas;
use JMS\Serializer\Annotation\Type;
use Pagerfanta\Pagerfanta;
/**
* @Hateoas\Relation(
* "authenticated_user",
* embedded = @Hateoas\Embedded("expr(service('security.token_storage').getToken().getUser())")
* )
*/
class Answers
{
/**
* @Type("array<AppBundle\Entity\Answer>")
*/
public $data;
public $meta;
public function __construct(Pagerfanta $data)
{
$this->data = $data;
$this->addMeta('limit', $data->getMaxPerPage());
$this->addMeta('current_items', count($data->getCurrentPageResults()));
$this->addMeta('total_items', $data->getNbResults());
$this->addMeta('offset', $data->getCurrentPageOffsetStart());
}
public function addMeta($name, $value)
{
if (isset($this->meta[$name])) {
throw new \LogicException(sprintf('This meta already exists. You are trying to override this meta, use the setMeta method instead for the %s meta.', $name));
}
$this->setMeta($name, $value);
}
public function setMeta($name, $value)
{
$this->meta[$name] = $value;
}
}
@@ -0,0 +1,46 @@
<?php
namespace AppBundle\Representation;
use Hateoas\Configuration\Annotation as Hateoas;
use JMS\Serializer\Annotation\Type;
use Pagerfanta\Pagerfanta;
/**
* @Hateoas\Relation(
* "authenticated_user",
* embedded = @Hateoas\Embedded("expr(service('security.token_storage').getToken().getUser())")
* )
*/
class Companies
{
/**
* @Type("array<AppBundle\Entity\Company>")
*/
public $data;
public $meta;
public function __construct(Pagerfanta $data)
{
$this->data = $data;
$this->addMeta('limit', $data->getMaxPerPage());
$this->addMeta('current_items', count($data->getCurrentPageResults()));
$this->addMeta('total_items', $data->getNbResults());
$this->addMeta('offset', $data->getCurrentPageOffsetStart());
}
public function addMeta($name, $value)
{
if (isset($this->meta[$name])) {
throw new \LogicException(sprintf('This meta already exists. You are trying to override this meta, use the setMeta method instead for the %s meta.', $name));
}
$this->setMeta($name, $value);
}
public function setMeta($name, $value)
{
$this->meta[$name] = $value;
}
}
@@ -0,0 +1,27 @@
<?php
namespace AppBundle\Representation;
use Hateoas\Configuration\Annotation as Hateoas;
use JMS\Serializer\Annotation\Type;
use AppBundle\Entity\Ad;
/**
* @Hateoas\Relation(
* "authenticated_user",
* embedded = @Hateoas\Embedded("expr(service('security.token_storage').getToken().getUser())")
* )
*/
class SingleAd
{
/**
* @Type("AppBundle\Entity\Ad")
*/
public $data;
public function __construct(Ad $data)
{
$this->data = $data;
}
}
@@ -0,0 +1,27 @@
<?php
namespace AppBundle\Representation;
use AppBundle\Entity\Answer;
use Hateoas\Configuration\Annotation as Hateoas;
use JMS\Serializer\Annotation\Type;
/**
* @Hateoas\Relation(
* "authenticated_user",
* embedded = @Hateoas\Embedded("expr(service('security.token_storage').getToken().getUser())")
* )
*/
class SingleAnswer
{
/**
* @Type("AppBundle\Entity\Answer")
*/
public $data;
public function __construct(Answer $data)
{
$this->data = $data;
}
}
@@ -0,0 +1,27 @@
<?php
namespace AppBundle\Representation;
use AppBundle\Entity\Company;
use Hateoas\Configuration\Annotation as Hateoas;
use JMS\Serializer\Annotation\Type;
/**
* @Hateoas\Relation(
* "authenticated_user",
* embedded = @Hateoas\Embedded("expr(service('security.token_storage').getToken().getUser())")
* )
*/
class SingleCompany
{
/**
* @Type("AppBundle\Entity\Company")
*/
public $data;
public function __construct(Company $data)
{
$this->data = $data;
}
}
@@ -0,0 +1,66 @@
<?php
namespace AppBundle\Security;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Exception\AuthenticationException;
use Symfony\Component\Security\Core\Exception\BadCredentialsException;
use Symfony\Component\Security\Core\Exception\CustomUserMessageAuthenticationException;
use Symfony\Component\Security\Core\User\UserProviderInterface;
use Symfony\Component\Security\Http\Authentication\SimplePreAuthenticatorInterface;
// NOT USED AT THE MOMENT
class ApiKeyAuthenticator implements SimplePreAuthenticatorInterface
{
public function createToken(Request $request, $providerKey)
{
$bearer = $request->headers->get('Authorization');
if (!$bearer) {
throw new BadCredentialsException();
}
return new PreAuthenticatedToken(
'anon.',
$bearer,
$providerKey
);
}
public function authenticateToken(TokenInterface $token, UserProviderInterface $userProvider, $providerKey)
{
$accessToken = $token->getCredentials();
$username = $userProvider->getUsernameForApiKey($accessToken);
if (!$username) {
// CAUTION: this message will be returned to the client
// (so don't put any un-trusted messages / error strings here)
throw new CustomUserMessageAuthenticationException(
sprintf('API Key "%s" does not exist.', $apiKey)
);
}
$user = $userProvider->loadUserByUsername($username);
return new PreAuthenticatedToken(
$user,
$accessToken,
$providerKey,
$user->getRoles()
);
}
public function supportsToken(TokenInterface $token, $providerKey)
{
return $token instanceof PreAuthenticatedToken && $token->getProviderKey() === $providerKey;
}
public function onAuthenticationFailure(Request $request, AuthenticationException $exception)
{
return new Response("Authentication Failed :(", 401);
}
}
@@ -0,0 +1,47 @@
<?php
namespace AppBundle\Security;
use Symfony\Component\Security\Core\User\UserProviderInterface;
use Symfony\Component\Security\Core\User\User;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
// NOT USED AT THE MOMENT
class ApiKeyUserProvider implements UserProviderInterface
{
public function getUsernameForApiKey($apiKey)
{
// Look up the username based on the token in the database, via
// an API call, or do something entirely different
// $username = ...;
return $username;
}
public function loadUserByUsername($username)
{
return new User(
$username,
null,
// the roles for the user - you may choose to determine
// these dynamically somehow based on the user
array('ROLE_API')
);
}
public function refreshUser(UserInterface $user)
{
// this is used for storing authentication in the session
// but in this example, the token is sent in each request,
// so authentication can be stateless. Throwing this exception
// is proper to make things stateless
throw new UnsupportedUserException();
}
public function supportsClass($class)
{
return User::class === $class;
}
}

Some files were not shown because too many files have changed in this diff Show More