Commit graph

265 commits

Author SHA1 Message Date
Katariina Pohto
e9356afd9f
Bug 36534: Batch operations when using limit in report
When report results number exceeds the result per page limit, batch
operations link reads "Batch operations with (page limit) records" even
if there are more or less shown records (more when using limit in SQL or
less in the last page of result). This patch fixes the link text to
actual shown records.

To test:
1) Create a report of items with a limit of e.g., 26.
2) Run report.
3) See that number of results shown exceeds 20 but the link says "Batch
   operations with 20 visible records".
4) See that the second page shows 6 results but the link is still for 20
   records.
5) Apply patch.
6) Run report again.
7) See that the link texts will show correctly 26 records on the first
   page and 6 records on the second.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-08 18:23:47 +02:00
7577e66268
Bug 35856: (follow-up) Expand display of radio button choices
This patch swaps out the icons with tooltips with visible hints,
expanding the radio button options to hopefully make it more readable.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-29 09:35:33 +02:00
Brendan Lawlor
3433ed94af
Bug 35856: added options to runtime parameter modal
This patch adds radio checkboxes to the reports runtime parameter modal for adding param options :all and :in.

The :in param option functionality depends on https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35746

Test plan:
1. Apply patch
2. Create a report from SQL
3. Click Insert runtime parameter and choose any option other than date, list or text field
4. Note the form now includes a radio checkbox for parameter options
5. Choose 'Include option for all' and click Insert parameter
6. Note the parameter is inserted with :all option like <<label|authval:all>>
7. Choose 'Allow multiple selections' and click Insert parameter
8. Note the parameter is inserted with :in option like <<label|authval:in>>
9. Make sure that parameter options are not included on the form for date, list and text field

Thanks!

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-29 09:35:33 +02:00
Brendan Lawlor
76f2214ff7
Bug 35746: (follow-up) Fix invalid tt in html tag
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-26 18:06:19 +02:00
Brendan Lawlor
521c9294cc
Bug 35746: add multiselect to report dropdowns
Rebased for changes to guided_reports_start.tt

This patch adds the ability to use multi select in report dropdowns.

It uses syntax similar to using a list and when using the :all option
WHERE i.homebranch in <<Select libraries|brnaches:in>>

Test plan:
1. Create an SQL report with with new syntax for multi select
    SELECT
    i.homebranch,
    count(*)
    FROM items i
    WHERE i.homebranch in <<Select libraries|branches:in>>
    GROUP BY i.homebranch
2. Save the report
3. Note that you get the error
    The authorized value category (branches:in) you selected does not exist.
4. Apply the patch and repeat steps 1 and 2
5. Note the report saves successfully
6. Run the report
7. Note the select dropdown is now a multiselect
8. Run the report with multiple selections
10. Click show SQL and note that multi select parameters get inserted into the query like:
     WHERE i.homebranch in ('CPL', 'FFL', 'FPL')
11. Test other types of queries with multiple multi selects and lists etc

Sponsored-by: CLAMS

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-26 18:06:19 +02:00
Emily Lamancusa
66e03ef4e5
Bug 36568: Fix id parameter in template
Fix missed case of changing parameter name from "reports" to "id"

To test:
1. Find or create an SQL report that will return more than 20 rows
2. Run the report
3. Change the "Rows per page" drop-down to a new value
--> An empty page is displayed!
4. Apply patch
5. Repeat steps 2-3
--> The report is displayed with the appropriate number of results

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:25:58 +02:00
203b1b3fc2
Bug 36384: Fix 'Used saved' typo in guided reports
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 11:51:20 +02:00
Julian Maurice
de91b2e5d9
Bug 35943: Fix group/subgroup filtering of saved reports
Use code instead of name for filtering and escape regexp special
characters.

This patch also disables datatables' smart filtering as it is not
recommended to use with regexp filtering

https://datatables.net/reference/api/search()

Test plan:
1. Create a report in a group named "Foo + Bar" and in a subgroup named
   "Baz + Quux"
2. Create other reports in group "Foo + Bar" but in other subgroups, as
   well as in other groups. This is useful to see the effect of
   filtering
3. Go to the saved reports page and verify that navigating between tabs
   have the desired result. Same for the subgroup select

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-22 12:26:45 +01:00
e701926442
Bug 36190: Fix problems found by test
opac-shelves           - forms were stateless - changed to GET
sco-main               - forms stateless - changed to GET
                         ** untested because sco + auth is broken
