Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d301c3b029 | |||
| 441304c363 | |||
| 3399a82379 | |||
| 4e111ae3cd | |||
| ed669974a1 | |||
| 02c68a48c9 | |||
| 0373f01013 | |||
| cbcf51f93d | |||
| dffb439bb3 | |||
| 4b2c5fc222 | |||
| 13073d59e4 | |||
| 8e995cef82 | |||
| 349bc309bd | |||
| 492d2687c5 | |||
| 2fa50e3d5b |
@@ -68,11 +68,11 @@
|
||||
- {{ company.addresses.billing.country|country }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col s12 profil-links">
|
||||
<div class="col s12 profil-links center-align">
|
||||
{% if company.website %}
|
||||
<a target="_blank" href="{{ company.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-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-link fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
@@ -38,11 +38,13 @@
|
||||
<a href="{{ path('talent_answer_create',{id:a.ad.id}) }}">
|
||||
<i class="fa fa-pencil-square-o" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% elseif a.status == "DRAFT" and a.company != null %}
|
||||
<a href="{{ path('talent_spontaneous_application_create',{id:a.company.id}) }}">
|
||||
<i class="fa fa-pencil-square-o" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if a.isViewed %}
|
||||
{% if a.isViewed.status == "DRAFT" %}
|
||||
{{ 'VIEWED'|trans }}
|
||||
{% endif %}
|
||||
{{ 'VIEWED'|trans }}
|
||||
{% else %}
|
||||
{{ a.status|trans }}
|
||||
{% endif %}
|
||||
@@ -80,4 +82,11 @@
|
||||
var player_vimeo = new Vimeo.Player('player_vimeo');
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
(function ($) {
|
||||
$(function () {
|
||||
$('.modal').modal();
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -25,29 +25,4 @@
|
||||
output='assetic/main.dashboard.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'
|
||||
});
|
||||
|
||||
jQuery.extend(jQuery.validator.messages, {
|
||||
required: "Ce champ est obligatoire"
|
||||
});
|
||||
|
||||
$('form[name="talent"]').validate();
|
||||
$('form[name="talent_profile"]').validate();
|
||||
$('form[name="careers"]').validate();
|
||||
$('form[name="formations"]').validate();
|
||||
$('form[name="languages"]').validate();
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -7,19 +7,19 @@
|
||||
<img src="{{ app.user.webPath | imagine_filter('profile_square') }}"
|
||||
alt="{{ app.user.firstname }} {{ app.user.lastname|first|upper }}"
|
||||
class="circle responsive-img"/>
|
||||
<a href="#modalProfilePicture">
|
||||
<a data-target="modalProfilePicture" class="modal-trigger" href="#modalProfilePicture">
|
||||
<i class="fa fa-pencil" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% elseif app.user.socialPicture is not null %}
|
||||
<img src="{{ app.user.socialPicture }}"
|
||||
alt="{{ app.user.firstname }} {{ app.user.lastname|first|upper }}"
|
||||
class="circle responsive-img"/>
|
||||
<a href="#modalProfilePicture">
|
||||
<a data-target="modalProfilePicture" class="modal-trigger" href="#modalProfilePicture">
|
||||
<i class="fa fa-pencil" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% else %}
|
||||
<div class="circle-letters font-2">{{ app.user.firstname|first|upper }}{{ app.user.lastname|first|upper }}</div>
|
||||
<a href="#modalProfilePicture">
|
||||
<a data-target="modalProfilePicture" class="modal-trigger" href="#modalProfilePicture">
|
||||
<i class="fa fa-pencil" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
@@ -325,5 +325,12 @@
|
||||
<script src="{{ asset('/js/dropzone.js') }}"></script>
|
||||
{% endif %}
|
||||
<script src="{{ asset('/js/profileTalent.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
(function ($) {
|
||||
$(function () {
|
||||
$('.modal').modal();
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
@@ -15,9 +15,14 @@
|
||||
</div>
|
||||
<div class="col s12 titleDateCareer">
|
||||
{% if c.beginMonthCareer is defined %}
|
||||
<span>{{ c.beginMonthCareer }} {{ c.beginYearCareer }}</span>
|
||||
{% set fullDate = '2018-' ~ c.beginMonthCareer ~ '-01' %}
|
||||
{% if c.beginMonthCareer matches '/^\\d+$/' %}
|
||||
<span>{{ fullDate|datetime }} {{ c.beginYearCareer }}</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<span>- {% if c.actualJobCareer is defined and c.actualJobCareer == true %}Aujourd'hui{% else %}{{ c.endMonthCareer }} {{ c.endYearCareer }}{% endif %}, {{ c.placeCareer }}
|
||||
<span>-
|
||||
{% if c.actualJobCareer is defined and c.actualJobCareer == true %}
|
||||
Aujourd'hui{% else %} {% set fullDateEnd = '2018-' ~ c.endMonthCareer ~ '-01' %} {% if c.endMonthCareer matches '/^\\d+$/' %}{{ fullDateEnd|datetime }}{% endif %} {{ c.endYearCareer }}{% endif %}, {{ c.placeCareer }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="col s12">
|
||||
|
||||
@@ -82,7 +82,9 @@
|
||||
{% for tag in talent.publicTag if talent.publicTag[0] is not empty %}
|
||||
<div class="chip {% if loop.index > 5 %}chip-invisible{% endif %}">{{ tag }}</div>
|
||||
{% endfor %}
|
||||
<div class="chip chip-more">+ {{ talent.publicTag|length - 5 }}</div>
|
||||
{% if talent.publicTag|length > 5 %}
|
||||
<div class="chip chip-more">+ {{ talent.publicTag|length - 5 }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% if user.company.extra.descriptionTalent %}
|
||||
|
||||
@@ -71,11 +71,11 @@
|
||||
- {{ company.addresses.billing.country|country }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col s12 profil-links">
|
||||
<div class="col s12 profil-links center-align">
|
||||
{% if company.website %}
|
||||
<a target="_blank" href="{{ company.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-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-link fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
@@ -41,6 +41,7 @@ assetic:
|
||||
- 'js/vendors/tooltipster.bundle.min.js'
|
||||
- 'js/vendors/datepicker.min.js'
|
||||
- 'js/vendors/jquery.validate.min.js'
|
||||
- 'js/talent.js'
|
||||
admin:
|
||||
inputs:
|
||||
- 'admin/AdminLTE/plugins/jQuery/jquery-2.2.3.min.js'
|
||||
|
||||
@@ -63,6 +63,7 @@ class TalentController extends Controller
|
||||
*/
|
||||
public function talentProfileAction(Request $request)
|
||||
{
|
||||
setlocale(LC_TIME, 'fr_FR.UTF8', 'fr.UTF8', 'fr_FR.UTF-8', 'fr.UTF-8');
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$history = $this->get('edeclic.history.record');
|
||||
$records = $history->recordShow($this->getUser()->getId(), "r", 'AppBundle\Entity\Ad', null);
|
||||
@@ -92,8 +93,6 @@ class TalentController extends Controller
|
||||
if ($formCompany->isSubmitted() && $formCompany->isValid()) {
|
||||
$companyManager = $this->get('app.company_manager');
|
||||
$companyManager->updateTalent($user);
|
||||
$event = new UserEvent($user);
|
||||
$this->get('event_dispatcher')->dispatch(PrestashopBridgeEvents::USER_PROFIL_EDIT_SUCCESS, $event);
|
||||
$this->addFlash(
|
||||
'notice',
|
||||
$this->get('translator')->trans('company.profile.save.title')
|
||||
@@ -105,13 +104,9 @@ class TalentController extends Controller
|
||||
if ($formCareer->isSubmitted() && $formCareer->isValid()) {
|
||||
$careers = $formCareer->getData()->getCareer();
|
||||
usort($careers, "static::sortByBeginYearCareer");
|
||||
//dump($careers);
|
||||
//die();
|
||||
$user->setCareer($careers);
|
||||
$em->persist($user);
|
||||
$em->flush();
|
||||
$event = new UserEvent($user);
|
||||
$this->get('event_dispatcher')->dispatch(PrestashopBridgeEvents::USER_PROFIL_EDIT_SUCCESS, $event);
|
||||
$this->addFlash(
|
||||
'notice',
|
||||
$this->get('translator')->trans('company.profile.save.title')
|
||||
@@ -126,8 +121,6 @@ class TalentController extends Controller
|
||||
$user->setFormation($formations);
|
||||
$em->persist($user);
|
||||
$em->flush();
|
||||
$event = new UserEvent($user);
|
||||
$this->get('event_dispatcher')->dispatch(PrestashopBridgeEvents::USER_PROFIL_EDIT_SUCCESS, $event);
|
||||
$this->addFlash(
|
||||
'notice',
|
||||
$this->get('translator')->trans('company.profile.save.title')
|
||||
@@ -138,12 +131,9 @@ class TalentController extends Controller
|
||||
$formLanguage->handleRequest($request);
|
||||
if ($formLanguage->isSubmitted() && $formLanguage->isValid()) {
|
||||
$languages = $formLanguage->getData()->getLanguage();
|
||||
//usort($languages, "static::sortByLanguageName");
|
||||
$user->setLanguage($languages);
|
||||
$em->persist($user);
|
||||
$em->flush();
|
||||
$event = new UserEvent($user);
|
||||
$this->get('event_dispatcher')->dispatch(PrestashopBridgeEvents::USER_PROFIL_EDIT_SUCCESS, $event);
|
||||
$this->addFlash(
|
||||
'notice',
|
||||
$this->get('translator')->trans('company.profile.save.title')
|
||||
@@ -164,7 +154,6 @@ class TalentController extends Controller
|
||||
}
|
||||
|
||||
return $this->render('talent/profile.html.twig', [
|
||||
//'form' => $form->createView(),
|
||||
'formProfile' => $formProfile->createView(),
|
||||
'formCompany' => $formCompany->createView(),
|
||||
'formCareer' => $formCareer->createView(),
|
||||
|
||||
@@ -140,7 +140,7 @@ class Answer
|
||||
}
|
||||
|
||||
public function getIsViewed(){
|
||||
if($this->messages->count() <= 1){
|
||||
if($this->messages->count() >= 1){
|
||||
|
||||
return $this->messages->last();
|
||||
} else {
|
||||
|
||||
@@ -95,14 +95,13 @@ class CareerType extends AbstractType
|
||||
|
||||
private function getMonths()
|
||||
{
|
||||
setlocale(LC_TIME, "fr_FR");
|
||||
$months = array();
|
||||
for ($m=1; $m<=12; $m++) {
|
||||
$month = utf8_encode(strftime('%B', mktime(0,0,0,$m, 1, date('Y'))));
|
||||
$months[] = $month;
|
||||
$month = strftime('%B', mktime(0,0,0,$m, 1, date('Y')));
|
||||
$months[$month] = $m;
|
||||
}
|
||||
|
||||
return array_combine($months, $months);
|
||||
return $months;
|
||||
}
|
||||
|
||||
public function getName()
|
||||
|
||||
@@ -82,17 +82,17 @@ class CompanyManager
|
||||
);
|
||||
$addrs['billing'] = $billing;
|
||||
$talent->setAddresses($addrs);
|
||||
$publicTags = explode(',', $talent->getTagsComma());
|
||||
$talent->setPublicTag($publicTags);
|
||||
$extra = array(
|
||||
'linkedin' => $talent->getLinkedin(),
|
||||
'twitter' => $talent->getTwitter(),
|
||||
'titleTalent' => $talent->getTitleTalent(),
|
||||
'situationTalent' => $talent->getSituationTalent(),
|
||||
'descriptionTalent' => $talent->getDescriptionTalent(),
|
||||
);
|
||||
$talent->setExtra($extra);
|
||||
}
|
||||
$publicTags = explode(',', $talent->getTagsComma());
|
||||
$talent->setPublicTag($publicTags);
|
||||
$extra = array(
|
||||
'linkedin' => $talent->getLinkedin(),
|
||||
'twitter' => $talent->getTwitter(),
|
||||
'titleTalent' => $talent->getTitleTalent(),
|
||||
'situationTalent' => $talent->getSituationTalent(),
|
||||
'descriptionTalent' => $talent->getDescriptionTalent(),
|
||||
);
|
||||
$talent->setExtra($extra);
|
||||
|
||||
$this->em->persist($talent);
|
||||
$this->em->persist($user);
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -13167,6 +13167,9 @@ coloring of icons.
|
||||
.hover-none a:hover {
|
||||
color: #ffffff; }
|
||||
|
||||
select {
|
||||
display: block; }
|
||||
|
||||
.color-white {
|
||||
color: #FFFFFF; }
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,66 @@
|
||||
$.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'
|
||||
});
|
||||
|
||||
jQuery.extend(jQuery.validator.messages, {
|
||||
required: "Ce champ est obligatoire"
|
||||
});
|
||||
|
||||
$('form[name="talent"]').validate();
|
||||
$('form[name="talent_profile"]').validate();
|
||||
$('form[name="careers"]').validate();
|
||||
$('form[name="formations"]').validate();
|
||||
$('form[name="languages"]').validate();
|
||||
|
||||
window.URL = window.URL || window.webkitURL;
|
||||
var useBlob = false && window.URL;
|
||||
|
||||
function readURL(file) {
|
||||
var reader = new FileReader();
|
||||
reader.addEventListener("load", function () {
|
||||
var image = new Image();
|
||||
image.addEventListener("load", function () {
|
||||
if (Math.round(file.size / 1024) > 4000) {
|
||||
$('#preview_profile_picture').html("");
|
||||
$('.btn-save-profile-picture').addClass('hide');
|
||||
$('#card-alert').slideDown();
|
||||
$(".errors").html("L'image que vous tentez de charger est trop lourde.<br />Merci de choisir une autre photo ne dépassant pas les 4Mo.");
|
||||
} else {
|
||||
$('#card-alert').fadeOut();
|
||||
$(".errors").html("");
|
||||
$('#preview_profile_picture').html(this);
|
||||
$('.btn-save-profile-picture').removeClass('hide');
|
||||
}
|
||||
});
|
||||
image.src = useBlob ? window.URL.createObjectURL(file) : reader.result;
|
||||
});
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
|
||||
$("#profile_picture_file, #profile_logo_file").change(function () {
|
||||
var files = this.files;
|
||||
if (files && files[0]) {
|
||||
for (var i = 0; i < files.length; i++) {
|
||||
var file = files[i];
|
||||
if ((/\.(png|jpeg|jpg|gif)$/i).test(file.name)) {
|
||||
readURL(file);
|
||||
} else {
|
||||
var errors = file.name + "<br />Le format de l'image n'est pas supporté. Merci de charger une image de type png,jpeg,jpg ou gif.";
|
||||
$('#preview_profile_picture').html("");
|
||||
$('.btn-save-profile-picture').addClass('hide');
|
||||
$('#card-alert').slideDown();
|
||||
$(".errors").html(errors);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -486,3 +486,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
select{
|
||||
display: block;
|
||||
}
|
||||
Reference in New Issue
Block a user