Compare commits

...

12 Commits

Author SHA1 Message Date
llaniau c7f4eddad5 Mise en place dev@talentstube.com 2021-01-18 09:44:41 +01:00
llaniau 39e02581ae US 482 modif variable cheminVideo 2021-01-14 17:24:51 +01:00
llaniau a5aa1364ab US482.488 Permettre aux d'envoyer plusieurs videos 2021-01-14 17:01:36 +01:00
llaniau e48027f2b2 Mise en place stats + mails 2021-01-13 17:29:05 +01:00
llaniau aad0203d0b Push 12/01 : Mail transact 2021-01-12 18:50:03 +01:00
llaniau a49cf8d9bf Champ taille entreprise dans Traits 2021-01-11 15:56:55 +01:00
llaniau c85313ade6 Init V2.5.1 2021-01-06 13:39:28 +01:00
llaniau 992ba3a103 MEP V2.5.0 2021-01-05 17:52:14 +01:00
llaniau 992f61867e Modif User 2021-01-05 17:32:57 +01:00
llaniau 72b119ac0c Mail envoyé avec tous les environnements 2021-01-05 15:19:37 +01:00
llaniau 831f7696ac REdirection dashboard 2021-01-05 13:28:59 +01:00
llaniau 5a44f7d6ec Bug170 : suppression user 2021-01-05 11:13:38 +01:00
23 changed files with 1440 additions and 271 deletions
@@ -0,0 +1,8 @@
UPDATE ad SET competences = '{"competences" : [{ "id1" : "libelle 1"},{ "id2" : "libelle 2"},{ "id3" : "libelle 3" }]}' WHERE id =1;
UPDATE ad SET competences = '{ "id1" : "libelle 1", "id2" : "libelle 2", "id3" : "libelle 3" }' WHERE id =1;
UPDATE ad SET competences = '{ "id1" : "libelle 1" }' WHERE id =31;
UPDATE ad SET competences = '{ "id2" : "libelle 2", "id3" : "libelle 3"}' WHERE id =29;
SELECT id FROM "ad" WHERE competences::jsonb @> '{ "id1" : "libelle 1"}'::jsonb LIMIT 10;
SELECT id FROM "ad" WHERE competences::jsonb ? 'id1' LIMIT 10;
SELECT competences::jsonb @> '{ "id1" : "libelle 1"}'::jsonb FROM "ad" WHERE id=1 LIMIT 1;
SELECT * FROM "ad" WHERE id = 1 or id=31 or id =29;
@@ -89,46 +89,89 @@ Afin de créer votre annonce, renseignez lensemble des champs relatifs au pos
</div>
<div class="tab-pane slide-left padding-20 sm-no-padding active" id="tab2">
<div class="row row-same-height">
<div class="col-md-5 b-r b-dashed b-grey ">
<div class="padding-30 sm-padding-5 sm-m-t-15 m-t-50">
<div class="col-md-6 b-r b-dashed b-grey ">
<div class="container-envoi-videos">
<div class="titre-bloc-envoi-videos">
<img src='https://www.talentstube.com/statique/images/capture.svg'class="image-envoi-video"/img>
<div class="texte-envoi-video">
<h4>Choix n°1</h4>
<h5>J<span class="underline">envoie</span> mes séquences vidéos à Talents Tube</h5>
</div>
</div>
<div class="contenu-bloc-envoi-videos">
{{ form_start(formFile, {'attr': { 'id': 'form_file' } }) }}
{# {{ form_row(form.brochure) }}
{{ form_row(form.brochure1) }}
{{ form_row(form.brochure2) }} #}
<p>Envoyez les séquences vidéos et Talents Tube soccupe pour vous du montage complet de votre offre demploi sous <span class="underline">48h</span></p>
<label for="etape-import-video">Vidéo 1 : Présentation de lentreprise</label>
{{ form_row(formFile.file1) }}
{# <input type="file" id="avatar" name="avatar" accept="image/png, image/jpeg"> #}
<label for="etape-import-video">Vidéo 2 : Présentation du poste et des missions</label>
{{ form_row(formFile.file2) }}
{# <input type="file" id="avatar" name="avatar" accept="image/png, image/jpeg"> #}
<label for="etape-import-video">Vidéo 3 : Témoignage dun collaborateur</label>
{{ form_row(formFile.file3) }}
{# <input type="file" id="avatar" name="avatar" accept="image/png, image/jpeg"> #}
<button aria-label class="btn btn-primary" type="submit" onClick='$("#encours").show();'>Envoyer les séquences vidéos</button>
{{ form_end(formFile) }}
{% if message !="" %}
<div class="green center-align" style="border-radius:10px;padding:20px;color:#FFF;">{{ message }}</div>
{% else %}
<div class=" center-align" id="encours">Vos séquences vidéos sont en cours denvoi...
Veuillez rester sur la page pendant le chargement qui peut durer plusieurs minutes.
</div>
{% endif %}
</div>
</div>
<!--<div class="padding-30 sm-padding-5 sm-m-t-15 m-t-50">
<h2>J'importe une vidéo</h2>
<p>Importez votre vidéo de recrutement et publiez votre annonce.
Vous ne possédez pas encore de vidéo ?
Talents Tube peut vous accompagner dans la réalisation de votre
vidéo d'offre d'emploi. <a href="https://blog.talentstube.com/contact" target="_blank">Contactez-nous</a></p>
{# <p class="small hint-text">Below is a sample page for your cart , Created using pages design
UI Elementes</p> #}
{# <ul id="tabs-video" class="tabs">
<li class="tab col s4"><a class="active" href="#tab-video-new">Ajouter une nouvelle vidéo</a>
</li>
<li class="tab col s4"><a href="#tab-video-select">Utiliser une vidéo existante</a></li>
</ul> #}
</div>
</div>-->
</div>
<div class="col-md-7">
<div class="padding-30 sm-padding-5" id="tab-video-new">
{% include 'media/dropzoneV2.html.twig' %}
{{ form_start(form, {'attr': { 'id': 'form_media' } }) }}
{{ form_row(form.title) }}
<br/>
<a href="{{ path('company_ad_edit',{"id": ad.getId()}) }}" class="btn btn-round btn-dark">
<button aria-label="" class="btn btn-primary btn-cons btn-animated from-left pull-right"
type="button">
<span>Retour au détail de l'annonce </span>
<span class="hidden-block">
<i class="material-icons fs-16">info</i>
</span>
</button>
</a>
<button aria-label="" id="submit" type="submit" class="btn btn-primary btn-cons btn-animated from-left pull-right hide"
type="button">
<span>Valider l'annonce</span>
<span class="hidden-block">
<i class="material-icons fs-16">save</i>
</span>
</button>
{{ form_end(form) }}
<div class="col-md-6">
<div class="padding sm-padding-5" id="tab-video-new">
<div class="container-envoi-videos">
<div class="titre-bloc-envoi-videos">
<img src='https://www.talentstube.com/statique/images/Import-video-recruteur.svg'class="image-envoi-video"/img>
<div class="texte-envoi-video">
<h4>Choix n°2</h4>
<h5>J<span class="underline">importe</span> ma vidéo doffre demploi</h5>
</div>
</div>
<div class="contenu-bloc-envoi-videos">
{% include 'media/dropzoneV2.html.twig' %}
{{ form_start(form, {'attr': { 'id': 'form_media' } }) }}
{{ form_row(form.title) }}
{# {{ form_row(form.brochure) }}
{{ form_row(form.brochure1) }}
{{ form_row(form.brochure2) }} #}
<br/>
<a href="{{ path('company_ad_edit',{"id": ad.getId()}) }}" class="btn btn-round btn-dark">
<button aria-label="" class="btn btn-primary btn-cons btn-animated from-left pull-right"
type="button">
<span>Retour au détail de l'annonce </span>
<span class="hidden-block">
<i class="material-icons fs-16">info</i>
</span>
</button>
</a>
<button aria-label="" id="submit" type="submit" class="btn btn-primary btn-cons btn-animated from-left pull-right hide"
type="button">
<span>Valider l'annonce</span>
<span class="hidden-block">
<i class="material-icons fs-16">save</i>
</span>
</button>
{{ form_end(form) }}
</div>
</div>
</div>
<div id="tab-video-select" class="col s12">
<div class="row">
@@ -243,6 +286,7 @@ vidéo d'offre d'emploi. <a href="https://blog.talentstube.com/contact" target="
});
</script>
<script type="text/javascript">
$("#encours").hide();
var urlDropzone = '{{ path("upload_media", {"id": ad.getId()}) }}';
var urlDelete = '{{ path("delete_media", {"id": ad.getId() }) }}'
var idObject = '{{ ad.getId() }}';
@@ -49,6 +49,10 @@
<a href="{{ path('company_profile') }}">à les remplir ici. <i class="fa fa-link" aria-hidden="true"></i></a>
</div>
</div>
<script>
document.location.href="/entreprise/me/profil";
</script>
{# {{ render("/entreprise/me/profil") }} #}
</div>
{% endif %}
@@ -20,7 +20,7 @@
<header class="text-center mb-5">
<h2 class="h4 mb-0">Connexion</h2>
<p>Connectez-vous pour gérer votre compte </p>
{% if erreur %}<p class="text-danger">Votre dernière tentative de connexion a échoué. Vérifiez votre email ou votre mot de passe</p>{% endif %}
{% if erreur is defined and erreur %}<p class="text-danger">Votre dernière tentative de connexion a échoué. Vérifiez votre email ou votre mot de passe</p>{% endif %}
</header>
@@ -144,4 +144,4 @@
<!-- End Content -->
</div>
<!-- End Signup Modal Window -->
<!-- ========== END SECONDARY CONTENTS ========== -->
<!-- ========== END SECONDARY CONTENTS ========== -->
@@ -1,110 +1,530 @@
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
<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%; }
.ExternalClass * { line-height:100%; }
body { margin: 0; padding: 0; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
table, td { border-collapse:collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; }
img { border: 0; height: auto; line-height: 100%; outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; }
p {
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;
}
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office">
</style>
<head>
<title>
Réinitialisation de votre mot de passe Talents Tube
</title>
<!--[if !mso]><!-- -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!--<![endif]-->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type="text/css">
#outlook a {
padding: 0;
}
<!--<![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;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;">
</td></tr></table>
<![endif]--></td></tr></tbody></table></div><!--[if mso]>
</td></tr></table>
<![endif]-->
<!--[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:22px 0;"><!--[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><a href="http://www.talentstube.com/"><img alt="Talents Tube" src="https://recruteur.talentstube.com/img/mail/logo-talents-tube.png" style="border:none;display:block;outline:none;text-decoration:none;width:100%;max-width:150px;height:auto;" width="150" height="auto"></a></td></tr></tbody></table></td></tr></tbody></table></div><!--[if mso]>
</td></tr></table>
<![endif]--></td></tr></tbody></table></div><!--[if mso]>
</td></tr></table>
<![endif]-->
<!--[if mso]>
body {
margin: 0;
padding: 0;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
<!--[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:#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:Raleway;font-size:14px;line-height:22px;">
{% block content %}{% endblock %}<!--[if mso]>
</td></tr></table>
<![endif]--></td></tr></tbody></table></div><!--[if mso]>
</td></tr></table>
<![endif]-->
<!--[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:#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: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="https://recruteur.talentstube.com/img/mail/facebook.png" alt="Facebook"></a>
<a style="margin:10px 20px 22px 20px;" href="https://twitter.com/TalentsTuber"><img src="https://recruteur.talentstube.com/img/mail/twitter.png" alt="Twitter"></a>
<a style="margin:10px 20px 22px 20px;" href="https://www.linkedin.com/company/talentstube"><img src="https://recruteur.talentstube.com/img/mail/linkedin.png" alt="LinkedIn"></a>
</p></div></td></tr></tbody></table></div><!--[if mso]>
</td></tr></table>
<![endif]--></td></tr></tbody></table></div><!--[if mso]>
</td></tr></table>
<![endif]-->
<!--[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;">
<![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>Village By CA - 3 rue Louis de Broglie - PIBS - 56000 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>
<![endif]--></td></tr></tbody></table></div><!--[if mso]>
</td></tr></table>
<![endif]--></div></body>
</html>
table,
td {
border-collapse: collapse;
mso-table-lspace: 0pt;
mso-table-rspace: 0pt;
}
img {
border: 0;
height: auto;
line-height: 100%;
outline: none;
text-decoration: none;
-ms-interpolation-mode: bicubic;
}
p {
display: block;
margin: 13px 0;
}
</style>
<!--[if mso]>
<xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml>
<![endif]-->
<!--[if lte mso 11]>
<style type="text/css">
.mj-outlook-group-fix { width:100% !important; }
</style>
<![endif]-->
<!--[if !mso]><!-->
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet" type="text/css">
<style type="text/css">
@import url(https://fonts.googleapis.com/css?family=Roboto:300,400,500,700);
</style>
<!--<![endif]-->
<style type="text/css">
@media only screen and (min-width:480px) {
.mj-column-per-100 {
width: 100% !important;
max-width: 100%;
}
}
</style>
<style type="text/css">
[owa] .mj-column-per-100 {
width: 100% !important;
max-width: 100%;
}
</style>
<style type="text/css">
@media only screen and (max-width:480px) {
table.mj-full-width-mobile {
width: 100% !important;
}
td.mj-full-width-mobile {
width: auto !important;
}
}
</style>
</head>
<body style="background-color:#f3f3f4;">
<div style="background-color:#f3f3f4;">
<!--[if mso | IE]>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600"
>
<tr>
<td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;">
<![endif]-->
<div style="margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation"
style="width:100%;">
<tbody>
<tr>
<td
style="border:0px solid #ffffff;direction:ltr;font-size:0px;padding:15px 0px 15px 0px;padding-bottom:15px;padding-left:0px;padding-right:0px;padding-top:15px;text-align:center;">
<!--[if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:600px;"
>
<![endif]-->
<div class="mj-column-per-100 mj-outlook-group-fix"
style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation"
style="vertical-align:top;" width="100%">
<tr>
<td align="center"
style="font-size:0px;padding:10px 25px 10px 25px;padding-right:25px;padding-left:25px;word-break:break-word;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation"
style="border-collapse:collapse;border-spacing:0px;">
<tbody>
<tr>
<td style="width:150px;">
<a href="https://www.talentstube.com/" target="_blank">
<img alt="Talents Tube, plateforme pour l'emploi en vidéo."
height="auto"
src="https://izq1.mjt.lu/tplimg/izq1/b/0644g/gvziq.png"
style="border:none;display:block;outline:none;text-decoration:none;height:auto;width:100%;font-size:13px;"
title="" width="150" />
</a>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600"
>
<tr>
<td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;">
<![endif]-->
<div style="background:#ffffff;background-color:#ffffff;margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation"
style="background:#ffffff;background-color:#ffffff;width:100%;">
<tbody>
<tr>
<td
style="border:0px solid #ffffff;direction:ltr;font-size:0px;padding:20px 0px 20px 0px;padding-left:0px;padding-right:0px;text-align:center;">
<!--[if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:600px;"
>
<![endif]-->
<div class="mj-column-per-100 mj-outlook-group-fix"
style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
{% block content %}{% endblock %}
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600"
>
<tr>
<td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;">
<![endif]-->
<div style="margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation"
style="width:100%;">
<tbody>
<tr>
<td
style="border:0px solid #ffffff;direction:ltr;font-size:0px;padding:20px 0px 0px 0px;padding-bottom:0px;padding-left:0px;padding-right:0px;text-align:center;">
<!--[if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:600px;"
>
<![endif]-->
<div class="mj-column-per-100 mj-outlook-group-fix"
style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation"
style="vertical-align:top;" width="100%">
<tr>
<td align="left"
style="font-size:0px;padding:0px 0px 0px 0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;word-break:break-word;">
<div
style="font-family:Arial, sans-serif;font-size:13px;letter-spacing:normal;line-height:1;text-align:left;color:#000000;">
<p
style="text-align: center; margin: 10px 0; margin-top: 10px; margin-bottom: 10px;">
<span
style="text-align:center;font-size:13px;letter-spacing:normal;text-align:left;color:#1E2327;font-family:Arial;">REJOIGNEZ
LA COMMUNAUTÉ</span></p>
</div>
</td>
</tr>
<tr>
<td align="center"
style="background:transparent;font-size:0px;padding:0px 0px 25px 0px;padding-top:0px;padding-right:0px;padding-bottom:25px;padding-left:0px;word-break:break-word;">
<!--[if mso | IE]>
<table
align="center" border="0" cellpadding="0" cellspacing="0" role="presentation"
>
<tr>
<td>
<![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0"
role="presentation" style="float:none;display:inline-table;">
<tr>
<td style="padding:4px;">
<table border="0" cellpadding="0" cellspacing="0"
role="presentation"
style="background:#1689fb;border-radius:50%;width:21;">
<tr>
<td
style="padding:5px 5px 5px 5px;font-size:0;height:21;vertical-align:middle;width:21;">
<a href="https://www.youtube.com/channel/UCRNqiJCLAorO0aCzNQu-8ww"
target="_blank">
<img height="21"
src="https://www.mailjet.com/images/theme/v1/icons/ico-social/youtube.png"
style="border-radius:50%;display:block;"
width="21" />
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--[if mso | IE]>
</td>
<td>
<![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0"
role="presentation" style="float:none;display:inline-table;">
<tr>
<td style="padding:4px;">
<table border="0" cellpadding="0" cellspacing="0"
role="presentation"
style="background:#1689fb;border-radius:50%;width:21;">
<tr>
<td
style="padding:5px 5px 5px 5px;font-size:0;height:21;vertical-align:middle;width:21;">
<a href="https://www.linkedin.com/company/talentstube"
target="_blank">
<img height="21"
src="https://www.mailjet.com/images/theme/v1/icons/ico-social/linkedin.png"
style="border-radius:50%;display:block;"
width="21" />
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--[if mso | IE]>
</td>
<td>
<![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0"
role="presentation" style="float:none;display:inline-table;">
<tr>
<td style="padding:4px;">
<table border="0" cellpadding="0" cellspacing="0"
role="presentation"
style="background:#1689fb;border-radius:50%;width:21;">
<tr>
<td
style="padding:5px 5px 5px 5px;font-size:0;height:21;vertical-align:middle;width:21;">
<a href="https://www.facebook.com/TalentsTuber/"
target="_blank">
<img height="21"
src="https://www.mailjet.com/images/theme/v1/icons/ico-social/facebook.png"
style="border-radius:50%;display:block;"
width="21" />
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--[if mso | IE]>
</td>
<td>
<![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0"
role="presentation" style="float:none;display:inline-table;">
<tr>
<td style="padding:4px;">
<table border="0" cellpadding="0" cellspacing="0"
role="presentation"
style="background:#1689fb;border-radius:50%;width:21;">
<tr>
<td
style="padding:5px 5px 5px 5px;font-size:0;height:21;vertical-align:middle;width:21;">
<a href="https://www.instagram.com/talents.tube/"
target="_blank">
<img height="21"
src="https://www.mailjet.com/images/theme/v1/icons/ico-social/instagram.png"
style="border-radius:50%;display:block;"
width="21" />
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--[if mso | IE]>
</td>
<td>
<![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0"
role="presentation" style="float:none;display:inline-table;">
<tr>
<td style="padding:4px;">
<table border="0" cellpadding="0" cellspacing="0"
role="presentation"
style="background:#1689fb;border-radius:50%;width:21;">
<tr>
<td
style="padding:5px 5px 5px 5px;font-size:0;height:21;vertical-align:middle;width:21;">
<a href="https://twitter.com/TalentsTuber"
target="_blank">
<img height="21"
src="https://www.mailjet.com/images/theme/v1/icons/ico-social/twitter.png"
style="border-radius:50%;display:block;"
width="21" />
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
<tr>
<td align="left"
style="font-size:0px;padding:0px 25px 0px 25px;padding-top:0px;padding-right:25px;padding-bottom:0px;padding-left:25px;word-break:break-word;">
<div
style="font-family:Arial, sans-serif;font-size:13px;letter-spacing:normal;line-height:1;text-align:left;color:#000000;">
<p class="text-build-content"
style="text-align: center; margin: 10px 0; margin-top: 10px;"
data-testid="51OayorMO"><a class="link-build-content"
style="color:inherit;; text-decoration: none;"
target="_blank"
href="https://www.talentstube.com/Confidentialite"><span
style="color:#4B4F52;font-family:Arial;font-size:13px;line-height:20px;"><u>Confidentialité</u></span></a><span
style="color:#4B4F52;font-family:Roboto;font-size:13px;line-height:20px;">
| </span><a class="link-build-content"
style="color:inherit;; text-decoration: none;"
target="_blank" href="https://www.talentstube.com/Cgu"><span
style="color:#4B4F52;font-family:Arial;font-size:13px;line-height:20px;"><u>CGU</u></span></a>
</p>
<p class="text-build-content"
style="text-align: center; margin: 10px 0; margin-bottom: 10px;"
data-testid="51OayorMO"><span
style="color:#4B4F52;font-family:Roboto;font-size:13px;line-height:20px;">Talents
Tube, 3 rue Louis de Broglie, 56000 Vannes, France</span>
</p>
</div>
</td>
</tr>
</table>
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</div>
</body>
</html>
@@ -2,16 +2,136 @@
{% block body_text %}
{% autoescape false %}
Bonjour {{ user.firstname }} {{ user.lastname }},
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
Nous avons reçu une demande de changement de mot de passe pour votre compte Talents Tube.
Si vous n'avez pas fait cette demande, veuillez ignorer cet e-mail.
Dans le cas contraire, veuillez cliquer sur le lien ci-dessous pour changer votre mot de passe :
<tr>
<td align="left"
style="font-size:0px;padding:0px 25px 0px 25px;padding-top:0px;padding-bottom:0px;word-break:break-word;">
{{ confirmationUrl }}
<div
style="font-family:Arial, sans-serif;font-size:22px;letter-spacing:normal;line-height:1;text-align:left;color:#000000;">
<h1 class="text-build-content" data-testid="1ZA4EV9FdGR"
style="margin-top: 10px; margin-bottom: 10px; font-weight: normal;">
<span style="color:#000000;font-family:Roboto;font-size:22px;"><b>Bonjour
{{ user.firstname }} {{ user.lastname }},</b></span></h1>
</div>
L'équipe de talentstube.com
</td>
</tr>
<tr>
<td align="left"
style="font-size:0px;padding:0px 25px 0px 25px;padding-top:0px;padding-bottom:0px;word-break:break-word;">
<div
style="font-family:Arial, sans-serif;font-size:14px;letter-spacing:normal;line-height:1;text-align:left;color:#000000;">
<p class="text-build-content" style="line-height: 24px; margin: 10px 0; margin-top: 10px;"
data-testid="S-P6IScCbo-"><span style="color:#000000;font-family:Roboto;font-size:16px;">Vous
avez demandé un nouveau mot de passe pour votre compte
Talents Tube.</span></p>
<p class="text-build-content" style="line-height: 24px; margin: 10px 0; margin-bottom: 10px;"
data-testid="S-P6IScCbo-"><span style="color:#000000;font-family:Roboto;font-size:16px;">Cliquez
sur le bouton ci-dessous pour changer votre mot de passe
:</span></p>
</div>
</td>
</tr>
<tr>
<td style="font-size:0px;padding:0px;padding-top:0px;padding-bottom:0px;word-break:break-word;">
<div
style="font-family:Arial, sans-serif;font-size:13px;letter-spacing:normal;line-height:1;color:#000000;">
<div>
<!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div style="margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation"
style="width:100%;">
<tbody>
<tr>
<td style="direction:ltr;font-size:0px;padding:10px 0;text-align:center;">
<!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]-->
<div class="mj-column-per-100 mj-outlook-group-fix"
style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation"
style="vertical-align:top;" width="100%">
<tr>
<td align="center" vertical-align="middle"
style="font-size:0px;padding:10px 25px;word-break:break-word;">
<table border="0" cellpadding="0" cellspacing="0"
role="presentation"
style="border-collapse:separate;line-height:100%;">
<tr>
<td align="center" bgcolor="#1689FB" role="presentation"
style="border:none;border-radius:3px;cursor:auto;mso-padding-alt:10px 25px;background:#1689FB;"
valign="middle">
<a href="{{ confirmationUrl }}"
style="display:inline-block;background:#1689FB;color:white;font-family:Roboto;font-size:15px;font-weight:normal;line-height:120%;margin:0;text-decoration:none;text-transform:none;padding:14px 20px;mso-padding-alt:0px;border-radius:5px;; text-decoration: none;">Modifier
mon mot de
passe</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<!--[if mso | IE]></td></tr></table><![endif]-->
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td></tr></table><![endif]-->
</div>
</div>
</td>
</tr>
<tr>
<td align="left"
style="background:#f3f9ff;font-size:0px;padding:0px 25px 0px 25px;padding-top:0px;padding-right:25px;padding-bottom:0px;padding-left:25px;word-break:break-word;">
<div
style="font-family:Arial, sans-serif;font-size:14px;letter-spacing:normal;line-height:1;text-align:left;color:#000000;">
<p class="text-build-content" style="line-height: 22px; margin: 10px 0; margin-top: 10px;"
data-testid="-KQrJGjLi"><span style="color:#000000;font-family:Roboto;font-size:14px;">Vous
pouvez également copier-coller cette URL dans votre
navigateur Internet.</span></p>
<p class="text-build-content" style="line-height: 22px; margin: 10px 0; margin-bottom: 10px;"
data-testid="-KQrJGjLi"><span
style="color:#000000;font-family:Roboto;font-size:14px;">{{ confirmationUrl }}</span>
</p>
</div>
</td>
</tr>
<tr>
<td align="left"
style="font-size:0px;padding:15px 25px 0px 25px;padding-top:15px;padding-right:25px;padding-bottom:0px;padding-left:25px;word-break:break-word;">
<div
style="font-family:Arial, sans-serif;font-size:13px;letter-spacing:normal;line-height:1;text-align:left;color:#000000;">
<p class="text-build-content" data-testid="CMoJCeaZu" style="margin: 10px 0; margin-top: 10px;"><span
style="color:#000000;font-family:Roboto;font-size:16px;line-height:24px;">Si
vous n'avez pas demandé à changer de mot de passe, veuillez
ignorer ce message.</span></p>
<p class="text-build-content" data-testid="CMoJCeaZu" style="margin: 10px 0;">&nbsp;</p>
<p class="text-build-content" data-testid="CMoJCeaZu" style="margin: 10px 0;"><span
style="color:#000000;font-family:Roboto;font-size:16px;line-height:24px;">A
très bientôt,</span></p>
<p class="text-build-content" data-testid="CMoJCeaZu" style="margin: 10px 0; margin-bottom: 10px;"><span
style="color:#000000;font-family:Roboto;font-size:16px;line-height:24px;">L'équipe
Talents Tube</span></p>
</div>
</td>
</tr>
</table>
{% endautoescape %}
{% endblock %}
@@ -2,17 +2,135 @@
{% block content %}
<p>Bonjour {{ user.firstname }} {{ user.lastname }},</p>
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
<p>
Nous avons reçu une demande de changement de mot de passe pour votre compte Talents Tube.<br />
Si vous n'avez pas fait cette demande, veuillez ignorer cet e-mail.<br />
Dans le cas contraire, veuillez cliquer sur le lien ci-dessous pour changer votre mot de passe :<br /><br />
<a href="{{ confirmationUrl }}">Réinitialiser mon mot de passe</a>
<br /><br />
Vous pouvez également copier-coller cette URL dans votre navigateur Internet :
{{ confirmationUrl }}
</p>
<tr>
<td align="left"
style="font-size:0px;padding:0px 25px 0px 25px;padding-top:0px;padding-bottom:0px;word-break:break-word;">
<div
style="font-family:Arial, sans-serif;font-size:22px;letter-spacing:normal;line-height:1;text-align:left;color:#000000;">
<h1 class="text-build-content" data-testid="1ZA4EV9FdGR"
style="margin-top: 10px; margin-bottom: 10px; font-weight: normal;">
<span style="color:#000000;font-family:Roboto;font-size:22px;"><b>Bonjour
{{ user.firstname }} {{ user.lastname }},</b></span></h1>
</div>
</td>
</tr>
<tr>
<td align="left"
style="font-size:0px;padding:0px 25px 0px 25px;padding-top:0px;padding-bottom:0px;word-break:break-word;">
<div
style="font-family:Arial, sans-serif;font-size:14px;letter-spacing:normal;line-height:1;text-align:left;color:#000000;">
<p class="text-build-content" style="line-height: 24px; margin: 10px 0; margin-top: 10px;"
data-testid="S-P6IScCbo-"><span style="color:#000000;font-family:Roboto;font-size:16px;">Vous
avez demandé un nouveau mot de passe pour votre compte
Talents Tube.</span></p>
<p class="text-build-content" style="line-height: 24px; margin: 10px 0; margin-bottom: 10px;"
data-testid="S-P6IScCbo-"><span style="color:#000000;font-family:Roboto;font-size:16px;">Cliquez
sur le bouton ci-dessous pour changer votre mot de passe
:</span></p>
</div>
</td>
</tr>
<tr>
<td style="font-size:0px;padding:0px;padding-top:0px;padding-bottom:0px;word-break:break-word;">
<div
style="font-family:Arial, sans-serif;font-size:13px;letter-spacing:normal;line-height:1;color:#000000;">
<div>
<!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div style="margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation"
style="width:100%;">
<tbody>
<tr>
<td style="direction:ltr;font-size:0px;padding:10px 0;text-align:center;">
<!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]-->
<div class="mj-column-per-100 mj-outlook-group-fix"
style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation"
style="vertical-align:top;" width="100%">
<tr>
<td align="center" vertical-align="middle"
style="font-size:0px;padding:10px 25px;word-break:break-word;">
<table border="0" cellpadding="0" cellspacing="0"
role="presentation"
style="border-collapse:separate;line-height:100%;">
<tr>
<td align="center" bgcolor="#1689FB" role="presentation"
style="border:none;border-radius:3px;cursor:auto;mso-padding-alt:10px 25px;background:#1689FB;"
valign="middle">
<a href="{{ confirmationUrl }}"
style="display:inline-block;background:#1689FB;color:white;font-family:Roboto;font-size:15px;font-weight:normal;line-height:120%;margin:0;text-decoration:none;text-transform:none;padding:14px 20px;mso-padding-alt:0px;border-radius:5px;; text-decoration: none;">Modifier
mon mot de
passe</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<!--[if mso | IE]></td></tr></table><![endif]-->
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td></tr></table><![endif]-->
</div>
</div>
</td>
</tr>
<tr>
<td align="left"
style="background:#f3f9ff;font-size:0px;padding:0px 25px 0px 25px;padding-top:0px;padding-right:25px;padding-bottom:0px;padding-left:25px;word-break:break-word;">
<div
style="font-family:Arial, sans-serif;font-size:14px;letter-spacing:normal;line-height:1;text-align:left;color:#000000;">
<p class="text-build-content" style="line-height: 22px; margin: 10px 0; margin-top: 10px;"
data-testid="-KQrJGjLi"><span style="color:#000000;font-family:Roboto;font-size:14px;">Vous
pouvez également copier-coller cette URL dans votre
navigateur Internet.</span></p>
<p class="text-build-content" style="line-height: 22px; margin: 10px 0; margin-bottom: 10px;"
data-testid="-KQrJGjLi"><span
style="color:#000000;font-family:Roboto;font-size:14px;">{{ confirmationUrl }}</span>
</p>
</div>
</td>
</tr>
<tr>
<td align="left"
style="font-size:0px;padding:15px 25px 0px 25px;padding-top:15px;padding-right:25px;padding-bottom:0px;padding-left:25px;word-break:break-word;">
<div
style="font-family:Arial, sans-serif;font-size:13px;letter-spacing:normal;line-height:1;text-align:left;color:#000000;">
<p class="text-build-content" data-testid="CMoJCeaZu" style="margin: 10px 0; margin-top: 10px;"><span
style="color:#000000;font-family:Roboto;font-size:16px;line-height:24px;">Si
vous n'avez pas demandé à changer de mot de passe, veuillez
ignorer ce message.</span></p>
<p class="text-build-content" data-testid="CMoJCeaZu" style="margin: 10px 0;">&nbsp;</p>
<p class="text-build-content" data-testid="CMoJCeaZu" style="margin: 10px 0;"><span
style="color:#000000;font-family:Roboto;font-size:16px;line-height:24px;">A
très bientôt,</span></p>
<p class="text-build-content" data-testid="CMoJCeaZu" style="margin: 10px 0; margin-bottom: 10px;"><span
style="color:#000000;font-family:Roboto;font-size:16px;line-height:24px;">L'équipe
Talents Tube</span></p>
</div>
</td>
</tr>
</table>
<p>L'équipe de talentstube.com</p>
{% endblock %}
+1 -1
View File
@@ -80,7 +80,7 @@ twig:
globals:
push_public_key: "%push_params.public_key%"
fairlane_cookie_consent: '@fairlane_cookie_consent.twig'
version: 'V2.4.2'
version: '2.5.1'
@@ -1,6 +1,8 @@
# This file is auto-generated during the composer install
parameters:
onurb_yuml.extension: jpg
mailjet_public: 355697fac93fca865660734b4fdffaeb
mailjet_private : ddecf75321ca89c09e561857b13534c8
mailer_transport: smtp
mailer_host: mail.gandi.net
mailer_user: noreply@talentstube.io
@@ -25,8 +27,8 @@ parameters:
media_photo_dir: '%kernel.root_dir%/../web/uploads/photos/'
elastic_host: tt-website.elasticsearch.dev
elastic_port: 9200
delivery_addresses: l.laniau@talentstube.com
app.version: 2.3.6
delivery_addresses: dev@talentstube.com
app.version: 2.5.1
push_params:
push_notification_file_path: '%kernel.root_dir%/../web/push/'
push_network_config:
@@ -1,4 +1,6 @@
parameters:
mailjet_public: 355697fac93fca865660734b4fdffaeb
mailjet_private : ddecf75321ca89c09e561857b13534c8
mailer_transport: smtp
mailer_host: mail.gandi.net
# mailer_user: noreply@talentstube.io
@@ -30,8 +32,8 @@ parameters:
elastic_host: tt-website.elasticsearch.preprod
elastic_port: 9200
delivery_addresses: l.laniau@talentstube.com
app.version: 2.3.6
delivery_addresses: dev@talentstube.com
app.version: 2.5.1
push_params:
push_notification_file_path: '%kernel.root_dir%/../web/push/'
push_network_config:
@@ -1,4 +1,6 @@
parameters:
mailjet_public: 355697fac93fca865660734b4fdffaeb
mailjet_private : ddecf75321ca89c09e561857b13534c8
mailer_transport: smtp
mailer_host: mail.gandi.net
#mailer_user: noreply@talentstube.com
@@ -22,15 +24,15 @@ parameters:
prestashop_ad_id: 10
prestashop_video_corporate_id: 19
prestashop_url: https://www.talentstube.com/store/
#Media
#Media
media_video_dir: '%kernel.root_dir%/../web/uploads/videos/'
media_video_url: 'http://static.talentstube.com/videos/'
media_photo_dir: '%kernel.root_dir%/../web/uploads/photos/'
elastic_host: tt-website.elasticsearch.prod
elastic_port: 9200
delivery_addresses: l.laniau@talentstube.com
app.version: 2.4.0
delivery_addresses: dev@talentstube.com
app.version: 2.5.1
push_params:
push_notification_file_path: '%kernel.root_dir%/../web/push/'
push_network_config:
@@ -1,4 +1,6 @@
parameters:
cheminVideo : '%kernel.project_dir%/web/uploads/videos/montage'
services:
#Tools (independent)
@@ -108,12 +108,16 @@ class UserController extends Controller
}
\assert(!\is_null($user));
// $company = $user->getCompany();
$company = $user->getCompany();
// if ($company) {
// $company->setPresentationVideo(null);
// $em->persist($company);
// $em->flush();
// $em->remove($company);
// $em->flush();
// }
if ($company) {
$company->setPresentationVideo(null);
$em->persist($company);
$em->flush();
}
$this->deleteRelation($user);
$em->remove($user);
$em->flush();
@@ -125,7 +129,7 @@ class UserController extends Controller
// if ($company) {
// $em->remove($company);
// }
$em->flush();
//$em->flush();
return $this->redirectToRoute('admin_config_others_user');
}
@@ -133,13 +137,14 @@ class UserController extends Controller
public function deleteRelation($user)
{
$em = $this->getDoctrine()->getManager();
//$company = $em->getRepository('AppBundle:Company')->find($companyId);
$sendMessage = $em->getRepository('AppBundle:Message')->findBy(array('sender' => $user));
if ($sendMessage) {
foreach ($sendMessage as $key => $message) {
$message->setSender(null);
$message->setAnswer(null);
}
$em->flush();
}
@@ -160,6 +165,14 @@ class UserController extends Controller
$em->flush();
}
$subscriptions = $em->getRepository('AppBundle:UserSubscription')->findBy(array('user' => $user));
if ($subscriptions) {
foreach ($subscriptions as $key => $subscription) {
$em->remove($subscription);
}
$em->flush();
}
$answers = $em->getRepository('AppBundle:Answer')->findBy(array('user' => $user));
if ($answers) {
foreach ($answers as $key => $answer) {
@@ -194,6 +207,12 @@ class UserController extends Controller
$medias = $em->getRepository('AppBundle:Media')->findBy(array('creator' => $user));
if ($medias) {
// foreach ($medias as $key => $media) {
// $media->setCompany(null);
// $em->persist($media);
// $em->flush();
// }
foreach ($medias as $key => $media) {
$em->remove($media);
}
@@ -18,7 +18,12 @@ use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use AppBundle\Entity\Media;
//MAILJET
use AppBundle\Entity\Mailjet;
// use AppBundle\Entity\Response;
use AppBundle\Entity\Resources;
use AppBundle\Entity\Config;
use AppBundle\Entity\Client;
class AnswerController extends Controller
{
/**
@@ -379,34 +384,94 @@ class AnswerController extends Controller
}
if ($form->isSubmitted() && $form->isValid()) {
$mj = new Client($this->getParameter('mailjet_public'), $this->getParameter('mailjet_private'));
// $link = $this->generateUrl('company_answer_show', array('id' => $answer->getId()), UrlGeneratorInterface::ABSOLUTE_URL);
$contactMail = $user->getEmail();
if ($this->container->get( 'kernel' )->getEnvironment() == "dev") {
$contactMail = "dev@talentstube.com";
}
if($message->getVideo() == null){
$body = [
'FromEmail' => "noreply@talentstube.io",
'FromName' => "Talents Tube",
'Subject' => "Découvrez la réponse de lentreprise pour votre candidature",
'MJ-TemplateID' =>2196199 ,
'MJ-TemplateLanguage' => true,
'Recipients' => [
[
'Email' => $contactMail,
'Vars' => [
'prenom' => $answer->getUser()->getFirstname(),
'entreprise' => $this->getUser()->getCompany()->getBrandName(),
]
]
]
];
}else{
$thumbnailsArray = $message->getVideo()->getThumbnails();
$img="";
if($thumbnailsArray){
if($thumbnailsArray[0]){
if($thumbnailsArray[0]['sizes']){
$img = $thumbnailsArray[0]['sizes'][4]['link'];
}
}
}
$body = [
'FromEmail' => "noreply@talentstube.io",
'FromName' => "Talents tube",
'Subject' => "Découvrez la réponse de lentreprise pour votre candidature",
'MJ-TemplateID' =>2196010 ,
'MJ-TemplateLanguage' => true,
'Recipients' => [
[
'Email' => $contactMail,
'Vars' => [
'prenom' => $answer->getUser()->getFirstname(),
'entreprise' => $this->getUser()->getCompany()->getBrandName(),
'imgReponseEntreprise' => $img,
]
]
]
];
}
$response = $mj->post(Resources::$Email, ['body' => $body]);
$response->success() && var_dump($response->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',
'answer' => $answer,
'messageText' => $messageText,
'user' => $answer->getUser(),
'video' => $message->getVideo(),
'message' => $message,
'aliasCompany' => $aliasCompany
));
// $mediaManager = $this->get('media_manager');
// $mediaManager->getThumbnails($message);
// $htmlView = $this->renderView('email/contact_talent.html.twig', array(
// 'type' => 'html',
// 'answer' => $answer,
// 'messageText' => $messageText,
// 'user' => $answer->getUser(),
// 'video' => $message->getVideo(),
// 'message' => $message,
// 'aliasCompany' => $aliasCompany
// ));
$plainView = $this->renderView('email/contact_talent_plain.html.twig', array(
'message' => $messageText,
'user' => $answer->getUser(),
));
$email = \Swift_Message::newInstance()
->setSubject('Candidature : ' . $title)
->setFrom($this->getParameter('mailer_user'))
->setReplyTo($this->getParameter('mailer_user'))
->setTo($answer->getUser()->getEmail())
->setBody($htmlView, 'text/html')
->addPart($plainView, 'text/plain');
$this->get('mailer')->send($email);
// $plainView = $this->renderView('email/contact_talent_plain.html.twig', array(
// 'message' => $messageText,
// 'user' => $answer->getUser(),
// ));
// $email = \Swift_Message::newInstance()
// ->setSubject('Candidature : ' . $title)
// ->setFrom($this->getParameter('mailer_user'))
// ->setReplyTo($this->getParameter('mailer_user'))
// ->setTo($answer->getUser()->getEmail())
// ->setBody($htmlView, 'text/html')
// ->addPart($plainView, 'text/plain');
// $this->get('mailer')->send($email);
$em = $this->getDoctrine()->getManager();
$message->setSubject('Candidature : ' . $title);
$message->setContent($messageText);
@@ -22,6 +22,12 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use JMS\Serializer\SerializationContext;
use AppBundle\Exception\ResourceValidationException;
use AppBundle\Exception\UnknownUserException;
//MAILJET
use AppBundle\Entity\Mailjet;
// use AppBundle\Entity\Response;
use AppBundle\Entity\Resources;
use AppBundle\Entity\Config;
use AppBundle\Entity\Client;
use \DateTime;
class AnswerController extends FOSRestController
@@ -95,7 +101,7 @@ class AnswerController extends FOSRestController
$mediaId = htmlspecialchars($request->get('mediaId'));
$companyId = htmlspecialchars($request->get('companyId'));
$adId = htmlspecialchars($request->get('adId'));
//TODO 471 : Associer CV avec candidature crée (on a envoyé le lien du cv dans le request)
if (!is_numeric($mediaId) || !is_numeric($companyId) || ($adId != null && !is_numeric($adId))) {
$message = 'Le média, l\'entreprise ou l\'offre ne sont pas au format demandé';
$status = 'failure';
@@ -160,35 +166,68 @@ class AnswerController extends FOSRestController
$message->setVideo($video);
$em->persist($message);
$em->flush();*/
if ($this->container->get( 'kernel' )->getEnvironment() != "dev") {
//if ($this->container->get( 'kernel' )->getEnvironment() != "dev") {
$mailManager = $this->get('app.mail_manager');
foreach ($usersCompany as $user){
$mj = new Client($this->getParameter('mailjet_public'), $this->getParameter('mailjet_private'));
$link = $this->generateUrl('company_answer_show', array('id' => $answer->getId()), UrlGeneratorInterface::ABSOLUTE_URL);
$mailManager->sendMail(
'Candidature 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><img alt="" src="' . $img . '" style="border:none;display:block;outline:none;text-decoration:none;width:100%;max-width:600px;height:auto;" width="600" height="auto"></td></tr></tbody></table></td></tr></tbody></table></div><!--[if mso]>
</td></tr></table>
<![endif]--></td></tr></tbody></table></div>
$contactMail = $user->getEmail();
if ($this->container->get( 'kernel' )->getEnvironment() == "dev") {
$contactMail = "dev@talentstube.com";
}
$body = [
'FromEmail' => "noreply@talentstube.io",
'FromName' => "Talents Tube",
'Subject' => "Une nouvelle candidature reçue sur Talents Tube",
'MJ-TemplateID' =>2164146 ,
'MJ-TemplateLanguage' => true,
'Recipients' => [
[
'Email' => $contactMail,
'Vars' => [
'prenomRecruteur' => $user->getFirstname(),
'nomRecruteur' => $user->getLastname(),
'prenom' => $answer->getUser()->getFirstname(),
'nom' => $answer->getUser()->getLastname(),
'imgCandidature' => $img,
'urlCandidature' => $link,
]
]
]
];
$response = $mj->post(Resources::$Email, ['body' => $body]);
$response->success() && var_dump($response->getData());
<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 ' . $user->getLastname() . ' ' . $user->getFirstname() . ',</p>
<p>Le talent ' . $answer->getUser()->getFirstname() . ' ' . $answer->getUser()->getLastname() . ' a répondu à votre annonce ' . $title . '.</p></div></td></tr></tbody></table></div><!--[if mso]>
</td></tr></table>
<![endif]--></td></tr></tbody></table></div>
// $mailManager->sendMail(
// 'Candidature 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><img alt="" src="' . $img . '" style="border:none;display:block;outline:none;text-decoration:none;width:100%;max-width:600px;height:auto;" width="600" height="auto"></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 0px 40px 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="' . $link . '" 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">Découvrir le talent</a></td></tr></tbody></table></td></tr></tbody></table></div><!--[if mso]>
</td></tr></table>
<![endif]--></td></tr></tbody></table></div>',
$user,
'contact_default'
);
// <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 ' . $user->getLastname() . ' ' . $user->getFirstname() . ',</p>
// <p>Le talent ' . $answer->getUser()->getFirstname() . ' ' . $answer->getUser()->getLastname() . ' a répondu à votre annonce ' . $title . '.</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]>
// <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="' . $link . '" 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">Découvrir le talent</a></td></tr></tbody></table></td></tr></tbody></table></div><!--[if mso]>
// </td></tr></table>
// <![endif]--></td></tr></tbody></table></div>',
// $user,
// 'contact_default'
// );
}
}
//}
$status = array('status' => "success", "idAnswer" => $answer->getId()/*, "idMessage" => $message->getId()*/);
}
} else {
@@ -389,30 +428,59 @@ class AnswerController extends FOSRestController
$em->flush();*/
$mailManager = $this->get('app.mail_manager');
foreach ($usersCompany as $user){
$link = $this->generateUrl('company_answer_show', array('id' => $existAnswer->getId()), UrlGeneratorInterface::ABSOLUTE_URL);
$mailManager->sendMail(
'Message sur la plateforme Talents Tube ',
'<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><img alt="" src="' . $img . '" style="border:none;display:block;outline:none;text-decoration:none;width:100%;max-width:600px;height:auto;" width="600" height="auto"></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 ' . $user->getLastname() . ' ' . $user->getFirstname() . ',</p>
<p>Le talent ' . $existAnswer->getUser()->getFirstname() . ' ' . $existAnswer->getUser()->getLastname() . ' a laissé un message à votre annonce ' . $title . '.</p></div></td></tr></tbody></table></div><!--[if mso]>
</td></tr></table>
<![endif]--></td></tr></tbody></table></div>
$mj = new Client($this->getParameter('mailjet_public'), $this->getParameter('mailjet_private'));
// $link = $this->generateUrl('company_answer_show', array('id' => $existAnswer->getId()), UrlGeneratorInterface::ABSOLUTE_URL);
$contactMail = $user->getEmail();
if ($this->container->get( 'kernel' )->getEnvironment() == "dev") {
$contactMail = "dev@talentstube.com";
}
$body = [
'FromEmail' => "noreply@talentstube.io",
'FromName' => "Talents Tube",
'Subject' => "Vous avez reçu un message dun candidat",
'MJ-TemplateID' =>2195469 ,
'MJ-TemplateLanguage' => true,
'Recipients' => [
[
'Email' => $contactMail,
'Vars' => [
'prenomRecruteur' => $user->getFirstname(),
'nomRecruteur' => $user->getLastname(),
'prenom' => $existAnswer->getUser()->getFirstname(),
'nom' => $existAnswer->getUser()->getLastname(),
'entreprise' => $title
]
]
]
];
$response = $mj->post(Resources::$Email, ['body' => $body]);
<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]>
<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="' . $link . '" 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">Lire le message</a></td></tr></tbody></table></td></tr></tbody></table></div><!--[if mso]>
</td></tr></table>
<![endif]--></td></tr></tbody></table></div>',
$user,
'contact_default'
);
// $link = $this->generateUrl('company_answer_show', array('id' => $existAnswer->getId()), UrlGeneratorInterface::ABSOLUTE_URL);
// $mailManager->sendMail(
// 'Message sur la plateforme Talents Tube ',
// '<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><img alt="" src="' . $img . '" style="border:none;display:block;outline:none;text-decoration:none;width:100%;max-width:600px;height:auto;" width="600" height="auto"></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 ' . $user->getLastname() . ' ' . $user->getFirstname() . ',</p>
// <p>Le talent ' . $existAnswer->getUser()->getFirstname() . ' ' . $existAnswer->getUser()->getLastname() . ' a laissé un message à votre annonce ' . $title . '.</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]>
// <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="' . $link . '" 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">Lire le message</a></td></tr></tbody></table></td></tr></tbody></table></div><!--[if mso]>
// </td></tr></table>
// <![endif]--></td></tr></tbody></table></div>',
// $user,
// 'contact_default'
// );
}
@@ -400,6 +400,7 @@ class CompanyController extends FOSRestController
public function companyAjaxRecStatAction(Company $company)
{
$history = $this->get('edeclic.history.record');
if ($this->getUser() && $this->getUser()->getCompany() != null) {
if ($this->getUser()->getCompany()->getId() !== $company->getId()) {
$history->recordIt($this->getUser()->getId(), "r", get_class($company), $company->getId(), serialize($company));
@@ -408,6 +409,10 @@ class CompanyController extends FOSRestController
$history->recordIt("Anonymous", "r", 'AppBundle\Entity\Company', $company->getId(), serialize($company));
}
return new JsonResponse(array('code' => "ok"));
if(!$this->getUser() == null){
return new JsonResponse(array('code' => "ok", "user" => $this->getUser()->getUsername()));
} else{
return new JsonResponse(array('code' => "ok"));
}
}
}
@@ -17,8 +17,9 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\Session;
//MAILJET
use AppBundle\Entity\Mailjet;
use AppBundle\Entity\Response;
// use AppBundle\Entity\Response;
use AppBundle\Entity\Resources;
use AppBundle\Entity\Config;
use AppBundle\Entity\Client;
@@ -216,31 +217,58 @@ class CompanyController extends Controller
// $user,
// 'contact_default'
// );
$message=$company->getBrandName()." vous invite à rejoindre la plateforme de recrutement vidéo Talents Tube.<br/>
Votre identifiant : ".$user->getEmail()."<br/>
Votre mot de passe : ".$form["password"]->getData()."<br/>
(Vous pourrez réinitialiser votre mot de passe en cliquant <a href='https://recruteur.talentstube.com/resetting/request' target='_blank'>**ici**</a><br/>
<br/>
<a href='https://recruteur.talentstube.com' target='_blank'>[Rejoindre l'équipe]</a> <br/>";
$plainView = $this->renderView('email/contact_default.html.twig', array(
'message' => $message,
'type' => 'html'
));
//$body ="";
$mj = new Client('355697fac93fca865660734b4fdffaeb', 'ddecf75321ca89c09e561857b13534c8');
$mj = new Client($this->getParameter('mailjet_public'), $this->getParameter('mailjet_private'));
$contactMail = $user->getEmail();
// if ($this->container->get( 'kernel' )->getEnvironment() == "dev") {
// $contactMail = "l.laniau@talentstube.com";
// }
$body = [
'FromEmail' => $this->getParameter('mailer_user'),
'FromEmail' => "noreply@talentstube.io",
'FromName' => "Talents Tube",
'Subject' => "Rejoignez l'équipe ".$company->getBrandName()." sur Talents Tube.",
//'Text-part' => "Dear passenger, welcome to Mailjet! May the delivery force be with you!",
'Html-part' => $plainView,
'Subject' => "Rejoignez lespace recruteur ".$company->getBrandName()." sur Talents Tube
" ,
'MJ-TemplateID' =>2183741 ,
'MJ-TemplateLanguage' => true,
'Recipients' => [
['Email' => $user->getEmail()]
[
'Email' => $contactMail,
'Vars' => [
'entreprise' => $company->getBrandName(),
'emailNouvelUtilisateur' => $user->getEmail(),
'mdpNouvelUtilisateur' => $form["password"]->getData(),
]
]
]
];
$response = $mj->post(Resources::$Email, ['body' => $body]);
$response->success() && var_dump($response->getData());
// $message=$company->getBrandName()." vous invite à rejoindre la plateforme de recrutement vidéo Talents Tube.<br/>
// Votre identifiant : ".$user->getEmail()."<br/>
// Votre mot de passe : ".$form["password"]->getData()."<br/>
// (Vous pourrez réinitialiser votre mot de passe en cliquant <a href='https://recruteur.talentstube.com/resetting/request' target='_blank'>**ici**</a><br/>
// <br/>
// <a href='https://recruteur.talentstube.com' target='_blank'>[Rejoindre l'équipe]</a> <br/>";
// $plainView = $this->renderView('email/contact_default.html.twig', array(
// 'message' => $message,
// 'type' => 'html'
// ));
// //$body ="";
// $mj = new Client('355697fac93fca865660734b4fdffaeb', 'ddecf75321ca89c09e561857b13534c8');
// $body = [
// 'FromEmail' => $this->getParameter('mailer_user'),
// 'FromName' => "Talents Tube",
// 'Subject' => "Rejoignez l'équipe ".$company->getBrandName()." sur Talents Tube.",
// //'Text-part' => "Dear passenger, welcome to Mailjet! May the delivery force be with you!",
// 'Html-part' => $plainView,
// 'Recipients' => [
// ['Email' => $user->getEmail()]
// ]
// ];
// $response = $mj->post(Resources::$Email, ['body' => $body]);
// $response->success() && var_dump($response->getData());
// $email = \Swift_Message::newInstance()
// ->setSubject("Rejoignez l'équipe ".$company->getBrandName()." sur Talents Tube." )
@@ -11,8 +11,11 @@ use AppBundle\Entity\Response;
use AppBundle\Entity\Resources;
use AppBundle\Entity\Config;
use AppBundle\Entity\Client;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
class DefaultController extends Controller
{
/**
* @Route("/indexV1", name="homepageV1")
*/
@@ -73,7 +76,14 @@ class DefaultController extends Controller
*/
public function homepagev2Action(Request $request)
{
//US-468
$session = $request->getSession();
$arrayDate['dateBegin'] = new \DateTime('now -1 Month');
$arrayDate['dateEnd'] = new \DateTime('now');
setlocale(LC_ALL, 'fr_FR.utf-8');
$stats = $this->get("app.stats_manager");
// $records = $stats->getCompanyDashboard(21247, $arrayDate);
// dump($records);
//US444
// $mj = new Client('805b8adce80bc6aa9422ddff20bb4171', 'f3bce955f21bc9456d65245c50e8c512');
// $body = [
@@ -365,7 +375,8 @@ class DefaultController extends Controller
//return $this->redirectToRoute('talent_dashboard');
} elseif ($user->hasRole('ROLE_COMPANY')) {
return $this->redirectToRoute('company_profile');
return $this->redirectToRoute('company_dashboard');
// return $this->redirectToRoute('company_profile');
}
} else {
@@ -14,11 +14,19 @@ 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\Form\Extension\Core\Type\FileType;
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;
use Symfony\Component\Validator\Constraints\File;
//MAILJET
use AppBundle\Entity\Mailjet;
// use AppBundle\Entity\Response;
use AppBundle\Entity\Resources;
use AppBundle\Entity\Config;
use AppBundle\Entity\Client;
class MediaController extends Controller
{
@@ -102,7 +110,15 @@ class MediaController extends Controller
'medias' => $medias,
]);
}
public function convertKekab($string){
$search = array('À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'à', 'á', 'â', 'ã', 'ä', 'å', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ð', 'ò', 'ó', 'ô', 'õ', 'ö', 'ù', 'ú', 'û', 'ü', 'ý', 'ÿ');
//Préférez str_replace à strtr car strtr travaille directement sur les octets, ce qui pose problème en UTF-8
$replace = array('A', 'A', 'A', 'A', 'A', 'A', 'C', 'E', 'E', 'E', 'E', 'I', 'I', 'I', 'I', 'O', 'O', 'O', 'O', 'O', 'U', 'U', 'U', 'U', 'Y', 'a', 'a', 'a', 'a', 'a', 'a', 'c', 'e', 'e', 'e', 'e', 'i', 'i', 'i', 'i', 'o', 'o', 'o', 'o', 'o', 'o', 'u', 'u', 'u', 'u', 'y', 'y');
$string = str_replace($search, $replace, $string);
$string = strtolower (str_replace(" ", "-", $string));
return $string;
}
/**
* @Route("/media/create/{id}", name="create_media")
* @Security("ad.getStatus() == 'DRAFT' or ad.getStatus() == 'DECLINED' or ad.getStatus() == 'TO_PUBLISH'")
@@ -115,6 +131,7 @@ class MediaController extends Controller
if ($ad) {
$video = $ad->getVideo();
}
$message="";
// Get Avalaible videos
$em = $this->getDoctrine()->getManager();
$videos = $em->getRepository('AppBundle:Media')->findBy(array('creator' => $this->getUser()));
@@ -141,11 +158,182 @@ class MediaController extends Controller
$em->flush();
}
$formFile = $this->createFormBuilder($video)
->add('file1', FileType::class, [
'label' => false,
// unmapped means that this field is not associated to any entity property
'mapped' => false,
// make it optional so you don't have to re-upload the PDF file
// every time you edit the Product details
'required' => false,
// unmapped fields can't define their validation using annotations
// in the associated entity, so you can use the PHP constraint classes
'constraints' => [
new File([
'maxSize' => '512000k',
'mimeTypes' => [
'video/*',
],
'mimeTypesMessage' => 'Votre fichier doit être un fichier vidéo',
])
],
])
->add('file2', FileType::class, [
'label' => false,
// unmapped means that this field is not associated to any entity property
'mapped' => false,
// make it optional so you don't have to re-upload the PDF file
// every time you edit the Product details
'required' => false,
// unmapped fields can't define their validation using annotations
// in the associated entity, so you can use the PHP constraint classes
'constraints' => [
new File([
'maxSize' => '512000k',
'mimeTypes' => [
'video/*',
],
'mimeTypesMessage' => 'Votre fichier doit être un fichier vidéo',
])
],
])
->add('file3', FileType::class, [
'label' => false,
// unmapped means that this field is not associated to any entity property
'mapped' => false,
// make it optional so you don't have to re-upload the PDF file
// every time you edit the Product details
'required' => false,
// unmapped fields can't define their validation using annotations
// in the associated entity, so you can use the PHP constraint classes
'constraints' => [
new File([
'maxSize' => '512000k',
'mimeTypes' => [
'video/*',
],
'mimeTypesMessage' => 'Votre fichier doit être un fichier vidéo',
])
],
])
->getForm();
$formFile->handleRequest($request);
if ($formFile->isSubmitted() && $formFile->isValid()) {
$file1 = $formFile->get('file1')->getData();
$file2 = $formFile->get('file2')->getData();
$file3 = $formFile->get('file3')->getData();
$newFilenameWithoutExt="fichier";
if($ad->getTitle()){
$newFilenameWithoutExt= $this->convertKekab($ad->getTitle()." ".$ad->getId()." ");
}
if ($file1) {
$originalFilename = pathinfo($file1->getClientOriginalName(), PATHINFO_FILENAME);
// this is needed to safely include the file name as part of the URL
$newFilename1 = "1-".$newFilenameWithoutExt.uniqid().'.'.$file1->guessExtension();
// Move the file to the directory where brochures are stored
try {
$file1->move(
$this->get('kernel')->getProjectDir()."/web/uploads/videos/montage",
$newFilename1
);
} catch (FileException $e) {
// ... handle exception if something happens during file upload
}
// updates the 'brochureFilename' property to store the PDF file name
// instead of its contents
// $product->setBrochureFilename($newFilename);
}
if ($file2) {
$originalFilename = pathinfo($file2->getClientOriginalName(), PATHINFO_FILENAME);
// this is needed to safely include the file name as part of the URL
$newFilename2 = "2-".$newFilenameWithoutExt.uniqid().'.'.$file2->guessExtension();
// Move the file to the directory where brochures are stored
try {
$file2->move(
$this->get('kernel')->getProjectDir()."/web/uploads/videos/montage",
$newFilename2
);
} catch (FileException $e) {
// ... handle exception if something happens during file upload
}
// updates the 'brochureFilename' property to store the PDF file name
// instead of its contents
// $product->setBrochureFilename($newFilename);
}
if ($file3) {
$originalFilename = pathinfo($file3->getClientOriginalName(), PATHINFO_FILENAME);
// this is needed to safely include the file name as part of the URL
$newFilename3 = "3-".$newFilenameWithoutExt.uniqid().'.'.$file3->guessExtension();
// Move the file to the directory where brochures are stored
try {
$file3->move(
$this->get('kernel')->getProjectDir()."/web/uploads/videos/montage",
$newFilename3
);
} catch (FileException $e) {
// ... handle exception if something happens during file upload
}
// updates the 'brochureFilename' property to store the PDF file name
// instead of its contents
// $product->setBrochureFilename($newFilename);
}
$mj = new Client($this->getParameter('mailjet_public'), $this->getParameter('mailjet_private'));
// $link = $this->generateUrl('company_answer_show', array('id' => $answer->getId()), UrlGeneratorInterface::ABSOLUTE_URL);
$body = [
'FromEmail' => "noreply@talentstube.io",
'FromName' => "Talents Tube",
'Subject' => $ad->getCompany()->getBrandName()." : Nouvelles vidéos Whaouuuuu!!!",
'MJ-TemplateID' =>2210612 ,
'MJ-TemplateLanguage' => true,
'Recipients' => [
[
'Email' => 'dev@talentstube.com',
'Vars' => [
'adressEmailRecruteur' => "",
'nomEntreprise' => $ad->getCompany()->getBrandName(),
'videoOffre1' => "https://recruteur.talentstube.com/uploads/videos/montage/".$newFilename1,
'videoOffre2' => "https://recruteur.talentstube.com/uploads/videos/montage/".$newFilename2,
'videoOffre3' => "https://recruteur.talentstube.com/uploads/videos/montage/".$newFilename3,
]
]
]
];
$response = $mj->post(Resources::$Email, ['body' => $body]);
$response->success() && var_dump($response->getData());
$message="Talents Tube a bien reçu vos séquences vidéos. Nous vous recontacterons par email pour finaliser la publication de votre annonce.";
}
return $this->render('company/createMedia.html.twig', array(
'form' => $form->createView(),
'formFile' => $formFile->createView(),
'ad' => $ad,
'video' => $video,
'videos' => $videos,
'message' => $message,
));
}
@@ -377,7 +377,7 @@ class User extends BaseUser
$zipCode = "";
$city = "";
$country = "";
$type=null;
if($this->getCompany()->getPresentationVideo())
{
$pres= $this->getCompany()->getPresentationVideo()->getCdnUrl();
@@ -424,7 +424,7 @@ class User extends BaseUser
}
}
}
$type=null;
if($this->getCompany()->getType()){
$type=$this->getCompany()->getType();
}
@@ -96,7 +96,7 @@ class MailManager
$email = \Swift_Message::newInstance()
->setSubject($subject)
->setFrom('noreply@talentstube.io')
->setTo('l.laniau@talentstube.com')
->setTo('dev@talentstube.com')
->setBody($message, 'text/html')
;
if ($this->mailer->send($email)) {
@@ -40,7 +40,7 @@ trait ExtraJsonTrait
$extra = $this->extra;
isset($extra['twitter']) ? $this->twitter = $extra['twitter'] : null;
isset($extra['linkedin']) ? $this->linkedin = $extra['linkedin'] : null;
isset($extra['size']) ? $this->size = $extra['size'] : null;
isset($extra['size']) ? $this->size = $extra['size'] : 1;
isset($extra['siren']) ? $this->siren = $extra['siren'] : null;
isset($extra['phoneTalent']) ? $this->phoneTalent = $extra['phoneTalent'] : null;
isset($extra['titleTalent']) ? $this->titleTalent = $extra['titleTalent'] : null;
@@ -66,6 +66,8 @@ trait ExtraJsonTrait
*/
public function getExtra()
{
$this->initExtra();
return $this->extra;
}
@@ -35,4 +35,65 @@
.font-2 {
font-family: "Varela Round", sans-serif; }
.container-envoi-videos{
width:100%;
height:auto;
border:1px solid #1689FB;
border-radius:5px;
margin-bottom:30px;
}
.titre-bloc-envoi-videos{
background-color:#1689FB;
padding:15px;
}
.image-envoi-video{
display:inline-block;
width:60px;
height:60px;
vertical-align: baseline;
margin-right:20px;
}
.texte-envoi-video{
display:inline-block;
}
.container-envoi-videos h4,.container-envoi-videos h5 {
color:#fff;
}
.container-envoi-videos h4{
font-size:1.250em;
}
.container-envoi-videos h5{
font-size:1em;
}
.contenu-bloc-envoi-videos{
padding:15px;
}
.contenu-bloc-envoi-videos p, .contenu-bloc-envoi-videos label{
color:#000;
font-weight: bold;
font-size:1em;
margin:10px 0;
}
.contenu-bloc-envoi-videos button{
display:block;
margin :20px 0;
}
.contenu-bloc-envoi-videos input{
display:block;
}
.underline{
text-decoration : underline;
}