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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-12 / +10 lines)
Lines 267-285 Link Here
267
                    <td class="homebranch">
267
                    <td class="homebranch">
268
                        [% Branches.GetName(item.homebranch) | html %]
268
                        [% Branches.GetName(item.homebranch) | html %]
269
                        <span class="shelvingloc">
269
                        <span class="shelvingloc">
270
                            [%# 1 - If permanent location is defined %]
270
<!--
271
                            [%#   a - display the description if available, display the code if not %]
271
If permanent location is defined, show description or code and display current location in parentheses. If not, display current location.
272
                            [%#   b - display the current location in parens %]
272
Note that permanent location is a code, and location may be an authval.
273
                            [%# 2 - If permanent location is not defined, but location is defined %]
273
-->
274
                            [%#   a - display the current location description if available, display the code if not %]
275
                            [%# 3 - If neither are defined, show nothing %]
276
                            [% IF item.permanent_location %]
274
                            [% IF item.permanent_location %]
277
                                [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.permanent_location ) | html %]
275
                                [% SET permloc_authval = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.permanent_location ) %]
278
                                [% IF item.location AND item.location != item.permanent_location %]
276
                                [% permloc_authval | html %]
279
                                    ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.location ) | html %])
277
                                [% IF item.location AND item.location != permloc_authval AND item.location != item.permanent_location %]
278
                                    ([% item.location | html %])
280
                                [% END %]
279
                                [% END %]
281
                            [% ELSIF item.location %]
280
                            [% ELSE %]
282
                                [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.permanent_location ) | html %]
281
                                [% item.location | html %]
283
                            [% END %]
282
                            [% END %]
284
                        </span>
283
                        </span>
285
                    </td>
284
                    </td>
286
- 

Return to bug 18355