Enhanced Theme: Modified header to show domain of current user, added labels.

This commit is contained in:
Nate Jones 2014-07-09 22:02:34 +00:00
parent dbc31f2dc3
commit 07e263bce2
2 changed files with 68 additions and 50 deletions

View File

@ -1,8 +1,24 @@
<?php <?php
// Theme // Theme
$text['theme-label-user']['en-us'] = "User:";
$text['theme-label-user']['es-cl'] = "Usuario:";
$text['theme-label-user']['pt-pt'] = "Usuário:";
$text['theme-label-user']['fr-fr'] = "Utilisateur:";
$text['theme-label-domain']['en-us'] = "Domain:";
$text['theme-label-domain']['es-cl'] = "Dominio:";
$text['theme-label-domain']['pt-pt'] = "Domínio:";
$text['theme-label-domain']['fr-fr'] = "Domaine:";
$text['theme-label-open_selector']['en-us'] = "Open Domain Selector";
$text['theme-label-open_selector']['es-cl'] = "Selector de Dominio Abierto";
$text['theme-label-open_selector']['pt-pt'] = "Seletor de Domínio Aberto";
$text['theme-label-open_selector']['fr-fr'] = "Sélecteur Domaine Ouvert";
$text['theme-title-domains']['en-us'] = "Domains"; $text['theme-title-domains']['en-us'] = "Domains";
$text['theme-title-domains']['es-cl'] = "Dominios"; $text['theme-title-domains']['es-cl'] = "Dominios";
$text['theme-title-domains']['pt-pt'] = "Domínios"; $text['theme-title-domains']['pt-pt'] = "Domínios";
$text['theme-title-domains']['fr-fr'] = "Domaines"; $text['theme-title-domains']['fr-fr'] = "Domaines";
$text['theme-button-close']['en-us'] = "Close"; $text['theme-button-close']['en-us'] = "Close";
@ -14,4 +30,10 @@
$text['theme-label-search']['es-cl'] = "Buscar..."; $text['theme-label-search']['es-cl'] = "Buscar...";
$text['theme-label-search']['pt-pt'] = "Pesquisa..."; $text['theme-label-search']['pt-pt'] = "Pesquisa...";
$text['theme-label-search']['fr-fr'] = "Recherche..."; $text['theme-label-search']['fr-fr'] = "Recherche...";
$text['theme-label-search']['en-us'] = "Search...";
$text['theme-label-search']['es-cl'] = "Buscar...";
$text['theme-label-search']['pt-pt'] = "Pesquisa...";
$text['theme-label-search']['fr-fr'] = "Recherche...";
?> ?>

View File

