Bug 37848

Summary: "Run with template" options need formatting
Product: Koha Reporter: Caroline Cyr La Rose <caroline.cyr-la-rose>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: Pushed to oldoldstable --- QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: fridolin.somers, lucas
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00,24.05.06,23.11.11
Circulation function:
Bug Depends on: 34136    
Bug Blocks:    
Attachments: Screenshot of the Run with template drop-down
Bug 37848: Fix "Run with template" dropdown menu style
Bug 37848: Fix "Run with template" dropdown menu style
Bug 37848: Fix "Run with template" dropdown menu style

Description Caroline Cyr La Rose 2024-09-05 16:39:05 UTC
Created attachment 171097 [details]
Screenshot of the Run with template drop-down

This seems to be the same problem as Bug 36157, but maybe related to the bootstrap upgrade?

To replicate (copied from bug 36157):

1. Create a notice with the module of "Reports" -- add something to the "Print" section. Example from the other bug:

[% FOREACH b IN data %]
<div class="panel panel-default">
  <div class="panel-heading">[% b.surname %], [% b.firstname %]</div>
  <div class="panel-body">Expiration: [% b.dateexpiry %]</div>
  <div class="panel-footer">ID: [% b.borrowernumber %]</div>
</div>
[% END %]

2. Create and run a saved report. Example from the other bug:

SELECT * FROM borrowers

3. Click on the "Run with template" dropdown and hover the template title.

I attached a screenshot of what it looks like in my ktd (Chrome on Ubuntu 22.04).
Comment 1 Owen Leonard 2024-09-06 11:49:53 UTC
Created attachment 171132 [details] [review]
Bug 37848: Fix "Run with template" dropdown menu style

This patch adds the missing "dropdown-item" class to the "Run with
template" dropdown menu markup in order to correct the menu's style.

The patch also adds a template ID to the menu items' id attributes so
that we don't have duplicate IDs.

To test, apply the patch and go to Tools -> Notices.

(testing steps copied from Bug 36157)

1. Create a notice with the module of "Reports" -- add something to the
   "Print" section. Example from the other bug:

    [% FOREACH b IN data %]
      <div class="panel panel-default">
         <div class="panel-heading">[% b.surname %], [% b.firstname %]</div>
         <div class="panel-body">Expiration: [% b.dateexpiry %]</div>
         <div class="panel-footer">ID: [% b.borrowernumber %]</div>
      </div>
    [% END %]

2. Create and run a saved report. Example from bug 36157:

    SELECT * FROM borrowers

3. Click on the "Run with template" dropdown and confirm that it is
   styled correctly.
4. Click to run the report with the template and confirm that it works
   correctly.

Sponsored-by: Athens County Public Libraries
Comment 2 Caroline Cyr La Rose 2024-09-06 13:03:56 UTC
Created attachment 171135 [details] [review]
Bug 37848: Fix "Run with template" dropdown menu style

This patch adds the missing "dropdown-item" class to the "Run with
template" dropdown menu markup in order to correct the menu's style.

The patch also adds a template ID to the menu items' id attributes so
that we don't have duplicate IDs.

To test, apply the patch and go to Tools -> Notices.

(testing steps copied from Bug 36157)

1. Create a notice with the module of "Reports" -- add something to the
   "Print" section. Example from the other bug:

    [% FOREACH b IN data %]
      <div class="panel panel-default">
         <div class="panel-heading">[% b.surname %], [% b.firstname %]</div>
         <div class="panel-body">Expiration: [% b.dateexpiry %]</div>
         <div class="panel-footer">ID: [% b.borrowernumber %]</div>
      </div>
    [% END %]

2. Create and run a saved report. Example from bug 36157:

    SELECT * FROM borrowers

3. Click on the "Run with template" dropdown and confirm that it is
   styled correctly.
4. Click to run the report with the template and confirm that it works
   correctly.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Comment 3 Jonathan Druart 2024-10-01 13:37:39 UTC
Created attachment 172268 [details] [review]
Bug 37848: Fix "Run with template" dropdown menu style

This patch adds the missing "dropdown-item" class to the "Run with
template" dropdown menu markup in order to correct the menu's style.

The patch also adds a template ID to the menu items' id attributes so
that we don't have duplicate IDs.

To test, apply the patch and go to Tools -> Notices.

(testing steps copied from Bug 36157)

1. Create a notice with the module of "Reports" -- add something to the
   "Print" section. Example from the other bug:

    [% FOREACH b IN data %]
      <div class="panel panel-default">
         <div class="panel-heading">[% b.surname %], [% b.firstname %]</div>
         <div class="panel-body">Expiration: [% b.dateexpiry %]</div>
         <div class="panel-footer">ID: [% b.borrowernumber %]</div>
      </div>
    [% END %]

2. Create and run a saved report. Example from bug 36157:

    SELECT * FROM borrowers

3. Click on the "Run with template" dropdown and confirm that it is
   styled correctly.
4. Click to run the report with the template and confirm that it works
   correctly.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Martin Renvoize (ashimema) 2024-10-02 09:56:29 UTC
Thanks for all the hard work!

Pushed to main for the next 24.11.00 release as RM Assistant
Comment 5 Lucas Gass (lukeg) 2024-11-18 22:46:06 UTC
Backported to 24.05.x for upcoming 24.05.06
Comment 6 Fridolin Somers 2024-12-11 14:19:52 UTC
Pushed to 23.11.x for 23.11.11