Loading module/Application/src/Application/Entity/Db/Doctorant.php +17 −3 Changes for module/Application/src/Application/Entity/Db/Doctorant.php: 17 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -38,10 +38,14 @@ class Doctorant implements DoctorantInterface, HistoriqueAwareInterface, Resourc * @var Collection */ private $complements; /** * @var Etablissement */ protected $etablissement; /** * @return mixed * @return Etablissement */ public function getEtablissement() { Loading @@ -49,9 +53,9 @@ class Doctorant implements DoctorantInterface, HistoriqueAwareInterface, Resourc } /** * @param mixed $etablissement * @param Etablissement $etablissement */ public function setEtablissement($etablissement) public function setEtablissement(Etablissement $etablissement) { $this->etablissement = $etablissement; } Loading Loading @@ -88,6 +92,16 @@ class Doctorant implements DoctorantInterface, HistoriqueAwareInterface, Resourc return $this->sourceCode; } /** * Get sourceCode * * @return string */ public function getSourceCodeSansPrefix() { return $this->getEtablissement()->removePrefixFrom($this->sourceCode); } /** * Get id * Loading module/Application/src/Application/Entity/Db/Etablissement.php +15 −1 Changes for module/Application/src/Application/Entity/Db/Etablissement.php: 15 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ class Etablissement implements HistoriqueAwareInterface, SourceAwareInterface protected $structure; /** * Ajoute le préfixe établissement à la chaîne de caractères sépecifiée. * Ajoute le préfixe établissement à la chaîne de caractères spécifiée. * * @param string $string * @return string Loading @@ -43,6 +43,20 @@ class Etablissement implements HistoriqueAwareInterface, SourceAwareInterface return $this->getCode() . self::ETAB_PREFIX_SEP . $string; } /** * Supprime le préfixe établissement à la chaîne de caractères spécifiée. * * @param string $string * @return string */ public function removePrefixFrom($string) { return substr( $string, stripos($string, self::ETAB_PREFIX_SEP) + strlen(self::ETAB_PREFIX_SEP) ); } /** * Etablissement constructor. */ Loading module/Application/view/application/these/identite.phtml +3 −1 Changes for module/Application/view/application/these/identite.phtml: 3 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -52,7 +52,8 @@ $persopassModifiedEvent = 'persopass-modified-event'; <div class="panel-body"> <div id="photo-div" class="pull-right"> <div class="photo-placeholder loading" data-src="<?php echo $this->url('leocarte/photo', ['id' => $these->getDoctorant()->getSourceCode()]) ?>"></div> <div class="photo-placeholder loading" data-src="<?php echo $this->url('leocarte/photo', ['id' => $these->getDoctorant()->getSourceCodeSansPrefix()]) ?>"></div> </div> <dl class="dl-horizontal"> Loading Loading @@ -399,6 +400,7 @@ $persopassModifiedEvent = 'persopass-modified-event'; function loadPhoto(photoPlaceholder) { debugger; var photoUrl = $(photoPlaceholder).data('src'); //create image to preload: Loading Loading
module/Application/src/Application/Entity/Db/Doctorant.php +17 −3 Changes for module/Application/src/Application/Entity/Db/Doctorant.php: 17 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -38,10 +38,14 @@ class Doctorant implements DoctorantInterface, HistoriqueAwareInterface, Resourc * @var Collection */ private $complements; /** * @var Etablissement */ protected $etablissement; /** * @return mixed * @return Etablissement */ public function getEtablissement() { Loading @@ -49,9 +53,9 @@ class Doctorant implements DoctorantInterface, HistoriqueAwareInterface, Resourc } /** * @param mixed $etablissement * @param Etablissement $etablissement */ public function setEtablissement($etablissement) public function setEtablissement(Etablissement $etablissement) { $this->etablissement = $etablissement; } Loading Loading @@ -88,6 +92,16 @@ class Doctorant implements DoctorantInterface, HistoriqueAwareInterface, Resourc return $this->sourceCode; } /** * Get sourceCode * * @return string */ public function getSourceCodeSansPrefix() { return $this->getEtablissement()->removePrefixFrom($this->sourceCode); } /** * Get id * Loading
module/Application/src/Application/Entity/Db/Etablissement.php +15 −1 Changes for module/Application/src/Application/Entity/Db/Etablissement.php: 15 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ class Etablissement implements HistoriqueAwareInterface, SourceAwareInterface protected $structure; /** * Ajoute le préfixe établissement à la chaîne de caractères sépecifiée. * Ajoute le préfixe établissement à la chaîne de caractères spécifiée. * * @param string $string * @return string Loading @@ -43,6 +43,20 @@ class Etablissement implements HistoriqueAwareInterface, SourceAwareInterface return $this->getCode() . self::ETAB_PREFIX_SEP . $string; } /** * Supprime le préfixe établissement à la chaîne de caractères spécifiée. * * @param string $string * @return string */ public function removePrefixFrom($string) { return substr( $string, stripos($string, self::ETAB_PREFIX_SEP) + strlen(self::ETAB_PREFIX_SEP) ); } /** * Etablissement constructor. */ Loading
module/Application/view/application/these/identite.phtml +3 −1 Changes for module/Application/view/application/these/identite.phtml: 3 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -52,7 +52,8 @@ $persopassModifiedEvent = 'persopass-modified-event'; <div class="panel-body"> <div id="photo-div" class="pull-right"> <div class="photo-placeholder loading" data-src="<?php echo $this->url('leocarte/photo', ['id' => $these->getDoctorant()->getSourceCode()]) ?>"></div> <div class="photo-placeholder loading" data-src="<?php echo $this->url('leocarte/photo', ['id' => $these->getDoctorant()->getSourceCodeSansPrefix()]) ?>"></div> </div> <dl class="dl-horizontal"> Loading Loading @@ -399,6 +400,7 @@ $persopassModifiedEvent = 'persopass-modified-event'; function loadPhoto(photoPlaceholder) { debugger; var photoUrl = $(photoPlaceholder).data('src'); //create image to preload: Loading