Bugzilla – Attachment 130234 Details for
Bug 29621
Add link for Lists on opac-detail.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29621: (follow-up) Make all views consistent
Bug-29621-follow-up-Make-all-views-consistent.patch (text/plain), 8.67 KB, created by
Pierre Fagot
on 2022-02-07 14:44:42 UTC
(
hide
)
Description:
Bug 29621: (follow-up) Make all views consistent
Filename:
MIME Type:
Creator:
Pierre Fagot
Created:
2022-02-07 14:44:42 UTC
Size:
8.67 KB
patch
obsolete
>From c356ba9260a3e2f908c45eee75081567ee36a79a Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 6 Dec 2021 11:15:58 +0000 >Subject: [PATCH] Bug 29621: (follow-up) Make all views consistent > >This follow-up makes various views more consistent: OPAC search results, >OPAC details, staff search results, and staff details. > >The patch also adds an indication to the user which lists are private. > >To test, apply the patch and rebuild the OPAC and staff CSS >(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). > >Repeat the previous test plan in the OPAC and staff client. > >Signed-off-by: Pierre Fagot <pierre.fagot@biblibre.com> >--- > catalogue/detail.pl | 9 +++------ > catalogue/search.pl | 8 ++++++++ > .../intranet-tmpl/prog/css/src/staff-global.scss | 5 +++++ > .../prog/en/modules/catalogue/detail.tt | 1 + > .../prog/en/modules/catalogue/results.tt | 11 +++++++++++ > koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss | 5 +++++ > .../opac-tmpl/bootstrap/en/modules/opac-detail.tt | 12 +++++++----- > .../opac-tmpl/bootstrap/en/modules/opac-results.tt | 1 + > 8 files changed, 41 insertions(+), 11 deletions(-) > >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index 1146aa78d8..09eeb02f15 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -516,13 +516,10 @@ $template->param( > # Lists > > if (C4::Context->preference("virtualshelves") ) { >- my $shelves = Koha::Virtualshelves->search( >+ my $shelves = Koha::Virtualshelves->get_shelves_containing_record( > { >- biblionumber => $biblionumber, >- public => 1, >- }, >- { >- join => 'virtualshelfcontents', >+ biblionumber => $biblionumber, >+ borrowernumber => $borrowernumber > } > ); > $template->param( 'shelves' => $shelves ); >diff --git a/catalogue/search.pl b/catalogue/search.pl >index 5da9c063f3..44dce636b5 100755 >--- a/catalogue/search.pl >+++ b/catalogue/search.pl >@@ -596,6 +596,14 @@ for (my $i=0;$i<@servers;$i++) { > if ( grep {$_ eq $line->{'biblionumber'}} @cart_list) { > $line->{'incart'} = 1; > } >+ >+ $line->{'shelves'} = Koha::Virtualshelves->get_shelves_containing_record( >+ { >+ biblionumber => $line->{'biblionumber'}, >+ borrowernumber => $borrowernumber >+ } >+ ); >+ > } > my( $page_numbers, $hits_to_paginate, $pages, $current_page_number, $previous_page_offset, $next_page_offset, $last_page_offset ) = > Koha::SearchEngine::Search->pagination_bar( >diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >index fa3421dee1..ee491f2b82 100644 >--- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >+++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >@@ -639,6 +639,11 @@ ol { > font-weight: bold; > } > >+.privateshelf { >+ font-style: italic; >+ color: #666; >+} >+ > .problem { > color: #990000; > font-weight: bold; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index 3b56260668..c674e6fd10 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -122,6 +122,7 @@ > <span class="results_summary"><span class="label">Lists that include this title: </span> > [% FOREACH s IN shelves %] > <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&shelfnumber=[% s.shelfnumber | uri %]">[% s.shelfname | html %]</a> >+ [% UNLESS ( s.public ) %] <span class="privateshelf">Private</span> [% END %] > [% IF ( loop.last ) %][% ELSE %]|[% END %] > [% END %] > </span> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >index 59def93d62..131407ed95 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >@@ -498,6 +498,17 @@ > [% SEARCH_RESULT.result_number | html %]. > [% SEARCH_RESULT.XSLTResultsRecord | $raw %] > >+ [% IF Koha.Preference('virtualshelves') AND SEARCH_RESULT.shelves.count %] >+ <div class="results_summary shelves"> >+ <span class="label">Lists:</span> >+ [% FOREACH shelf IN SEARCH_RESULT.shelves %] >+ <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]">[% shelf.shelfname | html %]</a> >+ [% UNLESS ( shelf.public ) %]<span class="privateshelf">Private</span>[% END %] >+ [%~ UNLESS loop.last %], [% ELSE %].[% END ~%] >+ [% END %] >+ </div> >+ [% END %] >+ > <p class="hold"> > [% IF ( SEARCH_RESULT.norequests ) %] > <span class="noholdstext">No holds allowed</span> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >index 9dbfbae0cd..e904e32f27 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >+++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >@@ -59,6 +59,11 @@ > } > } > >+.privateshelf { >+ font-style: italic; >+ color: #666; >+} >+ > a { > &:link, > &:visited { >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >index c226da6dd0..939813f23f 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -193,11 +193,13 @@ > > [% IF shelves.count %] > <!--This grabs all of the lists a bib record appears in --> >- <span class="results_summary lists"><span class="label">List(s) this item appears in: </span> >- [% FOREACH s IN shelves %] >- <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% s.shelfnumber | uri %]">[% s.shelfname | html %]</a> >- [% IF ( loop.last ) %][% ELSE %]|[% END %] >- [% END %] >+ <span class="results_summary lists"> >+ <span class="label">Lists that include this title: </span> >+ [% FOREACH s IN shelves %] >+ <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% s.shelfnumber | uri %]">[% s.shelfname | html %]</a> >+ [% UNLESS ( s.public ) %] <span class="privateshelf">Private</span> [% END %] >+ [% IF ( loop.last ) %][% ELSE %]|[% END %] >+ [% END %] > </span> > [% END %] > >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 28b4bdef6c..eefaeb7606 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >@@ -493,6 +493,7 @@ > [% FOREACH shelf IN SEARCH_RESULT.shelves %] > <li> > <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]">[% shelf.shelfname | html %]</a> >+ [% UNLESS ( shelf.public ) %] <span class="privateshelf">Private</span> [% END %] > [%~ UNLESS loop.last %], [% ELSE %].[% END ~%] > </li> > [% END %] >-- >2.17.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 29621
:
128246
|
128247
|
128282
|
128283
|
130233
| 130234