Bugzilla – Attachment 3395 Details for
Bug 5931
Paging and sorting saved reports table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
0001-Bug-5931-Paging-and-sorting-saved-reports-table.patch (text/plain), 5.45 KB, created by
Frédéric Demians
on 2011-03-22 13:07:35 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Frédéric Demians
Created:
2011-03-22 13:07:35 UTC
Size:
5.45 KB
patch
obsolete
>From 14f4f7806cb7609905b92e46aa8f5f37931dec7c Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= <f.demians@tamil.fr> >Date: Tue, 22 Mar 2011 14:14:25 +0100 >Subject: [PATCH] Bug 5931 Paging and sorting saved reports table > >On Reports > Saved reports page, a table shows all saved reports. >Table's rows are sorted by report IDs. When there are a lot reports, >this table is difficult to read. > >This enhancement add to Saved report page a paging bar and sort options on >column names, like in the framework table. >--- > .../en/modules/reports/guided_reports_start.tmpl | 66 +++++++++++++++++--- > 1 files changed, 58 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tmpl >index c5868a0..6933393 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tmpl >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tmpl >@@ -19,6 +19,9 @@ > <style type="text/css"> > #sql { width: 90%; height: 9em;} > </style> >+<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script> >+<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.pager.js"></script> >+ > <script type="text/javascript"> > //<![CDATA[ > $(document).ready(function(){ >@@ -38,6 +41,21 @@ $(document).ready(function(){ > } > }); > <!-- /TMPL_IF --> >+ // call the tablesorter plugin >+ $("#table_reports").tablesorter({ >+ sortList: [[1,0]], >+ headers: { >+ 6: { sorter: false}, >+ 7: { sorter: false}, >+ 8: { sorter: false}, >+ 9: { sorter: false}, >+ 10: { sorter: false} >+ } >+ }).tablesorterPager({ >+ container: $("#pagertable_reports"), >+ positionFixed: false, >+ size: 50 >+ }); > }); > //]]> > </script> >@@ -106,9 +124,41 @@ canned reports and writing custom SQL reports.</p> > <!-- TMPL_IF NAME="saved1" --> > <!-- TMPL_IF NAME="savedreports" --><h1>Saved Reports</h1> > <p>Choose the report to run from the list</p> >-<form action="/cgi-bin/koha/reports/guided_reports.pl"> >-<table> >-<tr><th>ID</th><th>Report Name</th><th>Type</th><th>Notes</th><th>Author</th><th>Creation Date</th><th>Saved Results</th><th>Saved SQL</th><th colspan="3"> </th></tr> >+ >+<span id="pagertable_reports" class="pager"> >+ <form class="formpager"> <strong>page(s)</strong> : >+ <img src="<!-- TMPL_VAR name="interface" -->/prog/img/first.png" class="first"/> >+ <img src="<!-- TMPL_VAR name="interface" -->/prog/img/prev.png" class="prev"/> >+ <input type="text" size="5" class="pagedisplay"/> >+ <img src="<!-- TMPL_VAR name="interface" -->/prog/img/next.png" class="next"/> >+ <img src="<!-- TMPL_VAR name="interface" -->/prog/img/last.png" class="last"/> >+ , entries/page: >+ <select class="pagesize"> >+ <option value="10">10</option> >+ <option value="25" selected="selected">25</option> >+ <option value="50">50</option> >+ <option value="100">100</option> >+ <option value="200">200</option> >+ </select> >+ </form> >+</span> >+ >+<table id="table_reports" class="tablesorter"> >+<thead> >+ <tr> >+ <th>ID</th> >+ <th>Report Name</th> >+ <th>Type</th> >+ <th>Notes</th> >+ <th>Author</th> >+ <th>Creation Date</th> >+ <th>Saved Results</th> >+ <th>Saved SQL</th> >+ <th> </th> >+ <th> </th> >+ </tr> >+</thead> >+<tbody> > <!-- TMPL_LOOP NAME="savedreports" --> > <!-- TMPL_UNLESS NAME="__odd__" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_UNLESS --> > <td><!-- TMPL_VAR NAME="id" --></td> >@@ -120,20 +170,20 @@ canned reports and writing custom SQL reports.</p> > <td><!-- TMPL_IF NAME="date_run" --><a href="/cgi-bin/koha/reports/guided_reports.pl?phase=retrieve%20results&id=<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="date_run" --></a><!-- /TMPL_IF --> > </td> > <td> >- <a href="/cgi-bin/koha/reports/guided_reports.pl?reports=<!-- TMPL_VAR NAME="id" -->&phase=Show%20SQL">Show SQL</a> >+ <a href="/cgi-bin/koha/reports/guided_reports.pl?reports=<!-- TMPL_VAR NAME="id" -->&phase=Show%20SQL">Show</a> > <!-- TMPL_IF name="CAN_user_reports_create_reports" --> >- <a href="/cgi-bin/koha/reports/guided_reports.pl?reports=<!-- TMPL_VAR NAME="id" -->&phase=Edit%20SQL">Edit SQL</a> >+ <a href="/cgi-bin/koha/reports/guided_reports.pl?reports=<!-- TMPL_VAR NAME="id" -->&phase=Edit%20SQL">Edit</a> > <!-- /TMPL_IF --> > </td> >-<td><a href="/cgi-bin/koha/reports/guided_reports.pl?reports=<!-- TMPL_VAR NAME="id" -->&phase=Run%20this%20report">Run</a></td> >-<td><a href="/cgi-bin/koha/tools/scheduler.pl?id=<!-- TMPL_VAR NAME="id" -->">Schedule</a></td> >+<td><a href="/cgi-bin/koha/reports/guided_reports.pl?reports=<!-- TMPL_VAR NAME="id" -->&phase=Run%20this%20report">Run</a> >+<a href="/cgi-bin/koha/tools/scheduler.pl?id=<!-- TMPL_VAR NAME="id" -->">Schedule</a></td> > <!-- TMPL_IF name="CAN_user_reports_create_reports" --> > <td><a class="confirmdelete" title="Delete this saved report" href="/cgi-bin/koha/reports/guided_reports.pl?reports=<!-- TMPL_VAR NAME="id" -->&phase=Delete%20Saved">Delete</a></td> > <!-- /TMPL_IF --> > </tr> > <!-- /TMPL_LOOP --> >+</tbody> > </table> >-</form> > <!-- TMPL_ELSE --><h4>There are no saved reports. > <!-- TMPL_IF name="CAN_user_reports_create_reports" --> > <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">Build new?</a> >-- >1.7.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 5931
: 3395