smart-rules.tt         - JS form template - added placeholder 'cud-' op
ill-requests           - added cud- tp ops
                         ** tested comments, but not checkout, simple changes
boraccount             - removed repeated op - updated script
patroncards/edit-batch - add placeholder 'cud-' op
patroncards/manage     - add placheholder 'cud-' op
elasticsearch/mappings - separate forms - this could use a style follow-up, but makes more sense separate I think
reports/dictionary      - stateless - changed to GET
guided_reports_start    - stateless - changed to GET
suggestion/suggestion   - add placeholder 'cud-' op
inventory               - filed bug 36305, needs more handling

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-15 09:38:54 +01:00
e19c978f02
Bug 36084: svc - mana
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:01:01 +01:00
21fa3f64c3
Bug 34478: Fix link to batch patron mod from reports
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:04 +01:00
f1ecd4eef1
Bug 34478: guided_reports - run is stateless
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:03 +01:00
8a20e0cb6a
Bug 34478: Add 'op' to reports/guided_reports - WIP
Bug 34478: [TO SQUASH] Add 'op' to reports/guided_reports

Found bug 36071 when working on this. This is not a regression from this
patch.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:58:53 +01:00
dd5f3701ce
Bug 34478: op modify=>edit_form, add=>add_form - memberentry.pl
Bug 34478: TO SQUASH op modify=>edit_form, add=>add_form ( pass opadd to template )- memberentry.pl

The template expects opadd when showing the form - along the way it was changed to 'add' and broke new patron
entry

Bug 34478: TO SQUASH op modify=>edit_form, add=>add_form ( pass op to template )- memberentry.pl

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:57:02 +01:00
6870eb5329
Bug 34478: op=modify should be op=add_form - memberentry.pl
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:57:01 +01:00
b85d77284a
Bug 34478: Manual fix - change to post - guided_reports
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:56:45 +01:00
366d8cafcb
Bug 34478: Add method="get" to forms without method
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:56:29 +01:00
69fd7c026d
Bug 34478: op =~ ^cud- everywhere
This is the result of
  perl op_must_start_with_cud.pl

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:56:06 +01:00
c8384299f7
Bug 34478: op-cud - Rename op with op-cud in templates
This is the result of
  perl rename_op_with_op-cud.pl

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:56:03 +01:00
a3c0c92508
Bug 34478: Add missing CSRF token to POST forms
This is the result of
  % perl csrf_add_missing_csrf.pl

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:55:57 +01:00
a19d36cf14
Bug 34862: Include messages.inc
Generated using `perl add_blocking_errors.pl`

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-31 14:44:44 +01:00
b5ccd83c6f
Bug 35936: Fix saving existing report with incorrect AV category
When an existing report is saved and an incorrect AV category is selected,
the UI is asking "do you want to save anyway", but the "Update SQL" button
leads to a blank page and the report is not saved.

On bug 33966 the value is been adjust to 'update_sql' but this incorrect
was left.

To test you need to use the browser inspector to adjust the value of the
selected option.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-30 17:48:42 +01:00
93866a2320
Bug 34913: DataTables upgrade: Update CSS and option names
This patch makes two categories of changes:

1. CSS changes to accommodate changes in DataTables default CSS and
   markup structure. I've tried to make sure all of our Koha-specific
   styles are still applying.

   This change necessitates a rebuild of staff interface CSS.

2. DataTables option names: In this version of DataTables you can't
   override a default which uses CamelCase (e.g. "pagingType") with one
   in "Hungarian" notation, e.g. "sPaginationType." Since we define many
   default options in prog/js/datatables.js in camel case, any template
   which previously used a Hungarian notation option to override the
   default has now been updated to use the CamelCase version.

   See https://datatables.net/upgrade/1.10-convert#Options for a summary
   of the different option name changes.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-26 15:13:40 +01:00
f9b3866ebf
Bug 35498: Allow tab to indent lines and trigger autocomplete
This patch allows the tab key to indent lines as well as trigger autocomplete.

Test plan:
1) Apply patch, navigate to reports and create a new SQL report
2) Click in the text editor and press tab, it should indent and then trigger the autocomplete options
3) Type something to select from the autocomplete box and press tab - it should autocomplete that option
4) Type any word and then press space. Now press tab and it should indent again

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2023-12-12 15:04:53 +01:00
94cee66ec7
Bug 34136: Add ability to render a report using a notice template
Sometimes it is useful to display the results of a report in a non-table format. We should be able to create notice templates to render reports.

