@@ -, +, @@ - Open the detail view for a record which has multiple cover images attached. On the Images tab, click the "Delete image" link for an image. After confirming, the link should change to a spinner icon and image should fade out. - Click one of the cover images to open the image viewer page. The thumbnails should each have a delete link which looks like and behaves like the delete links on the biblio detail page. - Clicking an image thumbnail should load a spinner icon into the area where the full-sized image was, which should be replaced by the image you chose. - There should be a button for uploading images which takes you to the correct page for adding images to that record. - The page title and breadcrumbs should show the title of the record. --- .../intranet-tmpl/prog/css/src/staff-global.scss | 1 + .../prog/en/modules/catalogue/detail.tt | 3 +- .../prog/en/modules/catalogue/imageviewer.tt | 133 ++++++++++++++------- 3 files changed, 93 insertions(+), 44 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -2280,6 +2280,7 @@ li { li { display: inline-block; list-style-type: none; + margin: 4px; } .remove { --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -792,7 +792,8 @@ function removeLocalImage(imagenumber) { var thumbnail = $("#imagenumber-" + imagenumber ); var copy = thumbnail.html(); - thumbnail.html("
"); + thumbnail.find("img").css("opacity", ".2"); + thumbnail.find("a.remove").html(""); $.ajax({ url: "/cgi-bin/koha/svc/cover_images?action=delete&biblionumber=" + biblionumber + "&imagenumber=" + imagenumber, success: function(data) { --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt @@ -2,36 +2,24 @@ [% USE Asset %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] -Koha › Catalog › Details for [% biblio.title | html %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield | html %][% END %] +Koha › Catalog › [% biblio.title | html %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield | html %][% END %] › Images [% INCLUDE 'doc-head-close.inc' %] -[% IF ( LocalCoverImages == 1 ) %] [% END %] + @@ -39,7 +27,7 @@ img.thumbnail { [% INCLUDE 'header.inc' %] [% INCLUDE 'cat-search.inc' %] - +
@@ -54,28 +42,45 @@ img.thumbnail { [% IF ( LocalCoverImages == 1 ) %] [% IF ( images.size > 0 ) %]
-
-
- -
- -
- - [% FOREACH img IN images %] - [% IF img %] - - [% IF ( imagenumber == img ) %] - Thumbnail - [% ELSE %] - Thumbnail - [% END %] - +
+
+ +
+ [% IF ( CAN_user_tools_upload_local_cover_images ) %] +
+

Upload an image file: Upload +

[% END %] - [% END %] -
-
+
+ +
+ +
+
[% ELSE %]
There are no images for this record.
+ [% IF ( CAN_user_tools_upload_local_cover_images ) %] +
+

Upload an image file: Upload +

+ [% END %] [% END %] [% ELSE %]
Local images have not been enabled by your system administrator.
@@ -95,19 +100,61 @@ img.thumbnail { [% INCLUDE 'catalog-strings.inc' %] [% Asset.js("js/catalog.js") | $raw %] [% END %] --