Bugzilla – Attachment 86771 Details for
Bug 22318
Extend Koha news feature to include other content areas
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22318: (follow-up) Add new options to new table filter form
Bug-22318-follow-up-Add-new-options-to-new-table-f.patch (text/plain), 6.56 KB, created by
Josef Moravec
on 2019-03-20 07:42:07 UTC
(
hide
)
Description:
Bug 22318: (follow-up) Add new options to new table filter form
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2019-03-20 07:42:07 UTC
Size:
6.56 KB
patch
obsolete
>From f63a18ecd42d896ef2f8e5793ed0b5ff6a39e383 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 19 Mar 2019 13:39:39 +0000 >Subject: [PATCH] Bug 22318: (follow-up) Add new options to new table filter > form > >This patch adds the new language/location options to the form for >filtering entries in the table of news items. Since this markup is >duplicated twice in the template, its contents have been moved to a >BLOCK. > >To test, apply the patch and go to Tools -> News. At the top of the >table of news items the "Display location" form should show all options >including OpacNavRight for all your enabled languages. > >Confirm that location/language selection still works correctly upon >adding and editing news items. > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > .../prog/en/modules/tools/koha-news.tt | 91 +++++++++------------- > 1 file changed, 37 insertions(+), 54 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 3096ece9bd..1d36f44e86 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 >@@ -52,38 +52,7 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div> > <ol> <li> > <label for="lang">Display location:</label> > <select id="lang" name="lang"> >- [% IF ( default_lang == "" ) %] >- <option value="" selected="selected">All</option> >- [% ELSE %] >- <option value="" >All</option> >- [% END %] >- [% IF ( default_lang == "koha" ) %] >- <option value="koha" selected="selected">Librarian interface</option> >- [% ELSE %] >- <option value="koha" >Librarian interface</option> >- [% END %] >- [% IF ( default_lang == "slip" ) %] >- <option value="slip" selected="selected">Slip</option> >- [% ELSE %] >- <option value="slip" >Slip</option> >- [% END %] >- [% FOREACH lang_lis IN lang_list %] >- <optgroup label="[% lang_lis.language | html %]"> >- [% FOREACH location IN [ '', 'OpacNavRight' ] %] >- [% IF ( location == '' ) %] >- [% SET location_lang = lang_lis.language %] >- [% SET location = "OPAC news" %] >- [% ELSE %] >- [% SET location_lang = location _ "_" _ lang_lis.language %] >- [% END %] >- [% IF ( location_lang == default_lang ) %] >- <option value="[% location_lang | html %]" selected="selected">[% location | html %] ([% lang_lis.language | html %])</option> >- [% ELSE %] >- <option value="[% location_lang | html %]">[% location | html %] ([% lang_lis.language | html %])</option> >- [% END %] >- [% END %] >- </optgroup> >- [% END %] >+ [% PROCESS lang_locations language => default_lang %] > </select> > </li> > <li> >@@ -135,28 +104,7 @@ 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"> >- [% IF ( lang == "" ) %] >- <option value="" selected="selected">All</option> >- [% ELSE %] >- <option value="" >All</option> >- [% END %] >- [% IF ( lang == "koha" ) %] >- <option value="koha" selected="selected">Librarian interface</option> >- [% ELSE %] >- <option value="koha" >Librarian interface</option> >- [% END %] >- [% IF ( lang == "slip" ) %] >- <option value="slip" selected="selected">Slip</option> >- [% ELSE %] >- <option value="slip" >Slip</option> >- [% END %] >- [% FOREACH lang_lis IN lang_list %] >- [% IF ( lang_lis.language == lang ) %] >- <option value="[% lang_lis.language | html %]" selected="selected">OPAC ([% lang_lis.language | html %])</option> >- [% ELSE %] >- <option value="[% lang_lis.language | html %]" >OPAC ([% lang_lis.language | html %])</option> >- [% END %] >- [% END %] >+ [% PROCESS lang_locations language => lang %] > </select> > <label for="branch">Library: </label> > <select id="branch" name="branch"> >@@ -312,4 +260,39 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div> > </script> > [% END %] > >+[% BLOCK lang_locations %] >+ [% IF ( language == "" ) %] >+ <option value="" selected="selected">All</option> >+ [% ELSE %] >+ <option value="">All</option> >+ [% END %] >+ [% IF ( language == "koha" ) %] >+ <option value="koha" selected="selected">Librarian interface</option> >+ [% ELSE %] >+ <option value="koha">Librarian interface</option> >+ [% END %] >+ [% IF ( language == "slip" ) %] >+ <option value="slip" selected="selected">Slip</option> >+ [% ELSE %] >+ <option value="slip">Slip</option> >+ [% END %] >+ [% FOREACH lang_lis IN lang_list %] >+ <optgroup label="[% lang_lis.language | html %]"> >+ [% FOREACH location IN [ '', 'OpacNavRight' ] %] >+ [% IF ( location == '' ) %] >+ [% SET location_lang = lang_lis.language %] >+ [% SET location = "OPAC news" %] >+ [% ELSE %] >+ [% SET location_lang = location _ "_" _ lang_lis.language %] >+ [% END %] >+ [% IF ( location_lang == language ) %] >+ <option value="[% location_lang | html %]" selected="selected">[% location | html %] ([% lang_lis.language | html %])</option> >+ [% ELSE %] >+ <option value="[% location_lang | html %]">[% location | html %] ([% lang_lis.language | html %])</option> >+ [% END %] >+ [% END %] >+ </optgroup> >+ [% END %] >+[% END %] >+ > [% INCLUDE 'intranet-bottom.inc' %] >-- >2.11.0
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 22318
:
85132
|
85133
|
86728
|
86730
|
86731
|
86733
|
86734
|
86743
|
86771
|
87490
|
87491
|
87492
|
87493