Test Plan:
1) Apply this patch
2) Restart all the things!
3) Create a new notice template using the new "Report" option from the
   "New notice" pulldown.
4) In the "Print" area, paste the following template:

[% 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 %]

5) Create a report with the query: SELECT * FROM borrowers
6) Once the report is saved, use the new "Run with template" option to
   select the template you just created.
7) Note that instead of the results being a paged table, you instead
   see the results rendered as cards!

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
2023-10-27 16:46:22 -03:00
c063990a92
Bug 29181: Create patron card creator batch from report result
This patch adds the option of taking the results of a report that
returns borrowernumbers and create a new patron card creator batch with
those results.

The logic of the dropdown menu has been modified in order to ensure that
duplicate patron modification options aren't shown in the menu when a
report return both borrowernumber and cardnumber.

To test, apply the patch and create a new report which will return
patron borrowernumbers, e.g.

SELECT borrowernumber, cardnumber, surname, firstname FROM borrowers
order by RAND() LIMIT 20

- Run your report
- Click the "Batch operations with..." button at the top of the result
  -  Click "Patron card creator"
- A new tab should open with a new patron card creator batch with the
  patrons from your report.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-18 10:26:02 -03:00
cdf2dfeceb
Bug 33923: Improve translation of title tags: Reports
This patch updates reports templates so that title tags can be more
easily translated.

To test, apply the patch and confirm that the following pages have the
correct title tags:

- Reports ->
  - Reports home
    - Statistics wizards ->
      - Acquisitions
      - Patrons
      - Catalog
      - Circulation
      - Serials
      - Cash register
      - Holds
    - Top lists ->
      - Patrons with the most checkouts
      - Most-circulated items
    - Inactive
      - Patrons who haven't checked out
      - Items with no checkouts
    - Other
      - Items lost
      - Orders by fund
      - Catalog by item type
      - Average loan time
    - Create guided report
    - Create from SQL
    - Use saved report
    - View dictionary

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-09-01 11:23:19 -03:00
e26d7c783e
Bug 34066: Datatable options don't fully translate on list of saved reports
This patch corrects the DataTable option for defining an alternate
language string when no records are returned by a table filter. An
obsolete version of the option name was breaking the existing custom
option supplied by our datatables.js

To test, apply the patch and go to Reports -> Use saved..

 - In the DataTable of existing reports, all the DataTable controls
   should look correct.
 - In the filter field at the top of the table, enter a string which
   will not be found. You should see a message, "No matching reports
   found."
 - Install another language if necessary, and switch to that language.
 - The labels on all the DataTable controls should show the terms which
   have been translated for that language.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-08-30 10:07:11 -03:00
f2be2cedc5
Bug 34533: jsdiff library missing from guided reports page
This patch restores the inclusion of the jsdiff JS library on the guided
reports page when displaying saved SQL reports. This fixes a JS error in
the browser console when the user tries to use our automatic update on
SQL reports which use an older syntax.

The patch also corrects a problem with svc/convert_report which was
causing an error when trying to display the diff information.

To test, apply the patch and restart services.

- Go to Reports -> Create from SQL.
- Add a report which is based on an older db structure. The example I
  found was:

  SELECT biblionumber,
  ExtractValue(marcxml,'//datafield/@tag/text()[substring(.,1,1) = "5"]') as 'notes'
  FROM biblioitems
  HAVING notes <> ''

- Save the report and go to the list of saved reports. There should be
  an "Update" column in the table, with a message about your newly-added
  report:

  "This report seems obsolete, it uses biblioitems.marcxml field."

- Clicking the "Update SQL" button should trigger a modal window that
  shows the before an after versions of the report. There should be
  no error in the browser console. Unfortunately the diff will not
  display because of a separate bug in svc/convert_report

Signed.off-by: Jessie Zairo <jzairo@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-08-29 14:37:13 -03:00
9066cd152e
Bug 34112: Replace fa.fa-pencil-alt with fa-solid.fa-pencil in edit buttons
The FontAwesome class "fa-pencil-alt" works in v.6 but is actually a v.5
class. We should use "fa-solid fa-pencil" instead.

This patch also corrects some leftover instances of "fa-edit"

To test, apply the patch and view some pages in the OPAC and staff
interface which have updated icons, e.g.

 - Administration -> Libraries
 - Catalog -> Bibliographic details
 - OPAC -> Bibliographic details

