Bugzilla – Attachment 66469 Details for
Bug 18581
Add standard edit and delete buttons to suggestions list
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18581 - Add standard edit and delete buttons to suggestions list
Bug-18581---Add-standard-edit-and-delete-buttons-t.patch (text/plain), 5.79 KB, created by
Marcel de Rooy
on 2017-08-25 10:20:31 UTC
(
hide
)
Description:
Bug 18581 - Add standard edit and delete buttons to suggestions list
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-08-25 10:20:31 UTC
Size:
5.79 KB
patch
obsolete
>From 032e0b1c875ba83920880328b22b955f03030d14 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 11 May 2017 15:02:29 +0000 >Subject: [PATCH] Bug 18581 - Add standard edit and delete buttons to > suggestions list >Content-Type: text/plain; charset=utf-8 > >This patch modifies the table of suggestions in the staff client, moving >the edit link to the standard last column and styling it correctly. A >delete button is added as well. > >Unrelated change: I removed the column containing suggestionid because I >don't think it's human-relevant information. > >To test, apply the patch and go to Acquisitions -> Suggestions. > >- In each tab, the table of suggestions should have an unsorted last > column containing "edit" and "delete" links which should be styled > correctly and working correctly. >- On the detailed view of a suggestion, the "delete" button in the > toolbar should still work correctly. > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../prog/en/modules/suggestion/suggestion.tt | 34 ++++++++++++---------- > 1 file changed, 18 insertions(+), 16 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >index cbf951b..89f9271 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >@@ -18,11 +18,11 @@ > </title> > [% INCLUDE 'doc-head-close.inc' %] > [% INCLUDE 'calendar.inc' %] >-[% IF ( op == 'show' ) %] >+[% IF ( op == 'show' || op_else ) %] > <script type="text/javascript"> > // <![CDATA[ > $(document).ready(function(){ >- $("#deletesuggestion").on("click",function(){ >+ $(".deletesuggestion").on("click",function(){ > return confirm(_("Are you sure you want to delete this suggestion?")); > }); > }); >@@ -53,7 +53,7 @@ $(document).ready(function() { > }); > $(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, { > "aoColumnDefs": [ >- { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false }, >+ { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }, > { "sType": "anti-the", "aTargets" : [ "anti-the" ] } > ], > "sPaginationType": "four_button" >@@ -204,7 +204,7 @@ h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief o > > <div id="toolbar" class="btn-toolbar"> > <a class="btn btn-default btn-sm" id="editsuggestion" href="suggestion.pl?op=edit&suggestionid=[% suggestionid %]"><i class="fa fa-pencil"></i> Edit</a> >- <a class="btn btn-default btn-sm" id="deletesuggestion" href="suggestion.pl?op=delete&edit_field=[% suggestionid %]"><i class="fa fa-trash"></i> Delete</a> >+ <a class="btn btn-default btn-sm deletesuggestion" href="suggestion.pl?op=delete&edit_field=[% suggestionid %]"><i class="fa fa-trash"></i> Delete</a> > </div> > > <fieldset class="rows"> >@@ -582,14 +582,16 @@ h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief o > <p><a id="CheckAll[% suggestion.suggestiontype %]" href="#">Check all</a> | <a id="UncheckAll[% suggestion.suggestiontype %]" href="#">Uncheck all</a></p> > <table id="[% suggestion.suggestiontype %]t" class="sorted"> > <thead> >- <tr><th> </th> >- <th>No.</th> >- <th class="anti-the">Suggestion</th> >- <th>Suggested by - on</th> >- <th>Managed by - on</th> >- <th>Library</th> >- <th>Fund</th> >- <th>Status</th></tr> >+ <tr> >+ <th class="NoSort"> </th> >+ <th class="anti-the">Suggestion</th> >+ <th>Suggested by - on</th> >+ <th>Managed by - on</th> >+ <th>Library</th> >+ <th>Fund</th> >+ <th>Status</th> >+ <th class="NoSort"> </th> >+ </tr> > </thead> > <tbody> > [% FOREACH suggestions_loo IN suggestion.suggestions_loop %] >@@ -598,12 +600,8 @@ h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief o > <input type="checkbox" name="edit_field" value="[% suggestions_loo.suggestionid %]" /> > </td> > <td> >- [% suggestions_loo.suggestionid %] >- </td> >- <td> > <a href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid %]&op=show" title="suggestion" > > [% suggestions_loo.title |html %][% IF ( suggestions_loo.author ) %], by [% suggestions_loo.author %][% END %]</a> >- [<a href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid %]&op=edit" title="suggestion" >edit</a>] > <br /> > [% IF ( suggestions_loo.copyrightdate ) %]© [% suggestions_loo.copyrightdate |html %] [% END %] > [% IF ( suggestions_loo.volumedesc ) %]; Volume:<i>[% suggestions_loo.volumedesc |html %]</i> [% END %] >@@ -644,6 +642,10 @@ h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief o > <br />([% suggestions_loo.reason %]) > [% END %] > </td> >+ <td class="actions"> >+ <a class="btn btn-xs btn-default" href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid %]&op=edit"><i class="fa fa-pencil"></i> Edit</a> >+ <a class="btn btn-default btn-xs deletesuggestion" href="suggestion.pl?op=delete&edit_field=[% suggestions_loo.suggestionid %]"><i class="fa fa-trash"></i> Delete</a> >+ </td> > </tr> > [% END %]</tbody> > </table> <fieldset> >-- >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 18581
:
63385
|
63402
| 66469