Bugzilla – Attachment 26606 Details for
Bug 7567
News by Library: refactor, enhance, and fix
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[NEEDS SIGN OFF] Bug 7567 - Correct Filtering and Default dropdown values
NEEDS-SIGN-OFF-Bug-7567---Correct-Filtering-and-De.patch (text/plain), 8.53 KB, created by
Mark Tompsett
on 2014-03-26 17:20:34 UTC
(
hide
)
Description:
[NEEDS SIGN OFF] Bug 7567 - Correct Filtering and Default dropdown values
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2014-03-26 17:20:34 UTC
Size:
8.53 KB
patch
obsolete
>From 1f1b9b88532c901173ad95328ace202d62e3c68d Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Fri, 13 Dec 2013 22:12:37 -0500 >Subject: [PATCH] [NEEDS SIGN OFF] Bug 7567 - Correct Filtering and Default > dropdown values > >In the staff client, when you went to Home -> Tools -> News >the default 'Display location' is 'All'. Everything is correctly >displayed. However, if you change the filter it filters the >table correctly, but does not set the dropdown value to match. >This patch corrects this. > >TEST PLAN >--------- > 1) Home -> Tools -> News > 2) Change 'Display location' value and click 'Filter'. > - Is the 'Display location' value the same now? > (no) > - Are the correct values displayed? > 3) Click 'New entry' > - Is it anything other than 'All'? > (no, and is this correct?) > 4) Click 'Cancel' > 5) Click 'Edit' for various news items with different locations. > - Does the 'Display location' get proper set? > (no) > 6) Apply patch > 7) Change the 'Display location' value and click 'Filter'. > - Does the 'Display location' value stay the same? > (this should be correct now) > - Are the correct values displayed? > 8) Change the 'Display location' value to 'All' and click 'Filter'. > - Does everything display? > 9) Change the 'Display location' value and click 'Filter'. >10) Click 'New entry' > - Does it match what the filter was? > (should match now) >11) Click 'Cancel' >12) Click 'Edit' for various news items with different locations. > - Does the 'Display location' get proper set? > (this should be correct now) >--- > .../prog/en/modules/tools/koha-news.tt | 79 ++++++++++++++------ > tools/koha-news.pl | 2 + > 2 files changed, 57 insertions(+), 24 deletions(-) > >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 411ab1f..bd9c2bb 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 >@@ -62,23 +62,43 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div> > > [% UNLESS ( add_form ) %] > <div id="toolbar" class="btn-toolbar"> >- <a class="btn btn-small" id="newentry" href="/cgi-bin/koha/tools/koha-news.pl?op=add_form"><i class="icon-plus"></i> New entry</a> >+ <a class="btn btn-small" id="newentry" href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&lang=[% lang %]"><i class="icon-plus"></i> New entry</a> > </div> > [% END %] > > [% IF ( add_form ) %] >+ [% IF ( op == 'add' ) %][% default_lang = lang %] >+ [% ELSE %][% default_lang = new_detail.lang %] >+ [% END %] > <form name="add_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" > > <input type="hidden" name="op" value="[% op %]" /> > <input type="hidden" name="id" value="[% id %]" /> > <fieldset class="rows"> > <legend>OPAC and Koha news</legend> > <ol> <li> >- <label for="lang">Display location</label> >+ <label for="lang">([% new_detail.lang %])([% lang %])Display location</label> > <select id="lang" name="lang"> >- <option value="koha">Librarian interface</option> >- [% IF ( slip ) %]<option value="slip" selected="selected">Slip</option>[% ELSE %]<option value="slip">Slip</option>[% END %] >+ [% IF ( default_lang == "" ) %] >+ <option value="" selected>All</option> >+ [% ELSE %] >+ <option value="" >All</option> >+ [% END %] >+ [% IF ( default_lang == "koha" ) %] >+ <option value="koha" selected>Librarian interface</option> >+ [% ELSE %] >+ <option value="koha" >Librarian interface</option> >+ [% END %] >+ [% IF ( default_lang == "slip" ) %] >+ <option value="slip" selected>Slip</option> >+ [% ELSE %] >+ <option value="slip" >Slip</option> >+ [% END %] > [% FOREACH lang_lis IN lang_list %] >- [% IF ( lang_lis.selected ) %]<option value="[% lang_lis.language %]" selected="selected">OPAC ([% lang_lis.language %])</option>[% ELSE %]<option value="[% lang_lis.language %]">OPAC ([% lang_lis.language %])</option>[% END %] >+ [% IF ( lang_lis.language == default_lang ) %] >+ <option value="[% lang_lis.language %]" selected>OPAC ([% lang_lis.language %])</option> >+ [% ELSE %] >+ <option value="[% lang_lis.language %]" >OPAC ([% lang_lis.language %])</option> >+ [% END %] > [% END %] > </select> > </li> >@@ -116,17 +136,27 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div> > <form name="add_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" > > <label for="lang">Display location:</label> > <select name="lang" id="lang"> >- <option value="">All</option> >- <option value="koha">Librarian interface</option> >- <option value="slip">Slip</option> >+ [% IF ( lang == "" ) %] >+ <option value="" selected>All</option> >+ [% ELSE %] >+ <option value="" >All</option> >+ [% END %] >+ [% IF ( lang == "koha" ) %] >+ <option value="koha" selected>Librarian interface</option> >+ [% ELSE %] >+ <option value="koha" >Librarian interface</option> >+ [% END %] >+ [% IF ( lang == "slip" ) %] >+ <option value="slip" selected>Slip</option> >+ [% ELSE %] >+ <option value="slip" >Slip</option> >+ [% END %] > [% FOREACH lang_lis IN lang_list %] >- [% IF ( lang_lis.selected ) %] >- <option value="[% lang_lis.language %]" selected="selected"> >- [% ELSE %] >- <option value="[% lang_lis.language %]"> >- [% END %] >- OPAC ([% lang_lis.language %]) >- </option> >+ [% IF ( lang_lis.language == lang ) %] >+ <option value="[% lang_lis.language %]" selected>OPAC ([% lang_lis.language %])</option> >+ [% ELSE %] >+ <option value="[% lang_lis.language %]">OPAC ([% lang_lis.language %])</option> >+ [% END %] > [% END %] > </select> > <input type="submit" class="button" value="Filter" /> >@@ -154,15 +184,16 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div> > <td> > <input type="checkbox" name="ids" value="[% opac_new.idnew %]" /> > </td> >- <td>[% IF ( opac_new.lang == 'koha' ) %] >- Librarian interface >- [% ELSE %] >- [% IF ( opac_new.lang == 'slip' ) %] >- Slip >- [% ELSE %] >- OPAC >- [% END %] >- [% END %] >+ <td>[% SWITCH opac_new.lang %] >+ [% CASE "koha" %] >+ Librarian interface >+ [% CASE "slip" %] >+ Slip >+ [% CASE "" %] >+ All >+ [% CASE %] >+ OPAC ([% opac_new.lang %]) >+ [% END %] > </td> > > <td>[% opac_new.number %]</td> >diff --git a/tools/koha-news.pl b/tools/koha-news.pl >index fb01195..58ee573 100755 >--- a/tools/koha-news.pl >+++ b/tools/koha-news.pl >@@ -7,6 +7,7 @@ > # Casta�eda, Carlos Sebastian - seba3c@yahoo.com.ar - Physics Library UNLP Argentina > # Modified to include news to KOHA intranet - tgarip@neu.edu.tr NEU library -Cyprus > # Copyright 2000-2002 Katipo Communications >+# Copyright (C) 2013 Mark Tompsett > # > # Koha is free software; you can redistribute it and/or modify it > # under the terms of the GNU General Public License as published by >@@ -118,4 +119,5 @@ else { > ); > $template->param( $lang => 1 ) if $lang; > } >+$template->param( lang => $lang ); > output_html_with_http_headers $cgi, $cookie, $template->output; >-- >1.7.9.5
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 7567
:
22863
|
22917
|
22920
|
23350
|
23351
|
23352
|
23362
|
23368
|
23378
|
23383
|
23386
|
23474
|
23475
|
23501
|
23544
|
23547
|
23552
|
23553
|
23554
|
23559
|
23664
|
23703
|
23704
|
23705
|
25316
|
25317
|
25318
|
25319
|
25320
|
25321
|
25322
|
25323
|
25324
|
25325
|
25331
|
25332
|
25333
|
26510
|
26511
|
26590
|
26591
|
26592
|
26593
|
26594
|
26595
|
26596
|
26597
|
26598
|
26599
|
26600
|
26601
|
26602
|
26603
|
26604
|
26605
|
26606
|
26607
|
26608
|
26609
|
26610
|
26611
|
26612
|
26631
|
26632
|
26633
|
26634
|
26635
|
26636
|
26637
|
26638
|
26639
|
26640
|
26641
|
26642
|
26643
|
26644
|
26647