Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4f185984f9 | |||
| 26e781c230 | |||
| b68e1c6050 | |||
| ee98a19150 | |||
| 0e512cb8a2 | |||
| 24a5ac8cbf | |||
| 6920e8faa0 | |||
| 5aa8079b0a | |||
| cc83f88458 | |||
| 4edfdfd187 |
@@ -34,7 +34,16 @@
|
||||
<td>{{ m.mediaid }}</td>
|
||||
<td><a href="{{ chemin }}{{ m.original_url }}" target="_blank">{{ m.title }}</a></td>
|
||||
<td>{{ m.firstname }} {{ m.lastname }} - ({{ m.email }}) </td>
|
||||
<td>{% if m.answerid %}({{ m.adtitle }}){% else %}<b>Vidéo orpheline</b>{% endif %}</td>
|
||||
<td>
|
||||
{% if m.answerid %}
|
||||
{% if m.adtitle %}
|
||||
({{ m.adtitle }})
|
||||
{% else %}
|
||||
({{ m.ctitle }})
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<b>Vidéo orpheline</b>
|
||||
{% endif %}</td>
|
||||
<td>
|
||||
<span class="label pull-right bg-orange">{{ m.sendtime }}</span>
|
||||
</td>
|
||||
|
||||
@@ -54,7 +54,9 @@
|
||||
{% if user.medias|length > 0 %}
|
||||
|
||||
{% else %}
|
||||
<a href="https://www.talentstube.com/Offre/{{ adId[1]|replace({' ': ''}) }}-{{ adId[1] }}" target="_blank">Lien vers l'annonce avant inscription</a>
|
||||
{% if adId[1] and adId[1] !="" %}
|
||||
<a href="https://www.talentstube.com/Offre/{{ adId[1]|replace({' ': ''}) }}-{{ adId[1] }}" target="_blank">Lien vers l'annonce avant inscription</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<!-- Required Meta Tags Always Come First -->
|
||||
<meta charset="utf-8">
|
||||
{# <meta name="robots" content="noindex,nofollow"> #}
|
||||
<meta name="robots" content="noindex,nofollow">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
{% block meta %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -80,7 +80,7 @@ twig:
|
||||
globals:
|
||||
push_public_key: "%push_params.public_key%"
|
||||
fairlane_cookie_consent: '@fairlane_cookie_consent.twig'
|
||||
version: '2.5.4'
|
||||
version: '2.6.1'
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -217,7 +217,7 @@ class AnswerController extends AbstractController
|
||||
case 'status':
|
||||
{
|
||||
if($answer->getstatus()=="SENDED"){
|
||||
$status= "ENVOYE <br><small>car ça choque Sarah Sended</small>";
|
||||
$status= "ENVOYE";
|
||||
}else{
|
||||
$status=$answer->getstatus();
|
||||
}
|
||||
|
||||
@@ -173,34 +173,44 @@ class AnswerController extends FOSRestController
|
||||
|
||||
$mailManager = $this->get('app.mail_manager');
|
||||
foreach ($usersCompany as $user){
|
||||
$mj = new Client($this->getParameter('mailjet_public'), $this->getParameter('mailjet_private'));
|
||||
$mj = new Client("355697fac93fca865660734b4fdffaeb", "ddecf75321ca89c09e561857b13534c8");
|
||||
$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";
|
||||
|
||||
}else{
|
||||
// $complSubject="";
|
||||
// if($user->getEmail()){
|
||||
// $complSubject=$user->getEmail();
|
||||
// }
|
||||
if($answer->getUser()){
|
||||
$body = [
|
||||
'FromEmail' => "noreply@talentstube.io",
|
||||
'FromName' => "Talents Tube",
|
||||
// 'To' => $contactMail,
|
||||
'Subject' => "Une nouvelle candidature reçue sur Talents Tube ",
|
||||
'MJ-TemplateID' =>2297838 ,
|
||||
'MJ-TemplateLanguage' => true,
|
||||
'Recipients' => [
|
||||
[
|
||||
'Email' => $contactMail,
|
||||
'Name' => $user->getLastname(),
|
||||
'Vars' => [
|
||||
'prenomRecruteur' => $user->getFirstname(),
|
||||
'nomRecruteur' => $user->getLastname(),
|
||||
'prenom' => $answer->getUser()->getFirstname(),
|
||||
'nom' => $answer->getUser()->getLastname(),
|
||||
'urlCandidature' => $link,
|
||||
]
|
||||
]
|
||||
],
|
||||
|
||||
];
|
||||
$response = $mj->post(Resources::$Email, ['body' => $body]);
|
||||
$response->success() ;
|
||||
}
|
||||
}
|
||||
$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());
|
||||
|
||||
|
||||
// $mailManager->sendMail(
|
||||
|
||||
@@ -165,6 +165,21 @@ class SecurityController extends FOSRestController
|
||||
$countryTalent = "";
|
||||
}
|
||||
$titleTalent = htmlspecialchars($request->get('currentJob'));
|
||||
|
||||
$geoloc = htmlspecialchars($request->get('geoloc'));
|
||||
$street_number = htmlspecialchars($request->get('street_number'));
|
||||
$route = htmlspecialchars($request->get('route'));
|
||||
$locality = htmlspecialchars($request->get('locality'));
|
||||
$administrative_area_level_2 = htmlspecialchars($request->get('administrative_area_level_2'));
|
||||
$administrative_area_level_1 = htmlspecialchars($request->get('administrative_area_level_1'));
|
||||
$country = htmlspecialchars($request->get('country'));
|
||||
$postal_code = htmlspecialchars($request->get('postal_code'));
|
||||
$formatted_address = str_replace('"', '', $request->get('formatted_address'));
|
||||
$lat = stripslashes($request->get('lat'));
|
||||
$lng = stripslashes($request->get('lng'));
|
||||
|
||||
//
|
||||
|
||||
$newLinkedin = htmlspecialchars($request->get('linkedin'));
|
||||
$newTwitter = htmlspecialchars($request->get('twitter'));
|
||||
$newWebsite = htmlspecialchars($request->get('website'));
|
||||
@@ -181,6 +196,26 @@ class SecurityController extends FOSRestController
|
||||
$talent->setLinkedin($newLinkedin);
|
||||
$talent->setTwitter($newTwitter);
|
||||
$talent->setTitleTalent($titleTalent);
|
||||
$array = Array ();
|
||||
|
||||
// \"$formatted_address
|
||||
if($formatted_address!=""){
|
||||
$array[] = Array (
|
||||
"street_number" => $street_number,
|
||||
"route" => $route,
|
||||
"administrative_area_level_2" => $administrative_area_level_2,
|
||||
"administrative_area_level_1" => $administrative_area_level_1,
|
||||
"country" => $country,
|
||||
"locality" => $locality,
|
||||
"postal_code" => $postal_code,
|
||||
"formatted_address" => $formatted_address,
|
||||
"lat" => stripslashes($lat),
|
||||
"lng" => stripslashes($lng)
|
||||
);
|
||||
|
||||
$usr->setGeoloc($array);
|
||||
}
|
||||
|
||||
$talent->setPhoneTalent($phoneTalent);
|
||||
//$talent->setPhoneTalent($phoneTalent);
|
||||
$billing = array(
|
||||
@@ -195,7 +230,7 @@ class SecurityController extends FOSRestController
|
||||
|
||||
$companyManager->updateTalent($usr);
|
||||
|
||||
$status = array('status' => "success");
|
||||
$status = array('status' => "success!!!!!!!!!!!!!!!!!!");
|
||||
}
|
||||
} else {
|
||||
$status = array('status' => "failure", 'message' => "Vous n'êtes pas connecté.");
|
||||
|
||||
@@ -111,9 +111,9 @@ class MediaController extends Controller
|
||||
]);
|
||||
}
|
||||
public function convertKekab($string){
|
||||
$search = array('À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'à', 'á', 'â', 'ã', 'ä', 'å', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ð', 'ò', 'ó', 'ô', 'õ', 'ö', 'ù', 'ú', 'û', 'ü', 'ý', 'ÿ');
|
||||
$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');
|
||||
$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', "s");
|
||||
|
||||
$string = str_replace($search, $replace, $string);
|
||||
$string = strtolower (str_replace(" ", "-", $string));
|
||||
|
||||
@@ -80,6 +80,15 @@ class User extends BaseUser
|
||||
*/
|
||||
private $status;
|
||||
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*
|
||||
* @ORM\Column(name="geoloc", type="json_document", nullable=true, options={"jsonb":true})
|
||||
* @Groups({"ad_detail", "ad_list", "answer_detail", "company_detail"})
|
||||
*/
|
||||
private $geoloc;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="AppBundle\Entity\Company", inversedBy="users", cascade={"persist"})
|
||||
*/
|
||||
@@ -451,6 +460,7 @@ class User extends BaseUser
|
||||
"country" => $country,
|
||||
"type" => $type,
|
||||
"currentJob" => $this->getCompany()->getExtra()["titleTalent"],
|
||||
"geoloc" => $this->getGeoloc(),
|
||||
"website" => $this->getCompany()->getWebsite(),
|
||||
);
|
||||
return $card;
|
||||
@@ -617,6 +627,32 @@ class User extends BaseUser
|
||||
return $this->status;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set Geoloc.
|
||||
*
|
||||
* @param json_document|null $geoloc
|
||||
*
|
||||
* @return User
|
||||
*/
|
||||
public function setGeoloc($geoloc = null)
|
||||
{
|
||||
$this->geoloc = $geoloc;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get geoloc.
|
||||
*
|
||||
* @return json_document|null
|
||||
*/
|
||||
public function getGeoloc()
|
||||
{
|
||||
//19/01 : modif pour size et siren cote Symfony. Effet sur la web app?
|
||||
//$this->initExtra();
|
||||
return $this->geoloc;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set facebookId.
|
||||
*
|
||||
|
||||
@@ -22,11 +22,12 @@ class MediaRepository extends AbstractRepository
|
||||
|
||||
|
||||
$medias = $qb->getQuery()->getResult();
|
||||
$rawSql = "SELECT m.id as mediaid, m.title as title, m.original_url as original_url , u.* , a.id as answerId, a.send_time as sendtime, ad.title as adTitle
|
||||
$rawSql = "SELECT m.id as mediaid, m.title as title, m.original_url as original_url , u.* , a.id as answerId, a.send_time as sendtime, ad.title as adTitle, c.brand_name as cTitle
|
||||
FROM media AS m
|
||||
JOIN fos_user AS u ON (u.id=m.creator_id)
|
||||
LEFT JOIN answer AS a ON (a.video_id=m.id)
|
||||
LEFT JOIN ad AS ad ON (ad.id=a.ad_id)
|
||||
LEFT JOIN ad AS ad ON (ad.id=a.ad_id)
|
||||
LEFT JOIN company AS c ON (c.id=a.company_id)
|
||||
WHERE m.status='TO_MODERATE'
|
||||
ORDER by m.id DESC";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user