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

Merge "Bug 1743955: Collection navigation theme changes"

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