Commit 517c3309 authored by Richard Mansfield's avatar Richard Mansfield

Use microheader when editing title/layout

Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
parent daedf6d7
{if $microheaders}{include file="viewmicroheader.tpl"}{else}{include file="header.tpl"}{/if}
{if !$edittitleurl}
<h1>{if !$microheaders}{$viewtitle}{else}{$maintitle}{/if}</h1>
{if $microheaders}
{include file="viewmicroheader.tpl"}
{else}
<h1>{$viewtitle}</h1>
{include file="header.tpl"}
{/if}
{include file="view/editviewtabs.tpl" selected='content'}
......
{include file="header.tpl"}
<h1>{$viewtitle}</h1>
{if $microheaders}
{include file="viewmicroheader.tpl"}
{else}
{include file="header.tpl"}
<h1>{$viewtitle}</h1>
{/if}
{include file="view/editviewtabs.tpl" selected='layout'}
<div class="subpage rel">
......@@ -11,4 +14,4 @@
</div>
{include file="footer.tpl"}
{if $microheaders}{include file="microfooter.tpl"}{else}{include file="footer.tpl"}{/if}
\ No newline at end of file
{include file="header.tpl"}
{if $microheaders}
{include file="viewmicroheader.tpl"}
{else}
<h1>{$viewtitle}</h1>
{include file="header.tpl"}
{/if}
<h1>{$viewtitle}</h1>
{include file="view/editviewtabs.tpl" selected='title'}
<div class="subpage rel">
{$editview|safe}
</div>
{include file="footer.tpl"}
{if $microheaders}{include file="microfooter.tpl"}{else}{include file="footer.tpl"}{/if}
{include file="header.tpl"}
<h1>{$viewtitle}</h1>
{if $microheaders}
{include file="viewmicroheader.tpl"}
{else}
{include file="header.tpl"}
<h1>{$viewtitle}</h1>
{/if}
{include file="view/editviewtabs.tpl" selected='layout'}
<div class="subpage rel">
......@@ -31,4 +34,4 @@
</div>
{include file="footer.tpl"}
{if $microheaders}{include file="microfooter.tpl"}{else}{include file="footer.tpl"}{/if}
......@@ -100,26 +100,26 @@ if ($view->get('type') == 'profile') {
$profile = true;
$displaylink = get_config('wwwroot') . 'user/view.php';
$title = get_string('usersprofile', 'mahara', display_name($view->get('owner'), null, true));
define('TITLE', $title . ': ' . get_string('editcontentandlayout', 'view'));
define('TITLE', $title . ': ' . get_string('editcontent', 'view'));
}
else if ($view->get('type') == 'dashboard') {
$dashboard = true;
$displaylink = get_config('wwwroot');
$title = get_string('usersdashboard', 'mahara', display_name($view->get('owner'), null, true));
define('TITLE', $title . ': ' . get_string('editcontentandlayout', 'view'));
define('TITLE', $title . ': ' . get_string('editcontent', 'view'));
}
else if ($view->get('type') == 'grouphomepage') {
$displaylink = get_config('wwwroot') . 'group/view.php?id=' . (int) $view->get('group');
$title = get_string('grouphomepage', 'view');
define('TITLE', $title . ': ' . get_string('editcontentandlayout', 'view'));
define('TITLE', $title . ': ' . get_string('editcontent', 'view'));
}
else if ($new) {
$displaylink = get_config('wwwroot') . 'view/view.php?id=' . $view->get('id') . '&new=1';
define('TITLE', get_string('editcontentandlayout', 'view'));
define('TITLE', get_string('editcontent', 'view'));
}
else {
$displaylink = get_config('wwwroot') . 'view/view.php?id=' . $view->get('id');
define('TITLE', $view->get('title') . ': ' . get_string('editcontentandlayout', 'view'));
define('TITLE', $view->get('title') . ': ' . get_string('editcontent', 'view'));
$editabletitle = true;
}
......@@ -196,7 +196,6 @@ foreach (array_keys($_POST + $_GET) as $key) {
}
$viewid = $view->get('id');
$smarty->assign('maintitle', TITLE);
$smarty->assign('edittitle', $view->can_edit_title());
$smarty->assign('displaylink', $displaylink);
$smarty->assign('formurl', get_config('wwwroot') . 'view/blocks.php');
......
......@@ -79,6 +79,10 @@ $smarty->assign('form', $columnsform);
$smarty->assign('viewid', $view->get('id'));
$smarty->assign('viewtitle', $view->get('title'));
$smarty->assign('edittitle', $view->can_edit_title());
if (get_config('viewmicroheaders')) {
$smarty->assign('microheaders', true);
$smarty->assign('microheadertitle', $view->display_title(true, false));
}
$smarty->display('view/columns.tpl');
function viewcolumns_submit(Pieform $form, $values) {
......
......@@ -186,6 +186,8 @@ $smarty->assign('editview', $editview);
$smarty->assign('viewid', $view->get('id'));
$smarty->assign('viewtitle', $view->get('title'));
$smarty->assign('edittitle', $view->can_edit_title());
$smarty->display('view/edit.tpl');
?>
if (get_config('viewmicroheaders')) {
$smarty->assign('microheaders', true);
$smarty->assign('microheadertitle', $view->display_title(true, false));
}
$smarty->display('view/edit.tpl');
\ No newline at end of file
......@@ -97,6 +97,10 @@ $smarty->assign('back', $back);
$smarty->assign('viewid', $view->get('id'));
$smarty->assign('viewtitle', $view->get('title'));
$smarty->assign('edittitle', $view->can_edit_title());
if (get_config('viewmicroheaders')) {
$smarty->assign('microheaders', true);
$smarty->assign('microheadertitle', $view->display_title(true, false));
}
$smarty->display('view/layout.tpl');
function viewlayout_submit(Pieform $form, $values) {
......
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