Bugzilla – Attachment 54317 Details for
Bug 17112
Action buttons for course reserves detail page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17112 - Action buttons for course reserves detail page
Bug-17112---Action-buttons-for-course-reserves-det.patch (text/plain), 6.55 KB, created by
Owen Leonard
on 2016-08-11 18:35:23 UTC
(
hide
)
Description:
Bug 17112 - Action buttons for course reserves detail page
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2016-08-11 18:35:23 UTC
Size:
6.55 KB
patch
obsolete
>From 2f8e61114367b14cf7c7ca870a3ebb7a8520b872 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 12 Jul 2016 11:55:51 -0400 >Subject: [PATCH] Bug 17112 - Action buttons for course reserves detail page >Content-Type: text/plain; charset="utf-8" > >This patch revises the edit and delete buttons on the course reserves >detail page so that they are styled as Bootstrap buttons with Font >Awesome icons. > >To test, apply the patch and choose or create a course reserve which has >in it at least one lost item and at least one item which is checked out. > >- In the list of items on the course reserve detail page, confirm that > the 'Edit' and 'Delete' buttons are correctly styled. >- Confirm that for the checked out item the delete button is disabled. > Hovering over the button should trigger a tooltip. Clicking the button > should trigger an alert. >- Confirm that for the lost item the same is true. >--- > .../en/modules/course_reserves/course-details.tt | 66 +++++++++++++--------- > 1 file changed, 40 insertions(+), 26 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >index ea9fda8..99aa832 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >@@ -25,6 +25,15 @@ > $("#delete_course").click(function(){ > return confirm( _("Are you sure you want to delete this course?") ); > }); >+ $(".disabled").tooltip().on("click", function(e){ >+ e.preventDefault(); >+ if( $(this).hasClass("checkedout") ){ >+ alert(_("This item cannot be removed. It is checked out")); >+ } >+ if( $(this).hasClass("itemlost") ) { >+ alert(_("This item cannot be removed. It is lost")); >+ } >+ }); > }); > > //]]> >@@ -82,10 +91,11 @@ > <th>Library</th> > <th>Staff note</th> > <th>Public note</th> >- [% IF CAN_user_coursereserves_add_reserves %]<th class="NoSort"> <!-- Edit --></th>[% END %] >- [% IF CAN_user_coursereserves_delete_reserves %]<th class="NoSort"> <!-- Remove --></th>[% END %] >- <th class="NoSort">Other course reserves</th> > <th>Link</th> >+ <th class="NoSort">Other course reserves</th> >+ [% IF CAN_user_coursereserves_add_reserves || CAN_user_coursereserves_delete_reserves %] >+ <th class="NoSort">Actions</th> >+ [% END %] > </tr> > </thead> > >@@ -167,22 +177,13 @@ > [% END %] > </td> > >- [% IF CAN_user_coursereserves_add_reserves %] >- <td><a href="add_items.pl?course_id=[% course.course_id %]&barcode=[% cr.item.barcode %]&action=lookup&return=[% course.course_id %]">Edit</a></td> >- [% END %] >- >- [% IF CAN_user_coursereserves_delete_reserves %] >- <td> >- [% IF cr.item.onloan %] >- Checked out >- [% ELSIF cr.item.itemlost %] >- Item lost >- [% ELSE %] >- <a href="course-details.pl?course_id=[% course.course_id %]&action=del_reserve&cr_id=[% cr.cr_id %]" class="delete_item" >Remove</a> >- [% END %] >- >- </td> >- [% END %] >+ <td> >+ [% IF (cr.item.uri) %] >+ <a href="[% cr.item.uri %]">Item URI</a> >+ [% ELSIF (cr.item.url) %] >+ <a href="[% cr.item.url %]">Record URL</a> >+ [% END %] >+ </td> > > <td> > [% FOREACH c IN cr.courses %] >@@ -197,13 +198,26 @@ > [% END %] > [% END %] > </td> >- <td> >- [% IF (cr.item.uri) %] >- <a href="[% cr.item.uri %]">Item URI</a> >- [% ELSIF (cr.item.url) %] >- <a href="[% cr.item.url %]">Record URL</a> >- [% END %] >- </td> >+ >+ [% IF CAN_user_coursereserves_add_reserves || CAN_user_coursereserves_delete_reserves %] >+ <td class="actions"> >+ [% IF CAN_user_coursereserves_add_reserves %] >+ <a class="btn btn-mini" href="add_items.pl?course_id=[% course.course_id %]&barcode=[% cr.item.barcode %]&action=lookup&return=[% course.course_id %]"><i class="fa fa-pencil"></i> Edit</a> >+ [% END %] >+ >+ [% IF CAN_user_coursereserves_delete_reserves %] >+ [% IF cr.item.onloan %] >+ <a class="btn btn-mini disabled checkedout" href="#" class="delete_item" data-toggle="tooltip" data-placement="left" title="This item is checked out"> >+ [% ELSIF cr.item.itemlost %] >+ <a class="btn btn-mini disabled itemlost" href="#" class="delete_item" data-toggle="tooltip" data-placement="left" title="This item is lost"> >+ [% ELSE %] >+ <a class="btn btn-mini" href="course-details.pl?course_id=[% course.course_id %]&action=del_reserve&cr_id=[% cr.cr_id %]" class="delete_item" > >+ [% END %] >+ <i class="fa fa-trash"></i> Remove</a> >+ [% END %] >+ </td> >+ [% END %] >+ > </tr> > [% END %] > </tbody> >-- >2.1.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 17112
:
54317
|
54378
|
54433