Bugzilla – Attachment 7154 Details for
Bug 6473
Test bug for Git-bz ✔ ❤ ★
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Test patch. Ignore
bug_1633-staff-interface.patch (text/plain), 11.68 KB, created by
Jared Camins-Esakov
on 2012-01-14 13:27:02 UTC
(
hide
)
Description:
Test patch. Ignore
Filename:
MIME Type:
Creator:
Jared Camins-Esakov
Created:
2012-01-14 13:27:02 UTC
Size:
11.68 KB
patch
obsolete
>From 5c19cdca2a92a5b4c1942696eb4274a926499b4e Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 13 Dec 2011 14:19:29 -0500 >Subject: [PATCH] Bug 1633 - Interface revisions for the staff client >Content-Type: text/plain; charset="utf-8" > >This patch revises the image viewer page to match other >biblio detail pages: a toolbar, a sidebar menu, etc. > >Additional data is now pulled by imageviewer.pl in order >to provide information necessary for the proper functioning >of the toolbar and menus: item counts, hold availability, >biblio view options. > >Other changes have been made to match the changes in the >OPAC interface like styling of the images and no-javascript >compatibility > >Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> >Signed-off-by: Magnus Enger <magnus@enger.priv.no> > >Patch failed to apply because of multiple Content-Type lines in the patch. >Corrected the same with this new patch. >--- > catalogue/image.pl | 2 +- > catalogue/imageviewer.pl | 30 ++++++- > .../intranet-tmpl/prog/en/css/staff-global.css | 9 +- > .../prog/en/includes/biblio-view-menu.inc | 2 +- > .../prog/en/modules/catalogue/detail.tt | 10 +- > .../prog/en/modules/catalogue/imageviewer.tt | 102 ++++++++++++++++---- > 6 files changed, 122 insertions(+), 33 deletions(-) > >diff --git a/catalogue/image.pl b/catalogue/image.pl >index 2af1246..98725a2 100755 >--- a/catalogue/image.pl >+++ b/catalogue/image.pl >@@ -29,7 +29,7 @@ use C4::Images; > > $|=1; > >-my $DEBUG = 1; >+my $DEBUG = 0; > my $data = new CGI; > my $imagenumber; > >diff --git a/catalogue/imageviewer.pl b/catalogue/imageviewer.pl >index 395e4b7..caa793e 100755 >--- a/catalogue/imageviewer.pl >+++ b/catalogue/imageviewer.pl >@@ -23,8 +23,10 @@ use warnings; > use CGI; > use C4::Auth; > use C4::Biblio; >+use C4::Items; > use C4::Output; > use C4::Images; >+use C4::Search; > > my $query = new CGI; > my ( $template, $borrowernumber, $cookie ) = get_template_and_user( >@@ -38,14 +40,38 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > ); > > my $biblionumber = $query->param('biblionumber') || $query->param('bib'); >+my $imagenumber = $query ->param('imagenumber'); > my ($count, $biblio) = GetBiblio($biblionumber); >+my $itemcount = GetItemsCount($biblionumber); >+ >+my @items = GetItemsInfo( $biblionumber ); >+ >+my $norequests = 1; >+foreach my $item (@items) { >+ # can place holds defaults to yes >+ $norequests = 0 unless ( ( $item->{'notforloan_per_itemtype'} > 0 ) || ( $item->{'itemnotforloan'} > 0 ) ); >+} >+ >+if($query->cookie("holdfor")){ >+ my $holdfor_patron = GetMember('borrowernumber' => $query->cookie("holdfor")); >+ $template->param( >+ holdfor => $query->cookie("holdfor"), >+ holdfor_surname => $holdfor_patron->{'surname'}, >+ holdfor_firstname => $holdfor_patron->{'firstname'}, >+ holdfor_cardnumber => $holdfor_patron->{'cardnumber'}, >+ ); >+} > > if (C4::Context->preference("LocalCoverImages")) { > my @images = ListImagesForBiblio($biblionumber); > $template->{VARS}->{'LocalCoverImages'} = 1; > $template->{VARS}->{'images'} = \@images; >+ $template->{VARS}->{'imagenumber'} = $imagenumber || $images[0] || ''; > } >- >-$template->{VARS}->{'biblio'} = $biblio; >+ $template->{VARS}->{'count'} = $itemcount; >+ $template->{VARS}->{'biblionumber'} = $biblionumber; >+ $template->{VARS}->{'norequests'} = $norequests; >+ $template->param( C4::Search::enabled_staff_search_views ); >+ $template->{VARS}->{'biblio'} = $biblio; > > output_html_with_http_headers $query, $cookie, $template->output; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css >index 30334ef..4d18ac6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css >+++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css >@@ -2133,6 +2133,9 @@ div.pager input.pagedisplay { > font-weight: bold; > text-align : center; > } >-.localimage { >- padding: .3em; >-} >+ >+a.localimage img { >+ border : 1px solid #0000CC; >+ margin : 0 .5em; >+ padding : .3em; >+} >\ No newline at end of file >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc >index a944dc5..903cf3a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc >@@ -23,7 +23,7 @@ > [% IF ( CAN_user_reserveforothers ) %] > [% IF ( holdsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% IF ( object ) %][% object %][% ELSE %][% biblionumber %][% END %]">Holds</a></li> > [% END %] >- [% IF ( EasyAnalyticalRecords ) %][% IF ( analyze ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% IF ( object ) %][% object %]&analyze=1[% ELSE %][% biblionumber %]&analyze=1[% END %]">Analytics</a></li>[% END %] >+ [% IF ( EasyAnalyticalRecords ) %][% IF ( analyze ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% IF ( object ) %][% object %]&analyze=1[% ELSE %][% biblionumber %]&analyze=1[% END %]">Analytics</a></li>[% END %] > > [% IF ( subscriptionsnumber ) %]<li><a href="/cgi-bin/koha/serials/serials-home.pl?searched=1&biblionumber=[% biblionumber %]">Subscription(s)</a></li>[% END %] > </ul> >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 880a01e..ad3f12c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -518,7 +518,7 @@ function verify_images() { > <ul> > [% FOREACH AMAZON_SIMILAR_PRODUCT IN AMAZON_SIMILAR_PRODUCTS %] > [% FOREACH similar_biblionumber IN AMAZON_SIMILAR_PRODUCT.similar_biblionumbers %] >-<li><img alt="img" src="http://images.amazon.com/images/P/[% similar_biblionumber.ASIN %].01._SS50_.jpg" /> <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% similar_biblionumber.biblionumber %]">[% similar_biblionumber.title |html %]</a> </li> >+<li><img alt="" src="http://images.amazon.com/images/P/[% similar_biblionumber.ASIN %].01._SS50_.jpg" /> <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% similar_biblionumber.biblionumber %]">[% similar_biblionumber.title |html %]</a> </li> > [% END %] > [% END %] > </ul> >@@ -527,16 +527,16 @@ function verify_images() { > > [% IF ( LocalCoverImages ) %] > <div id="images"> >-[% IF ( localimages ) %] >-<div>Click on an image to view it in the image viewer</div> >+[% IF ( localimages.0 ) %] >+<p>Click on an image to view it in the image viewer</p> > [% FOREACH image IN localimages %] > [% IF image %] >-<span class="localimage"><a href="/cgi-bin/koha/catalogue/imageviewer.pl?biblionumber=[% biblionumber %]&imagenumber=[% image %]"><img alt="img" src="/cgi-bin/koha/catalogue/image.pl?thumbnail=1&imagenumber=[% image %]" /></a></span> >+<a class="localimage" href="/cgi-bin/koha/catalogue/imageviewer.pl?biblionumber=[% biblionumber %]&imagenumber=[% image %]"><img alt="" src="/cgi-bin/koha/catalogue/image.pl?thumbnail=1&imagenumber=[% image %]" /></a> > [% END %] > [% END %] > [% ELSE %] > [% IF ( CAN_user_tools_upload_local_cover_images ) %] >-<p>No images have been uploaded for this bibliographic record yet. Please <a href='/cgi-bin/koha/tools/upload-cover-image.pl?biblionumber=[% biblionumber %]&filetype=image'>upload</a> one.</p> >+<p>No images have been uploaded for this bibliographic record yet. Please <a href='/cgi-bin/koha/tools/upload-cover-image.pl?biblionumber=[% biblionumber %]&filetype=image'>upload</a> one.</p> > [% END %] > [% END %] > </div> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt >index c5ab657..0ec6011 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt >@@ -1,11 +1,12 @@ > [% INCLUDE 'doc-head-open.inc' %] >-[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog › Images for: [% biblio.title |html %] >+<title>Koha › Catalog › Details for [% biblio.title |html %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield %][% END %]</title> > [% INCLUDE 'doc-head-close.inc' %] >-<script type="text/JavaScript" language="JavaScript"> >+[% IF ( LocalCoverImages == 1 ) %] >+<script type="text/JavaScript"> > //<![CDATA[ > > $(document).ready(function(){ >- showCover($('.thumbnail').attr('id')); >+ showCover([% imagenumber %]); > }); > > function showCover(img) { >@@ -16,28 +17,87 @@ function showCover(img) { > //]]> > </script> > <style type="text/css"> >+#largeCoverImg { >+ border : 1px solid #CCCCCC; >+ display : block; >+ margin : auto; >+ padding : 1em; >+} >+#thumbnails { >+ text-align : center; >+} >+#thumbnails a img { >+ border : 1px solid #0000CC; >+} > img.thumbnail { >- border-style: solid; >- border-width: 3px; >- border-color: white; >+ display : block; >+ float : none; >+ margin: 0 5px 5px 0; >+ padding : .5em; > } > >-img.selected { >+#thumbnails a img.selected { > border-color: black; >+ cursor : default; >+ opacity:0.4; >+ filter:alpha(opacity=40); /* For IE8 and earlier */ > } >-</style> >-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script> >-<body id="imageviewer"> >-<div id="largeCover"><img id="largeCoverImg" alt="Large view" /></div> >-[% IF LocalCoverImages == 1 %] >-[% FOREACH img IN images %] >-[% IF img %] >-<a href='#' onclick='showCover([% img %])'><img class='thumbnail' id='[% img %]' src='/cgi-bin/koha/catalogue/image.pl?imagenumber=[% img %]&thumbnail=1' alt='Image'/></a> >-[% END %] >-[% END %] >-[% biblio.title %] [% biblio.author %] >+</style>[% END %] >+</head> >+ >+<body> >+ >+[% INCLUDE 'header.inc' %] >+[% INCLUDE 'cat-search.inc' %] >+ >+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a> › Images for <i>[% biblio.title |html %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield %][% END %]</i></div> >+ >+<div id="doc3" class="yui-t1"> >+ >+<div id="bd"> >+ <div id="yui-main"> >+ <div class="yui-b"> >+ <div class="yui-ge"> >+ >+[% INCLUDE 'cat-toolbar.inc' %] >+ >+<h3>Images for <i>[% biblio.title |html %]</i></h3> >+<h4>[% biblio.author %]</h4> >+ >+[% IF ( LocalCoverImages == 1 ) %] >+ [% IF ( images.size > 0 ) %] >+ <div class="yui-u first"> >+ <div id="largeCover"> >+ <img id="largeCoverImg" alt="" src="/cgi-bin/koha/catalogue/image.pl?imagenumber=[% imagenumber %]" /> >+ </div></div> >+ >+ <div class="yui-u"><div id="thumbnails"> >+ >+ [% FOREACH img IN images %] >+ [% IF img %] >+ <a href="/cgi-bin/koha/catalogue/imageviewer.pl?biblionumber=[% biblionumber %]&imagenumber=[% img %]" onclick="showCover([% img %]); return false;"> >+ [% IF ( imagenumber == img ) %] >+ <img class="thumbnail selected" id="[% img %]" src="/cgi-bin/koha/catalogue/image.pl?imagenumber=[% img %]&thumbnail=1" alt="Thumbnail" /> >+ [% ELSE %] >+ <img class="thumbnail" id="[% img %]" src="/cgi-bin/koha/catalogue/image.pl?imagenumber=[% img %]&thumbnail=1" alt="Thumbnail" /> >+ [% END %] >+ </a> >+ [% END %] >+ [% END %] >+ </div></div> >+ >+ [% ELSE %] >+ <div class="dialog message">There are no images for this record.</div> >+ [% END %] > [% ELSE %] >-Unfortunately, images are not enabled for this catalog at this time. >+ <div class="dialog message">Local images have not been enabled by your system administrator.</div> > [% END %] >-</body> >-</html> >+ >+</div> >+</div> >+</div> >+<div class="yui-b"> >+[% INCLUDE 'biblio-view-menu.inc' %] >+</div> >+</div> >+[% INCLUDE 'intranet-bottom.inc' %] >-- >1.7.5.4
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 6473
:
4386
|
6837
|
6838
|
6839
|
6840
|
6841
|
6842
|
6843
|
7154
|
7155
|
7567
|
7994
|
7995
|
7996
|
7997
|
8018
|
9807
|
9808
|
9813
|
9831
|
9832
|
9836
|
9854
|
10842
|
10843
|
10844
|
10845
|
10846
|
10847
|
10848
|
10849
|
10850
|
10851
|
10852
|
10853
|
10854
|
10855
|
10856
|
10857
|
10858
|
11540
|
11543
|
11544
|
12502
|
12513
|
12514
|
12515
|
12516
|
12517
|
12518
|
12519
|
13473
|
13673
|
14955
|
14969
|
14970
|
14972
|
15201
|
18949
|
18950
|
18951
|
18952
|
18953
|
18954
|
18955
|
18956
|
18957
|
18958
|
18959
|
18960
|
18961
|
18962
|
18963
|
18971
|
18972
|
19518
|
19519
|
19591
|
19592
|
19871
|
19879
|
19880
|
19881
|
19882
|
20011
|
20012
|
20013
|
20014
|
22477
|
22481
|
22482
|
22496
|
22502
|
22503
|
31958
|
32444
|
32445
|
32446
|
32447
|
32448
|
32449
|
32450
|
32451
|
32452
|
34200
|
34201
|
34625
|
34999
|
35130
|
35269
|
35273
|
35274
|
35275
|
35276
|
35277
|
35279
|
35280
|
35303
|
40954
|
40957
|
45345
|
45349
|
45731
|
45732
|
45733
|
45734
|
47283
|
47284
|
47298
|
47299
|
47300
|
47334
|
47336
|
49083
|
56974
|
61059
|
61069
|
62038
|
65313
|
77301
|
78016
|
79959
|
80178
|
80179
|
80180
|
80181
|
80182
|
84400
|
86644
|
86645
|
87152
|
88128
|
95586
|
95716
|
97394
|
99026
|
99027
|
114217
|
114218
|
114219
|
114220
|
114221
|
114222
|
114223
|
114224
|
114225
|
114226
|
119255
|
121181
|
131891
|
131893
|
131894
|
134862
|
144109
|
144144
|
144671
|
144672
|
144673
|
147183
|
149030
|
149031
|
149032
|
149033
|
160566
|
160567
|
160568