From 9caf879d39c2cb6435b6109535ad6712a217942e 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. --- .../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 0000000..c9372da --- /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 edb781f..e2e3a0a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -765,78 +765,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 2a3b818..d893a91 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.1.0