Commit 93c17a68 authored by Aaron Wells's avatar Aaron Wells

Remove "small page headers" feature (Bug 1485801)

Change-Id: Ie1b2e8fb8a72a339f3decd127eeb320191d11842
parent 6ee9bbaa
......@@ -647,13 +647,6 @@ $siteoptionform = array(
'rules' => array('integer' => true, 'minvalue' => 0, 'maxvalue' => 1000),
'disabled' => in_array('tagssideblockmaxtags', $OVERRIDDEN),
),
'viewmicroheaders' => array(
'type' => 'switchbox',
'title' => get_string('smallviewheaders', 'admin'),
'description' => get_string('smallviewheadersdescription1', 'admin'),
'defaultvalue' => get_config('viewmicroheaders'),
'disabled' => in_array('viewmicroheaders', $OVERRIDDEN),
),
'showonlineuserssideblock' => array(
'type' => 'switchbox',
'title' => get_string('showonlineuserssideblock', 'admin'),
......@@ -794,7 +787,7 @@ function siteoptions_submit(Pieform $form, $values) {
'defaultaccountlifetimeupdate', 'allowpublicviews', 'allowpublicprofiles', 'allowanonymouspages', 'generatesitemap',
'registration_sendweeklyupdates', 'mathjax', 'institutionexpirynotification', 'institutionautosuspend', 'requireregistrationconfirm',
'showselfsearchsideblock', 'nousernames', 'searchplugin', 'showtagssideblock',
'tagssideblockmaxtags', 'country', 'viewmicroheaders', 'userscanchooseviewthemes',
'tagssideblockmaxtags', 'country', 'userscanchooseviewthemes',
'remoteavatars', 'userscanhiderealnames', 'antispam', 'spamhaus', 'surbl', 'anonymouscomments',
'recaptchaonregisterform', 'recaptchapublickey', 'recaptchaprivatekey', 'loggedinprofileviewaccess', 'disableexternalresources',
'proxyaddress', 'proxyauthmodel', 'proxyauthcredentials', 'smtphosts', 'smtpport', 'smtpuser', 'smtppass', 'smtpsecure',
......
......@@ -197,22 +197,6 @@ $smarty->assign('artefact', $content);
$smarty->assign('artefactpath', $artefactpath);
$smarty->assign('INLINEJAVASCRIPT', $inlinejavascript);
if (get_config('viewmicroheaders')) {
$smarty->assign('maharalogofilename', 'site-logo-small');
$smarty->assign('microheaders', true);
$smarty->assign('microheadertitle', $view->display_title(true, false));
// Support for normal, light, or dark small Mahara logo - to use with skins
if ($skin) {
if ($skindata['header_logo_image'] == 'light') {
$smarty->assign('maharalogofilename', 'site-logo-small-light');
}
else if ($skindata['header_logo_image'] == 'dark') {
$smarty->assign('maharalogofilename', 'site-logo-small-dark');
}
}
}
$smarty->assign('view', $view);
$smarty->assign('viewid', $viewid);
$smarty->assign('feedback', $feedback);
......
......@@ -526,10 +526,6 @@ function xmldb_core_upgrade($oldversion=0) {
)");
}
if ($oldversion < 2010012700) {
set_config('viewmicroheaders', 1);
}
if ($oldversion < 2010012701) {
set_config('userscanchooseviewthemes', 1);
}
......
......@@ -837,7 +837,6 @@ function core_install_firstcoredata_defaults() {
set_config('showtagssideblock', 1);
set_config('tagssideblockmaxtags', 20);
set_config('usersallowedmultipleinstitutions', 1);
set_config('viewmicroheaders', 0);
set_config('userscanchooseviewthemes', 0);
set_config('anonymouscomments', 1);
set_config('homepageinfo', 1);
......
body,
body#micro {
body {
background: {$data.background};
}
h1,
......@@ -39,10 +38,6 @@ a:focus {
#right-nav li.identity a {
color: {$data.backgroundfg};
}
#micro .viewtitle,
#micro .collection-title {
color: {$data.backgroundfg};
}
.viewheadertop #mainnav-container #mainnav a,
.viewheadertop #mainnav-container #mainnav a:link,
.viewheadertop #mainnav-container #mainnav a:visited,
......
</div><!-- end main-column-container -->
</div><!-- end main-column -->
</div><!-- end main-wrapper -->
</div><!-- end mainmiddle -->
</div><!-- end mainmiddlewrap -->
<div id="footer-wrap">
<div id="footer">
<div id="powered-by"><a href="http://mahara.org/"><img src="{theme_url filename='images/powered_by_mahara_small.png'}" border="0" alt="Powered by Mahara"></a></div>
{mahara_performance_info}
<div class="cb"></div>
</div>
</div>
</div>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--[if IE 8 ]><html{if $LANGDIRECTION == 'rtl'} dir="rtl"{/if} lang="{$LANGUAGE}" class="ie ie8"><![endif]-->
<!--[if IE 9 ]><html{if $LANGDIRECTION == 'rtl'} dir="rtl"{/if} lang="{$LANGUAGE}" class="ie ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html{if $LANGDIRECTION == 'rtl'} dir="rtl"{/if} lang="{$LANGUAGE}"><!--<![endif]-->
{include file="header/head.tpl"}
<body id="micro" class="no-js">
{if $USERMASQUERADING || !$PRODUCTIONMODE || $SITECLOSED || $SITETOP}<div class="sitemessages">{/if}
{if $USERMASQUERADING}<div class="sitemessage"><img src="{theme_url filename='images/failure.png'}" alt="">{$masqueradedetails} {$becomeyouagain|safe}</div>{/if}
{if !$PRODUCTIONMODE}<div class="sitemessage center">{str tag=notproductionsite section=error}</div>{/if}
{if $SITECLOSED}<div class="sitemessage center">{if $SITECLOSED == 'logindisabled'}{str tag=siteclosedlogindisabled section=mahara arg1="`$WWWROOT`admin/upgrade.php"}{else}{str tag=siteclosed}{/if}</div>{/if}
{if $SITETOP}<div id="switchwrap">{$SITETOP|safe}</div>{/if}
{if $USERMASQUERADING || !$PRODUCTIONMODE || $SITECLOSED || $SITETOP}</div>{/if}
<div id="container">
<div class="center"><a class="skiplink" href="#mainmiddle">{str tag=skipmenu}</a></div>
<div id="loading-box"></div>
<div id="top-wrapper">
<div id="header">
<h1 class="hidden"><a href="{$WWWROOT}">{$hiddenheading|default:"Mahara"|escape}</a></h1>
</div>
</div>
<div id="mainmiddlewrap">
<div id="mainmiddle">
<div id="main-wrapper">
<div id="main-column" class="main-column">
<div id="main-column-container">
{dynamic}{insert_messages}{/dynamic}
{if isset($PAGEHEADING)} <h1>{$PAGEHEADING}{if $PAGEHELPNAME}<span class="page-help-icon">{$PAGEHELPICON|safe}</span>{/if}</h1>
{/if}
......@@ -2,8 +2,7 @@
{$view_text_font_face|safe}
/* {$view_heading_font_notice} */
{$view_heading_font_face|safe}
body,
body#micro {
body {
background-color: {$body_background_color};
background-image: {$body_background_image|safe};
background-repeat: {$body_background_repeat};
......@@ -117,9 +116,7 @@ input.select:active,
background: {$header_background_color};
}
.viewheadertop,
.viewheadertop .title,
#micro .viewtitle,
#micro .collection-title {
.viewheadertop .title {
color: {$header_text_font_color};
}
.viewheadertop a,
......
{if $microheaders}{include file="viewmicroheader.tpl"}{else}{include file="header.tpl"}{/if}
{include file="header.tpl"}
<h1>{$maintitle}</h1>
<div class="center">
......@@ -16,4 +16,4 @@
</form>
</div>
{if $microheaders}{include file="microfooter.tpl"}{else}{include file="footer.tpl"}{/if}
{include file="footer.tpl"}
......@@ -5,4 +5,4 @@
{$form|safe}
{if $microheaders}{include file="microfooter.tpl"}{else}{include file="footer.tpl"}{/if}
{include file="footer.tpl"}
......@@ -142,4 +142,4 @@
</div>
</div>
{if $microheaders}{include file="microfooter.tpl"}{else}{include file="footer.tpl"}{/if}
{include file="footer.tpl"}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--[if IE 8 ]> <html{if $LANGDIRECTION == 'rtl'} dir="rtl"{/if} lang="{$LANGUAGE}" class="ie ie8"> <![endif]-->
<!--[if IE 9 ]> <html{if $LANGDIRECTION == 'rtl'} dir="rtl"{/if} lang="{$LANGUAGE}" class="ie ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html{if $LANGDIRECTION == 'rtl'} dir="rtl"{/if} lang="{$LANGUAGE}"><!--<![endif]-->
<html{if $LANGDIRECTION == 'rtl'} dir="rtl"{/if}>
{include file="header/head.tpl"}
<body id="micro">
{if $USERMASQUERADING || !$PRODUCTIONMODE || $SITECLOSED || $SITETOP}<div class="sitemessages">{/if}
{if $USERMASQUERADING}<div class="sitemessage"><img src="{theme_url filename='images/failure.png'}" alt="">{$masqueradedetails} {$becomeyouagain|safe}</div>{/if}
{if !$PRODUCTIONMODE}<div class="sitemessage center">{str tag=notproductionsite section=error}</div>{/if}
{if $SITECLOSED}<div class="sitemessage center">{if $SITECLOSED == 'logindisabled'}{str tag=siteclosedlogindisabled section=mahara arg1="`$WWWROOT`admin/upgrade.php"}{else}{str tag=siteclosed}{/if}</div>{/if}
{if $SITETOP}<div id="switchwrap">{$SITETOP|safe}</div>{/if}
{if $USERMASQUERADING || !$PRODUCTIONMODE || $SITECLOSED || $SITETOP}</div>{/if}
<div id="container">
<div class="center"><a class="skiplink" href="#viewheader">{str tag=skipmenu}</a></div>
<div id="loading-box"></div>
<div id="top-wrapper">
<div id="header">
<div class="viewheadertop">
<div class="fl">
<a class="small-logo" href="{$WWWROOT}"><img src="{theme_url filename=$maharalogofilename}" alt="{$sitename}"></a>
</div>
{if $LOGGEDIN}
<div id="mainnav-container" class="nav">
<div id="mainnav">
<strong><a href="{profile_url($USER)}">{$USER|display_name:null:true}</a>:</strong>
{foreach from=$MAINNAV item=item}
{if $item.path}
<a href="{$WWWROOT}{$item.url}">{$item.title}</a> |
{/if}
{/foreach}
{if $USER->get('admin')}
<a href="{$WWWROOT}admin/index.php">{str tag="administration"}</a> |
{elseif $USER->is_institutional_admin()}
<a href="{$WWWROOT}admin/users/search.php">{str tag="administration"}</a> |
{/if}
{if $mnethost}<a href="{$mnethost.url}">{str tag=backto arg1=$mnethost.name}</a>&nbsp;{/if}
<a href="{$WWWROOT}?logout">{str tag="logout"}</a>
</div>
</div>
{/if}
<div class="fr links">
{if $microheaderlinks}
{foreach from=$microheaderlinks item=item}
<a class="btn" href="{$item.url}">{$item.name}</a>
{/foreach}
{/if}
<a class="btn nojs-hidden-inline" href="javascript:history.back()"><span class="btn-back">{str tag=back}</span></a>
</div>
</div>
<div id="viewheader" class="viewheader">
{if $collection}
<div id="collection"><h1 class="collection-title">{$microheadertitle|safe}</h1>{include file=collectionnav.tpl}</div>
{else}
<h1 class="center viewtitle">{$microheadertitle|safe}</h1>
{/if}
<div class="cb"></div>
</div>
</div>
</div>
<div class="cb"></div>
<div id="mainmiddlewrap">
<div id="mainmiddle">
<div id="main-wrapper">
<div class="main-column">
<div id="main-column-container">
{dynamic}{insert_messages}{/dynamic}
......@@ -208,7 +208,7 @@ if (!empty($loggedinid) && $loggedinid != $userid) {
'options' => $invitelist,
'defaultvalue' => $default,
),
'submit' => array(
'type' => 'button',
'usebuttontag' => true,
......@@ -249,7 +249,7 @@ if (!empty($loggedinid) && $loggedinid != $userid) {
'options' => $controlledlist,
'defaultvalue' => $default,
),
'submit' => array(
'type' => 'button',
'usebuttontag' => true,
......@@ -352,40 +352,15 @@ $smarty->assign('viewtitle', get_string('usersprofile', 'mahara', display_name($
$smarty->assign('viewtype', 'profile');
$smarty->assign('user', $user);
if (get_config('viewmicroheaders')) {
$smarty->assign('microheaders', true);
$smarty->assign('microheadertitle', $view->display_title(true, false));
$smarty->assign('maharalogofilename', 'site-logo-small');
// Support for normal, light, or dark small Mahara logo - to use with skins
if ($skin) {
if ($skindata['header_logo_image'] == 'light') {
$smarty->assign('maharalogofilename', 'site-logo-small-light');
}
else if ($skindata['header_logo_image'] == 'dark') {
$smarty->assign('maharalogofilename', 'site-logo-small-dark');
}
}
if ($loggedinid && $loggedinid == $userid) {
$microheaderlinks = array(
array(
'name' => get_string('editthisview', 'view'),
'url' => get_config('wwwroot') . 'view/blocks.php?profile=1',
),
);
$smarty->assign('microheaderlinks', $microheaderlinks);
}
}
else {
if ($loggedinid && $loggedinid == $userid) {
$smarty->assign('ownprofile', true);
}
$smarty->assign('pageheadinghtml', $view->display_title(false));
if ($skin) {
if ($skindata['header_logo_image'] == 'light' || $skindata['header_logo_image'] == 'dark') {
// override the default $smarty->assign('sitelogo') that happens
// in the initial call to smarty()
$smarty->assign('sitelogo', $THEME->header_logo($skindata['header_logo_image']));
}
if ($loggedinid && $loggedinid == $userid) {
$smarty->assign('ownprofile', true);
}
$smarty->assign('pageheadinghtml', $view->display_title(false));
if ($skin) {
if ($skindata['header_logo_image'] == 'light' || $skindata['header_logo_image'] == 'dark') {
// override the default $smarty->assign('sitelogo') that happens
// in the initial call to smarty()
$smarty->assign('sitelogo', $THEME->header_logo($skindata['header_logo_image']));
}
}
......
......@@ -257,12 +257,6 @@ if ($owner && $viewtype == 'profile') {
$viewtitle = get_string('usersprofile', 'mahara', display_name($view->get('owner'), null, true));
}
if (get_config('viewmicroheaders')) {
$smarty->assign('maharalogofilename', 'site-logo-small');
$smarty->assign('microheaders', true);
$smarty->assign('microheadertitle', $view->display_title(true, false, false));
}
$smarty->assign('viewtype', $viewtype);
$smarty->assign('view', $view->get('id'));
$smarty->assign('groupid', $group);
......
......@@ -254,11 +254,6 @@ $smarty->assign('viewtitle', $view->get('title'));
$smarty->assign('edittitle', $view->can_edit_title());
$smarty->assign('displaylink', $displaylink);
$smarty->assign('new', $new);
if (get_config('viewmicroheaders')) {
$smarty->assign('maharalogofilename', 'site-logo-small');
$smarty->assign('microheaders', true);
$smarty->assign('microheadertitle', $view->display_title(true, false, false));
}
$smarty->assign('issiteview', isset($institution) && ($institution == 'mahara'));
$smarty->assign('PAGEHEADING', $state);
$smarty->assign('subsectionheading', TITLE);
......
......@@ -186,11 +186,6 @@ $smarty->assign('viewtitle', $view->get('title'));
$smarty->assign('edittitle', $view->can_edit_title());
$smarty->assign('displaylink', $view->get_url());
$smarty->assign('new', $new);
if (get_config('viewmicroheaders')) {
$smarty->assign('maharalogofilename', 'site-logo-small');
$smarty->assign('microheaders', true);
$smarty->assign('microheadertitle', $view->display_title(true, false));
}
$smarty->assign('issiteview', $view->get('institution') == 'mahara');
if ($view->get('owner') == "0") {
$smarty->assign('issitetemplate', true);
......
......@@ -127,11 +127,6 @@ $smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('edittitle', $view->can_edit_title());
$smarty->assign('displaylink', $displaylink);
$smarty->assign('new', $new);
if (get_config('viewmicroheaders')) {
$smarty->assign('maharalogofilename', 'site-logo-small');
$smarty->assign('microheaders', true);
$smarty->assign('microheadertitle', $view->display_title(true, false, false));
}
$smarty->assign('issiteview', $issiteview);
$smarty->display('view/skin.tpl');
......
......@@ -352,66 +352,21 @@ if ($view->is_anonymous()) {
$titletext = ($collection && $shownav) ? hsc($collection->get('name')) : $view->display_title(true, false, false);
$smarty->assign('visitstring', $view->visit_message());
if (get_config('viewmicroheaders')) {
$microheaderlinks = array();
$smarty->assign('microheaders', true);
$smarty->assign('microheadertitle', $titletext);
$smarty->assign('maharalogofilename', 'site-logo-small');
// Support for normal, light, or dark small Mahara logo - to use with skins
if ($skin) {
if ($skindata['header_logo_image'] == 'light') {
$smarty->assign('maharalogofilename', 'site-logo-small-light');
}
else if ($skindata['header_logo_image'] == 'dark') {
$smarty->assign('maharalogofilename', 'site-logo-small-dark');
}
}
if ($can_edit) {
if ($new) {
$microheaderlinks[] = array(
'name' => get_string('back'),
'url' => get_config('wwwroot') . 'view/blocks.php?id=' . $viewid . '&new=1',
'type' => 'reply',
);
}
else {
$microheaderlinks[] = array(
'name' => get_string('edit', 'mahara'),
'url' => get_config('wwwroot') . 'view/blocks.php?id=' . $viewid,
);
}
}
if ($can_copy) {
$microheaderlinks[] = array(
'name' => get_string('copy', 'mahara'),
'url' => get_config('wwwroot') . 'view/copy.php?id=' . $viewid . (!empty($collection) ? '&collection=' . $collection->get('id') : ''),
'class' => 'copyview',
);
}
$smarty->assign('microheaderlinks', $microheaderlinks);
if ($can_edit) {
$smarty->assign('editurl', get_config('wwwroot') . 'view/blocks.php?id=' . $viewid . ($new ? '&new=1' : ''));
}
else {
if ($can_edit) {
$smarty->assign('editurl', get_config('wwwroot') . 'view/blocks.php?id=' . $viewid . ($new ? '&new=1' : ''));
}
if ($can_copy) {
$smarty->assign('copyurl', get_config('wwwroot') . 'view/copy.php?id=' . $viewid . (!empty($collection) ? '&collection=' . $collection->get('id') : ''));
}
if ($can_copy) {
$smarty->assign('copyurl', get_config('wwwroot') . 'view/copy.php?id=' . $viewid . (!empty($collection) ? '&collection=' . $collection->get('id') : ''));
}
$title = hsc(TITLE);
if (!get_config('viewmicroheaders')) {
$smarty->assign('maintitle', $titletext);
if ($skin) {
if ($skindata['header_logo_image'] == 'light' || $skindata['header_logo_image'] == 'dark') {
// override the default $smarty->assign('sitelogo') that happens
// in the initial call to smarty()
$smarty->assign('sitelogo', $THEME->header_logo($skindata['header_logo_image']));
}
$smarty->assign('maintitle', $titletext);
if ($skin) {
if ($skindata['header_logo_image'] == 'light' || $skindata['header_logo_image'] == 'dark') {
// override the default $smarty->assign('sitelogo') that happens
// in the initial call to smarty()
$smarty->assign('sitelogo', $THEME->header_logo($skindata['header_logo_image']));
}
}
......
......@@ -83,7 +83,6 @@ class BehatAdmin extends BehatBase {
'showselfsearchsideblock',
'showtagssideblock',
'tagssideblockmaxtags',
'viewmicroheaders',
'showonlineuserssideblock',
'onlineuserssideblockmaxusers',
'licensemetadata',
......
Markdown is supported
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