From e3fff5174b8279612ca909dfb487e18af21c5734 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 28 Oct 2022 17:24:08 +0000 Subject: [PATCH] Bug 32038: Sidebar and footer style improvements on suggestions page This patch makes some changes to the suggestions template in order to make the sidebar filter form and bulk action table footer forms more usable and readable. Some global changes to
style are made. To test, apply the patch and rebuild the staff interface CSS. - Go to Suggestions. - Confirm that the sidebar contains two sections: Organize by and Filter by. - Test that the links under "Filter by" work to expand and collapse the different sections (bibliographic, suggestion, and acquisition). - Below the table of existing suggestions you should see the section "Change selected suggestions." - Each form should look good, with labels in bold above each form field, with "primary" style submit buttons. - Because some global styles have been modified, check that fieldsets with the class "brief" are still displayed correctly in other areas: - In sidebar forms: Patrons, Acquisitions order and invoice searches, overdues and holds to pull in Circulation. - In other areas: The Quick spine label creator; the upload plugin form; the calendar's add holiday form. Signed-off-by: David Nind --- .../prog/css/src/staff-global.scss | 23 +- .../prog/en/modules/suggestion/suggestion.tt | 390 +++++++++--------- 2 files changed, 211 insertions(+), 202 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss index a6d30023b6..3dce585a56 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -814,7 +814,6 @@ fieldset { width: auto; } - &.brief { div { &.hint { @@ -822,8 +821,12 @@ fieldset { } } - label { + label, + span.label { + display: block; + font-weight: bold; padding: .3em 0; + text-align: left; &.inline { display: inline; @@ -834,7 +837,7 @@ fieldset { } li { - margin-top: 1em; + margin-top: .5em; &:first-child { margin-top: 0; @@ -862,24 +865,16 @@ fieldset { ol, li { list-style-type: none; - } - - span { - .label { - display: block; - font-weight: bold; - padding: .3em 0; - text-align: left; - white-space: normal; - } + padding-left: 0; } .action { margin: 0; - padding: .4em 0; + padding: 1em 0 0 0; } } + ol { li { list-style-type: none; 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 13e7a92f3b..5765356efc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt @@ -31,7 +31,7 @@ font-size: 80%; text-decoration: none; } - fieldset.brief ol { + #limits fieldset.brief { display: none; } .overlay { @@ -880,9 +880,13 @@
-

Change selected suggestions

+
+

Change selected suggestions

+
+
+
-
+
- +
-
-
-
- Update manager
+
+ Update manager Select manager
- +
-
+
Delete selected
- +
@@ -1007,10 +1011,11 @@
-
    +

    Organize by:

    +
    1. - - [% IF ( displayby == "STATUS" ) %] [% ELSE %] @@ -1037,197 +1042,204 @@ [% END %] -
    +
    + +
-

Filter by: [clear]

- -
-
-

Bibliographic information

-
    -
  1. - - -
  2. -
  3. - - -
  4. -
  5. - - -
  6. -
  7. - - -
  8. -
  9. - - -
  10. -
  11. - -
  12. -
  13. -
-
- -
-

Suggestion information

-
    -
  1. - - [% IF filter_archived %] - - [% ELSE %] - - [% END %] -
  2. -
  3. - - +
  4. +
  5. + + +
  6. +
  7. + + +
  8. +
  9. + + +
  10. +
  11. + + +
  12. +
  13. + + +
  14. +
+
+ +
+
+ +

Suggestion information

+
+
    +
  1. + + [% IF filter_archived %] + [% ELSE %] - + [% END %] +
  2. +
  3. + + -
  4. - -
  5. - - -
  6. -
  7. - - -
  8. -
  9. - - -
  10. -
  11. - - -
  12. -
  13. - - -
  14. -
  15. - - -
  16. -
  17. - - -
  18. -
  19. - - -
  20. -
  21. - - -
  22. -
  23. + + [% FOREACH s IN SuggestionStatuses %] + [% IF s.authorised_value == selected_status %] + + [% ELSE %] + + [% END %] + [% END %] + +
  24. + +
  25. + + +
  26. +
  27. + + +
  28. +
  29. + + +
  30. +
  31. + + +
  32. +
  33. + + +
  34. +
  35. + + +
  36. +
  37. + + +
  38. +
  39. + + +
  40. +
  41. + + +
  42. +
+
- - -
+
+
-

- Acquisition information + Acquisition information

-
    -
  1. - - + + [% IF budgetid == '__NONE__' %] + [% ELSE %] - + [% END %] - [% END %] - -
  2. -
  3. + [% FOREACH budgetsloo IN budgetsloop %] + [% IF ( budgetsloo.selected ) %] + + [% ELSE %] + + [% END %] + [% END %] + +
  4. +
+
- - -
- +
+ + + [% INCLUDE 'acquisitions-menu.inc' %] @@ -1379,9 +1391,11 @@ $(this).siblings("input[name='other_reason']").hide(); e.preventDefault(); }); - $("h4.local_collapse a").click(function(){ - $(this).parent().parent().find("ol").toggle(); - return false; + + $("h4.local_collapse a").on("click", function(e){ + e.preventDefault(); + const target = $(this).data("target"); + $("#" + target).toggle(); }); $("button[type='submit']").on("click", function(e) { -- 2.30.2