Confirm that the pencil icon looks correct. Checking all modified
templates is probably too much, but inspecting the patch should show
that only fa-pencil-alt and fa-edit icons are affected.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-07-11 08:52:31 -03:00
81b2ee0eb0
Bug 32910: (follow-up) Replace v4 icon names with v6
This patch updates icons which are listed as having changed names in
this document:

https://fontawesome.com/docs/web/setup/upgrade/upgrade-from-v4

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-12 11:52:10 -03:00
a8c6c134d8
Bug 33966: (bug 23824 follow-up) Fix submit buttons for translated templates
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Andrii Nugged <nugged@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-12 11:52:04 -03:00
a40bd8d05d
Bug 33713: Make batch operations from report results open in new tab
To test:
1. Have some reports that can do the following batch operations:
    -Batch patron mod
    -Batch item deletion
    -Batch add to list
    -Batch item mod
    -Batch record delection
    -Batch record mod

2. Run the report ann click 'Batch operations with X visible records', make sure each batch op opens in a new tab.

These two simple reports should allow you to test each of the batch cases:

select * from items limit 1
select * from borrowers limit 1

Signed-off-by: Andrew  Fuerste-Henry <andrewfh@dubcolib.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-18 11:35:06 -03:00
Didier Gautheron
0c1d7fe0fb
Bug 33513: Remove whitespace in batch report lists
Bug 32368 added whitespaces, remove them.

To test:
 1 - Create a report like:
    SELECT biblionumber FROM biblio
 2 - Run it
 3 - Try the various options from the 'Batch operations' button
 4 - The operations don't find the biblios
 5 - Create a report like:
    SELECT cardnumber FROM borrowers
 6 - Run it
 7 - Test the batch operations
 8 - They fail
 9 - Apply patch
10 - Run each report again and test batch operations
11 - They work!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 10:58:02 -03:00
fb940cf8c4
Bug 33437: Use template wrapper for breadcrumbs: Reports part 2
This patch updates several reports templates so that they use the new
WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Reports ->
  - Most circulated items
    - Report results
  - Items with no checkouts
    - Report results
  - Catalog statistics wizard
    - Report results
  - View dictionary
    - New definition (steps 1-5)
  - Saved reports
    - View report
    - New report
    - Edit report
  - Guided reports
    - Build a report
      - Steps 1 through 6

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-05 09:13:26 -03:00
Magnus Enger
2ea5163970
Bug 23824: Add a "Save and run" button to reports
This will save one click every time you want to save and then run
a report.

To test:
- Apply this patch
- Create a new report
- Click the new "Update and run SQL" button
- Verify the report was saved and the results are displayed

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-17 09:39:45 -03:00
6884b73a71
Bug 33333: Use template wrapper for tabs: SQL reports
This patch updates the saved SQL reports template so that it uses the
new WRAPPER directive to build tab markup.

To test, apply the patch and go to Reports -> Use saved. In order to
properly test the patch you should have multiple reports defined with
multiple categories ("Accounts", "Acquisitions", "Catalog", etc.).

Clicking each tab should filter the table of reports correctly.
After navigating away from the page and back to it, your selected tab
should be remembered.

Signed-off-by: Alexandra Speer <alexandra.speer@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-12 11:22:05 -03:00
Katrin Fischer
a651ff50a6
Bug 33063: Make sure correct subgroup is pre-selected when duplicating reports
When the 'Duplicate' option for reports was used, the all options
would be copied correctly to the new report, but the report sub group.

In this case the templates were created correctly, but the JavaScript
to create the correct pull downs for each group, overwrote the
the selection.

To test:
* Create a some reports with different groups and subgroups and without
* 'Duplicate' your reports and verify that the sub group will always stay empty
* Apply patch
* Verify the correct sub group is now always selected
* Edit/Add some reports to make sure the group/subgroup controls still
  work as expected

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-10 11:15:23 -03:00
6f6f7e15f8 Bug 33152: Add focus to search field
This patch adds focus to the search field for a new SQL report from
mana.

Test plan:
1) Navigate to Reports > Create from SQL
2) Click on the new report dropdown and select "New SQL from Mana"
3) Observe that there is no focus on the input and the user needs to
   click to start typing
4) Apply patch
5) Repeat steps 1-2
6) There should now be focus on the input and typing can be started
   immediately

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-10 10:21:46 -03:00
8925a0b7b6
Bug 32613: Add database tables to autocomplete
This patch adds a database call to get the table and column names in the
database and parse them into the autocomplete engine.

