Disable change of lang in demo

This commit is contained in:
Laurent Destailleur 2008-05-13 20:49:38 +00:00
parent 65c046514a
commit 601cd5114d
3 changed files with 19 additions and 8 deletions

View File

@ -124,6 +124,7 @@ EncodeBinariesInHexa=Encode binary datas in hexadecimal
Yes=Yes
No=No
AutoDetectLang=Autodetect (browser language)
FeatureDisabledInDemo=Feature disabled in demo
Rights=Permissions
BoxesDesc=Boxes are screen area that show some information on some pages. You can choose between showing or not a such box by selecting target page en clicking 'Activate', or by clicking the dustbin to disable it.
OnlyActiveElementsAreShown=Only elements about <a href="modules.php">enabled modules</a> are shown.

View File

@ -124,6 +124,7 @@ EncodeBinariesInHexa=Encoder les champs binaires en hexad
Yes=Oui
No=Non
AutoDetectLang=Détection auto (navigateur)
FeatureDisabledInDemo=Fonction désactivée dans la demo
Rights=Permissions
BoxesDesc=Les boîtes sont des zones d'information réduites qui s'affichent sur certaines pages. Vous pouvez choisir ou non d'activer une boîte en sélectionnant la page cible et en cliquant sur 'Activer', ou en cliquant sur la poubelle pour la désactiver.
OnlyActiveElementsAreShown=Seuls les éléments en rapport avec un <a href="modules.php">module actif</a> sont présentées.

View File

@ -163,14 +163,16 @@ if ($_GET["action"] == 'edit')
$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("MaxSizeList").'</td>';
print '<td>'.$conf->global->MAIN_SIZE_LISTE_LIMIT.'</td>';
print '<td align="left" nowrap="nowrap" width="20%"><input name="check_SIZE_LISTE_LIMIT" type="checkbox" '.($fuser->conf->MAIN_SIZE_LISTE_LIMIT?" checked":"").'> '.$langs->trans("UsePersonalValue").'</td>';
print '<td align="left" nowrap="nowrap" width="20%"><input name="check_SIZE_LISTE_LIMIT" type="checkbox" '.($fuser->conf->MAIN_SIZE_LISTE_LIMIT?" checked":"");
print ! empty($conf->global->MAIN_DEMO)?' disabled="true"':''; // Disabled for demo
print '> '.$langs->trans("UsePersonalValue").'</td>';
print '<td><input class="flat" name="main_size_liste_limit" size="4" value="' . $fuser->conf->SIZE_LISTE_LIMIT . '"></td></tr>';
print '</table><br>';
// Theme
show_theme($fuser,1);
show_theme($fuser,$conf->global->MAIN_DEMO?0:1);
print '</div>';
@ -210,13 +212,20 @@ else
print '</div>';
print '<div class="tabsAction">';
if ($caneditfield || $user->admin) // Si utilisateur édité = utilisateur courant ayant les droits de créer ou admin
{
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&amp;id='.$_GET["id"].'">'.$langs->trans("Modify").'</a>';
}
else
if ($conf->global->MAIN_DEMO)
{
print "<a class=\"butActionRefused\" title=\"".$langs->trans("NotEnoughPermissions")."\" href=\"#\">".$langs->trans("Modify")."</a>";
print "<a class=\"butActionRefused\" title=\"".$langs->trans("FeatureDisabledInDemo")."\" href=\"#\">".$langs->trans("Modify")."</a>";
}
else
{
if ($caneditfield || $user->admin) // Si utilisateur édité = utilisateur courant ayant les droits de créer ou admin
{
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&amp;id='.$_GET["id"].'">'.$langs->trans("Modify").'</a>';
}
else
{
print "<a class=\"butActionRefused\" title=\"".$langs->trans("NotEnoughPermissions")."\" href=\"#\">".$langs->trans("Modify")."</a>";
}
}
print '</div>';