@ -942,7 +942,7 @@ legend {
<td align='left' valign='top' class='headermain' colspan='2' width='100%' height='70px;'> <td align='left' valign='top' class='headermain' colspan='2' width='100%' height='70px;'>
<table border='0' cellpadding='0' cellspacing='0' width='100%'> <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr> <tr>
<td width='50%'> <td>
<?php <?php
if ($_SERVER['PHP_SELF'] != PROJECT_PATH."/resources/install.php") { if ($_SERVER['PHP_SELF'] != PROJECT_PATH."/resources/install.php") {
if (strlen(PROJECT_PATH) > 0) { if (strlen(PROJECT_PATH) > 0) {
@ -954,15 +954,27 @@ legend {
} }
?> ?>
</td> </td>
<td width='50%' style='padding-right: 15px;' align='right' valign='middle'> <td width='100%' style='padding-right: 15px;' align='right' valign='middle'>
<a href="/core/user_settings/user_dashboard.php"><?php echo $_SESSION['username']; ?></a>
<?php <?php
if ($_SESSION['username'] != '') {
echo "<span style='white-space: nowrap;'>";
echo " <span style='color: black; font-size: 10px; font-weight: bold;'>".$text['theme-label-user']."</span>&nbsp;";
echo " <a href='/core/user_settings/user_dashboard.php'>";
echo $_SESSION['username'];
if (count($_SESSION['domains']) > 1) {
echo "@".$_SESSION["user_context"];
}
echo "</a>";
echo "</span>\n";
}
//logged in show the domains block //logged in show the domains block
if (strlen($_SESSION["username"]) > 0 && permission_exists("domain_select") && count($_SESSION['domains']) > 1) { if (strlen($_SESSION["username"]) > 0 && permission_exists("domain_select") && count($_SESSION['domains']) > 1) {
?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "<span style='white-space: nowrap; line-height: 45px;'>";
<a href="javascript:void(0);" id="domains_show_text"><?php echo $_SESSION['domain_name']; ?></a> echo " &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style='color: black; font-size: 10px; font-weight: bold;'>".$text['theme-label-domain']."</span>&nbsp;";
<img id="domains_show_icon" src="<?php echo PROJECT_PATH; ?>/themes/enhanced/images/icon_domains_show.png" style="width: 23px; height: 16px; border: none;" title="Open Domain Selector" align="absmiddle"> echo " <a href='javascript:void(0);' id='domains_show_text'>".$_SESSION['domain_name']."</a>";
<?php echo " <img id='domains_show_icon' src='".PROJECT_PATH."/themes/enhanced/images/icon_domains_show.png' style='width: 23px; height: 16px; border: none;' title='".$text['theme-label-open_selector']."' align='absmiddle'>";
echo "</span>";
} }
//logged out show the login //logged out show the login
@ -979,33 +991,22 @@ legend {
} }
//login form //login form
echo "<div align='right'>\n"; echo "<div align='right'>\n";
echo "<form name='login' METHOD=\"POST\" action=\"".$_SESSION['login']['destination']['url']."\">\n"; echo " <form name='login' METHOD=\"POST\" action=\"".$_SESSION['login']['destination']['url']."\">\n";
echo "<input type='hidden' name='path' value='".$_GET['path']."'>\n"; echo " <input type='hidden' name='path' value='".$_GET['path']."'>\n";
echo "<table width='200' border='0'>\n"; echo " <table width='200' border='0'>\n";
echo "<tr>\n"; echo " <tr>\n";
//echo "<td align='left'>\n"; echo " <td>\n";
//echo " <strong>".$text['label-username'].":</strong>\n"; echo " <input type='text' class='formfld' style='min-width: 105px; width: 105px; text-align: center;' name='username' placeholder=\"".$text['label-username']."\">\n";
//echo "</td>\n"; echo " </td>\n";
echo "<td>\n"; echo " <td align='left'>\n";
echo " <input type=\"text\" class='formfld' style='min-width: 105px; width: 105px; text-align: center;' name=\"username\" placeholder=\"".$text['label-username']."\">\n"; echo " <input type='password' class='formfld' style='min-width: 105px; width: 105px; text-align: center;' name='password' placeholder=\"".$text['label-password']."\">\n";
echo "</td>\n"; echo " </td>\n";
//echo "</tr>\n";
//echo "<tr>\n";
//echo "<td align='left'>\n";
//echo " <strong>".$text['label-password'].":</strong>\n";
//echo "</td>\n";
echo "<td align='left'>\n";
echo " <input type=\"password\" class='formfld' style='min-width: 105px; width: 105px; text-align: center;' name=\"password\" placeholder=\"".$text['label-password']."\">\n";
echo "</td>\n";
//echo "</tr>\n";
if ($_SESSION['login']['domain_name.visible']['boolean'] == "true") { if ($_SESSION['login']['domain_name.visible']['boolean'] == "true") {
//echo "<tr>\n"; echo " <td align='left'>\n";
echo "<td align='left'>\n";
echo " <strong>".$text['label-domain'].":</strong>\n"; echo " <strong>".$text['label-domain'].":</strong>\n";
echo "</td>\n"; echo " </td>\n";
echo "<td>\n"; echo " <td>\n";
if (count($_SESSION['login']['domain_name']) > 0) { if (count($_SESSION['login']['domain_name']) > 0) {
echo " <select style='width: 150px;' class='formfld' name='domain_name'>\n"; echo " <select style='width: 150px;' class='formfld' name='domain_name'>\n";
echo " <option value=''></option>\n"; echo " <option value=''></option>\n";
@ -1015,26 +1016,21 @@ legend {
echo " </select>\n"; echo " </select>\n";
} }
else { else {
echo " <input type=\"text\" style='width: 150px;' class='formfld' name=\"domain_name\">\n"; echo " <input type='text' style='width: 150px;' class='formfld' name='domain_name'>\n";
} }
echo "</td>\n"; echo " </td>\n";
//echo "</tr>\n";
} }
//echo "<tr>\n"; echo " <td align='right'>\n";
echo "<td>\n"; echo " <input type='submit' class='btn' style='margin-left: 5px;' value=\"".$text['button-login']."\">\n";
echo "</td>\n"; echo " </td>\n";
echo "<td align=\"right\">\n"; echo " </tr>\n";
echo " <input type=\"submit\" class='btn' value=\"".$text['button-login']."\">\n"; echo " </table>\n";
echo "</td>\n"; echo " </form>";
echo "</tr>\n";
echo "</table>\n";
echo "</form>";
echo "</div>"; echo "</div>";
} }
} }
?> ?>
&nbsp;
</td> </td>
</tr> </tr>
</table> </table>