Test Plan:
As previous commit but also check for column/table names in the
autocomplete popup

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-06 14:45:29 -03:00
a3b2f42cc7
Bug 32613: Add autocomplete to SQL reports editor
This adds auto-complete for the sql reports editor codemirror instance.
To prevent a regression in syntax highlighting the overlay mode
'sqlPlaceholders' has been removed and replaced with a highlighting
engine that works correctly with the autocomplete engine.

Test Plan:
1. Navigate to reports and create a new sql report
2. Write an Sql query and observe that there is no autocomplete options
3. Apply patch
4. Write a new Sql query and observe that there are now auto-complete
   options that can be navigated through with the arrow keys and
   accepted with either tab or the enter keys.
5. Ensure that items bounded in << >> or [[ ]] are still syntax
   highlighted post-patch

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-06 14:45:28 -03:00
898aeaad9a
Bug 32605: (follow-up) Additional fixes
This patch makes some further changes to form CSS in order to improve
consistency. Some templates have also been modified to improve layout.

- Acquisitions -> New vendor
- Staff interface home ->  Patrons requesting modifications
- Reports -> Saved SQL reports
- Serials -> New subscription
- Tools -> Import patrons

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-02-15 09:22:05 -03:00
0c1fbffbe4
Bug 32239: Remove uneeded CSS from reports.css
To test:
1. Apply patch.
2. When adding a new SQL report, the options for adding/creating groups and sub groups should be aligned properly.
3. Turn on Mana and look at Mana Knowledge Base report search results to make sure everything is still properly aligned there.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-01-31 11:08:49 -03:00
96804dfb5f
Bug 32368: Add page-section to report results
This patch adds the page-section container to the results page after
running a report

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-15 09:36:08 -03:00
ccabd9f3dd
Bug 32091: Consistent classes for primary buttons: Reports
This patch makes changes the button markup in reports templates so that
all submit buttons and any buttons that should should be styled as
primary buttons have the Bootstrap class "btn btn-primary."

To test, apply the patch and view reports pages to confirm that
everything looks correct. In most cases there are no visible changes.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-10 10:27:48 -03:00
ab92871651
Bug 31753: Dialog boxes inside of modals don't seem wide enough
This patch makes some tweaks to the style of Bootstrap modals in the
staff interface, including making a correction to the style of .dialog
<div>s within modals.

The patch makes a correction to the modal markup generated by the guided
reports template for SQL previews so that the modal footer displays
correctly.

The patch also removes CSS which makes links inside headings the same
color as the heading text. The effect of this was to make links
invisible in the headings of hold confirmation modals.

To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

- Test the hold confirmation modal in check-in:
  - Place a hold on an available title.
  - Check in an item from that record and confirm that the modal
    looks correct. The "Check in message" box should take up the whole
    width of the modal, and the links in the modal header should be the
    standard green.
- Test the SQL preview modal in reports:
  - Go to Reports -> Use saved.
  - Click the actions menu associated with one of your saved reports and
    choose "Preview SQL." The modal should look correct.
- Other modals which might be tested: MARC previews from the
  bibliographic detail page, the cataloging search page, the Z39.50
  search page, etc.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-21 10:19:39 -03:00
Julian Maurice
cd21757826
Bug 30952: Undo change to Home breadcrumb for remaining templates
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-12 16:00:50 -03:00
Solène Desvaux
f43558f539
Bug 30952: Staff interface redesign (header)
What this patch does:
- change the navigation bar style
- change the breadcrumbs style
- change the "last borrower" link style
- move the search bar inside the navigation bar
- move the help link to the same row as the breadcrumbs

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-12 15:58:16 -03:00
926568a4e2
Bug 31594: Use count of results for displaying number shown
To test:
1 - Create a report with a number of results that is not a multiple of 20
    SELECT barcode FROM items
2 - Run the report
3 - Go to the final page
4 - Note report says 20 shown, but there are less
5 - Apply patch
6 - Reload and confirm correct number of shown is shown :-)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-03 10:06:30 -03:00
Katrin Fischer
cc0efad411
Bug 27436: Set focus on first input when adding a new SQL report
When adding a new SQL report, the focus/cursor should be
in the first input field of the form: Report name

To test:
* Add a new SQL report in reports > new from SQL
  - cursur is in no field
* Apply patch
* Add another new SQL report
  - cursor is now in the first input field of the form: Report name

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-07 13:44:38 -07:00