Add per-page help link to GUI. The link is extracted from the menu file and added to the menu. Currently only implemented for 'ipfire' and 'ipfire-rounded' themes.
Tim FitzGeorge (3): Help for GUI - ipfire theme code Help for GUI - Help links Help for GUI - help link style
config/menu/10-system.menu | 11 +++++++ config/menu/20-status.menu | 13 ++++++++ config/menu/30-network.menu | 20 +++++++++-- config/menu/40-services.menu | 6 ++++ config/menu/50-firewall.menu | 8 ++++- config/menu/60-ipfire.menu | 1 + config/menu/70-log.menu | 33 ++++++++++++------- config/menu/EX-apcupsd.menu | 1 + config/menu/EX-guardian.menu | 1 + config/menu/EX-mpfire.menu | 1 + config/menu/EX-samba.menu | 1 + config/menu/EX-tor.menu | 1 + config/menu/EX-wlanap.menu | 1 + html/html/themes/ipfire/include/css/style.css | 8 +++++ html/html/themes/ipfire/include/functions.pl | 19 +++++++++-- 15 files changed, 107 insertions(+), 18 deletions(-)
-- 2.26.1
Extracts help key from menu hash when building menus and adds help link to the menu.
Signed-off-by: Tim FitzGeorge ipfr@tfitzgeorge.me.uk --- html/html/themes/ipfire/include/functions.pl | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/html/html/themes/ipfire/include/functions.pl b/html/html/themes/ipfire/include/functions.pl index 9aec77497..6eb56c628 100644 --- a/html/html/themes/ipfire/include/functions.pl +++ b/html/html/themes/ipfire/include/functions.pl @@ -39,6 +39,8 @@ require "${General::swroot}/lang.pl"; # @param submenu entries sub showsubmenu() { my $submenus = shift; + my $uri = shift; + my $help; print "<ul>"; foreach my $item (sort keys %$submenus) { @@ -54,16 +56,26 @@ sub showsubmenu() { } print '<a href="'.$link.'">'.$submenus->{$item}->{'caption'}.'</a>';
+ if (exists $submenus->{$item}->{'help'} and $link eq $uri) { + $help = $submenus->{$item}->{'help'}; + } + &showsubmenu($subsubmenus) if ($subsubmenus); print '</li>'; } - print "</ul>" + print "</ul>"; + + return $help; }
############################################################################### # # print menu html elements sub showmenu() { + $uri = shift; + my $help = ''; + my $subhelp; + print '<div id="cssmenu" class="bigbox fixed">';
if ($settings{'SPEED'} ne 'off') { @@ -82,10 +94,11 @@ EOF next if (!is_menu_visible($link) or $link eq ''); print '<li class="has-sub "><a href="#"><span>'.$menu->{$k1}->{'caption'}.'</span></a>'; my $submenus = $menu->{$k1}->{'subMenu'}; - &showsubmenu($submenus) if ($submenus); + $help .= &showsubmenu($submenus, $uri) if ($submenus); print "</li>"; }
+ print '<li><a href="https://wiki.ipfire.org/'.$help.'" target="ipfire" class="help">?</a></li>' if ($help); print "</ul></div>"; }
@@ -168,7 +181,7 @@ print <<END END ;
-&showmenu() if ($suppressMenu != 1); +&showmenu( $URI[0] ) if ($suppressMenu != 1);
print <<END <div class="bigbox fixed">
Signed-off-by: Tim FitzGeorge ipfr@tfitzgeorge.me.uk --- config/menu/10-system.menu | 11 +++++++++++ config/menu/20-status.menu | 13 +++++++++++++ config/menu/30-network.menu | 20 +++++++++++++++++--- config/menu/40-services.menu | 6 ++++++ config/menu/50-firewall.menu | 8 +++++++- config/menu/60-ipfire.menu | 1 + config/menu/70-log.menu | 33 ++++++++++++++++++++++----------- config/menu/EX-apcupsd.menu | 1 + config/menu/EX-guardian.menu | 1 + config/menu/EX-mpfire.menu | 1 + config/menu/EX-samba.menu | 1 + config/menu/EX-tor.menu | 1 + config/menu/EX-wlanap.menu | 1 + 13 files changed, 83 insertions(+), 15 deletions(-)
diff --git a/config/menu/10-system.menu b/config/menu/10-system.menu index b142bfbac..176621b41 100644 --- a/config/menu/10-system.menu +++ b/config/menu/10-system.menu @@ -3,63 +3,74 @@ 'uri' => '/cgi-bin/index.cgi', 'title' => "$Lang::tr{'alt home'}", 'enabled' => 1, + 'help' => 'configuration/system/startpage' }; $subsystem->{'20.dialup'} = { 'caption' => $Lang::tr{'alt dialup'}, 'uri' => '/cgi-bin/pppsetup.cgi', 'title' => "$Lang::tr{'alt dialup'}", 'enabled' => 1, + 'help' => 'configuration/system/dial' }; $subsystem->{'21.wlan'} = { 'caption' => $Lang::tr{'wlan client'}, 'uri' => '/cgi-bin/wirelessclient.cgi', 'title' => "$Lang::tr{'wlan client'}", 'enabled' => 0, + 'help' => 'configuration/system/wlanclient' }; $subsystem->{'22.dma'} = {'caption' => $Lang::tr{'email settings'}, 'uri' => '/cgi-bin/mail.cgi', 'title' => "$Lang::tr{'email settings'}", 'enabled' => 1, + 'help' => 'configuration/system/mail_service' }; $subsystem->{'30.ssh'} = { 'caption' => $Lang::tr{'ssh access'}, 'uri' => '/cgi-bin/remote.cgi', 'title' => "$Lang::tr{'ssh access'}", 'enabled' => 1, + 'help' => 'configuration/system/ssh' }; $subsystem->{'40.gui'} = { 'caption' => $Lang::tr{'gui settings'}, 'uri' => '/cgi-bin/gui.cgi', 'title' => "$Lang::tr{'gui settings'}", 'enabled' => 1, + 'help' => 'configuration/system/userinterface' }; $subsystem->{'40.backup'} = { 'caption' => $Lang::tr{'backup'}, 'uri' => '/cgi-bin/backup.cgi', 'title' => "$Lang::tr{'backup'}", 'enabled' => 1, + 'help' => 'configuration/system/backup' }; $subsystem->{'41.fireinfo'} = { 'caption' => $Lang::tr{'system information'}, 'uri' => '/cgi-bin/fireinfo.cgi', 'title' => "$Lang::tr{'system information'}", 'enabled' => 1, + 'help' => 'fireinfo' }; $subsystem->{'42.hwvuln'} = { 'caption' => $Lang::tr{'hardware vulnerabilities'}, 'uri' => '/cgi-bin/vulnerabilities.cgi', 'title' => "$Lang::tr{'hardware vulnerabilities'}", 'enabled' => 1, + 'help' => 'configuration/system/vulnerabilties' }; $subsystem->{'43.shutdown'} = { 'caption' => $Lang::tr{'shutdown'}, 'uri' => '/cgi-bin/shutdown.cgi', 'title' => "$Lang::tr{'shutdown'}", 'enabled' => 1, + 'help' => 'configuration/system/shutdown' }; $subsystem->{'99.credits'} = { 'caption' => $Lang::tr{'credits'}, 'uri' => '/cgi-bin/credits.cgi', 'title' => "$Lang::tr{'credits'}", 'enabled' => 1, + 'help' => 'configuration/system/credits' }; diff --git a/config/menu/20-status.menu b/config/menu/20-status.menu index 2bcf0d5e8..38944b447 100644 --- a/config/menu/20-status.menu +++ b/config/menu/20-status.menu @@ -3,48 +3,56 @@ 'uri' => '/cgi-bin/system.cgi', 'title' => "$Lang::tr{'system'}", 'enabled' => 1, + 'help' => 'configuration/status/system' }; $substatus->{'20.memory'} = { 'caption' => $Lang::tr{'memory'}, 'uri' => '/cgi-bin/memory.cgi', 'title' => "$Lang::tr{'memory'}", 'enabled' => 1, + 'help' => 'configuration/status/memory' }; $substatus->{'30.services'} = { 'caption' => $Lang::tr{'services'}, 'uri' => '/cgi-bin/services.cgi', 'title' => "$Lang::tr{'services'}", 'enabled' => 1, + 'help' => 'configuration/status/services' }; $substatus->{'40.media'} = { 'caption' => $Lang::tr{'media'}, 'uri' => '/cgi-bin/media.cgi', 'title' => "$Lang::tr{'media'}", 'enabled' => 1, + 'help' => 'configuration/status/drives' }; $substatus->{'50.networkred'} = { 'caption' => "$Lang::tr{'network red'}", 'uri' => '/cgi-bin/netexternal.cgi', 'title' => "$Lang::tr{'network red'}", 'enabled' => 1, + 'help' => 'configuration/status/network_ext' }; $substatus->{'51.networkinternal'} = { 'caption' => "$Lang::tr{'network internal'}", 'uri' => '/cgi-bin/netinternal.cgi', 'title' => "$Lang::tr{'network internal'}", 'enabled' => 1, + 'help' => 'configuration/status/network_int' }; $substatus->{'52.networkother'} = { 'caption' => "$Lang::tr{'network other'}", 'uri' => '/cgi-bin/netother.cgi', 'title' => "$Lang::tr{'network other'}", 'enabled' => 1, + 'help' => 'configuration/status/network_other' }; $substatus->{'53.networkovpn'} = { 'caption' => "$Lang::tr{'vpn statistic rw'}", 'uri' => '/cgi-bin/netovpnrw.cgi', 'title' => "$Lang::tr{'vpn statistic rw'}", 'enabled' => 1, + 'help' => 'configuration/status/network_ovpnrw' }; $substatus->{'54.networkovpnsrv'} = { 'caption' => "$Lang::tr{'vpn statistic n2n'}", @@ -57,24 +65,28 @@ 'uri' => '/cgi-bin/hardwaregraphs.cgi', 'title' => "$Lang::tr{'hardware graphs'}", 'enabled' => 1, + 'help' => 'configuration/status/hardware_diagrams' }; $substatus->{'61.entropy'} = { 'caption' => "$Lang::tr{'entropy'}", 'uri' => '/cgi-bin/entropy.cgi', 'title' => "$Lang::tr{'entropy graphs'}", 'enabled' => 1, + 'help' => 'configuration/status/entropy' }; $substatus->{'71.connections'} = { 'caption' => $Lang::tr{'connections'}, 'uri' => '/cgi-bin/connections.cgi', 'title' => "$Lang::tr{'connections'}", 'enabled' => 1, + 'help' => 'configuration/status/connections' }; $substatus->{'72.nettraf'} = { 'caption' => $Lang::tr{'sstraffic'}, 'uri' => '/cgi-bin/traffic.cgi', 'title' => "$Lang::tr{'sstraffic'}", 'enabled' => 1, + 'help' => 'configuration/status/nettraffic' }; $substatus->{'73.qos'} = { 'caption' => $Lang::tr{'qos graphs'}, @@ -96,4 +108,5 @@ 'uri' => '/cgi-bin/mdstat.cgi', 'title' => 'Mdstat', 'enabled' => 1, + 'help' => 'configuration/status/mdstat' }; diff --git a/config/menu/30-network.menu b/config/menu/30-network.menu index 19571a870..6b1e8edf6 100644 --- a/config/menu/30-network.menu +++ b/config/menu/30-network.menu @@ -1,83 +1,97 @@ $subnetwork->{'10.netconf'} = {'caption' => "$Lang::tr{'net config'}", 'uri' => '/cgi-bin/netconfig.cgi', 'title' => "$Lang::tr{'net config'}", - 'enabled' => 0, + 'enabled' => 0 }; $subnetwork->{'11.zoneconf'} = {'caption' => "$Lang::tr{'zoneconf title'}", 'uri' => '/cgi-bin/zoneconf.cgi', 'title' => "$Lang::tr{'zoneconf title'}", 'enabled' => 1, + 'help' => 'configuration/network/zoneconf' }; $subnetwork->{'12.dns'} = { 'caption' => $Lang::tr{'dns title'}, 'uri' => '/cgi-bin/dns.cgi', 'title' => "$Lang::tr{'dns title'}", 'enabled' => 1, + 'help' => 'configuration/network/dns' }; $subnetwork->{'20.proxy'} = {'caption' => "$Lang::tr{'web proxy'}", 'uri' => '/cgi-bin/proxy.cgi', 'title' => "$Lang::tr{'web proxy'}", 'enabled' => 1, + 'help' => 'configuration/network/proxy/wui_conf' }; $subnetwork->{'21.urlfilter'} = {'caption' => $Lang::tr{'url filter'}, 'uri' => '/cgi-bin/urlfilter.cgi', 'title' => $Lang::tr{'url filter'}, 'enabled' => 1, + 'help' => 'configuration/network/url-filter' }; $subnetwork->{'22.updxlrator'} = {'caption' => $Lang::tr{'update accelerator'}, 'uri' => '/cgi-bin/updatexlrator.cgi', 'title' => $Lang::tr{'update accelerator'}, 'enabled' => 1, + 'help' => 'configuration/network/update-booster' }; $subnetwork->{'30.dhcp'} = {'caption' => $Lang::tr{'dhcp server'}, 'uri' => '/cgi-bin/dhcp.cgi', 'title' => "$Lang::tr{'dhcp server'}", 'enabled' => 1, + 'help' => 'configuration/network/dhcp' }; $subnetwork->{'32.captive'} = {'caption' => $Lang::tr{'Captive'}, 'uri' => '/cgi-bin/captive.cgi', 'title' => $Lang::tr{'Captive'}, 'enabled' => 1, + 'help' => 'configuration/network/captive' }; $subnetwork->{'40.scheduler'} = { 'caption' => $Lang::tr{'connscheduler'}, 'uri' => '/cgi-bin/connscheduler.cgi', 'title' => "$Lang::tr{'connscheduler'}", 'enabled' => 1, + 'help' => 'configuration/network/connectionscheduler' }; $subnetwork->{'50.hosts'} = { 'caption' => $Lang::tr{'edit hosts'}, 'uri' => '/cgi-bin/hosts.cgi', 'title' => "$Lang::tr{'edit hosts'}", 'enabled' => 1, + 'help' => 'configuration/network/hosts' }; $subnetwork->{'52.dnsforward'} = { 'caption' => $Lang::tr{'dnsforward'}, 'uri' => '/cgi-bin/dnsforward.cgi', 'title' => "$Lang::tr{'dnsforward'}", - 'enabled' => 1 + 'enabled' => 1, + 'help' => 'configuration/network/dnsforward' }; $subnetwork->{'60.routes'} = { 'caption' => $Lang::tr{'static routes'}, 'uri' => '/cgi-bin/routing.cgi', 'title' => "$Lang::tr{'static routes'}", 'enabled' => 1, + 'help' => 'configuration/network/static' }; $subnetwork->{'70.aliases'} = { 'caption' => $Lang::tr{'aliases'}, 'uri' => '/cgi-bin/aliases.cgi', 'title' => "$Lang::tr{'aliases'}", - 'enabled' => `grep "RED_TYPE=STATIC" /var/ipfire/ethernet/settings`, + 'help' => 'configuration/network/aliases', + 'enabled' => `grep "RED_TYPE=STATIC" /var/ipfire/ethernet/settings` }; $subnetwork->{'80.macadressmenu'} = { 'caption' => $Lang::tr{'mac address menu'}, 'uri' => '/cgi-bin/mac.cgi', 'title' => "$Lang::tr{'mac address menu'}", 'enabled' => 1, + 'help' => 'configuration/network/mac-address' }; $subnetwork->{'90.wakeonlan'} = { 'caption' => $Lang::tr{'WakeOnLan'}, 'uri' => '/cgi-bin/wakeonlan.cgi', 'title' => "$Lang::tr{'WakeOnLan'}", 'enabled' => 1, + 'help' => 'configuration/network/wake-on-lan' }; diff --git a/config/menu/40-services.menu b/config/menu/40-services.menu index 83ce3bc1f..bb363cbae 100644 --- a/config/menu/40-services.menu +++ b/config/menu/40-services.menu @@ -3,30 +3,36 @@ 'uri' => '/cgi-bin/vpnmain.cgi', 'title' => "$Lang::tr{'virtual private networking'}", 'enabled' => 1, + 'help' => 'configuration/services/ipsec' }; $subservices->{'20.openvpn'} = { 'caption' => 'OpenVPN', 'uri' => '/cgi-bin/ovpnmain.cgi', 'title' => "$Lang::tr{'virtual private networking'}", 'enabled' => 1, + 'help' => 'configuration/services/openvpn' }; $subservices->{'30.dyndns'} = {'caption' => $Lang::tr{'dynamic dns'}, 'uri' => '/cgi-bin/ddns.cgi', 'title' => "$Lang::tr{'dynamic dns'}", 'enabled' => 1, + 'help' => 'configuration/services/dyndns' }; $subservices->{'40.time'} = {'caption' => $Lang::tr{'time server'}, 'uri' => '/cgi-bin/time.cgi', 'title' => "$Lang::tr{'time server'}", 'enabled' => 1, + 'help' => 'configuration/services/ntp' }; $subservices->{'50.qos'} = {'caption' => 'Quality of Service', 'uri' => '/cgi-bin/qos.cgi', 'title' => "Quality of Service", 'enabled' => 1, + 'help' => 'configuration/services/qos' }; $subservices->{'70.extrahd'} = {'caption' => "ExtraHD", 'enabled' => 1, 'uri' => '/cgi-bin/extrahd.cgi', 'title' => "ExtraHD", + 'help' => 'configuration/services/extrahd' }; diff --git a/config/menu/50-firewall.menu b/config/menu/50-firewall.menu index 5ec1f67fc..07dfd4732 100644 --- a/config/menu/50-firewall.menu +++ b/config/menu/50-firewall.menu @@ -3,6 +3,7 @@ 'uri' => '/cgi-bin/firewall.cgi', 'title' => "$Lang::tr{'firewall rules'}", 'enabled' => 1, + 'help' => 'configuration/firewall/rules' }; $subfirewall->{'20.fwhost'} = { 'caption' => $Lang::tr{'fwhost menu'}, @@ -15,29 +16,33 @@ 'uri' => '/cgi-bin/optionsfw.cgi', 'title' => "$Lang::tr{'options fw'}", 'enabled' => 1, + 'help' => 'configuration/firewall/options' }; $subfirewall->{'40.ids'} = {'caption' => $Lang::tr{'intrusion detection'}, 'uri' => '/cgi-bin/ids.cgi', 'title' => "$Lang::tr{'intrusion detection system'}", 'enabled' => 1, + 'help' => 'configuration/firewall/ips' }; $subfirewall->{'50.p2p'} = { 'caption' => $Lang::tr{'p2p block'}, 'uri' => '/cgi-bin/p2p-block.cgi', 'title' => "P2P-Block", 'enabled' => 1, + 'help' => 'configuration/firewall/p2p-block' }; $subfirewall->{'60.geoipblock'} = { 'caption' => $Lang::tr{'geoipblock'}, 'uri' => '/cgi-bin/geoip-block.cgi', 'title' => $Lang::tr{'geoipblock'}, 'enabled' => 1, + 'help' => 'configuration/firewall/geoip-block' }; $subfirewall->{'70.wireless'} = { 'caption' => $Lang::tr{'blue access'}, 'uri' => '/cgi-bin/wireless.cgi', 'title' => "$Lang::tr{'blue access'}", - 'enabled' => 1, + 'enabled' => 1 }; $subfirewall->{'80.upnp'} = { 'caption' => 'UPnP', @@ -50,4 +55,5 @@ 'uri' => '/cgi-bin/iptables.cgi', 'title' => "$Lang::tr{'ipts'}", 'enabled' => 1, + 'help' => 'configuration/firewall/iptables' }; diff --git a/config/menu/60-ipfire.menu b/config/menu/60-ipfire.menu index 8b4c13950..87ce7f506 100644 --- a/config/menu/60-ipfire.menu +++ b/config/menu/60-ipfire.menu @@ -2,6 +2,7 @@ 'uri' => '/cgi-bin/pakfire.cgi', 'title' => "Pakfire", 'enabled' => 1, + 'help' => 'configuration/ipfire/pakfire' }; $subipfire->{'99.help'} = {'caption' => $Lang::tr{'help'}, 'uri' => '/cgi-bin/help.cgi', diff --git a/config/menu/70-log.menu b/config/menu/70-log.menu index 2fa0e426e..97931d3b8 100644 --- a/config/menu/70-log.menu +++ b/config/menu/70-log.menu @@ -1,59 +1,69 @@ $sublogs->{'10.summary'} = {'caption' => $Lang::tr{'log summary'}, 'uri' => '/cgi-bin/logs.cgi/summary.dat', 'title' => "$Lang::tr{'log summary'}", - 'enabled' => 1 + 'enabled' => 1, + 'help' => 'configuration/logs/summary' }; $sublogs->{'20.settings'} = {'caption' => $Lang::tr{'log settings'}, 'uri' => '/cgi-bin/logs.cgi/config.dat', 'title' => "$Lang::tr{'log settings'}", - 'enabled' => 1 + 'enabled' => 1, + 'help' => 'configuration/logs/logsettings' }; $sublogs->{'30.proxy'} = {'caption' => $Lang::tr{'proxy logs'}, 'uri' => '/cgi-bin/logs.cgi/proxylog.dat', 'title' => "$Lang::tr{'proxy logs'}", - 'enabled' => 1 + 'enabled' => 1, + 'help' => 'configuration/logs/proxy' }; $sublogs->{'31.calamaris'} = {'caption' => $Lang::tr{'calamaris proxy reports'}, 'uri' => '/cgi-bin/logs.cgi/calamaris.dat', 'title' => "$Lang::tr{'calamaris proxy reports'}", - 'enabled' => 1 + 'enabled' => 1, + 'help' => 'configuration/logs/proxyreports' }; $sublogs->{'40.firewall'} = {'caption' => $Lang::tr{'firewall logs'}, 'uri' => '/cgi-bin/logs.cgi/firewalllog.dat', 'title' => "$Lang::tr{'firewall logs'}", - 'enabled' => 1 + 'enabled' => 1, + 'help' => 'configuration/logs/firewall' }; $sublogs->{'41.firewallip'} = {'caption' => $Lang::tr{'firewall logs ip'}, 'uri' => '/cgi-bin/logs.cgi/firewalllogip.dat', 'title' => "$Lang::tr{'firewall logs ip'}", - 'enabled' => 1 + 'enabled' => 1, + 'help' => 'configuration/logs/firewall-ip' }; $sublogs->{'42.firewallport'} = {'caption' => $Lang::tr{'firewall logs port'}, 'uri' => '/cgi-bin/logs.cgi/firewalllogport.dat', 'title' => "$Lang::tr{'firewall logs port'}", - 'enabled' => 1 + 'enabled' => 1, + 'help' => 'configuration/logs/firewall-port' }; $sublogs->{'43.firewallcountry'} = {'caption' => $Lang::tr{'firewall logs country'}, 'uri' => '/cgi-bin/logs.cgi/firewalllogcountry.dat', 'title' => "$Lang::tr{'firewall logs country'}", - 'enabled' => 1 + 'enabled' => 1, + 'help' => 'configuration/logs/firewall-country' }; $sublogs->{'50.ids'} = {'caption' => $Lang::tr{'ids logs'}, 'uri' => '/cgi-bin/logs.cgi/ids.dat', 'title' => "$Lang::tr{'ids logs'}", - 'enabled' => 1 + 'enabled' => 1, + 'help' => 'configuration/logs/ids' }; $sublogs->{'55.ovpnclients'} = { 'caption' => $Lang::tr{'ovpn rw connection log'}, 'uri' => '/cgi-bin/logs.cgi/ovpnclients.dat', 'title' => "$Lang::tr{'ovpn rw connection log'}", - 'enabled' => 1, + 'enabled' => 1 }; $sublogs->{'60.urlfilter'} = { 'caption' => $Lang::tr{'urlfilter logs'}, 'uri' => '/cgi-bin/logs.cgi/urlfilter.dat', 'title' => "$Lang::tr{'urlfilter log'}", 'enabled' => 1, + 'help' => 'configuration/logs/url-filter' }; $sublogs->{'70.openvpn'} = {'caption' => $Lang::tr{'openvpn log'}, 'uri' => '/cgi-bin/logs.cgi/openvpn.dat', @@ -63,7 +73,8 @@ $sublogs->{'80.system'} = {'caption' => $Lang::tr{'system logs'}, 'uri' => '/cgi-bin/logs.cgi/log.dat', 'title' => "$Lang::tr{'system logs'}", - 'enabled' => 1 + 'enabled' => 1, + 'help' => 'configuration/logs/system' }; $sublogs->{'90.userlog'} = {'caption' => $Lang::tr{'user proxy logs'}, 'uri' => '/cgi-bin/logs.cgi/userlog.dat', diff --git a/config/menu/EX-apcupsd.menu b/config/menu/EX-apcupsd.menu index 5f01dce33..70553c8a5 100644 --- a/config/menu/EX-apcupsd.menu +++ b/config/menu/EX-apcupsd.menu @@ -2,4 +2,5 @@ 'uri' => '/cgi-bin/upsstats.cgi', 'title' => $Lang::tr{'apcupsd'}, 'enabled' => 1, + 'help' => 'addons/apcupsd' }; diff --git a/config/menu/EX-guardian.menu b/config/menu/EX-guardian.menu index 89cda9d35..159b54486 100644 --- a/config/menu/EX-guardian.menu +++ b/config/menu/EX-guardian.menu @@ -3,4 +3,5 @@ $subservices->{'65.guardian'} = { 'uri' => '/cgi-bin/guardian.cgi', 'title' => "$Lang::tr{'guardian'}", 'enabled' => '1', + 'help' => 'addons/guardian' }; diff --git a/config/menu/EX-mpfire.menu b/config/menu/EX-mpfire.menu index afba4dbde..583e7eca0 100644 --- a/config/menu/EX-mpfire.menu +++ b/config/menu/EX-mpfire.menu @@ -2,4 +2,5 @@ 'uri' => '/cgi-bin/mpfire.cgi', 'title' => $Lang::tr{'mpfire'}, 'enabled' => 1, + 'help' => 'addons/mpfire' }; diff --git a/config/menu/EX-samba.menu b/config/menu/EX-samba.menu index 6a9a1ae71..30bcb0c8b 100644 --- a/config/menu/EX-samba.menu +++ b/config/menu/EX-samba.menu @@ -2,4 +2,5 @@ 'uri' => '/cgi-bin/samba.cgi', 'title' => $Lang::tr{'samba'}, 'enabled' => 1, + 'help' => 'addons/samba' }; diff --git a/config/menu/EX-tor.menu b/config/menu/EX-tor.menu index 00ddffe8d..aec5b4354 100644 --- a/config/menu/EX-tor.menu +++ b/config/menu/EX-tor.menu @@ -3,4 +3,5 @@ $subipfire->{'50.tor'} = { 'uri' => '/cgi-bin/tor.cgi', 'title' => $Lang::tr{'tor'}, 'enabled' => 1, + 'help' => 'addons/tor' }; diff --git a/config/menu/EX-wlanap.menu b/config/menu/EX-wlanap.menu index 95b653052..cc131a209 100644 --- a/config/menu/EX-wlanap.menu +++ b/config/menu/EX-wlanap.menu @@ -2,4 +2,5 @@ 'uri' => '/cgi-bin/wlanap.cgi', 'title' => WLanAP, 'enabled' => 1, + 'help' => 'addons/wireless' }; -- 2.26.1
Signed-off-by: Tim FitzGeorge ipfr@tfitzgeorge.me.uk --- html/html/themes/ipfire/include/css/style.css | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/html/html/themes/ipfire/include/css/style.css b/html/html/themes/ipfire/include/css/style.css index 9421fc111..7c2ec8577 100644 --- a/html/html/themes/ipfire/include/css/style.css +++ b/html/html/themes/ipfire/include/css/style.css @@ -261,6 +261,14 @@ input.text { background: #dddddd; }
+#cssmenu .help { + padding: 0px 6px; + border: solid; + border-width: thin; + border-radius: 10px; + line-height: 20px; +} + /* This decorates all tables with class="tbl" */
table {
Hi Tim,
Thank you very much for submitting these patches.
I am afraid that I must say that I oppose these changes.
This has recently been discussed on the community portal and although I still have not made my mind up entirely, I think this not helpful to anyone:
* We do not have documentation for everything for a start * There is never this “just read one sentence and you suddenly will be an expert” thing this kind of promotes
Should we not rather link the wiki somewhere in the footer and encourage people to start reading the whole thing from the start before they do something?
What is your rationale to implementing this?
Best, -Michael
On 15 May 2020, at 22:39, Tim FitzGeorge ipfr@tfitzgeorge.me.uk wrote:
Add per-page help link to GUI. The link is extracted from the menu file and added to the menu. Currently only implemented for 'ipfire' and 'ipfire-rounded' themes.
Tim FitzGeorge (3): Help for GUI - ipfire theme code Help for GUI - Help links Help for GUI - help link style
config/menu/10-system.menu | 11 +++++++ config/menu/20-status.menu | 13 ++++++++ config/menu/30-network.menu | 20 +++++++++-- config/menu/40-services.menu | 6 ++++ config/menu/50-firewall.menu | 8 ++++- config/menu/60-ipfire.menu | 1 + config/menu/70-log.menu | 33 ++++++++++++------- config/menu/EX-apcupsd.menu | 1 + config/menu/EX-guardian.menu | 1 + config/menu/EX-mpfire.menu | 1 + config/menu/EX-samba.menu | 1 + config/menu/EX-tor.menu | 1 + config/menu/EX-wlanap.menu | 1 + html/html/themes/ipfire/include/css/style.css | 8 +++++ html/html/themes/ipfire/include/functions.pl | 19 +++++++++-- 15 files changed, 107 insertions(+), 18 deletions(-)
-- 2.26.1
Hi Michael,
On 16/05/2020 10:35, Michael Tremer wrote:
Hi Tim,
Thank you very much for submitting these patches.
I am afraid that I must say that I oppose these changes.
This has recently been discussed on the community portal and although
I still have not made my mind up entirely, I think this not helpful to anyone:
- We do not have documentation for everything for a start
Actually, it's not too bad. The only menu items (out of 72) in the core that I couldn't find help for are:
Status / VPN: Net-to-Net Statistics Firewall / Firewall Groups Firewall / Blue Access Firewall / OpenVPN Roadwarrior connections log
Status / Qos Graphs * Status / Modem Status Status / Atm-status Network / Network configuration * Firewall / UPnP IPFire / Help * Log / Open VPN Log *
and at least four of those (*) don't appear to exist. There might well be pages for some of these which I didn't see when I was adding the links. There are also four pages which obviously require further work:
Status / Entropy Status / Connections Status / MDstat Network / URL Filter
- There is never this “just read one sentence and you suddenly will be
an expert” thing this kind of promotes
True. But in the extreme this could be argued to say that IPFire shouldn't provide any information in the wiki unless it's much more detailed than the current wiki. Where do you draw the line?
Should we not rather link the wiki somewhere in the footer and
encourage people to start reading the whole thing from the start before they do something?
I think the best place for this is either on the download page or in the installer, so they get prompted to read the wiki before they start playing.
I suspect putting a link in the footer wouldn't help many people. If they can't find the wiki on the website they're probably not going to find it in the GUI footer.
What is your rationale to implementing this?
I was following the discussion in the community, and several people seemed to be in favour of the idea. And to quote 'This suggestion has been made plenty of times. I would be happy to accept patches, but so far nobody wanted to work on it.'
So I submitted the patches.
I understand that there are two sides to the argument. Having the wiki pages linked as help will be beneficial to some people and will just get other people into a mess quicker when they try to do something they don't understand - but having a link to the wiki page may help some of this latter group to realise that they don't understand and need to learn more.
Which is going to be of most benefit to most people? I think for me, having the help links would be preferable, but that's for me, with my skill set and personality.
Tim
Best, -Michael
Hi,
On 18 May 2020, at 21:18, Tim FitzGeorge ipfr@tfitzgeorge.me.uk wrote:
Hi Michael,
On 16/05/2020 10:35, Michael Tremer wrote:
Hi Tim,
Thank you very much for submitting these patches.
I am afraid that I must say that I oppose these changes.
This has recently been discussed on the community portal and although
I still have not made my mind up entirely, I think this not helpful to anyone:
- We do not have documentation for everything for a start
Actually, it's not too bad. The only menu items (out of 72) in the core that I couldn't find help for are:
Status / VPN: Net-to-Net Statistics Firewall / Firewall Groups Firewall / Blue Access Firewall / OpenVPN Roadwarrior connections log
Status / Qos Graphs * Status / Modem Status Status / Atm-status Network / Network configuration * Firewall / UPnP IPFire / Help * Log / Open VPN Log *
and at least four of those (*) don't appear to exist. There might well be pages for some of these which I didn't see when I was adding the links. There are also four pages which obviously require further work:
Status / Entropy Status / Connections Status / MDstat Network / URL Filter
- There is never this “just read one sentence and you suddenly will be
an expert” thing this kind of promotes
True. But in the extreme this could be argued to say that IPFire shouldn't provide any information in the wiki unless it's much more detailed than the current wiki. Where do you draw the line?
Yeah, I suppose I give up this argument.
*Some* documentation is better than nothing and people who generally know what they are doing will probably benefit.
Should we not rather link the wiki somewhere in the footer and
encourage people to start reading the whole thing from the start before they do something?
I think the best place for this is either on the download page or in the installer, so they get prompted to read the wiki before they start playing.
I suppose nobody reads the manual before they buy anything.
I also do not want to scare anyone away by claiming that IPFire is “for experts only”. It isn’t.
I suspect putting a link in the footer wouldn't help many people. If they can't find the wiki on the website they're probably not going to find it in the GUI footer.
I still cannot my head around it why this is a problem.
We have search that will find the right page, if you put in the keyword that you will find on top of the page you are currently looking at.
And the wiki has exactly the same hierarchy than the web UI. How can this go wrong?
What is your rationale to implementing this?
I was following the discussion in the community, and several people seemed to be in favour of the idea. And to quote 'This suggestion has been made plenty of times. I would be happy to accept patches, but so far nobody wanted to work on it.'
So I submitted the patches.
I appreciate it, but it would have been nice if we could have had the discussion first and come to a conclusion that everyone can live with.
Plenty of people have commented on this. There have been some further threads on the topic - or rather slight spin-offs - and suddenly there was absolute silence. I do not value the opinion of people very much when they only have that to give and are not willing to put any leg work in.
In this case: Everyone wants better documentation, but only one(!) person is actually editing it and improving it gradually. It is absolutely not okay for a group of 10 people to tell that one person what they expect them to do.
Therefore I personally feel that we are quite far away from what we can actually do here.
-Michael
I understand that there are two sides to the argument. Having the wiki pages linked as help will be beneficial to some people and will just get other people into a mess quicker when they try to do something they don't understand - but having a link to the wiki page may help some of this latter group to realise that they don't understand and need to learn more.
Which is going to be of most benefit to most people? I think for me, having the help links would be preferable, but that's for me, with my skill set and personality.
Tim
Best, -Michael