From 1486c2a5b4cb2481a321a69b9101d968ac49287d Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 21 Oct 2021 11:51:47 +0000 Subject: [PATCH] Bug 29299: Reindent serials search template This patch updates the serials search template to give it consistent indentation. The patch also moves one section of markup: The section is moved to after in order to conform to current standards. To test, apply the patch and go to Serials -> Search subscriptions (in the header). - Serials search should work correctly and the page should look correct. - With Mana enabled, click on the "Search on Mana" link in the sidebar. - Searches of Mana should work correctly too. - If you view the diff while ignoring whitespace the only changes should be the move of and places where line breaks were introduced. Signed-off-by: David Nind Signed-off-by: Katrin Fischer --- .../prog/en/modules/serials/serials-search.tt | 783 +++++++++++---------- 1 file changed, 395 insertions(+), 388 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt index cfb3886fdd..e1ba05436f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt @@ -13,415 +13,422 @@ -[% INCLUDE 'header.inc' %] -[% INCLUDE 'serials-search.inc' %] - - - [% IF closed %] - [% SET tab = 'closed' %] - [% ELSE %] - [% SET tab = 'opened' %] + [% url_params = [] %] + [% FOREACH param IN CGI.params.pairs %] + [% escaped_value = BLOCK %][% param.value | uri %][% END %] + [% url_params.push(param.key _ '=' _ escaped_value) %] [% END %] - [% IF CAN_user_serials_edit_subscription %] -
- Select all - | - Clear all - - | Actions: - Edit selected serials - -
- [% END %] - - - - - - - - - - - [% UNLESS closed %] - - [% END %] - [% FOR field IN additional_fields_for_subscription %] - - [% END %] - - - - - - - - - - - - - [% SET column_num = 6 %] - [% UNLESS closed %] - - [% SET column_num = column_num + 1 %] - [% END %] - [% FOR field IN additional_fields_for_subscription %] - - [% END %] - - - - - [% FOREACH subscription IN subscriptions %] - [% UNLESS subscription.cannotdisplay %] - - - - - - - - - [% UNLESS closed %] - - [% END %] - [% FOR field IN additional_fields_for_subscription %] - [% IF field.authorised_value_category %] - - [% ELSE %] - - [% END %] + [% SET referrer = '/cgi-bin/koha/serials/serials-search.pl?' %] + [% referrer = BLOCK %][% referrer | url %][% url_params.join("&") |uri %][% END %] + [% SET edit_action_link = '/cgi-bin/koha/serials/subscription-batchedit.pl?referrer=' _ referrer %] + + [% BLOCK subscriptions_table %] + + [% IF closed %] + [% SET tab = 'closed' %] + [% ELSE %] + [% SET tab = 'opened' %] [% END %] + [% IF CAN_user_serials_edit_subscription %] +
+ Select all + | + Clear all + + | Actions: + Edit selected serials + +
+ [% END %] +
ISSNTitleNotesLibraryLocationCall numberExpiration date[% field.name | html %]Actions
- [% UNLESS subscription.cannotedit %] - - [% ELSE %] - - [% END %] - - [% IF ( subscription.issn ) %][% subscription.issn | html %] - [% END %] - [% subscription.title | html %] - [% IF ( subscription.publicnotes ) %][% subscription.publicnotes | html %][% END %] - [% IF ( subscription.internalnotes ) %]([% subscription.internalnotes | html %])[% END %] - - [% IF ( subscription.branchcode ) %][% Branches.GetName( subscription.branchcode ) | html %][% END %] - - [% IF ( subscription.location ) %][% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => subscription.location ) | html %][% END %] - - [% IF ( subscription.callnumber ) %][% subscription.callnumber | html %][% END %] - - [% subscription.enddate | $KohaDates %] - [% AuthorisedValues.GetByCode( field.authorised_value_category, subscription.additional_fields.${field.name} ) | html %][% subscription.additional_fields.${field.name} | html %]
+ + + + + + + + + + [% UNLESS closed %] + + [% END %] + [% FOR field IN additional_fields_for_subscription %] + + [% END %] + + + + + [% FOREACH subscription IN subscriptions %] + [% UNLESS subscription.cannotdisplay %] + + + + + + + + + [% UNLESS closed %] + + [% END %] - + [% ELSE %] + + [% END %] [% END %] - [% END # IF ( routing && CAN_user_serials_routing ) %] -
  • - Issue history -
  • + + + + [% END %] + [% END %] + + + + + + + + + + + [% SET column_num = 6 %] + [% UNLESS closed %] + + [% SET column_num = column_num + 1 %] + [% END %] + [% FOR field IN additional_fields_for_subscription %] + + [% END %] + + + +
    ISSNTitleNotesLibraryLocationCall numberExpiration date[% field.name | html %]Actions
    + [% UNLESS subscription.cannotedit %] + + [% ELSE %] + + [% END %] + + [% IF ( subscription.issn ) %] + [% subscription.issn | html %] + [% END %] + + [% subscription.title | html %] + + [% IF ( subscription.publicnotes ) %][% subscription.publicnotes | html %][% END %] + [% IF ( subscription.internalnotes ) %]([% subscription.internalnotes | html %])[% END %] + + [% IF ( subscription.branchcode ) %][% Branches.GetName( subscription.branchcode ) | html %][% END %] + + [% IF ( subscription.location ) %] + [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => subscription.location ) | html %] + [% END %] + + [% IF ( subscription.callnumber ) %][% subscription.callnumber | html %][% END %] + + [% subscription.enddate | $KohaDates %] + -
    - [% IF closed %] - - Actions - -
    [% AuthorisedValues.GetByCode( field.authorised_value_category, subscription.additional_fields.${field.name} ) | html %][% subscription.additional_fields.${field.name} | html %] +
    + [% IF closed %] + + Actions + + + [% ELSE %] +
    + [% IF ( CAN_user_serials_receive_serials ) %] + [%# There should be no space between these two buttons, it would render badly %] + Serial receive + [% ELSE %] + Actions + [% END %] + +
    + [% END %] +
    +
    + + [% END %] + +
    +
    +
    +
    + + [% INCLUDE 'serials-toolbar.inc' %] - + [% IF ( done_searched ) %] +

    Serials subscriptions ([% total | html %] found)

    [% ELSE %] -
    - [% IF ( CAN_user_serials_receive_serials ) %] - [%# There should be no space between these two buttons, it would render badly %] - Serial receive - [% ELSE %] - Actions - [% END %] - +
    + +
    + +
    [% END %] -
    - - - - [% END %] - [% END %] - - - -[% END %] - -
    -
    -
    -
    - - [% INCLUDE 'serials-toolbar.inc' %] - - [% IF ( done_searched ) %] -

    Serials subscriptions ([% total | html %] found)

    - [% ELSE %] -

    Serials subscriptions search

    - [% END %] - - [% UNLESS ( done_searched ) %] -
    -
    -
    - Search subscriptions -
      -
    1. - - -
    2. -
    3. - - -
    4. - [% IF ( marcflavour == "UNIMARC" ) %] -
    5. - - -
    6. - [% END %] -
    7. - - -
    8. -
    9. - - -
    10. -
    11. - - -
    12. -
    13. - - -
    14. -
    15. - - [% PROCESS 'av-build-dropbox.inc' name="location_filter", category="LOC", default=location_filter, all=1 %] -
    16. -
    17. - - -
    18. - [% INCLUDE 'additional-fields-entry.inc' available=additional_fields_for_subscription values=additional_field_filters wrap_fieldset=0 %] -
    - - [% IF ( mana ) %][% END %] -
    - -
    -
    -
    -
    - [% END %] - [% IF ( done_searched ) %] - [% IF ( total ) %] -
    - - [% IF mana %] -
    - [% INCLUDE 'mana/mana-subscription-search-result.inc' %] -
    - [% ELSE %] -
    - [% IF openedsubscriptions %] - [% INCLUDE subscriptions_table subscriptions = openedsubscriptions %] - [% ELSE %] -
    -

    Your search returned no open subscriptions.

    -
    - [% END %] -
    -
    - [% IF closedsubscriptions %] - [% INCLUDE subscriptions_table subscriptions = closedsubscriptions closed = 1 %] - [% ELSE %] -
    -

    Your search returned no closed subscriptions.

    -
    - [% END %] -
    - [% END %] -
    - [% ELSE %] -
    -

    Your search returned no results.

    -
    - [% END %] - [% END %] - -
    -
    - -
    -
    - - - [% END %] - [% END %] - -
    -
    + +
    +
    [% MACRO jsinclude BLOCK %] [% INCLUDE 'calendar.inc' %] -- 2.11.0