Commit 918eea06 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "Bug 1743955: Collection navigation theme changes"

parents da4777f8 45bfeb5e
......@@ -31,7 +31,7 @@ jQuery(function($) {
// setup prev
if (currentIndex !== 0) {
$('.prevpage').removeClass('invisible');
$('.prevpage').removeClass('disabled');
$('.prevpage').click(function() {
var target = currentIndex - 1;
......@@ -46,7 +46,7 @@ jQuery(function($) {
// setup next
if (currentIndex !== (indexLength - 1)) {
$('.nextpage').removeClass('invisible');
$('.nextpage').removeClass('disabled');
$('.nextpage').click(function() {
var target = currentIndex + 1;
......
.collection-nav {
h2 {
font-size: 32px;
}
.collection-nav-btns {
@media (min-width: $screen-md-min) {
bottom: 14px;
}
}
}
......@@ -11,3 +11,4 @@
@import "../components/user-icon";
@import "../features/dashboard-widget";
@import "../features/collection-navigation";
.collection-nav {
padding: 15px;
margin-left: -15px;
margin-right: -15px;
border-radius: 0;
h2 {
font-size: 38px;
}
.collection-nav-btns {
@media (min-width: $screen-md-min) {
bottom: 22px;
}
}
}
......@@ -4,3 +4,4 @@
@import "../layout/nav/main-nav"; // Custom navigation
@import "../layout/panel/panel-heading"; // Custom panel header
@import "../features/dashboard-widget"; // Custom dashboard
@import "../features/collection-navigation"; // Custom collection navigation
......@@ -2,42 +2,38 @@
background-color: $panel-default-heading-bg;
padding: 10px;
margin-bottom: 20px;
border-top: 1px solid $btn-default-border;
@include border-bottom-radius(3px);
text-align: center;
margin-left: -10px;
margin-right: -10px;
border-radius: 3px;
position: relative;
h2 {
clear: both;
font-weight: bold;
font-size: 30px;
@media (min-width: $screen-md-min) {
clear: none;
margin-right: 300px;
margin-bottom: 0;
}
}
.collection-nav-btns {
display: inline-block;
@media (min-width: $screen-md-min) {
position: absolute;
right: 10px;
bottom: 12px;
}
}
.prevpage {
float: left;
background-color: $body-bg;
margin-right: 10px;
margin-bottom: 10px;
}
.nextpage {
float: right;
background-color: $body-bg;
margin-left: 10px;
margin-bottom: 10px;
}
p.navlabel {
display: inline-block;
margin-right: 10px;
}
nav.custom-dropdown {
margin: 0 auto;
display: inline-block;
min-width: 200px;
}
@media (min-width: $screen-md-min) {
h2 {
clear: none;
}
}
}
<div id="collectionnavwrap" class="collection-nav">
{if count($collection) > 1}
<button type="button" class="btn btn-default prevpage invisible">
<span class="icon left icon-chevron-left" role="presentation" aria-hidden="true"></span>
{str tag="prevpage" section="collection"}
</button>
<button type="button" class="btn btn-default nextpage invisible"> {str tag="nextpage" section="collection"}
<span class="icon right icon-chevron-right" role="presentation" aria-hidden="true"></span>
</button>
{/if}
{if $maintitle}<h2>{str tag="Collection" section="collection"}: {$maintitle|safe}</h2>{/if}
{if $maintitle}<h2>{$maintitle|safe}</h2>{/if}
{* should the collection description go here? might need a read more concertina to prevent it being too long *}
<p class="navlabel">{str tag="navtopage" section="collection"}</p>
<nav class="custom-dropdown dropdown">
<ul class="hidden">
{foreach from=$collection item=view name=page}
<li>
{if $view->view == $viewid}
{$currentindex = $dwoo.foreach.page.index}
<span data-index="{$dwoo.foreach.page.index}" data-location="{$view->fullurl}">{$view->title}</span>
{else}
<a href="{$view->fullurl}" data-index="{$dwoo.foreach.page.index}" data-location="{$view->fullurl}">{$view->title}</a>
{/if}
</li>
{/foreach}
</ul>
<span class="picker form-control">{str tag="viewingpage" section="collection"}<span id="currentindex" data-currentindex="{$currentindex}">{$currentindex + 1}</span>/{count($collection)}</span>
</nav>
<span id="collectionbtns" class="collection-nav-btns">
<nav class="custom-dropdown dropdown">
<ul class="hidden">
{foreach from=$collection item=view name=page}
<li>
{if $view->view == $viewid}
{$currentindex = $dwoo.foreach.page.index}
<span data-index="{$dwoo.foreach.page.index}" data-location="{$view->fullurl}">{$view->title}</span>
{else}
<a href="{$view->fullurl}" data-index="{$dwoo.foreach.page.index}" data-location="{$view->fullurl}">{$view->title}</a>
{/if}
</li>
{/foreach}
</ul>
<span class="picker form-control">{str tag="viewingpage" section="collection"}<span id="currentindex" data-currentindex="{$currentindex}">{$currentindex + 1}</span>/{count($collection)}</span>
</nav>
{if count($collection) > 1}
<button type="button" class="btn btn-default prevpage disabled" title='{str tag="prevpage"}'>
<span class="icon left icon-chevron-left" role="presentation" aria-hidden="true"></span>
</button>
<button type="button" class="btn btn-default nextpage disabled" title='{str tag="nextpage"}'>
<span class="icon right icon-chevron-right" role="presentation" aria-hidden="true"></span>
</button>
{/if}
</span>
</div>
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