From 2aebc84cc880048c559aa4d19e66cb35a37f42ea Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 4 Nov 2014 09:34:32 +0100 Subject: [PATCH] Bug 13190: Refactor the checkouts table template code This code is duplicated and should be centralised. Signed-off-by: Kyle M Hall Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../prog/en/includes/checkouts-table.inc | 70 ++++++++++++++++++ .../prog/en/modules/circ/circulation.tt | 72 +----------------- .../prog/en/modules/members/moremember.tt | 74 +------------------ 3 files changed, 72 insertions(+), 144 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc new file mode 100644 index 0000000000..fc6d4edeab --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc @@ -0,0 +1,70 @@ +
+ [% IF ( issuecount ) %] + +
+ + + + + + + + + + + + + + + + + + + + [% INCLUDE 'checkouts-table-footer.inc' %] +
  Due dateDue dateTitleItem typeChecked out onChecked out fromCall noChargePriceRenew

select all | none

Check in

select all | none

Export

select all | none

+ + + + +
+
+ [% IF ( CAN_user_circulate_override_renewals ) %] + [% IF ( AllowRenewalLimitOverride ) %] + + + [% END %] + [% END %] + + +
+ + [% IF ( exports_enabled ) %] +
+ + + + + + + + + +
+ [% END %] +
+
+ [% ELSE %] +

Patron has nothing checked out.

+ [% END %] +
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index 94ef2575b8..c2f3ba897b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -766,78 +766,8 @@ No patron matched [% message %] -
- [% IF ( issuecount ) %] - - -
- - - - - - - - - - - - - - - - - - - - [% INCLUDE 'checkouts-table-footer.inc' %] -
  Due dateDue dateTitleItem typeChecked out onChecked out fromCall noChargePriceRenew

select all | none

Check in

select all | none

Export

select all | none

- - - - -
- [% IF ( CAN_user_circulate_override_renewals ) %] - [% IF ( AllowRenewalLimitOverride ) %] - - - [% END %] - [% END %] - - -
- - [% IF issuecount %] - [% IF ( exports_enabled ) %] -
- - - - - - - - - -
- [% END %] - [% END %] -
- [% ELSE %] -

Patron has nothing checked out.

- [% END %] -
+[% INCLUDE "checkouts-table.inc" %] [% IF ( relatives_issues_count ) %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index 2a3b8186c6..d893a9166e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -417,79 +417,7 @@ function validate1(date) {
  • [% debarments.size %] Restrictions
  • -
    - [% IF ( issuecount ) %] - - -
    - - - - - - - - - - - - - - - - - - - - [% INCLUDE 'checkouts-table-footer.inc' %] -
      Due dateDue dateTitleItem typeChecked out onChecked out fromCall noChargePriceRenew

    select all | none

    Check in

    select all | none

    Export

    select all | none

    - - - - - [% IF ( issuecount ) %] -
    -
    - [% IF ( CAN_user_circulate_override_renewals ) %] - [% IF ( AllowRenewalLimitOverride ) %] - - - [% END %] - [% END %] - - -
    - - [% IF ( exports_enabled ) %] -
    - - - - - - - - - -
    - [% END %] -
    - [% END %] -
    - [% ELSE %] -

    Patron has nothing checked out.

    - [% END %] -
    +[% INCLUDE "checkouts-table.inc" %] [% IF ( relatives_issues_count ) %]
    -- 2.39.5