View | Details | Raw Unified | Return to bug 24194
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc (-4 / +8 lines)
Lines 13-19 Link Here
13
        <th>Patron</th>
13
        <th>Patron</th>
14
        <th>Notes</th>
14
        <th>Notes</th>
15
        <th>Date</th>
15
        <th>Date</th>
16
        <th>Expiration</th>
16
        [% IF Koha.Preference('ReserveExpiration') %]
17
            <th>Expiration</th>
18
        [% END %]
17
        <th>Pickup library</th>
19
        <th>Pickup library</th>
18
        <th>Details</th>
20
        <th>Details</th>
19
        [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
21
        [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
Lines 113-121 Link Here
113
                    [% hold.date | $KohaDates %]
115
                    [% hold.date | $KohaDates %]
114
                [% END %]
116
                [% END %]
115
            </td>
117
            </td>
116
            <td>
118
            [% IF Koha.Preference('ReserveExpiration') %]
117
                <input type="text" class="flatpickr" data-flatpickr-futuredate="true" value="[% hold.expirationdate | $KohaDates %]" size="10" name="expirationdate" />
119
                <td>
118
            </td>
120
                    <input type="text" class="flatpickr" data-flatpickr-futuredate="true" value="[% hold.expirationdate | $KohaDates %]" size="10" name="expirationdate" />
121
                </td>
122
            [% END %]
119
            <td>
123
            <td>
120
                [%- IF ( hold.found ) -%]
124
                [%- IF ( hold.found ) -%]
121
                    [%- IF ( hold.atdestination ) -%]
125
                    [%- IF ( hold.atdestination ) -%]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (+1 lines)
Lines 975-980 Link Here
975
            relatives_borrowernumbers.push("[% b | html %]");
975
            relatives_borrowernumbers.push("[% b | html %]");
976
        [% END %]
976
        [% END %]
977
        var SuspendHoldsIntranet = [% ( Koha.Preference('SuspendHoldsIntranet') ) ? 1 : 0 | html %];
977
        var SuspendHoldsIntranet = [% ( Koha.Preference('SuspendHoldsIntranet') ) ? 1 : 0 | html %];
978
        var ReserveExpiration = [% ( Koha.Preference('ReserveExpiration') ) ? 1 : 0 | html %];
978
    </script>
979
    </script>
979
    [% Asset.js("js/pages/circulation.js") | $raw %]
980
    [% Asset.js("js/pages/circulation.js") | $raw %]
980
    [% Asset.js("js/checkouts.js") | $raw %]
981
    [% Asset.js("js/checkouts.js") | $raw %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt (-10 / +17 lines)
Lines 62-70 Link Here
62
        <th>Expiration date</th>
62
        <th>Expiration date</th>
63
        <th>Waiting date</th>
63
        <th>Waiting date</th>
64
        <th>Cancellation date</th>
64
        <th>Cancellation date</th>
65
        [% IF show_itemtype_column %]
65
        <th>Requested item type</th>
66
          <th>Requested item type</th>
67
        [% END %]
68
        <th>Status</th>
66
        <th>Status</th>
69
        </tr>
67
        </tr>
70
      </thead>
68
      </thead>
Lines 85-91 Link Here
85
          <td data-order="[% hold.cancellationdate | html %]">
83
          <td data-order="[% hold.cancellationdate | html %]">
86
                [% hold.cancellationdate | $KohaDates %]
84
                [% hold.cancellationdate | $KohaDates %]
87
          </td>
85
          </td>
88
          [% IF show_itemtype_column %]
89
            <td>
86
            <td>
90
              [% IF hold.itemtype %]
87
              [% IF hold.itemtype %]
91
                  [% ItemTypes.GetDescription( hold.itemtype ) | html %]
88
                  [% ItemTypes.GetDescription( hold.itemtype ) | html %]
Lines 93-99 Link Here
93
                  <span>Any item type</span>
90
                  <span>Any item type</span>
94
              [% END %]
91
              [% END %]
95
            </td>
92
            </td>
96
          [% END %]
97
          <td>
93
          <td>
98
          [% IF hold.found == 'F' %]
94
          [% IF hold.found == 'F' %]
99
              Fulfilled
95
              Fulfilled
Lines 136-147 Link Here
136
    [% INCLUDE 'str/members-menu.inc' %]
132
    [% INCLUDE 'str/members-menu.inc' %]
137
    [% Asset.js("js/members-menu.js") | $raw %]
133
    [% Asset.js("js/members-menu.js") | $raw %]
138
    <script>
134
    <script>
135
        var ReserveExpiration = [% ( Koha.Preference('ReserveExpiration') ) ? 1 : 0 | html %];
136
        var show_itemtype_column = [% ( show_itemtype_column ) ? 1 : 0 | html %];
137
        var columns_settings = [% TablesSettings.GetColumns('members', 'holdshistory', 'holdshistory-table', 'json') %];
139
        $(document).ready(function() {
138
        $(document).ready(function() {
140
            var columns_settings = [% TablesSettings.GetColumns('members', 'holdshistory', 'holdshistory-table', 'json') %];
139
            columns_settings.forEach(function(thisCol) {
141
            [% UNLESS show_itemtype_column %]
140
                if( show_itemtype_column == 0 && thisCol.columnname == "itemtype" ){
142
              //Remove item type column settings
141
                    thisCol.cannot_be_modified = 1;
143
              columns_settings = columns_settings.filter(function(c){return c['columnname'] != 'itemtype';});
142
                    thisCol.cannot_be_toggled = 1;
144
            [% END %]
143
                    thisCol.is_hidden = 1;
144
                }
145
                if( ReserveExpiration == 0 && thisCol.columnname == "expirationdate" ){
146
                    thisCol.cannot_be_modified = 1;
147
                    thisCol.cannot_be_toggled = 1;
148
                    thisCol.is_hidden = 1;
149
                }
150
            });
151
145
            var table = KohaTable("table_holdshistory", {
152
            var table = KohaTable("table_holdshistory", {
146
                "sPaginationType": "full",
153
                "sPaginationType": "full",
147
                "aaSorting": [[4, 'desc']]
154
                "aaSorting": [[4, 'desc']]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt (-2 / +6 lines)
Lines 115-121 Link Here
115
                    <th>Title</th>
115
                    <th>Title</th>
116
                    <th>Author</th>
116
                    <th>Author</th>
117
                    <th>Placed on</th>
117
                    <th>Placed on</th>
118
                    <th>Expires on</th>
118
                    [% IF Koha.Preference('ReserveExpiration') %]
119
                        <th>Expires on</th>
120
                    [% END %]
119
                    <th>Pick up location</th>
121
                    <th>Pick up location</th>
120
                </tr>
122
                </tr>
121
            </thead>
123
            </thead>
Lines 125-131 Link Here
125
                        <td>[% reserve.title | html %]</td>
127
                        <td>[% reserve.title | html %]</td>
126
                        <td>[% reserve.author | html %]</td>
128
                        <td>[% reserve.author | html %]</td>
127
                        <td>[% reserve.reservedate | $KohaDates %]</td>
129
                        <td>[% reserve.reservedate | $KohaDates %]</td>
128
                        <td>[% reserve.expirationdate | $KohaDates %]</td>
130
                        [% IF Koha.Preference('ReserveExpiration') %]
131
                            <td>[% reserve.expirationdate | $KohaDates %]</td>
132
                        [% END %]
129
                        <td>[% reserve.waiting_at | html %]</td>
133
                        <td>[% reserve.waiting_at | html %]</td>
130
                    </tr>
134
                    </tr>
131
                [% END %]
135
                [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (+1 lines)
Lines 882-887 Link Here
882
            relatives_borrowernumbers.push("[% b | html %]");
882
            relatives_borrowernumbers.push("[% b | html %]");
883
        [% END %]
883
        [% END %]
884
        var SuspendHoldsIntranet = [% ( Koha.Preference('SuspendHoldsIntranet') ) ? 1 : 0 | html %];
884
        var SuspendHoldsIntranet = [% ( Koha.Preference('SuspendHoldsIntranet') ) ? 1 : 0 | html %];
885
        var ReserveExpiration = [% ( Koha.Preference('ReserveExpiration') ) ? 1 : 0 | html %];
885
    </script>
886
    </script>
886
    [% Asset.js("js/pages/circulation.js") | $raw %]
887
    [% Asset.js("js/pages/circulation.js") | $raw %]
887
    [% Asset.js("js/checkouts.js") | $raw %]
888
    [% Asset.js("js/checkouts.js") | $raw %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/holds.js (-1 / +4 lines)
Lines 194-200 $(document).ready(function() { Link Here
194
                            else { return oObj.branchcode.escapeHtml() || ""; }
194
                            else { return oObj.branchcode.escapeHtml() || ""; }
195
                        }
195
                        }
196
                    },
196
                    },
197
                    { "data": { _: "expirationdate_formatted", "sort": "expirationdate" } },
197
                    {
198
                        "visible": ReserveExpiration,
199
                        "data": { _: "expirationdate_formatted", "sort": "expirationdate" }
200
                    },
198
                    {
201
                    {
199
                        "mDataProp": function( oObj ) {
202
                        "mDataProp": function( oObj ) {
200
                            if ( oObj.priority && parseInt( oObj.priority ) && parseInt( oObj.priority ) > 0 ) {
203
                            if ( oObj.priority && parseInt( oObj.priority ) && parseInt( oObj.priority ) > 0 ) {
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc (-14 / +18 lines)
Lines 16-22 Link Here
16
                    [% ELSE %]
16
                    [% ELSE %]
17
                        <th class="psort">Placed on</th>
17
                        <th class="psort">Placed on</th>
18
                    [% END %]
18
                    [% END %]
19
                    <th>Expires on</th>
19
                    [% IF Koha.Preference('ReserveExpiration') %]
20
                        <th>Expires on</th>
21
                    [% END %]
20
                    [% UNLESS( singleBranchMode) %]
22
                    [% UNLESS( singleBranchMode) %]
21
                        <th>Pick up location</th>
23
                        <th>Pick up location</th>
22
                    [% END %]
24
                    [% END %]
Lines 67-86 Link Here
67
                                [% HOLD.reservedate | $KohaDates %]
69
                                [% HOLD.reservedate | $KohaDates %]
68
                            </span>
70
                            </span>
69
                        </td>
71
                        </td>
70
                        [% IF ! HOLD.found %]
72
                        [% IF Koha.Preference('ReserveExpiration') %]
71
                            <td class="expirationdate" data-order="[% HOLD.expirationdate | html %]">
73
                            [% IF ! HOLD.found %]
72
                                [% IF ( HOLD.expirationdate ) %]
74
                                <td class="expirationdate" data-order="[% HOLD.expirationdate | html %]">
73
                                    <span class="tdlabel">Expiration:</span>
75
                                    [% IF ( HOLD.expirationdate ) %]
74
                                    [% HOLD.expirationdate | $KohaDates %]
76
                                        <span class="tdlabel">Expiration:</span>
75
                                [% ELSE %]
77
                                        [% HOLD.expirationdate | $KohaDates %]
76
                                    <span class="tdlabel">Expiration:</span>
78
                                    [% ELSE %]
77
                                    Never expires
79
                                        <span class="tdlabel">Expiration:</span>
78
                                [% END %]
80
                                        Never expires
79
                        [% ELSE %]
81
                                    [% END %]
80
                            <td class="expirationdate" data-order="0000-00-00">
82
                            [% ELSE %]
81
                                -
83
                                <td class="expirationdate" data-order="0000-00-00">
84
                                    -
85
                            [% END %]
86
                            </td>
82
                        [% END %]
87
                        [% END %]
83
                        </td>
84
                        [% UNLESS( singleBranchMode) %]
88
                        [% UNLESS( singleBranchMode) %]
85
                            <td class="branch">
89
                            <td class="branch">
86
                                <span class="tdlabel">Pick up location:</span>
90
                                <span class="tdlabel">Pick up location:</span>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-holdshistory.tt (-7 / +10 lines)
Lines 106-112 Link Here
106
                                        <th>Barcode</th>
106
                                        <th>Barcode</th>
107
                                        <th>Library</th>
107
                                        <th>Library</th>
108
                                        <th>Hold date</th>
108
                                        <th>Hold date</th>
109
                                        <th>Expiration date</th>
109
                                        [% IF Koha.Preference('ReserveExpiration') %]
110
                                            <th>Expiration date</th>
111
                                        [% END %]
110
                                        <th>Waiting date</th>
112
                                        <th>Waiting date</th>
111
                                        <th>Cancellation date</th>
113
                                        <th>Cancellation date</th>
112
                                        [% IF show_itemtype_column %]
114
                                        [% IF show_itemtype_column %]
Lines 123-133 Link Here
123
                                        <td>[% hold.item.barcode | html %]</td>
125
                                        <td>[% hold.item.barcode | html %]</td>
124
                                        <td>[% Branches.GetName( hold.branchcode ) | html %]</td>
126
                                        <td>[% Branches.GetName( hold.branchcode ) | html %]</td>
125
                                        <td data-order="[% hold.reservedate | html %]">[% hold.reservedate | $KohaDates %]</td>
127
                                        <td data-order="[% hold.reservedate | html %]">[% hold.reservedate | $KohaDates %]</td>
126
                                        <td data-order="[% hold.expirationdate | html %]">
128
                                        [% IF Koha.Preference('ReserveExpiration') %]
127
                                            [% IF hold.expirationdate %]
129
                                            <td data-order="[% hold.expirationdate | html %]">
128
                                                [% hold.expirationdate | $KohaDates %]
130
                                                [% IF hold.expirationdate %]
129
                                            [% END %]
131
                                                    [% hold.expirationdate | $KohaDates %]
130
                                        </td>
132
                                                [% END %]
133
                                            </td>
134
                                        [% END %]
131
                                        <td data-order="[% hold.waitingdate | html %]">
135
                                        <td data-order="[% hold.waitingdate | html %]">
132
                                            [% IF hold.waitingdate %]
136
                                            [% IF hold.waitingdate %]
133
                                                [% hold.waitingdate | $KohaDates %]
137
                                                [% hold.waitingdate | $KohaDates %]
134
- 

Return to bug 24194