Bugzilla – Attachment 7153 Details for
Bug 1633
Add ability to take book cover images from local img db
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 1633 - [SIGNED-OFF] Interface revisions for the staff client
Bug-1633---SIGNED-OFFInterface-revisions-for-the-s.patch (text/plain), 11.83 KB, created by
Koustubha Kale
on 2012-01-14 08:59:22 UTC
(
hide
)
Description:
Bug 1633 - [SIGNED-OFF] Interface revisions for the staff client
Filename:
MIME Type:
Creator:
Koustubha Kale
Created:
2012-01-14 08:59:22 UTC
Size:
11.83 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] =?UTF-8?q?Bug=201633=20-=20[SIGNED-OFF]=C2=A0Interface=20re?= > =?UTF-8?q?visions=20for=20the=20staff=20client?= >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit >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 1633
:
6242
|
6699
|
6706
|
6712
|
6745
|
6746
|
6747
|
6748
|
6749
|
6750
|
6755
|
6756
|
6758
|
6759
|
6764
|
6765
|
6766
|
6785
|
6786
|
6787
|
6788
|
6791
|
6823
|
6973
|
6974
|
6975
|
6976
|
6977
|
6978
|
6979
|
6980
|
6981
|
6982
|
6983
|
7146
|
7147
|
7148
|
7149
|
7150
|
7151
|
7152
|
7153
|
7156
|
7219
|
7267
|
7268
|
7270
|
7271
|
7272
|
7273
|
7274
|
7275
|
7312
|
7315
|
7320
|
7324
|
7325
|
7334