mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-11 03:53:13 +00:00
Use symfony translator
This commit is contained in:
@@ -183,9 +183,9 @@ function giveMeBaseUsr(Application $app, $usr)
|
||||
if ($baseInsc['CollsRegistered']) {
|
||||
foreach ($baseInsc['CollsRegistered'] as $collId => $isTrue) {
|
||||
$base_id = phrasea::baseFromColl($sbasId, $collId, $app);
|
||||
$out .= '<tr><td colspan="3" style="text-align:center;">' . _('login::register: acces authorise sur la collection ') . phrasea::bas_labels($base_id, $app);
|
||||
$out .= '<tr><td colspan="3" style="text-align:center;">' . $app->trans('login::register: acces authorise sur la collection') . phrasea::bas_labels($base_id, $app);
|
||||
if (trim($isTrue) != '')
|
||||
$out .= ' <a class="inscriptlink" href="/include/cguUtils.php?action=PRINT&bas=' . $sbasId . '&col=' . $collId . '">' . _('login::register::CGU: lire les CGU') . '</a>';
|
||||
$out .= ' <a class="inscriptlink" href="/include/cguUtils.php?action=PRINT&bas=' . $sbasId . '&col=' . $collId . '">' . $app->trans('login::register::CGU: lire les CGU') . '</a>';
|
||||
$out .= '</td></tr>';
|
||||
}
|
||||
$out .= '<tr style="height:5px;"><td></td></tr>';
|
||||
@@ -193,9 +193,9 @@ function giveMeBaseUsr(Application $app, $usr)
|
||||
if ($baseInsc['CollsRefuse']) {
|
||||
foreach ($baseInsc['CollsRefuse'] as $collId => $isTrue) {
|
||||
$base_id = phrasea::baseFromColl($sbasId, $collId, $app);
|
||||
$out .= '<tr><td colspan="3" style="text-align:center;"><span style="color:red;">' . _('login::register: acces refuse sur la collection ') . phrasea::bas_labels($base_id, $app) . '</span>';
|
||||
$out .= '<tr><td colspan="3" style="text-align:center;"><span style="color:red;">' . $app->trans('login::register: acces refuse sur la collection') . phrasea::bas_labels($base_id, $app) . '</span>';
|
||||
if (trim($isTrue) != '')
|
||||
$out .= ' <a class="inscriptlink" href="/include/cguUtils.php?action=PRINT&bas=' . $sbasId . '&col=' . $collId . '">' . _('login::register::CGU: lire les CGU') . '</a>';
|
||||
$out .= ' <a class="inscriptlink" href="/include/cguUtils.php?action=PRINT&bas=' . $sbasId . '&col=' . $collId . '">' . $app->trans('login::register::CGU: lire les CGU') . '</a>';
|
||||
$out .= '</td></tr>';
|
||||
}
|
||||
$out .= '<tr style="height:5px;"><td></td></tr>';
|
||||
@@ -203,9 +203,9 @@ function giveMeBaseUsr(Application $app, $usr)
|
||||
if ($baseInsc['CollsWait']) {
|
||||
foreach ($baseInsc['CollsWait'] as $collId => $isTrue) {
|
||||
$base_id = phrasea::baseFromColl($sbasId, $collId, $app);
|
||||
$out .= '<tr><td colspan="3" style="text-align:center;"><span style="color:orange;">' . _('login::register: en attente d\'acces sur') . ' ' . phrasea::bas_labels($base_id, $app) . '</span>';
|
||||
$out .= '<tr><td colspan="3" style="text-align:center;"><span style="color:orange;">' . $app->trans('login::register: en attente d\'acces sur') . ' ' . phrasea::bas_labels($base_id, $app) . '</span>';
|
||||
if (trim($isTrue) != '')
|
||||
$out .= ' <a class="inscriptlink" href="/include/cguUtils.php?action=PRINT&bas=' . $sbasId . '&col=' . $collId . '">' . _('login::register::CGU: lire les CGU') . '</a>';
|
||||
$out .= ' <a class="inscriptlink" href="/include/cguUtils.php?action=PRINT&bas=' . $sbasId . '&col=' . $collId . '">' . $app->trans('login::register::CGU: lire les CGU') . '</a>';
|
||||
$out .= '</td></tr>';
|
||||
}
|
||||
$out .= '<tr style="height:5px;"><td></td></tr>';
|
||||
@@ -213,9 +213,9 @@ function giveMeBaseUsr(Application $app, $usr)
|
||||
if ($baseInsc['CollsIntime']) {
|
||||
foreach ($baseInsc['CollsIntime'] as $collId => $isTrue) {
|
||||
$base_id = phrasea::baseFromColl($sbasId, $collId, $app);
|
||||
$out .= '<tr><td colspan="3" style="text-align:center;">' . _('login::register: acces temporaire sur') . phrasea::bas_labels($base_id, $app) . '</span>';
|
||||
$out .= '<tr><td colspan="3" style="text-align:center;">' . $app->trans('login::register: acces temporaire sur') . phrasea::bas_labels($base_id, $app) . '</span>';
|
||||
if (trim($isTrue) != '')
|
||||
$out .= ' <a class="inscriptlink" href="/include/cguUtils.php?action=PRINT&bas=' . $sbasId . '&col=' . $collId . '">' . _('login::register::CGU: lire les CGU') . '</a>';
|
||||
$out .= ' <a class="inscriptlink" href="/include/cguUtils.php?action=PRINT&bas=' . $sbasId . '&col=' . $collId . '">' . $app->trans('login::register::CGU: lire les CGU') . '</a>';
|
||||
$out .= '</td></tr>';
|
||||
}
|
||||
$out .= '<tr style="height:5px;"><td></td></tr>';
|
||||
@@ -223,9 +223,9 @@ function giveMeBaseUsr(Application $app, $usr)
|
||||
if ($baseInsc['CollsOuttime']) {
|
||||
foreach ($baseInsc['CollsOuttime'] as $collId => $isTrue) {
|
||||
$base_id = phrasea::baseFromColl($sbasId, $collId, $app);
|
||||
$out .= '<tr><td colspan="3" style="text-align:center;"><span style="color:red;">' . _('login::register: acces temporaire termine sur ') . phrasea::bas_labels($base_id, $app) . '</span>';
|
||||
$out .= '<tr><td colspan="3" style="text-align:center;"><span style="color:red;">' . $app->trans('login::register: acces temporaire termine sur') . phrasea::bas_labels($base_id, $app) . '</span>';
|
||||
if (trim($isTrue) != '')
|
||||
$out .= ' <a class="inscriptlink" href="/include/cguUtils.php?action=PRINT&bas=' . $sbasId . '&col=' . $collId . '">' . _('login::register::CGU: lire les CGU') . '</a>';
|
||||
$out .= ' <a class="inscriptlink" href="/include/cguUtils.php?action=PRINT&bas=' . $sbasId . '&col=' . $collId . '">' . $app->trans('login::register::CGU: lire les CGU') . '</a>';
|
||||
$out .= '</td></tr>';
|
||||
}
|
||||
$out .= '<tr style="height:5px;"><td></td></tr>';
|
||||
@@ -233,9 +233,9 @@ function giveMeBaseUsr(Application $app, $usr)
|
||||
if ($baseInsc['CollsNonactif']) {
|
||||
foreach ($baseInsc['CollsNonactif'] as $collId => $isTrue) {
|
||||
$base_id = phrasea::baseFromColl($sbasId, $collId, $app);
|
||||
$out .= '<tr><td colspan="3" style="text-align:center;"><span style="color:red;">' . _('login::register: acces supendu sur') . phrasea::bas_labels($base_id, $app) . '</span>';
|
||||
$out .= '<tr><td colspan="3" style="text-align:center;"><span style="color:red;">' . $app->trans('login::register: acces supendu sur') . phrasea::bas_labels($base_id, $app) . '</span>';
|
||||
if (trim($isTrue) != '')
|
||||
$out .= ' <a class="inscriptlink" href="/include/cguUtils.php?action=PRINT&bas=' . $sbasId . '&col=' . $collId . '">' . _('login::register::CGU: lire les CGU') . '</a>';
|
||||
$out .= ' <a class="inscriptlink" href="/include/cguUtils.php?action=PRINT&bas=' . $sbasId . '&col=' . $collId . '">' . $app->trans('login::register::CGU: lire les CGU') . '</a>';
|
||||
$out .= '</td></tr>';
|
||||
}
|
||||
$out .= '<tr style="height:5px;"><td></td></tr>';
|
||||
@@ -248,7 +248,7 @@ function giveMeBaseUsr(Application $app, $usr)
|
||||
if ($baseInsc['Colls']) {//des coll ou on peut s'inscrire sans cgu specifiques
|
||||
//je check si ya des cgu pour la base
|
||||
if ($baseInsc['CGU']) {
|
||||
$out .= '<tr><td colspan="3" style="text-align:center;">' . _('login::register: L\'acces aux bases ci-dessous implique l\'acceptation des Conditions Generales d\'Utilisation (CGU) suivantes') . '</td></tr>';
|
||||
$out .= '<tr><td colspan="3" style="text-align:center;">' . $app->trans('login::register: L\'acces aux bases ci-dessous implique l\'acceptation des Conditions Generales d\'Utilisation (CGU) suivantes') . '</td></tr>';
|
||||
$out .= '<tr><td colspan="3" style="text-align:center;"><div style="width:90%;height:120px;text-align:left;overflow:auto;">' . $baseInsc['CGU'] . '</div></td></tr>';
|
||||
}
|
||||
foreach ($baseInsc['Colls'] as $collId => $collName) {
|
||||
@@ -258,7 +258,7 @@ function giveMeBaseUsr(Application $app, $usr)
|
||||
'<td></td>' .
|
||||
'<td class="TD_R" style="width:200px;">' .
|
||||
'<input style="width:15px;" class="checkbox" type="checkbox" name="demand[]" value="' . $base_id . '" >' .
|
||||
'<span>' . _('login::register: Faire une demande d\'acces') . '</span>' .
|
||||
'<span>' . $app->trans('login::register: Faire une demande d\'acces') . '</span>' .
|
||||
'</td>' .
|
||||
'</tr>';
|
||||
}
|
||||
@@ -267,7 +267,7 @@ function giveMeBaseUsr(Application $app, $usr)
|
||||
foreach ($baseInsc['CollsCGU'] as $collId => $collDesc) {
|
||||
$base_id = phrasea::baseFromColl($sbasId, $collId, $app);
|
||||
$out .= '<tr><td colspan="3" style="text-align:center;"><hr style="width:80%"/></td></tr>' .
|
||||
'<tr><td colspan="3" style="text-align:center;">' . _('login::register: L\'acces aux bases ci-dessous implique l\'acceptation des Conditions Generales d\'Utilisation (CGU) suivantes') . '</td></tr>' .
|
||||
'<tr><td colspan="3" style="text-align:center;">' . $app->trans('login::register: L\'acces aux bases ci-dessous implique l\'acceptation des Conditions Generales d\'Utilisation (CGU) suivantes') . '</td></tr>' .
|
||||
'<tr>' .
|
||||
'<td colspan="3" style="text-align:center;">' .
|
||||
'<div style="width:90%;height:120px;text-align:left;overflow:auto;">' . $collDesc['CGU'] . '</div>' .
|
||||
@@ -278,7 +278,7 @@ function giveMeBaseUsr(Application $app, $usr)
|
||||
'<td></td>' .
|
||||
'<td class="TD_R" style="width:200px;">' .
|
||||
'<input style="width:15px;" class="checkbox" type="checkbox" name="demand[]" value="' . $base_id . '" >' .
|
||||
'<span>' . _('login::register: Faire une demande d\'acces') . '</span>' .
|
||||
'<span>' . $app->trans('login::register: Faire une demande d\'acces') . '</span>' .
|
||||
'</td>' .
|
||||
'</tr>';
|
||||
}
|
||||
@@ -290,37 +290,3 @@ function giveMeBaseUsr(Application $app, $usr)
|
||||
|
||||
return ['tab' => $out, 'demandes' => $noDemand];
|
||||
}
|
||||
|
||||
function giveModInscript($usr, $lng)
|
||||
{
|
||||
$out = '<html lang="' . $app['session.I18n'] . '">' .
|
||||
'<head>' .
|
||||
'</head>' .
|
||||
'<body>' .
|
||||
'<div style="width:600px;height:20px;text-align:center;margin:0">' . _('admin::compte-utilisateur actuellement, acces aux bases suivantes : ') . ' :</div>' .
|
||||
'<form id="conf_mod" target="_self" action="mod_inscript.php" method="post">' .
|
||||
'<div style="width:400px;center;margin:0 100px;">';
|
||||
|
||||
$demandes = giveMeBaseUsr($app, $usr);
|
||||
|
||||
$out .= $demandes['tab'];
|
||||
|
||||
$noDemand = $demandes['demandes'];
|
||||
$out .= '</div>' .
|
||||
'<input type="hidden" value="' . $lng . '" name="lng">' .
|
||||
'<input type="hidden" value="SEND" name="act">' .
|
||||
'<input type="hidden" value="' . $usr . '" name="usrid">' .
|
||||
'</form>';
|
||||
|
||||
if ($noDemand) {
|
||||
$out .= '<div style="margin:10px 0;width:600px;text-align:center;">' . _('login::register: Vous avez acces a toutes les collections de toutes les bases') . '</div>';
|
||||
} else {
|
||||
$out .= '<div style="margin:10px 0;width:600px;text-align:center;"><input type="button" value="' . _('login::register: confirmer la demande') . '" onclick="document.getElementById(\'conf_mod\').submit();" /></a></div>';
|
||||
}
|
||||
|
||||
$out .= '</div>' .
|
||||
'</body>' .
|
||||
'</html>';
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
Reference in New Issue
Block a user