diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss index 91c425fbe3..c852515e27 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss +++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss @@ -619,6 +619,10 @@ th { white-space: nowrap; } +.dropdown-menu > .dropdown-header:first-child { + border-top: 0; +} + .btn-group.open { .btn-link { &.dropdown-toggle { @@ -1127,7 +1131,6 @@ fieldset { .toolbar { background-color: #EEEEEE; - border: 1px solid #E8E8E8; font-size: .9rem; padding: 3px 3px 5px 5px; vertical-align: middle; @@ -1197,12 +1200,11 @@ fieldset { .selections-toolbar { background: linear-gradient( #B2B2B2 0%, #E0E0E0 14%, #E8E8E8 100% ); - border-bottom: none; display: flex; + flex-wrap: wrap; margin: 0; padding-left: 10px; padding-top: .5em; - flex-wrap: wrap; > div:first-child::before { content: ""; diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/result-batch-controls.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/result-batch-controls.inc new file mode 100644 index 0000000000..eed84b5736 --- /dev/null +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/result-batch-controls.inc @@ -0,0 +1,90 @@ +
+ [% IF ( OpacHighlightedWords && results ) %] +
+ Unhighlight + Highlight +
+ [% END %] + +
+ + + Select all + + + Clear all + +
+ + + [% IF ( TagsInputEnabled ) %] + + + [% END %] +
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/title-actions-menu.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/title-actions-menu.inc index 56edfd1795..79db98d6e4 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/title-actions-menu.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/title-actions-menu.inc @@ -1,27 +1,25 @@
- [% IF Koha.Preference( 'OPACHoldRequests' ) == 1 %] + [% IF ( HoldsEnabled ) %] [% UNLESS ( items.norequests ) %] - [% IF Koha.Preference( 'opacuserlogin' ) == 1 %] - [% IF ( shelf AND op == 'view' ) # Lists view has more granular checking of hold availability %] - [% IF ( items.allow_onshelf_holds ) %] - Place hold - [% ELSE %] - [% IF ( items.itemsissued ) %] - Place hold - [% END %] - [% END %] - [% ELSE %] + [% IF ( shelf AND op == 'view' ) # Lists view has more granular checking of hold availability %] + [% IF ( items.allow_onshelf_holds ) %] Place hold + [% ELSE %] + [% IF ( items.itemsissued ) %] + Place hold + [% END %] [% END %] - [% END # / IF opacuserlogin %] + [% ELSE %] + Place hold + [% END %] [% END # / UNLESS items.norequests %] [% END # / OPACHoldRequests %] - [% IF Koha.Preference('UseRecalls') %] + [% IF ( RecallsEnabled ) %] Place recall [% END %] - [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) %] + [% IF ( LoginEnabled ) %] [% IF items.artreqpossible %] Request article [% END %] @@ -48,7 +46,7 @@ [% END # IF loggedinusername %] [% END # if TagsInputEnabled %] - [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && loggedinusername && ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %] + [% IF ( ListsEnabled ) %] [% IF ( shelf AND op == 'view' ) %] Save to another list [% IF can_remove_biblios %] @@ -59,7 +57,7 @@ [% END # /IF ( shelf AND op == 'view' ) %] [% END # /IF Koha.Preference( 'opacuserlogin' ) %] - [% IF Koha.Preference( 'opacbookbag' ) == 1 %] + [% IF ( CartEnabled ) %] [% IF ( items.incart ) %] In your cart (remove) [% ELSE %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt index 9d9a7bacee..c92819eebf 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt @@ -3,9 +3,17 @@ [% USE Koha %] [% USE KohaPlugins %] [% USE To %] -[% SET TagsShowEnabled = ( ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsShowOnList ) %] -[% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsInputOnList ) %] -[% SET CoverImagePlugins = KohaPlugins.get_plugins_opac_cover_images %] +[% SET LoginEnabled = ( Koha.Preference('opacuserlogin') == 1 ) %] +[% IF ( Koha.Preference('TagsEnabled') ) %] + [% SET TagsShowEnabled = ( ( Koha.Preference('TagsEnabled') == 1 ) && ( Koha.Preference('TagsShowOnList') > 0 ) ) %] + [% SET TagsInputEnabled = LoginEnabled && TagsShowEnabled && ( Koha.Preference('TagsInputOnList') > 0 ) %] +[% END %] +[% SET CartEnabled = ( Koha.Preference('opacbookbag') == 1 ) %] +[% SET ListsEnabled = ( Koha.Preference('virtualshelves') == 1 ) && LoginEnabled %] +[% SET HoldsEnabled = ( Koha.Preference('OPACHoldRequests') == 1 ) && LoginEnabled %] +[% SET RecallsEnabled = ( Koha.Preference('UseRecalls') == 1 ) && LoginEnabled %] +[% SET ArticleRequestsEnabled = ( Koha.Preference('ArticleRequests') == 1 ) && LoginEnabled %] +[% SET MultiHolds = ( Koha.Preference('DisplayMultiPlaceHold') == 1 ) && HoldsEnabled %] [% IF firstPage %] [% SET OverDriveEnabled = Koha.Preference('OverDriveLibraryID') && Koha.Preference('OverDriveClientKey') && Koha.Preference('OverDriveClientSecret') %] @@ -192,94 +200,7 @@ [% END # /UNLESS tag %]
-
- [% IF ( OpacHighlightedWords ) %] -
- Unhighlight - Highlight -
- [% END %] - -
- - - Select all - - - Clear all - -
- - - [% IF ( TagsInputEnabled && loggedinusername ) %] - - - [% END %] -
+ [% INCLUDE 'result-batch-controls.inc' results=1 %] @@ -531,7 +452,6 @@
- Pages
@@ -581,91 +501,12 @@ [% END %] [% CoverImagePlugins | $raw %] + [% Asset.js("js/results-list.js") | $raw %] + [% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt index 0990eedd83..1d70e788fe 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt @@ -5,8 +5,17 @@ [% USE AdditionalContents %] [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] -[% SET TagsShowEnabled = ( ( Koha.Preference( 'TagsEnabled' ) == 1 ) && Koha.Preference('TagsShowOnList') ) %] -[% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) && Koha.Preference('TagsInputOnList') ) %] +[% SET LoginEnabled = ( Koha.Preference('opacuserlogin') == 1 ) %] +[% IF ( Koha.Preference('TagsEnabled') ) %] + [% SET TagsShowEnabled = ( ( Koha.Preference('TagsEnabled') == 1 ) && ( Koha.Preference('TagsShowOnList') > 0 ) ) %] + [% SET TagsInputEnabled = LoginEnabled && TagsShowEnabled && ( Koha.Preference('TagsInputOnList') > 0 ) %] +[% END %] +[% SET CartEnabled = ( Koha.Preference('opacbookbag') == 1 ) %] +[% SET ListsEnabled = ( Koha.Preference('virtualshelves') == 1 ) && LoginEnabled %] +[% SET HoldsEnabled = ( Koha.Preference('OPACHoldRequests') == 1 ) && LoginEnabled %] +[% SET RecallsEnabled = ( Koha.Preference('UseRecalls') == 1 ) && LoginEnabled %] +[% SET ArticleRequestsEnabled = ( Koha.Preference('ArticleRequests') == 1 ) && LoginEnabled %] +[% SET MultiHolds = ( Koha.Preference('DisplayMultiPlaceHold') == 1 ) && HoldsEnabled %] [% BLOCK delete_shelf %]
@@ -345,48 +354,7 @@
- -
-
- - Select all - - - Clear all - -
- -
+ [% INCLUDE 'result-batch-controls.inc' %]
@@ -556,6 +524,10 @@
[% END %] +
+ + +
[% ELSE %]
@@ -846,21 +818,12 @@ [% Asset.js("js/openlibrary.js") | $raw %] [% END %] +[% Asset.js("js/results-list.js") | $raw %] + +[% Asset.js("js/results-list.js") | $raw %]