Bugzilla – Attachment 4757 Details for
Bug 6616
Move common table pager markup to include
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Fix for Bug 6616 - Move common table pager markup to include
SIGNED-OFF-Fix-for-Bug-6616---Move-common-table-pa.patch (text/plain), 18.85 KB, created by
Katrin Fischer
on 2011-07-27 20:33:20 UTC
(
hide
)
Description:
[SIGNED-OFF] Fix for Bug 6616 - Move common table pager markup to include
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2011-07-27 20:33:20 UTC
Size:
18.85 KB
patch
obsolete
>From 326f3e71a85fc40a0868a561a936163cfec863c2 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 20 Jul 2011 14:18:34 -0400 >Subject: [PATCH] [SIGNED-OFF] Fix for Bug 6616 - Move common table pager markup to include >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit >Content-Type: text/plain; charset="utf-8" > >Created new include for the tablesorter pager markup: > >[% INCLUDE 'table-pager.inc' perpage='20' %] > >'perpage' variable defines the default items per page for >the paged table. > >Unique changes in branch_transfer_limits.tt: > >- Moved tablesorter configuration out of a loop and changed > it to work by class instead of id (less repeated markup). >- Corrected an errant TMPL tag. > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> > >Checked: >- Home ⺠Administration ⺠Authority MARC Framework: Default Framework >- Home ⺠Administration ⺠Authorized values >- Home ⺠Administration ⺠Set Library Checkin and Transfer Policy >- Home ⺠Administration ⺠Libraries and Groups >- Home ⺠Administration ⺠Patron Categories >- Home ⺠Administration ⺠Cities >- Home ⺠Administration ⺠Item Types Administration >- Home ⺠Administration ⺠MARC Frameworks ⺠Default MARC framework >- Home ⺠Reports ⺠Guided Reports Wizard ⺠Saved Reports >- Home ⺠Patrons ⺠Circulation History for Koha Admin > >No problems found. > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >--- > .../intranet-tmpl/prog/en/includes/table-pager.inc | 17 +++++++++ > .../prog/en/modules/admin/auth_tag_structure.tt | 21 ++---------- > .../prog/en/modules/admin/authorised_values.tt | 22 ++---------- > .../en/modules/admin/branch_transfer_limits.tt | 36 +++++-------------- > .../prog/en/modules/admin/branches.tt | 21 ++---------- > .../prog/en/modules/admin/categorie.tt | 21 ++---------- > .../intranet-tmpl/prog/en/modules/admin/cities.tt | 21 ++---------- > .../prog/en/modules/admin/itemtypes.tt | 21 ++---------- > .../prog/en/modules/admin/marctagstructure.tt | 21 ++---------- > .../prog/en/modules/members/readingrec.tt | 21 ++---------- > .../en/modules/reports/guided_reports_start.tt | 20 ++--------- > 11 files changed, 54 insertions(+), 188 deletions(-) > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/table-pager.inc > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/table-pager.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/table-pager.inc >new file mode 100644 >index 0000000..961c07b >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/table-pager.inc >@@ -0,0 +1,17 @@ >+<div class="pager"><form class="formpager" action=""><label>Page(s): >+ <img src="[% interface %]/prog/img/first.png" alt="" class="first"/> >+ <img src="[% interface %]/prog/img/prev.png" alt="" class="prev"/> >+ <input type="text" size="5" class="pagedisplay"/></label> >+ <img src="[% interface %]/prog/img/next.png" alt="" class="next"/> >+ <img src="[% interface %]/prog/img/last.png" alt="" class="last"/> >+ <label>Entries/page: >+ <select class="pagesize"> >+ [% IF ( perpage == 10) %]<option value="10" selected="selected">10</option>[% ELSE %]<option value="10">10</option>[% END %] >+ [% IF ( perpage == 20) %]<option value="20" selected="selected">20</option>[% ELSE %]<option value="20">20</option>[% END %] >+ [% IF ( perpage == 30) %]<option value="30" selected="selected">30</option>[% ELSE %]<option value="30">30</option>[% END %] >+ [% IF ( perpage == 40) %]<option value="40" selected="selected">40</option>[% ELSE %]<option value="40">40</option>[% END %] >+ [% IF ( perpage == 50) %]<option value="50" selected="selected">50</option>[% ELSE %]<option value="50">50</option>[% END %] >+ [% IF ( perpage == 100) %]<option value="100" selected="selected">100</option>[% ELSE %]<option value="100">100</option>[% END %] >+ [% IF ( perpage == 200) %]<option value="200" selected="selected">200</option>[% ELSE %]<option value="200">200</option>[% END %] >+ </select></label> >+</form></div> >\ No newline at end of file >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt >index eb1d47e..af03d1c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt >@@ -208,24 +208,9 @@ return false; > <input type="text" name="searchfield" value="[% searchfield %]" /> > <input type="submit" value="OK" class="submit" /> > </form><br /> >-<span id="pagertable_authtagstructure" class="pager"> >- <form class="formpager"> <strong>page(s)</strong> : >- <img src="[% interface %]/prog/img/first.png" class="first"/> >- <img src="[% interface %]/prog/img/prev.png" class="prev"/> >- <input type="text" size="5" class="pagedisplay"/> >- <img src="[% interface %]/prog/img/next.png" class="next"/> >- <img src="[% interface %]/prog/img/last.png" class="last"/> >- , entries/page : >- <select class="pagesize"> >- <option value="10">10</option> >- <option selected="selected" value="20">20</option> >- <option value="30">30</option> >- <option value="40">40</option> >- <option value="50">50</option> >- <option value="100">100</option> >- </select> >-</form> >-</span> >+<div id="pagertable_authtagstructure"> >+[% INCLUDE 'table-pager.inc' perpage='20' %] >+</div> > <table id="table_authtagstructure"> > <thead> > <th>Tag</th> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt >index f235634..7e71789 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt >@@ -221,25 +221,9 @@ > [% END %] > <h3>Authorized values for category [% category %]:</h3> > >-[% IF ( loop ) %]<span id="pagertable_authorized_values" class="pager"> >- <form class="formpager"> <strong>page(s)</strong> : >- <img src="[% interface %]/prog/img/first.png" class="first"/> >- <img src="[% interface %]/prog/img/prev.png" class="prev"/> >- <input type="text" size="5" class="pagedisplay"/> >- <img src="[% interface %]/prog/img/next.png" class="next"/> >- <img src="[% interface %]/prog/img/last.png" class="last"/> >- , entries/page : >- <select class="pagesize"> >- <option value="10">10</option> >- <option value="20">20</option> >- <option value="30">30</option> >- <option value="40">40</option> >- <option selected="selected" value="50">50</option> >- <option value="100">100</option> >- <option value="200">200</option> >- </select> >- </form> >-</span>[% END %] >+[% IF ( loop ) %]<div id="pagertable_authorized_values"> >+[% INCLUDE 'table-pager.inc' perpage='50' %] >+</div>[% END %] > > [% IF ( loop ) %]<table id="table_authorized_values" class="tablesorter"> > <thead><tr> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt >index cf7ada3..167a717 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt >@@ -5,6 +5,7 @@ > <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.pager.js"></script> > <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> > <script type="text/javascript"> >+//<![CDATA[ > $(document).ready(function(){ > $("#CheckAll").click(function(){ $("#transferlimit_tabs").checkCheckboxes();}); > $("#UncheckAll").click(function(){ $("#transferlimit_tabs").unCheckCheckboxes();}); >@@ -49,8 +50,12 @@ > $("#"+tid).unCheckCheckboxes(); > return false; > }); >- >+ $(".sorted").tablesorter({ >+ sortList: [[0,0]], >+ headers: { 1: { sorter: false}} >+ }).tablesorterPager({container: $(".pager"),positionFixed: false,size: 10}); > }); >+//]]> > </script> > <style type="text/css">td { text-align: center; }</style> > </head> >@@ -92,32 +97,11 @@ > <div id="[% codes_loo.code %]set"> > <h4>Policy for [% codes_loo.limit_phrase %]: [% codes_loo.code %]</h4> > <p><a id="CheckAll[% codes_loo.code %]table" class="checkall" href="#">Check All</a> | <a id="UncheckAll[% codes_loo.code %]table" class="uncheckall" href="#">Uncheck All</a></p> >- <script type="text/javascript" id="js">$(document).ready(function() { >- $("#[% codes_loo.code %]table").tablesorter({ >- sortList: [[0,0]], >- headers: { 1: { sorter: false}} >- }).tablesorterPager({container: $("#pager[% codes_loo.code %]table"),positionFixed: false,size: 10}); >-}); </script> > >- <span id="pager[% codes_loo.code %]table" class="pager"> >- <form class="formpager"> <strong>page(s)</strong> : >- <img src="[% interface %]/[% theme %]/img/first.png" class="first"/> >- <img src="[% interface %]/[% theme %]/img/prev.png" class="prev"/> >- <input type="text" size="5" class="pagedisplay"/> >- <img src="[% interface %]/[% theme %]/img/next.png" class="next"/> >- <img src="[% interface %]/[% theme %]/img/last.png" class="last"/> >- , entries/page : >- <select class="pagesize"> >- <option selected="selected" value="10">10</option> >- <option value="20">20</option> >- <option value="30">30</option> >- <option value="40">40</option> >- <option value="50">50</option> >- <option value="100">100</option> >- </select> >- </form> >-</span> >- <table id="[% codes_loo.code %]table"> >+ <div id="pager[% codes_loo.code %]table"> >+ [% INCLUDE 'table-pager.inc' perpage='20' %] >+ </div> >+ <table id="[% codes_loo.code %]table" class="sorted"> > <thead> > <tr> > <th>Library</th> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt >index b92ad52..7b79aa8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt >@@ -163,24 +163,9 @@ > [% IF ( MESSAGE10 ) %]<div class="dialog message">Library cannot be deleted because there are items held by that library</div>[% END %] > [% IF ( MESSAGE11 ) %]<div class="dialog message">Library cannot be deleted because there are patrons registered at that library</div>[% END %] > [% IF ( branches ) %] >-<span id="pagerbranchest" class="pager"> >- <form class="formpager"> <strong>page(s)</strong> : >- <img src="[% interface %]/prog/img/first.png" class="first"/> >- <img src="[% interface %]/prog/img/prev.png" class="prev"/> >- <input type="text" size="5" class="pagedisplay"/> >- <img src="[% interface %]/prog/img/next.png" class="next"/> >- <img src="[% interface %]/prog/img/last.png" class="last"/> >- , entries/page : >- <select class="pagesize"> >- <option selected="selected" value="10">10</option> >- <option value="20">20</option> >- <option value="30">30</option> >- <option value="40">40</option> >- <option value="50">50</option> >- <option value="100">100</option> >- </select> >- </form> >-</span> >+<div id="pagerbranchest"> >+[% INCLUDE 'table-pager.inc' perpage='10' %] >+</div> > <table id="branchest"> > <thead><tr> > <th>Name</th> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt >index c2e5062..7a98164 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt >@@ -265,24 +265,9 @@ Confirm Deletion of Category [% categorycode |html %][% END %]</legend> > [% IF ( searchfield ) %] > You Searched for [% searchfield %]</span> > [% END %] >-<span id="pagertable_categorie" class="pager"> >- <form class="formpager"> <strong>page(s)</strong> : >- <img src="[% interface %]/prog/img/first.png" class="first"/> >- <img src="[% interface %]/prog/img/prev.png" class="prev"/> >- <input type="text" size="5" class="pagedisplay"/> >- <img src="[% interface %]/prog/img/next.png" class="next"/> >- <img src="[% interface %]/prog/img/last.png" class="last"/> >- , entries/page : >- <select class="pagesize"> >- <option value="10">10</option> >- <option selected="selected" value="20">20</option> >- <option value="30">30</option> >- <option value="40">40</option> >- <option value="50">50</option> >- <option value="100">100</option> >- </select> >- </form> >-</span> >+<div id="pagertable_categorie"> >+[% INCLUDE 'table-pager.inc' perpage='20' %] >+</div> > <table id="table_categorie"> > <thead> > <th scope="col">Code</th> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt >index 2e9bdd2..9a90923 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt >@@ -114,24 +114,9 @@ > [% END %] > > [% IF ( loop ) %] >-<span id="pagertable_cities" class="pager"> >- <form class="formpager"> <strong>page(s)</strong> : >- <img src="[% interface %]/prog/img/first.png" class="first"/> >- <img src="[% interface %]/prog/img/prev.png" class="prev"/> >- <input type="text" size="5" class="pagedisplay"/> >- <img src="[% interface %]/prog/img/next.png" class="next"/> >- <img src="[% interface %]/prog/img/last.png" class="last"/> >- , entries/page : >- <select class="pagesize"> >- <option value="10">10</option> >- <option selected="selected" value="20">20</option> >- <option value="30">30</option> >- <option value="40">40</option> >- <option value="50">50</option> >- <option value="100">100</option> >- </select> >- </form> >-</span> >+<div id="pagertable_cities"> >+[% INCLUDE 'table-pager.inc' perpage='20' %] >+</div> > <table id="table_cities"> > <thead> > <th>City ID</th> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt >index 9174247..13ece6e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt >@@ -285,24 +285,9 @@ Item Types Administration > > [% IF ( else ) %] > <h2>Item Types Administration</h2> >-[% IF ( loop ) %]<span id="pagertable_item_type" class="pager"> >- <form class="formpager"> <strong>page(s)</strong>: >- <img src="[% interface %]/prog/img/first.png" class="first"/> >- <img src="[% interface %]/prog/img/prev.png" class="prev"/> >- <input type="text" size="5" class="pagedisplay"/> >- <img src="[% interface %]/prog/img/next.png" class="next"/> >- <img src="[% interface %]/prog/img/last.png" class="last"/> >- , entries/page: >- <select class="pagesize"> >- <option selected="selected" value="10">10</option> >- <option value="20">20</option> >- <option value="30">30</option> >- <option value="40">40</option> >- <option value="50">50</option> >- <option value="100">100</option> >- </select> >- </form> >-</span> >+[% IF ( loop ) %]<div id="pagertable_item_type"> >+[% INCLUDE 'table-pager.inc' perpage='10' %] >+</div> > <table id="table_item_type"> > <thead> > [% UNLESS ( noItemTypeImages ) %]<th>Image</th>[% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt >index 275f232..c889820 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt >@@ -157,24 +157,9 @@ $(document).ready(function() { > [% END %]</p> > </fieldset> > </form> >-<span id="pagertable_marctagstructure" class="pager"> >- <form class="formpager"> <strong>page(s)</strong> : >- <img src="[% interface %]/prog/img/first.png" class="first"/> >- <img src="[% interface %]/prog/img/prev.png" class="prev"/> >- <input type="text" size="5" class="pagedisplay"/> >- <img src="[% interface %]/prog/img/next.png" class="next"/> >- <img src="[% interface %]/prog/img/last.png" class="last"/> >- , entries/page : >- <select class="pagesize"> >- <option value="10">10</option> >- <option selected="selected" value="20">20</option> >- <option value="30">30</option> >- <option value="40">40</option> >- <option value="50">50</option> >- <option value="100">100</option> >- </select> >- </form> >-</span> >+<div id="pagertable_marctagstructure"> >+[% INCLUDE 'table-pager.inc' perpage='20' %] >+</div> > <table id="table_marctagstructure"> > <thead> > <th>Tag</th> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt >index c61006b..1ab1130 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt >@@ -32,24 +32,9 @@ > <h1>Circulation History</h1> > <form action="/cgi-bin/koha/members/readingrec.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" /></form> > >-<span id="pagertable_readingrec" class="pager"> >- <form class="formpager"> <strong>page(s)</strong> : >- <img src="[% interface %]/prog/img/first.png" class="first"/> >- <img src="[% interface %]/prog/img/prev.png" class="prev"/> >- <input type="text" size="5" class="pagedisplay"/> >- <img src="[% interface %]/prog/img/next.png" class="next"/> >- <img src="[% interface %]/prog/img/last.png" class="last"/> >- , entries/page : >- <select class="pagesize"> >- <option value="10">10</option> >- <option selected="selected" value="20">20</option> >- <option value="30">30</option> >- <option value="40">40</option> >- <option value="50">50</option> >- <option value="100">100</option> >- </select> >- </form> >-</span> >+<div id="pagertable_readingrec"> >+[% INCLUDE 'table-pager.inc' perpage='20' %] >+</div> > <table id="table_readingrec"> > <thead> > <th>Date</th> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >index e3df4e2..88b52c5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >@@ -124,23 +124,9 @@ canned reports and writing custom SQL reports.</p> > [% IF ( saved1 ) %] > [% IF ( savedreports ) %]<h1>Saved Reports</h1> > >-<span id="pagertable_reports" class="pager"> >- <form class="formpager"> <strong>page(s)</strong> : >- <img src="[% interface %]/prog/img/first.png" class="first"/> >- <img src="[% interface %]/prog/img/prev.png" class="prev"/> >- <input type="text" size="5" class="pagedisplay"/> >- <img src="[% interface %]/prog/img/next.png" class="next"/> >- <img src="[% 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> >+<div id="pagertable_reports"> >+[% INCLUDE 'table-pager.inc' perpage='20' %] >+</div> > > <table id="table_reports" class="tablesorter"> > <thead> >-- >1.7.4.1
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 6616
:
4686
|
4687
|
4757
|
5737
|
5738