| Summary: | Make "Current on-site checkouts allowed" column display depend on OnSiteCheckouts system preference | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Caroline Cyr La Rose <caroline.cyr-la-rose> |
| Component: | System Administration | Assignee: | Bugs List <koha-bugs> |
| Status: | NEW --- | QA Contact: | Testopia <testopia> |
| Severity: | enhancement | ||
| Priority: | P5 - low | CC: | gmcharlt |
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | --- |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
|
Description
Caroline Cyr La Rose
2025-02-20 21:26:00 UTC
I did the change, but the new tidy thing emptied the smart-rules.tt file when I went to commit...
This is my diff before the commit (and before I corrected the tabs to spaces)
caroline@cacouana[16:42:09](master-dev)/inlibro/git/koha-master-dev-caroline$ git diff
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt
index 7c36fb4d1d..6560798651 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt
@@ -114,7 +114,9 @@
<th class="noExport">Actions</th>
<th>Note</th>
<th>Current checkouts allowed</th>
- <th>Current on-site checkouts allowed</th>
+ [% IF Koha.Preference('OnSiteCheckouts') %]
+ <th>Current on-site checkouts allowed</th>
+ [% END %]
<th>Loan period</th>
<th>Days mode</th>
<th>Unit</th>
@@ -261,13 +263,15 @@
<span>Unlimited</span>
[% END %]
</td>
- <td>
- [% IF maxonsiteissueqty.defined && maxonsiteissueqty != '' %]
- [% maxonsiteissueqty | html %]
- [% ELSE %]
- <span>Unlimited</span>
- [% END %]
- </td>
+ [% IF Koha.Preference('OnSiteCheckouts') %]
+ <td>
+ [% IF maxonsiteissueqty.defined && maxonsiteissueqty != '' %]
+ [% maxonsiteissueqty | html %]
+ [% ELSE %]
+ <span>Unlimited</span>
+ [% END %]
+ </td>
+ [% END %]
<td>[% issuelength | html %]</td>
<td data-code="[% daysmode | html %]">
[% SWITCH daysmode %]
@@ -595,7 +599,9 @@
<th> </th>
<th>Note</th>
<th>Current checkouts allowed</th>
- <th>Current on-site checkouts allowed</th>
+ [% IF Koha.Preference('OnSiteCheckouts') %]
+ <th>Current on-site checkouts allowed</th>
+ [% END %]
<th>Loan period</th>
<th>Days mode</th>
<th>Unit</th>
@@ -657,7 +663,9 @@
<tr>
<th> </th>
<th>Total current checkouts allowed</th>
- <th>Total current on-site checkouts allowed</th>
+ [% IF Koha.Preference('OnSiteCheckouts') %]
+ <th>Total current on-site checkouts allowed</th>
+ [% END %]
<th>Maximum total holds allowed (count)</th>
<th>Hold policy</th>
<th>Hold pickup library match</th>
@@ -812,7 +820,9 @@
<tr>
<th>Patron category</th>
<th>Total current checkouts allowed</th>
- <th>Total current on-site checkouts allowed</th>
+ [% IF Koha.Preference('OnSiteCheckouts') %]
+ <th>Total current on-site checkouts allowed</th>
+ [% END %]
<th>Total holds allowed</th>
<th> </th>
</tr>
I honestly don't have the emotional fortitude today to do it over...
That's OK. Before working on something else: make sure you are on the latest ktd (git pull) with the latest images (ktd pull) and also try deleting your node_modules directory and run yarn build. It should cover all bases. We had one report about this happening, but I think it was working after those steps. I git pulled koha-testing-docker and main (koha), I ktd pulled, I closed everything down and retarted ktd (`ktd --es7 up`), and I still have the same problem. Nothing in stash, empty smart-rules.tt file. The yarn build part, should that be in the ktd shell? I'm putting my test plan here just so I don't lose it. I will add it to the commit message whenever/if ever I manage to commit This patch makes the display of the 'Current on-site checkouts allowed' column in the circulation rules dependent on the OnSiteCheckouts system preference. To test: 1. Apply patch 2. Go to Administration > Circulation rules --> Note that there is no 'Current on-site checkouts allowed' column in the main table --> Note that there is no 'Total current on-site checkouts allowed in the 'Default checkout, hold and return policy' table (second table) 3. Enable OnSiteCheckouts 3.1. Go to Administration > System preferences 3.2. Search for OnSiteCheckouts 3.3. Set the system preference to Enable 3.4. Click 'Save all Circulation preferences 4. Repeat step 2 --> The column is visible in the main table --> The column is visible in the second table 5. Optional: test the on-site checkout functionality, it should still work as before (In reply to Caroline Cyr La Rose from comment #4) > The yarn build part, should that be in the ktd shell? Yes :) |