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 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

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)

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>

(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.

(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.
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>