Bug 12236 - Collapse unused message transport types in notice editor
Summary: Collapse unused message transport types in notice editor
Status: RESOLVED WORKSFORME
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: paxed
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-13 08:29 UTC by paxed
Modified: 2023-07-15 19:30 UTC (History)
2 users (show)

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


Attachments
Collapse unused message transport types in notice editor (2.71 KB, patch)
2014-05-13 08:40 UTC, paxed
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description paxed 2014-05-13 08:29:55 UTC
When editing a notice, the input boxes take up a lot of space and are a distraction, but most of them are actually unused.

By default, collapse the ones that have no title nor content, and allow opening them when clicking on the transport name.
Comment 1 paxed 2014-05-13 08:40:14 UTC
Created attachment 28200 [details] [review]
Collapse unused message transport types in notice editor

When editing a notice, the input boxes take up a lot of space
and are a distraction, but most of them are actually unused.

By default, collapse the ones that have no title nor content,
and allow opening them when clicking on the transport name.

To test:
1) Apply patch
2) Go and edit a notice. The edit boxes for unused transport types
   should be collapsed, and clicking on the transport name should
   open the edit fields.
3) Saving and editing of the notice should still work.
Comment 2 Frédéric Demians 2014-11-01 15:54:01 UTC
It may already have changed in HEAD, and it doesn't apply anymore.
Comment 3 Mark Tompsett 2016-08-20 05:31:01 UTC
Comment on attachment 28200 [details] [review]
Collapse unused message transport types in notice editor

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

::: koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt
@@ +344,4 @@
>                    [% letter.message_transport_type %]
>                  [% END %]
>                </legend>
> +              <ol[% IF (letter.title.length < 1 && letter.content.length < 1) %] class="noshow_mtt noshow_mtt_[% letter.message_transport_type%]"[% END %]>

https://wiki.koha-community.org/wiki/Coding_Guidelines#HTML1:_Template_Toolkit_markup_inside_HTML
Comment 4 Mark Tompsett 2016-08-20 05:47:12 UTC
I believe upon further inspection that:

 $( "#transport-types" ).accordion({ collapsible: true, active:false, animate: 200 });

accomplishes what the point of this patch was. Marking as resolved/fixed.
Comment 5 paxed 2016-08-22 05:33:11 UTC
(In reply to M. Tompsett from comment #4)
> I believe upon further inspection that:
> 
>  $( "#transport-types" ).accordion({ collapsible: true, active:false,
> animate: 200 });
> 
> accomplishes what the point of this patch was. Marking as resolved/fixed.

Not really. The intention was to have the unused entries start as collapsed,
and the entries in use as open - easier to see with a glance which ones are in use, without needing to scroll past the unused entries. If I understand correctly, accordion will just make it even more awkward to see which ones are in use.
Comment 6 Mark Tompsett 2016-08-22 13:26:01 UTC
Feel free to fix it then. :)
Comment 7 Katrin Fischer 2023-07-15 19:30:46 UTC
We now use an accordeon view that has all entries collapsed by default when the page is opened. As with the accordeon not more than one entry can be open at the same time, I feel that this makes sense.

Closing for now, please reopen if you still see a need for changing the behavior.