Bugzilla – Attachment 49617 Details for
Bug 16058
Add a button to delete an individual news item
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16058: Delete individual news item from koha-news.pl
Bug-16058-Delete-individual-news-item-from-koha-ne.patch (text/plain), 4.82 KB, created by
Aleisha Amohia
on 2016-03-29 02:37:08 UTC
(
hide
)
Description:
Bug 16058: Delete individual news item from koha-news.pl
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2016-03-29 02:37:08 UTC
Size:
4.82 KB
patch
obsolete
>From 4c208c479792865639836813443d7b62bb12c8cf Mon Sep 17 00:00:00 2001 >From: Aleisha <aleishaamohia@hotmail.com> >Date: Tue, 29 Mar 2016 02:29:26 +0000 >Subject: [PATCH] Bug 16058: Delete individual news item from koha-news.pl > >This patch adds a confirm message for deleting a news item from the home page in the staff client. It also gives the ability to delete an individual news item from koha-news.pl with a confirm message. The buttons on koha-news.pl are now styled as font awesome buttons. > >To test: >1) Go to main intranet page. Click 'Delete' for a news item. >2) Confirm that Cancel stops the Delete, and OK deletes the item and takes you to tools/koha-news.pl >3) Confirm that the buttons (Edit and Delete) on koha-news.pl are now styled as font awesome buttons and the buttons don't wrap on a narrow browser. >4) Confirm that the column heading for the buttons is now "Actions". >5) Confirm that clicking Delete triggers a confirm message. Confirm that Cancel stops the Delete, and OK deletes the item and it no longer shows in the News table or anywhere else. > >Sponsored-by: Catalyst IT >--- > koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt | 8 ++++++-- > koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt | 5 +++-- > 2 files changed, 9 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >index 64c05f9..f7e8b36 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >@@ -4,7 +4,11 @@ > <link rel="stylesheet" type="text/css" href="[% themelang %]/css/mainpage.css" /> > [% INCLUDE 'doc-head-close.inc' %] > <style type="text/css"> </style> >- >+<script type="text/javascript"> >+//<![CDATA[ >+var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this news item? This cannot be undone."); >+//]]> >+</script> > </head> > <body id="main_intranet-main" class="main"> > [% INCLUDE 'header.inc' %] >@@ -179,7 +183,7 @@ > <p class="newsfooter"> Posted on [% koha_new.newdate %][% IF( ( newsdisp == 'staff' || newsdisp == 'both' ) && koha_new.borrowernumber ) %] by <span class="newsauthor_title">[% koha_new.author_title %] </span>[% koha_new.author_firstname %] [% koha_new.author_surname %]<br />[% END %] > [% IF ( CAN_user_tools ) %] > <a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&id=[% koha_new.idnew %]">Edit</a> >- | <a href="/cgi-bin/koha/tools/koha-news.pl?op=del&ids=[% koha_new.idnew %]">Delete</a> >+ | <a href="/cgi-bin/koha/tools/koha-news.pl?op=del&ids=[% koha_new.idnew %]" onclick="return confirm(MSG_CONFIRM_DELETE);">Delete</a> > | <a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form">New</a> > [% END %] > </p> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt >index ca4588a..0db1b98 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt >@@ -23,6 +23,7 @@ > <script type="text/javascript" src="[% interface %]/lib/tiny_mce/tiny_mce.js"></script> > <script type="text/javascript">//<![CDATA[ > var MSG_CONFIRM_DELETE_NEWS = _("Are you sure you want to delete the selected news?"); >+var MSG_CONFIRM_DELETE_SINGLE = _("Are you sure you want to delete this news item? This cannot be undone."); > > tinyMCE.init({ > mode : "textareas", >@@ -215,7 +216,7 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div> > <th>Title</th> > <th>Author</th> > <th>News</th> >- <th> </th> >+ <th>Actions</th> > </tr></thead> > <tbody>[% FOREACH opac_new IN opac_news %] > [% IF ( opac_new.expired ) %] >@@ -249,7 +250,7 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div> > <td> > [% opac_new.new %] > </td> >- <td><a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&id=[% opac_new.idnew %]">Edit</a></td> >+ <td class="actions"><a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&id=[% opac_new.idnew %]" class="btn btn-mini"><i class="fa fa-pencil"></i> Edit</a><a href="/cgi-bin/koha/tools/koha-news.pl?op=del&ids=[% opac_new.idnew %]" onclick="return confirm(MSG_CONFIRM_DELETE_SINGLE);" class="btn btn-mini"><i class="fa fa-trash"></i> Delete</a></td> > </tr> > [% END %]</tbody> > </table> >-- >1.7.10.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 16058
:
49617
|
49628
|
49712
|
49725