Online help pages in staff client display a button 'Edit help' which is not wanted / needed for every installation. Introduce a system variable CustomOnlineHelpStaff to manage the online help system. In a first step it can select between 'None' and the existing 'File based help system' (selected by default).
Created attachment 62525 [details] [review] Bug 18472: Add system preference CustomOnlineHelpStaff to hide / select custom online help system Online help pages in staff client display a button 'Edit help' which is not wanted / needed for every installation. Introduce a system variable CustomOnlineHelpStaff to manage the online help system. In a first step it can select between 'None' and the existing 'File based help system' (selected by default). To test: - In staff client, open help on some pages, including help on main page - They have a button 'Edit help'. On main page help, yo see a text about 'Can I edit the online help?' - Apply patch, restart memcached and plack - Update database - In staff client, go to Administration > System preferences - Search syspref 'CustomOnlineHelpStaff' verify that 'File based' is selected by default (i.e. the legacy custom help system) - Verify that the help pages you visited look the same as before - Change syspref 'CustomOnlineHelpStaff' to 'None' - Visit the pages again, verify that 'Edit help' button and text about editing on main page help do no longer display. Note to QAers: Please have a close look at koha-tmpl/intranet-tmpl/prog/en/modules/help/mainpage.tt I had to include there [% USE Koha %] again, to trigger Koha.Preference('CustomOnlineHelpStaff').(It should trigger, because [% USE Koha %] is already included help-top.inc)
(In reply to Marc Véron from comment #1) > Note to QAers: Please have a close look at > koha-tmpl/intranet-tmpl/prog/en/modules/help/mainpage.tt > I had to include there [% USE Koha %] again, to trigger > Koha.Preference('CustomOnlineHelpStaff').(It should trigger, > because [% USE Koha %] is already included help-top.inc) No problem with that, but the USE should be moved to the top of the file.
Created attachment 62556 [details] [review] Bug 18472: Add system preference CustomOnlineHelpStaff to hide / select custom online help system Online help pages in staff client display a button 'Edit help' which is not wanted / needed for every installation. Introduce a system variable CustomOnlineHelpStaff to manage the online help system. In a first step it can select between 'None' and the existing 'File based help system' (selected by default). To test: - In staff client, open help on some pages, including help on main page - They have a button 'Edit help'. On main page help, yo see a text about 'Can I edit the online help?' - Apply patch, restart memcached and plack - Update database - In staff client, go to Administration > System preferences - Search syspref 'CustomOnlineHelpStaff' verify that 'File based' is selected by default (i.e. the legacy custom help system) - Verify that the help pages you visited look the same as before - Change syspref 'CustomOnlineHelpStaff' to 'None' - Visit the pages again, verify that 'Edit help' button and text about editing on main page help do no longer display. Amended for comment #2 / MV
Created attachment 62647 [details] [review] Bug 18472: (followup) Add system preference CustomOnlineHelpStaff Add bug description to file bug_18472-Add_system_preference_CustomOnlineHelpStaff.perl The bug description was not filled in upgrade message.
Created attachment 62692 [details] [review] Bug 18472: Some architectural changes...
Created attachment 62693 [details] [review] Bug 18472: Add system preferences to manage online help system This patch introduces two new system preferences in section 'Administration' - 'HelpSystem' to select / disable the help system to use. It is designed to allow future expansions (alternative / complementing help system), thats why it is a 'Multiple choice' with one choice - 'EnableEditingFilebasedHelp' is used to toggle on/off the 'Edit' field that appears at the bottom of the durrent help pages. To test: - In staff client, open help on some pages, including help on main page - They have a button 'Edit help'. On main page help, you see a text about 'Can I edit the online help?' - Apply patch, restart memcached and plack - Update database - In staff client, go to Administration > System preferences > Administration - Locate section 'Help system', do not yet schange settings - Verify that the help pages you visited look the same as before - Change syspref 'EnableEditingFilebasedHelp' to 'No' - Visit the help pages again, verify that 'Edit help' button no longer appears. - Set the system preference 'HelpSystem' to none (deselect 'File based (staff client) - Reload any page and verify that the 'Help' link in the page header does no longer display - In syspref 'HelpSystem', check 'File based (staff client)' - Reload any page, verify that the 'Help' link is displayed
Created attachment 62717 [details] [review] Bug 18472: Add system preferences to manage online help system This patch introduces two new system preferences in section 'Administration' - 'HelpSystem' to select / disable the help system to use. It is designed to allow future expansions (alternative / complementing help system), thats why it is a 'Multiple choice' with one choice - 'EnableEditingFilebasedHelp' is used to toggle on/off the 'Edit' field that appears at the bottom of the durrent help pages. To test: - In staff client, open help on some pages, including help on main page - They have a button 'Edit help'. On main page help, you see a text about 'Can I edit the online help?' - Apply patch, restart memcached and plack - Update database - In staff client, go to Administration > System preferences > Administration - Locate section 'Help system', do not yet schange settings - Verify that the help pages you visited look the same as before - Change syspref 'EnableEditingFilebasedHelp' to 'No' - Visit the help pages again, verify that 'Edit help' button no longer appears. - Set the system preference 'HelpSystem' to none (deselect 'File based (staff client) - Reload any page and verify that the 'Help' link in the page header does no longer display - In syspref 'HelpSystem', check 'File based (staff client)' - Reload any page, verify that the 'Help' link is displayed
Created attachment 62864 [details] [review] Bug 18472: Add system preferences to manage online help system This patch introduces two new system preferences in section 'Administration' - 'HelpSystem' to select / disable the help system to use. It is designed to allow future expansions (alternative / complementing help system), thats why it is a 'Multiple choice' with one choice - 'EnableEditingFilebasedHelp' is used to toggle on/off the 'Edit' field that appears at the bottom of the durrent help pages. To test: - In staff client, open help on some pages, including help on main page - They have a button 'Edit help'. On main page help, you see a text about 'Can I edit the online help?' - Apply patch, restart memcached and plack - Update database - In staff client, go to Administration > System preferences > Administration - Locate section 'Help system', do not yet schange settings - Verify that the help pages you visited look the same as before - Change syspref 'EnableEditingFilebasedHelp' to 'No' - Visit the help pages again, verify that 'Edit help' button no longer appears. - Set the system preference 'HelpSystem' to none (deselect 'File based (staff client) - Reload any page and verify that the 'Help' link in the page header does no longer display - In syspref 'HelpSystem', check 'File based (staff client)' - Reload any page, verify that the 'Help' link is displayed
Created attachment 62866 [details] [review] Bug 18472: Add system preferences to manage online help system This patch introduces two new system preferences in section 'Administration' - 'HelpSystem' to select / disable the help system to use. It is designed to allow future expansions (alternative / complementing help system), thats why it is a 'Multiple choice' with one choice - 'EnableEditingFilebasedHelp' is used to toggle on/off the 'Edit' field that appears at the bottom of the durrent help pages. To test: - In staff client, open help on some pages, including help on main page - They have a button 'Edit help'. On main page help, you see a text about 'Can I edit the online help?' - Apply patch, restart memcached and plack - Update database - In staff client, go to Administration > System preferences > Administration - Locate section 'Help system', do not yet schange settings - Verify that the help pages you visited look the same as before - Change syspref 'EnableEditingFilebasedHelp' to 'No' - Visit the help pages again, verify that 'Edit help' button no longer appears. - Set the system preference 'HelpSystem' to none (deselect 'File based (staff client) - Reload any page and verify that the 'Help' link in the page header does no longer display - In syspref 'HelpSystem', check 'File based (staff client)' - Reload any page, verify that the 'Help' link is displayed
Comment on attachment 62866 [details] [review] Bug 18472: Add system preferences to manage online help system Review of attachment 62866 [details] [review]: ----------------------------------------------------------------- ::: installer/data/mysql/sysprefs.sql @@ +115,5 @@ > ('CronjobLog','0',NULL,'If ON, log information from cron jobs.','YesNo'), > ('CumulativeRestrictionPeriods',0,NULL,'Cumulate the restriction periods instead of keeping the highest','YesNo'), > ('CurrencyFormat','US','US|FR|CH','Determines the display format of currencies. eg: \'36000\' is displayed as \'360 000,00\' in \'FR\' or \'360,000.00\' in \'US\'.','Choice'), > +('HelpSystem', 'filebased', 'filebased', 'Select online help system.', 'multiple'), > +("INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('EnableEditingFilebasedHelp', '1', '', 'Enable editing of file based Koha help.', 'yesno')" ), This line is wrong. Looks like a cut and paste which didn't get tweaked properly. A fresh install will fail. ::: koha-tmpl/intranet-tmpl/prog/en/includes/help-top.inc @@ +1,1 @@ > +[% USE Koha %] doc-head-open.inc has a [% USE Koha %] -- Is this necessary or preferred? ::: koha-tmpl/intranet-tmpl/prog/en/modules/help/mainpage.tt @@ +1,1 @@ > +[% USE Koha %] help-top.inc includes doc-head-open.inc which has a [% USE Koha %] -- Is this necessary or preferred?
Setting to Failed QA due to "installer/data/mysql/sysprefs.sql" issue.
(In reply to M. Tompsett from comment #10) > Comment on attachment 62866 [details] [review] [review] > Bug 18472: Add system preferences to manage online help system > > Review of attachment 62866 [details] [review] [review]: > ----------------------------------------------------------------- (...) > > ::: koha-tmpl/intranet-tmpl/prog/en/includes/help-top.inc > @@ +1,1 @@ > > +[% USE Koha %] > > doc-head-open.inc has a [% USE Koha %] -- Is this necessary or preferred? > > ::: koha-tmpl/intranet-tmpl/prog/en/modules/help/mainpage.tt > @@ +1,1 @@ > > +[% USE Koha %] > > help-top.inc includes doc-head-open.inc which has a [% USE Koha %] -- Is > this necessary or preferred? Yes, see comment #2 If I do not include them, Koha.Preference('HelpSystem') does not trigger.
Created attachment 62896 [details] [review] Bug 18472: Add system preferences to manage online help system This patch introduces two new system preferences in section 'Administration' - 'HelpSystem' to select / disable the help system to use. It is designed to allow future expansions (alternative / complementing help system), thats why it is a 'Multiple choice' with one choice - 'EnableEditingFilebasedHelp' is used to toggle on/off the 'Edit' field that appears at the bottom of the durrent help pages. To test: - In staff client, open help on some pages, including help on main page - They have a button 'Edit help'. On main page help, you see a text about 'Can I edit the online help?' - Apply patch, restart memcached and plack - Update database - In staff client, go to Administration > System preferences > Administration - Locate section 'Help system', do not yet schange settings - Verify that the help pages you visited look the same as before - Change syspref 'EnableEditingFilebasedHelp' to 'No' - Visit the help pages again, verify that 'Edit help' button no longer appears. - Set the system preference 'HelpSystem' to none (deselect 'File based (staff client) - Reload any page and verify that the 'Help' link in the page header does no longer display - In syspref 'HelpSystem', check 'File based (staff client)' - Reload any page, verify that the 'Help' link is displayed (Amended to correct wrong line in sysprefs.sql 201-04-29 mv)
Created attachment 62897 [details] [review] Bug 18472: Add system preferences to manage online help system This patch introduces two new system preferences in section 'Administration' - 'HelpSystem' to select / disable the help system to use. It is designed to allow future expansions (alternative / complementing help system), thats why it is a 'Multiple choice' with one choice - 'EnableEditingFilebasedHelp' is used to toggle on/off the 'Edit' field that appears at the bottom of the durrent help pages. To test: - In staff client, open help on some pages, including help on main page - They have a button 'Edit help'. On main page help, you see a text about 'Can I edit the online help?' - Apply patch, restart memcached and plack - Update database - In staff client, go to Administration > System preferences > Administration - Locate section 'Help system', do not yet schange settings - Verify that the help pages you visited look the same as before - Change syspref 'EnableEditingFilebasedHelp' to 'No' - Visit the help pages again, verify that 'Edit help' button no longer appears. - Set the system preference 'HelpSystem' to none (deselect 'File based (staff client) - Reload any page and verify that the 'Help' link in the page header does no longer display - In syspref 'HelpSystem', check 'File based (staff client)' - Reload any page, verify that the 'Help' link is displayed (Amended to correct wrong line in sysprefs.sql 201-04-29 mv)
(In reply to M. Tompsett from comment #10) > Comment on attachment 62866 [details] [review] [review] > Bug 18472: Add system preferences to manage online help system > > Review of attachment 62866 [details] [review] [review]: > ----------------------------------------------------------------- > > ::: installer/data/mysql/sysprefs.sql > @@ +115,5 @@ > > ('CronjobLog','0',NULL,'If ON, log information from cron jobs.','YesNo'), > > ('CumulativeRestrictionPeriods',0,NULL,'Cumulate the restriction periods instead of keeping the highest','YesNo'), > > ('CurrencyFormat','US','US|FR|CH','Determines the display format of currencies. eg: \'36000\' is displayed as \'360 000,00\' in \'FR\' or \'360,000.00\' in \'US\'.','Choice'), > > +('HelpSystem', 'filebased', 'filebased', 'Select online help system.', 'multiple'), > > +("INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('EnableEditingFilebasedHelp', '1', '', 'Enable editing of file based Koha help.', 'yesno')" ), > > This line is wrong. Looks like a cut and paste which didn't get tweaked > properly. A fresh install will fail. Fixed edit error with latest patch Went through install - without patch 583 rows in systempreferences - with patch: 585 rows in system preferences (2 more, as expected).
Created attachment 62950 [details] [review] [SIGNED-OFF] Bug 18472: Add system preferences to manage online help system This patch introduces two new system preferences in section 'Administration' - 'HelpSystem' to select / disable the help system to use. It is designed to allow future expansions (alternative / complementing help system), thats why it is a 'Multiple choice' with one choice - 'EnableEditingFilebasedHelp' is used to toggle on/off the 'Edit' field that appears at the bottom of the durrent help pages. To test: - In staff client, open help on some pages, including help on main page - They have a button 'Edit help'. On main page help, you see a text about 'Can I edit the online help?' - Apply patch, restart memcached and plack - Update database - In staff client, go to Administration > System preferences > Administration - Locate section 'Help system', do not yet schange settings - Verify that the help pages you visited look the same as before - Change syspref 'EnableEditingFilebasedHelp' to 'No' - Visit the help pages again, verify that 'Edit help' button no longer appears. - Set the system preference 'HelpSystem' to none (deselect 'File based (staff client) - Reload any page and verify that the 'Help' link in the page header does no longer display - In syspref 'HelpSystem', check 'File based (staff client)' - Reload any page, verify that the 'Help' link is displayed (Amended to correct wrong line in sysprefs.sql 201-04-29 mv) Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Could you explain why did you reuse the news system instead of creating a new fresh module?
(In reply to Jonathan Druart from comment #17) > Could you explain why did you reuse the news system instead of creating a > new fresh module? Because the news module contains all the functionality needed, and users are used to it. I did not want to reinvent the wheel.
I personally do not think it is a good idea, I'd like to get other QAers point of view.
(In reply to Jonathan Druart from comment #19) > I personally do not think it is a good idea, I'd like to get other QAers > point of view. At first glance, I would think so too. But I did not study all code changes. Marc: Could you convince the QA team why this is a good idea? What is the impact on the news module itself?
(In reply to Marcel de Rooy from comment #20) > (In reply to Jonathan Druart from comment #19) > > I personally do not think it is a good idea, I'd like to get other QAers > > point of view. > > At first glance, I would think so too. But I did not study all code changes. > > Marc: Could you convince the QA team why this is a good idea? What is the > impact on the news module itself? Need: - Having a user editable, page aware help system is a long outstanding need. First time I was asked for goes back to 2012. - We have libraries interested in Koha who ask for in their requirements. - Writing a brand new help module would take a lot of time. And who would fund it? User: - The news system works very well and libraries are used to use it. The help additons introduced in Bug 18483 enhances the news system to host custom help as well. - From a user standpoint it is easy to use, you can add whatever you want / need as help. All the benefits of the news system can be used. Custom help items can easyly be added / edited. - It can turned on and off (combined with the existing file based help system or 'standalone'). This Bug 18472 is the basis for turning on and off and/or add additional help systems. - There is no change in behavior of news and file based help system if turned off (however this patch allows to turn off the edit function of the existing file based help system). Impact: - In Bug 18483, I paid great attention to have a minimal impact on existing code. No changes in .pm files were needed. - There is a small database change to have a field to host the page key if a news item is used as help item. Things to come: - Since the news system works for both staff client and OPAC it will be easy to implement the editable help for OPAC as well (Bug 18515) So I kindly ask for Bug 18472 and Bug 18483 to make part of Koha. Marc
Still applies on current master
Still applies on current master. BTW: This bug is only about enabling / disabling the current help system and, if enabled, allow or disallow editing. Disabling the edit functionality is a long outstanding issue, because it does not work out of the box. Additionaly it prepares the possibility to implement an alternative help system. That's why I will copy parts of the comments to Bug 18483 - Customised help: Enhance staff client with news based, easily editable help system
Created attachment 66851 [details] [review] Bug 18472: Add system preferences to manage online help system This patch introduces two new system preferences in section 'Administration' - 'HelpSystem' to select / disable the help system to use. It is designed to allow future expansions (alternative / complementing help system), thats why it is a 'Multiple choice' with one choice - 'EnableEditingFilebasedHelp' is used to toggle on/off the 'Edit' field that appears at the bottom of the durrent help pages. To test: - In staff client, open help on some pages, including help on main page - They have a button 'Edit help'. On main page help, you see a text about 'Can I edit the online help?' - Apply patch, restart memcached and plack - Update database - In staff client, go to Administration > System preferences > Administration - Locate section 'Help system', do not yet schange settings - Verify that the help pages you visited look the same as before - Change syspref 'EnableEditingFilebasedHelp' to 'No' - Visit the help pages again, verify that 'Edit help' button no longer appears. - Set the system preference 'HelpSystem' to none (deselect 'File based (staff client) - Reload any page and verify that the 'Help' link in the page header does no longer display - In syspref 'HelpSystem', check 'File based (staff client)' - Reload any page, verify that the 'Help' link is displayed (Amended to correct wrong line in sysprefs.sql 201-04-29 mv) Signed-off-by: Josef Moravec <josef.moravec@gmail.com> (Minor change to make it apply on current master 2017-09-05 mv)
Created attachment 68744 [details] [review] Bug 18472: Add system preferences to manage online help system This patch introduces two new system preferences in section 'Administration' - 'HelpSystem' to select / disable the help system to use. It is designed to allow future expansions (alternative / complementing help system), thats why it is a 'Multiple choice' with one choice - 'EnableEditingFilebasedHelp' is used to toggle on/off the 'Edit' field that appears at the bottom of the durrent help pages. To test: - In staff client, open help on some pages, including help on main page - They have a button 'Edit help'. On main page help, you see a text about 'Can I edit the online help?' - Apply patch, restart memcached and plack - Update database - In staff client, go to Administration > System preferences > Administration - Locate section 'Help system', do not yet schange settings - Verify that the help pages you visited look the same as before - Change syspref 'EnableEditingFilebasedHelp' to 'No' - Visit the help pages again, verify that 'Edit help' button no longer appears. - Set the system preference 'HelpSystem' to none (deselect 'File based (staff client) - Reload any page and verify that the 'Help' link in the page header does no longer display - In syspref 'HelpSystem', check 'File based (staff client)' - Reload any page, verify that the 'Help' link is displayed (Amended to correct wrong line in sysprefs.sql 201-04-29 mv) Signed-off-by: Josef Moravec <josef.moravec@gmail.com> (Minor change to make it apply on current master 2017-09-05 mv) Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
I am waiting for answers, feedbacks and suggestions on bug 19817.