Commit 9777d305 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:sparkles: feat(core) Set title tag to a meaningful value

It will be the same as headline when available. It’s also set in login
 and recovery pages.

issue #5898
Showing with 11 additions and 19 deletions
+11 -19
......@@ -354,6 +354,7 @@ class passwordRecovery extends standAlonePage {
$lang = session::global_get('lang');
$smarty->assign('lang', preg_replace('/_.*$/', '', $lang));
$smarty->assign('rtl', Language::isRTL($lang));
$smarty->assign('title', _('Password recovery'));
$smarty->display(get_template_path('headers.tpl'));
$smarty->assign('version', FD_VERSION);
......
......@@ -48,6 +48,7 @@ function displayLogin()
$smarty->assign ('revision', FD_VERSION);
$smarty->assign ('year', date('Y'));
$smarty->append ('css_files', get_template_path('login.css'));
$smarty->assign('title', _('Sign in'));
/* Some error to display? */
if (!isset($message)) {
......
......@@ -347,7 +347,6 @@ if (isset($_POST['_channel_'])) {
} else {
$smarty->assign("channel", "");
}
$smarty->assign ("title", "FusionDirectory");
if (class_available('Game')) {
$smarty->assign('game_screen', Game::run());
......
......@@ -104,29 +104,20 @@ $ui = new fake_userinfo();
$display = "";
require_once("../setup/main.inc");
$smarty->assign("date", date("l, dS F Y H:i:s O"));
$header = $smarty->fetch(get_template_path('headers.tpl'));
/* Set focus to the error button if we've an error message */
$focus = "";
if (session::is_set('errors') && session::get('errors') != "") {
$focus = '<script type="text/javascript">';
$focus .= 'document.forms[0].error_accept.focus();';
$focus .= '</script>';
}
$focus = '<script type="text/javascript">';
$focus .= 'next_msg_dialog();';
$focus .= '</script>';
/* show web frontend */
$setup = session::global_get('setup');
$smarty->assign('date', date('l, dS F Y H:i:s O'));
$smarty->assign('headline', $setup->get_header_text());
$header = $smarty->fetch(get_template_path('headers.tpl'));
$smarty->assign("contents", $display.$setup->get_bottom_html());
$smarty->assign("navigation", $setup->get_navigation_html());
$smarty->assign("headline_image", $setup->get_header_image());
$smarty->assign("headline", $setup->get_header_text());
$smarty->assign("focus", $focus);
$smarty->assign('CSRFtoken', CSRFProtection::getToken());
$smarty->assign("msg_dialogs", msg_dialog::get_dialogs());
......
......@@ -14,11 +14,11 @@
<img src="geticon.php?context=actions&amp;icon=application-exit&amp;size=22" alt="Sign out"/>&nbsp;{t}Sign out{/t}
</a>
<a class="plugtop">
<img src="{$headline_image|escape}" alt="{t}{$headline}{/t}"/>{t}{$headline}{/t}
<img src="{$headline_image|escape}" alt="{t}{$headline|escape}{/t}"/>{t}{$headline|escape}{/t}
</a>
</div>
<div id="header-right">
<a><span class="optional">{t}Signed in:{/t} </span><b>{$username}</b></a>
<a><span class="optional">{t}Signed in:{/t} </span><b>{$username|escape}</b></a>
{if ($sessionLifetime > 0)}
<div class="logout-label">
<canvas id="sTimeout" width="22" height="22" title="{$sessionLifetime}|{t}Session expires in %d!{/t}"></canvas>
......
......@@ -2,11 +2,11 @@
<html xmlns="http://www.w3.org/1999/xhtml" {if $lang}lang="{$lang}" xml:lang="{$lang}"{/if} {if $rtl}dir="rtl" class="rtl"{else}class="ltr"{/if}>
<head>
<title>{if isset($title)}{$title}{else}FusionDirectory{/if}</title>
<title>FusionDirectory{if isset($title)} - {$title|escape}{elseif isset($headline)} - {$headline|escape}{/if}</title>
<meta charset="utf-8"/>
<meta name="description" content="FusionDirectory - Login"/>
<meta name="description" content="FusionDirectory - Your Infrastructure Manager"/>
<meta name="author" lang="en" content="FusionDirectory Project"/>
<meta name="viewport" content="width=device-width"/>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment