From f8432bb26d3d981a0276dc62e81576a455e323bb 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 --- .../prog/en/includes/checkouts-table.inc | 70 +++++++++++++++ .../prog/en/modules/circ/circulation.tt | 72 +--------------- .../prog/en/modules/members/moremember.tt | 85 +------------------ 3 files changed, 72 insertions(+), 155 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 e271deb3f5..6c1a4a03af 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -697,78 +697,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 59999beeb9..2d6cf1e02b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -413,90 +413,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 %] - - -
    - - [% IF ( exports_enabled ) %] -
    - - - - - - - - - -
    - [% END %] - - - - - [% IF ( exports_enabled ) %] -
    - - - - - - - - - -
    - [% END %] - [% END %] -
    - [% ELSE %] -

    Patron has nothing checked out.

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