Commit fee3217f authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Move collection nav up into small header


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 53b57587
......@@ -210,14 +210,16 @@ input.addcolumn, input.removecolumn {
}
/* Collection navigation */
#colnav ul {
ul.colnav {
list-style: none;
padding: 0;
margin: 0;
}
#colnav li {
float: left;
ul.colnav li {
display: inline;
padding: 0;
margin: 0 0.15em;
}
ul.colnav li.selected a {
color: #333;
}
<ul class="colnav">
{foreach from=$collection item=view name=cviews}
<li{if $view->view == $viewid} class="selected"{/if}><a href="{$WWWROOT}view/view.php?id={$view->view}">{$view->title}</a></li>
{if !$.foreach.cviews.last}| {/if}
{/foreach}
</ul>
......@@ -2,25 +2,12 @@
{if $notrudeform}<div class="message delete">{$notrudeform|safe}</div>{/if}
{if $collection}
<div id="colnav">
<ul>
{foreach from=$collection item=view name=cviews}
<li><strong>
{if $view->view != $viewid}
<a href="{$WWWROOT}view/view.php?id={$view->view}">{$view->title}</a>
{else}
{$view->title}
{/if}
{if !$.foreach.cviews.last}: {/if}</strong></li>
{/foreach}
</ul>
</div>
<div class="cb"></div>
{/if}
{if $maintitle}<h1>{$maintitle|safe}</h1>{/if}
{if !$microheaders && $collection}
{include file=collectionnav.tpl}
{/if}
{if !$microheaders && $mnethost}
<div class="rbuttons">
<a href="{$mnethost.url}">{str tag=backto arg1=$mnethost.name}</a>
......
......@@ -37,7 +37,11 @@
<a href="{$WWWROOT}?logout">{str tag="logout"}</a>
</div>
{/if}
{if $collection}
<div class="center cb"><strong>{$microheadertitle|safe}</strong> : {include file=collectionnav.tpl}</div>
{else}
<div class="center cb title">{$microheadertitle|safe}</div>
{/if}
</div>
</div>
<div id="main-wrapper">
......
......@@ -181,7 +181,7 @@ addLoadEvent(function () {
EOF;
// collection top navigation
if ($collection = Collection::search_by_view_id($viewid)) {
if ($collection = $view->get('collection')) {
$shownav = $collection->get('navigation');
if ($shownav) {
if ($views = $collection->get('views')) {
......@@ -202,7 +202,7 @@ $smarty->assign('tags', $view->get('tags'));
if (get_config('viewmicroheaders')) {
$smarty->assign('microheaders', true);
$smarty->assign('microheadertitle', $view->display_title(true, false));
$smarty->assign('microheadertitle', $collection ? hsc($collection->get('name')) : $view->display_title(true, false));
if ($can_edit) {
$smarty->assign('visitstring', $view->visit_message());
......@@ -259,7 +259,7 @@ if (get_config('viewmicroheaders')) {
$title = hsc(TITLE);
if ($viewtype != 'profile' && !get_config('viewmicroheaders')) {
$title = $view->display_title();
$title = $collection ? hsc($collection->get('name')) : $view->display_title();
}
if ($viewtype != 'profile' || !get_config('viewmicroheaders')) {
......
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