From 939e1e9c9ed378e9ff5b0bf211f0e6c194b09edc Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 6 Apr 2022 15:35:47 +0000 Subject: [PATCH] Bug 30473: Convert suggestions page tabs to Bootstrap This patch updates the suggestions page to use Bootstrap tabs instead of jQueryUI. To test you should have multiple suggestions from different libraries, different item types, and different statuses. Apply the patch and go to Suggestions. - Suggestions should initially be displayed in tabs by status. - Confirm that the tabs look correct and work correctly. - Test that tabs work correctly for each option in the "Organize by" dropdown in the left-hand sidebar. Signed-off-by: Lucas Gass Signed-off-by: Martin Renvoize Signed-off-by: Fridolin Somers --- .../prog/en/modules/suggestion/suggestion.tt | 506 +++++++++--------- 1 file changed, 255 insertions(+), 251 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt index 584764bd5f..78da04cc78 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt @@ -686,10 +686,10 @@ [% UNLESS ( notabs ) %]
-
    + +
    [% END # /UNLESS notabs %] - [% FOREACH suggestion IN suggestions %] -
    -
    + [% FOREACH suggestion IN suggestions %] +
    + - [% IF ( suggestion.suggestions_loop ) %] -

    - Check all | Uncheck all -

    + [% IF ( suggestion.suggestions_loop ) %] +

    + Check all | Uncheck all +

    - - - - - - - - - - - - - - - - - - - - [% FOREACH suggestions_loo IN suggestion.suggestions_loop %] +
     SuggestionSuggested bySuggested onManaged byManaged onLast modification byLast modification onLast updatedLibraryFundStatus 
    + - - - - - - - - - - - - - + + + + + + + + + + + + + - [% END # /FOREACH suggestions_loo %] - -
    - - - - [% suggestions_loo.title | html %][% IF ( suggestions_loo.author ) %], by [% suggestions_loo.author | html %][% END %] - -
    - [% IF ( suggestions_loo.copyrightdate ) %] - © [% suggestions_loo.copyrightdate | html %] - [% END %] - [% IF ( suggestions_loo.volumedesc ) %] - ; Volume:[% suggestions_loo.volumedesc | html %] - [% END %] - [% IF ( suggestions_loo.isbn ) %] - ; ISBN: [% suggestions_loo.isbn | html %] - [% END %] - [% IF ( suggestions_loo.publishercode ) %] - ; Published by [% suggestions_loo.publishercode | html %] - [% END %] - [% IF ( suggestions_loo.publicationyear ) %] - in [% suggestions_loo.publicationyear | html %] - [% END %] - [% IF ( suggestions_loo.place ) %] - in [% suggestions_loo.place | html %] - [% END %] - [% IF ( suggestions_loo.collectiontitle ) %] - ; [% suggestions_loo.collectiontitle | html %] - [% END %] - [% IF ( suggestions_loo.itemtype ) %] - ; [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', suggestions_loo.itemtype, 0 ) | html %] - [% END %] -
    - [% IF ( suggestions_loo.note ) %] -
    [% suggestions_loo.note | html %]
    - [% END %] - [% IF suggestions_loo.archived %] -
    Archived - [% END %] -
    - [% suggestions_loo.surnamesuggestedby | html %][% IF ( suggestions_loo.firstnamesuggestedby ) %], [% suggestions_loo.firstnamesuggestedby | html %][% END %] [% IF (suggestions_loo.cardnumbersuggestedby ) %]([% suggestions_loo.cardnumbersuggestedby | html %])[% END %] - - [% IF ( suggestions_loo.suggesteddate ) %][% suggestions_loo.suggesteddate | $KohaDates %][% END %] - - [% suggestions_loo.surnamemanagedby | html %][% IF ( suggestions_loo.firstnamemanagedby ) %], [% suggestions_loo.firstnamemanagedby | html %][% END %] - - [% IF ( suggestions_loo.manageddate ) %][% suggestions_loo.manageddate | $KohaDates %][% END %] - - [% suggestions_loo.surnamelastmodificationby | html %][% IF ( suggestions_loo.firstnamelastmodificationby ) %], [% suggestions_loo.firstnamelastmodificationby | html %][% END %] - - [% IF ( suggestions_loo.lastmodificationdate ) %][% suggestions_loo.lastmodificationdate | $KohaDates %][% END %] - - [% suggestions_loo.date | $KohaDates %] - - [% Branches.GetName( suggestions_loo.branchcode ) | html %] - - [% suggestions_loo.budget_name | html %] - - [% IF ( suggestions_loo.ASKED ) %] - Pending - [% ELSIF ( suggestions_loo.ACCEPTED ) %] - Accepted - [% ELSIF ( suggestions_loo.ORDERED ) %] - Ordered - [% ELSIF ( suggestions_loo.REJECTED ) %] - Rejected - [% ELSIF ( suggestions_loo.CHECKED ) %] - Checked - [% ELSIF ( suggestions_loo.AVAILABLE ) %] - Available - [% ELSIF AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) %] - [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) | html %] - [% ELSE %] - Status unknown - [% END %] - - [% IF ( suggestions_loo.reason ) %] -
    ([% suggestions_loo.reason | html %]) - [% END %] -
    -
    - Edit - -
    -
     SuggestionSuggested bySuggested onManaged byManaged onLast modification byLast modification onLast updatedLibraryFundStatus 
    - -
    -

    Change selected suggestions

    -
    -
    -
    - - + + + + [% suggestions_loo.title | html %][% IF ( suggestions_loo.author ) %], by [% suggestions_loo.author | html %][% END %] + +
    + [% IF ( suggestions_loo.copyrightdate ) %] + © [% suggestions_loo.copyrightdate | html %] + [% END %] + [% IF ( suggestions_loo.volumedesc ) %] + ; Volume:[% suggestions_loo.volumedesc | html %] + [% END %] + [% IF ( suggestions_loo.isbn ) %] + ; ISBN: [% suggestions_loo.isbn | html %] + [% END %] + [% IF ( suggestions_loo.publishercode ) %] + ; Published by [% suggestions_loo.publishercode | html %] + [% END %] + [% IF ( suggestions_loo.publicationyear ) %] + in [% suggestions_loo.publicationyear | html %] + [% END %] + [% IF ( suggestions_loo.place ) %] + in [% suggestions_loo.place | html %] + [% END %] + [% IF ( suggestions_loo.collectiontitle ) %] + ; [% suggestions_loo.collectiontitle | html %] + [% END %] + [% IF ( suggestions_loo.itemtype ) %] + ; [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', suggestions_loo.itemtype, 0 ) | html %] + [% END %] +
    + [% IF ( suggestions_loo.note ) %] +
    [% suggestions_loo.note | html %]
    + [% END %] + [% IF suggestions_loo.archived %] +
    Archived + [% END %] + + + [% suggestions_loo.surnamesuggestedby | html %][% IF ( suggestions_loo.firstnamesuggestedby ) %], [% suggestions_loo.firstnamesuggestedby | html %][% END %] [% IF (suggestions_loo.cardnumbersuggestedby ) %]([% suggestions_loo.cardnumbersuggestedby | html %])[% END %] + + + [% IF ( suggestions_loo.suggesteddate ) %][% suggestions_loo.suggesteddate | $KohaDates %][% END %] + + + [% suggestions_loo.surnamemanagedby | html %][% IF ( suggestions_loo.firstnamemanagedby ) %], [% suggestions_loo.firstnamemanagedby | html %][% END %] + + + [% IF ( suggestions_loo.manageddate ) %][% suggestions_loo.manageddate | $KohaDates %][% END %] + + + [% suggestions_loo.surnamelastmodificationby | html %][% IF ( suggestions_loo.firstnamelastmodificationby ) %], [% suggestions_loo.firstnamelastmodificationby | html %][% END %] + + + [% IF ( suggestions_loo.lastmodificationdate ) %][% suggestions_loo.lastmodificationdate | $KohaDates %][% END %] + + + [% suggestions_loo.date | $KohaDates %] + + + [% Branches.GetName( suggestions_loo.branchcode ) | html %] + + + [% suggestions_loo.budget_name | html %] + + + [% IF ( suggestions_loo.ASKED ) %] + Pending + [% ELSIF ( suggestions_loo.ACCEPTED ) %] + Accepted + [% ELSIF ( suggestions_loo.ORDERED ) %] + Ordered + [% ELSIF ( suggestions_loo.REJECTED ) %] + Rejected + [% ELSIF ( suggestions_loo.CHECKED ) %] + Checked + [% ELSIF ( suggestions_loo.AVAILABLE ) %] + Available + [% ELSIF AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) %] + [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) | html %] + [% ELSE %] + Status unknown + [% END %] - [% IF (statusselected_CHECKED ) %] - - [% ELSE %] - - [% END %] + [% IF ( suggestions_loo.reason ) %] +
    ([% suggestions_loo.reason | html %]) + [% END %] + + +
    + Edit + +
    + + + [% END # /FOREACH suggestions_loo %] + + + +
    +

    Change selected suggestions

    +
    +
    +
    + + + [% IF ( statusselected_REJECTED ) %] + + [% ELSE %] + + [% END %] - - + [% IF ( statusselected_ORDERED ) %] + + [% ELSE %] + + [% END %] - - - Cancel - -
    + [% FOREACH s IN SuggestionStatuses %] + + [% END %] + - - -
    - + + + + + + Cancel + +
    + + + +
    + +
    - -
    - -
    -
    - - - -
    - +
    + +
    +
    + + + +
    + +
    - -
    - -
    -
    - Update manager
    - Select manager - - - - -
    - +
    + +
    +
    + Update manager
    + Select manager + + + + +
    + +
    - -
    - -
    -
    - Delete selected - - -
    - +
    + +
    +
    + Delete selected + + +
    + +
    - -
    -
    -
    - Archive selected - - -
    - +
    +
    +
    + Archive selected + + +
    + +
    - -
    -
    +
    +
    - [% ELSE %] - No results. - [% END # /IF ( suggestion.suggestions_loop ) %] - -
    - [% END # /FOREACH suggestion %] + [% ELSE %] + No results. + [% END # /IF ( suggestion.suggestions_loop ) %] + +
+ [% END # /FOREACH suggestion %] [% UNLESS ( notabs ) %] + [% END # /UNLESS notabs %] [% END # /IF op == 'else' %] @@ -1313,8 +1316,9 @@ [% INCLUDE 'columns_settings.inc' %]