Bug 26431: Use split button to offer choice of WYSIWYG or code editor for news
authorOwen Leonard <oleonard@myacpl.org>
Thu, 30 Jul 2020 12:38:22 +0000 (12:38 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Tue, 20 Oct 2020 17:11:30 +0000 (17:11 +0000)
commit8d4069ca278aba25d308c6ca9719eaa7c8c1a46d
tree2728561573bef21a202a4efbff959fbee0ce5946
parent49de13e03a58145b0798a928d2b12fd6058537f3
Bug 26431: Use split button to offer choice of WYSIWYG or code editor for news

This patch modifies the news interface so that the user is offered a
choice of editing news items using the default editor as defined by the
NewsToolEditor system preference or the non-default one.

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

- In the list of news items you should see an "Edit" split button in
  each row.
- Clicking the "Edit" part of the button should open the edit view with
  the correct editor as defined by the NewsToolEditor preference.
- Clicking the menu arrow on the button should offer the other editing
  method:
 - If NewsToolEditor is set to "WYSIWYG," the menu should offer "text
   editor."
 - If NewsToolEditor is set to "text editor," the menu should offer
   "WYSIWYG editor."
- Test the button with the NewsToolEditor preference set to both options
  and confirm that the button and menu work correctly.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 72485629565dd76022e4202549defafec1dd2998)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt
tools/koha-news.pl