Bugzilla – Attachment 91485 Details for
Bug 23279
In news management interface, sort news by publication date descending
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23279: In news management interface, sort news by publication date descending
Bug-23279-In-news-management-interface-sort-news-b.patch (text/plain), 3.31 KB, created by
Claire Gravely
on 2019-07-12 13:05:47 UTC
(
hide
)
Description:
Bug 23279: In news management interface, sort news by publication date descending
Filename:
MIME Type:
Creator:
Claire Gravely
Created:
2019-07-12 13:05:47 UTC
Size:
3.31 KB
patch
obsolete
>From 72c8398ba7c7510c04301c4073c587e8e4d928b6 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 8 Jul 2019 16:06:38 +0000 >Subject: [PATCH] Bug 23279: In news management interface, sort news by > publication date descending > >This patch makes a few changes to the configuration of the DataTable >showing news items in the staff client. It adds a default sort on >"Publication date," descending; It updates the way non-sortable columns >are configured; It modifies sorting on the title and content columns so >that articles are ignored. > >To test, apply the patch and go to Tools -> News. > > - When the page loads the table of news items should sort by default on > publication date, descending. > - There should be no sorting indicator on the first and last columns. > - When sorting the "Title" or "News" columns, articles "A," "An," and > "The" should be ignored. > >Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> >--- > .../intranet-tmpl/prog/en/modules/tools/koha-news.tt | 15 ++++++++------- > 1 file changed, 8 insertions(+), 7 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 fe88908..f7f90f4 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 >@@ -104,16 +104,16 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div> > <form id="del_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl"> > <table id="newst"> > <thead> <tr> >- <th> </th> >+ <th class="NoSort"> </th> > <th>Location</th> > <th>Library</th> > <th>Number</th> > <th class="title-string">Publication date</th> > <th class="title-string">Expiration date</th> >- <th>Title</th> >+ <th class="anti-the">Title</th> > <th>Author</th> >- <th>News</th> >- <th>Actions</th> >+ <th class="anti-the">News</th> >+ <th class="NoSort">Actions</th> > </tr></thead> > <tbody>[% FOREACH opac_new IN opac_news %] > [% IF ( opac_new.expired ) %] >@@ -240,10 +240,11 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div> > > $(document).ready(function() { > var newst = $("#newst").DataTable($.extend(true, {}, dataTablesDefaults, { >+ "order": [[ 4, "desc" ]], > "aoColumnDefs": [ >- { "aTargets": [ 0,-1,-2 ], "bSortable": false }, >- { "aTargets": [ 0, -1 ], "bSearchable": false }, >- { 'sType': "title-string", 'aTargets' : [ 'title-string'] } >+ { "sortable": false, "searchable": false, 'targets': [ 'NoSort' ] }, >+ { "type": "anti-the", "targets": [ "anti-the" ] }, >+ { "type": "title-string", "targets" : [ "title-string"] } > ], > "sPaginationType": "full_numbers" > })); >-- >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 23279
:
91410
|
91485
|
91505
|
91624