Bug 12147 - Column width for action links on invoices too small
Summary: Column width for action links on invoices too small
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low trivial (vote)
Assignee: Owen Leonard
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-27 08:39 UTC by Katrin Fischer
Modified: 2015-06-04 23:30 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Invoices table (23.69 KB, image/png)
2014-04-27 08:39 UTC, Katrin Fischer
Details
Bug 12147 - Column width for action links on invoices too small (1.19 KB, patch)
2014-04-29 08:54 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 12147 [Alternate] Column width for action links on invoices too small (8.18 KB, patch)
2014-05-05 19:33 UTC, Owen Leonard
Details | Diff | Splinter Review
[Signed-off] Bug 12147 [Alternate] Column width for action links on invoices too small (8.35 KB, patch)
2014-05-06 07:04 UTC, Marc Véron
Details | Diff | Splinter Review
[Signed-off] Bug 12147 [Alternate] Column width for action links on invoices too small (8.38 KB, patch)
2014-05-09 18:03 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 12147: Column width for action links on invoices too small (8.40 KB, patch)
2014-05-12 08:27 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2014-04-27 08:39:19 UTC
Created attachment 27675 [details]
Invoices table

In the table of invoices the last column is not wide enough for the links, that causes each line to be 3 lines.
Comment 1 Marc Véron 2014-04-27 17:36:36 UTC
It really looks ugly...

My first idea was to put non breakting spaces around te slashes in lines 144 and 151 in invoices.tt, but this does not work out because of the formatting (indenting) with spaces. One would have to putt all of the if-else-logic on one line, and that is no good idea.

Looking at the HTML code I see tat all column headers get a hardcoded style "width" with values between 19.2 and 126.2px - exept of the last one with the action links. But I do not see where this is done?
Comment 2 Marc Véron 2014-04-29 08:54:42 UTC Comment hidden (obsolete)
Comment 3 Owen Leonard 2014-05-05 19:33:42 UTC Comment hidden (obsolete)
Comment 4 Marc Véron 2014-05-06 07:04:28 UTC Comment hidden (obsolete)
Comment 5 Marcel de Rooy 2014-05-07 15:04:12 UTC
[% FOREACH budget IN budgets_loop %]
-                                  <option value="[% budget.budget_id %]">
-                                  [% budget.budget_name %]
+                                  <option value="[% invoice.invoiceid %]">[% budget.budget_name %]

Is this correct? invoice and budget..
Comment 6 Jonathan Druart 2014-05-08 14:26:12 UTC
Comment on attachment 27956 [details] [review]
[Signed-off] Bug 12147 [Alternate] Column width for action links on invoices too small

Review of attachment 27956 [details] [review]:
-----------------------------------------------------------------

::: koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt
@@ +183,4 @@
>                              <select id="merge_shipment_budgetid" name="shipment_budget_id">
>                                  <option value="">No fund</option>
>                                [% FOREACH budget IN budgets_loop %]
> +                                  <option value="[% invoice.invoiceid %]">[% budget.budget_name %]

Owen, could you confirm this change is intended?
Comment 7 Owen Leonard 2014-05-09 18:03:45 UTC Comment hidden (obsolete)
Comment 8 Owen Leonard 2014-05-09 18:04:21 UTC
(In reply to Jonathan Druart from comment #6)

> Owen, could you confirm this change is intended?

It was not. I have attached a corrected patch.
Comment 9 Jonathan Druart 2014-05-12 08:27:10 UTC
Created attachment 28167 [details] [review]
Bug 12147: Column width for action links on invoices too small

This alternative patch groups "action" links into a menu as was done
with Bug 11763.

This patch also converts the date column sorting configuration to use
header class instead of an index.

This patch also corrects a couple of HTML markup errors: An
improperly-closed <input> and an improperly closed <option>.

To test, view the invoices page and confirm that the "Actions" menu
button works corectly. Test the functionality of each menu options:
Details, Close, Reopen, and Delete. Confirm that sorting by billing date
still works correctly.

Much nicer user interface. Followed test plan. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 10 Jonathan Druart 2014-05-12 08:29:05 UTC
The patch didn't applied, I got "fatal: cannot convert from UTF-8utf-8 to UTF-8".
I applied it manually and recreated the path.

Note there is no confirmation needed on deleting an invoice. Which is quite dangerous I think. This behavior existed before this patch.

Marked as Passed QA.
Comment 11 Galen Charlton 2014-05-23 13:37:46 UTC
Pushed to master and 3.16.x.  Thanks, Owen!