This patch adds a little "help" icon to the page header. If a manual entry exists for a configuration page, the icon appears and offers a quick way to access the wiki. Wiki pages can be configured in the "manualpages" file.
Signed-off-by: Leo-Andres Hofmann hofmann@leo-andres.de --- config/cfgroot/header.pl | 20 +++++++++++++++++++ config/cfgroot/manualpages | 7 +++++++ html/html/themes/ipfire/include/css/style.css | 13 ++++++++++++ html/html/themes/ipfire/include/functions.pl | 17 +++++++++++++++- 4 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 config/cfgroot/manualpages
diff --git a/config/cfgroot/header.pl b/config/cfgroot/header.pl index 79accbe8a..e97f90d67 100644 --- a/config/cfgroot/header.pl +++ b/config/cfgroot/header.pl @@ -91,7 +91,11 @@ if ( -d "/var/ipfire/langs/${language}/" ) { }; };
+### Initialize user manual +my %manualpages = (); +&General::readhash("${General::swroot}/main/manualpages", %manualpages);
+### Load selected language and theme functions require "${swroot}/langs/en.pl"; require "${swroot}/langs/${language}.pl"; eval `/bin/cat /srv/web/ipfire/html/themes/ipfire/include/functions.pl`; @@ -553,3 +557,19 @@ sub colorize { return $string; } } + +# Get user manual URL for the specified configuration page, returns empty if no entry is configured +sub get_manualpage_url() { + my ($cgi_page) = @_; + + # Ensure base url is configured + return unless($manualpages{'BASE_URL'}); + + # Return URL + if($cgi_page && defined($manualpages{$cgi_page})) { + return "$manualpages{'BASE_URL'}/$manualpages{$cgi_page}"; + } + + # No manual page configured, return nothing + return; +} diff --git a/config/cfgroot/manualpages b/config/cfgroot/manualpages new file mode 100644 index 000000000..e5ab1a13c --- /dev/null +++ b/config/cfgroot/manualpages @@ -0,0 +1,7 @@ +# User manual base URL (without trailing slash) +BASE_URL=https://wiki.ipfire.org + +# Assign manual page URL path to CGI file ([cgi basename]=[path/to/page]) +index=configuration/system/startpage +pppsetup=configuration/system/dial +qos=configuration/services/qos diff --git a/html/html/themes/ipfire/include/css/style.css b/html/html/themes/ipfire/include/css/style.css index b92f476c4..661773675 100644 --- a/html/html/themes/ipfire/include/css/style.css +++ b/html/html/themes/ipfire/include/css/style.css @@ -169,6 +169,19 @@ iframe { margin-bottom: 1em; }
+#main_header > * { + display: inline-block; + vertical-align: baseline; +} + +#main_header > span { + margin-left: 0.8em; +} + +#main_header img { + padding: 0; +} + #footer { height: 2.5em; margin-bottom: 1em; diff --git a/html/html/themes/ipfire/include/functions.pl b/html/html/themes/ipfire/include/functions.pl index 9f12bbe59..18931428e 100644 --- a/html/html/themes/ipfire/include/functions.pl +++ b/html/html/themes/ipfire/include/functions.pl @@ -170,7 +170,22 @@ END print <<END <div class="bigbox fixed"> <div id="main_inner" class="fixed"> - <h1>$title</h1> + <div id="main_header"> + <h1>$title</h1> +END +; + +# Print user manual link +my $manual_url = &Header::get_manualpage_url($scriptName); +if($manual_url) { + print <<END + <span><a href="$manual_url" title="$Lang::tr{'online help en'}" target="_blank"><img src="/images/help-browser.png" alt="$Lang::tr{'online help en'}"></a></span> +END +; +} + +print <<END + </div> END ; }
This patch adds a function to verify the user manual links configuration file at build time. Run with "./make.sh check-manualpages"
Signed-off-by: Leo-Andres Hofmann hofmann@leo-andres.de --- make.sh | 12 +++++- tools/check_manualpages.pl | 84 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 tools/check_manualpages.pl
diff --git a/make.sh b/make.sh index 8b97b24df..370a19aa5 100755 --- a/make.sh +++ b/make.sh @@ -1958,8 +1958,18 @@ find-dependencies) shift exec "${BASEDIR}/tools/find-dependencies" "${BASEDIR}/build" "$@" ;; +check-manualpages) + echo "Checking the manual pages for broken links..." + + chmod 755 $BASEDIR/tools/check_manualpages.pl + if $BASEDIR/tools/check_manualpages.pl; then + print_status DONE + else + print_status FAIL + fi + ;; *) - echo "Usage: $0 {build|changelog|clean|gettoolchain|downloadsrc|shell|sync|toolchain|update-contributors|find-dependencies}" + echo "Usage: $0 {build|changelog|clean|gettoolchain|downloadsrc|shell|sync|toolchain|update-contributors|find-dependencies|check-manualpages}" cat doc/make.sh-usage ;; esac diff --git a/tools/check_manualpages.pl b/tools/check_manualpages.pl new file mode 100644 index 000000000..8eefc63e2 --- /dev/null +++ b/tools/check_manualpages.pl @@ -0,0 +1,84 @@ +#!/usr/bin/perl +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2005-2021 IPFire Team # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see http://www.gnu.org/licenses/. # +# # +############################################################################### + +use strict; +#use warnings; + +# Import make.sh environment +my $basedir = $ENV{'BASEDIR'}; + +# Load configuration file (General::readhash isn't available yet) +my $configfile = "${basedir}/config/cfgroot/manualpages"; +my %manualpages = (); + +open(my $file, "<", $configfile) or die "ERROR: Can't read from file '$configfile'!\n"; +while(my $line = <$file>) { + $line =~ s/\R//g; + next unless($line =~ /=/); + + my($left, $value) = split(/=/, $line, 2); + if($left =~ /(^[A-Za-z0-9_-]+$)/) { + my $key = $1; # Got alphanumeric key + $manualpages{$key} = $value; + } +} +close($file); + +# Check configuration +if(! defined $manualpages{'BASE_URL'}) { + die "ERROR: User manual base URL not configured!\n"; +} +my $baseurl = $manualpages{'BASE_URL'}; +delete $manualpages{'BASE_URL'}; + +if ($baseurl =~ //\s*$/) { + die "ERROR: User manual base URL must not end with a slash!\n"; +} + +# Loop trough configured manual pages +foreach my $page (keys %manualpages) { + # Build absolute path and URL + my $cgifile = "${basedir}/html/cgi-bin/${page}.cgi"; + my $url = "${baseurl}/$manualpages{$page}"; + + print "${page}.cgi -> '$url'\n"; + + # Check CGI file exists + if(! -f $cgifile) { + print "WARNING: Obsolete link, page '$cgifile' doesn't exist!\n"; + } + + # Check obvious invalid characters + if($url =~ /[^[:graph:]]/) { + die("ERROR: URL contains invalid characters!\n"); + } + + # Check HTTP 200 "OK" result, follow up to 1 redirect (e.g. HTTP -> HTTPS) + my $status = `curl --silent --show-error --output /dev/null --location --max-redirs 1 --max-time 10 --write-out "%{http_code}" --url "${url}"`; + if($status != 200) { + die("ERROR: Received unexpected HTTP '$status'!\n"); + } + + print "SUCCESS: Received HTTP '$status'.\n"; +} + +# Clean exit +exit 0;
Reviewed-by: Bernhard Bitsch bbitsch@ipfire.org
Am 28.09.2021 um 13:09 schrieb Leo-Andres Hofmann:
This patch adds a function to verify the user manual links configuration file at build time. Run with "./make.sh check-manualpages"
Signed-off-by: Leo-Andres Hofmann hofmann@leo-andres.de
make.sh | 12 +++++- tools/check_manualpages.pl | 84 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 tools/check_manualpages.pl
diff --git a/make.sh b/make.sh index 8b97b24df..370a19aa5 100755 --- a/make.sh +++ b/make.sh @@ -1958,8 +1958,18 @@ find-dependencies) shift exec "${BASEDIR}/tools/find-dependencies" "${BASEDIR}/build" "$@" ;; +check-manualpages)
- echo "Checking the manual pages for broken links..."
- chmod 755 $BASEDIR/tools/check_manualpages.pl
- if $BASEDIR/tools/check_manualpages.pl; then
print_status DONE
- else
print_status FAIL
- fi
- ;; *)
- echo "Usage: $0 {build|changelog|clean|gettoolchain|downloadsrc|shell|sync|toolchain|update-contributors|find-dependencies}"
- echo "Usage: $0 {build|changelog|clean|gettoolchain|downloadsrc|shell|sync|toolchain|update-contributors|find-dependencies|check-manualpages}" cat doc/make.sh-usage ;; esac
diff --git a/tools/check_manualpages.pl b/tools/check_manualpages.pl new file mode 100644 index 000000000..8eefc63e2 --- /dev/null +++ b/tools/check_manualpages.pl @@ -0,0 +1,84 @@ +#!/usr/bin/perl +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2005-2021 IPFire Team # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see http://www.gnu.org/licenses/. # +# # +###############################################################################
+use strict; +#use warnings;
+# Import make.sh environment +my $basedir = $ENV{'BASEDIR'};
+# Load configuration file (General::readhash isn't available yet) +my $configfile = "${basedir}/config/cfgroot/manualpages"; +my %manualpages = ();
+open(my $file, "<", $configfile) or die "ERROR: Can't read from file '$configfile'!\n"; +while(my $line = <$file>) {
- $line =~ s/\R//g;
- next unless($line =~ /=/);
- my($left, $value) = split(/=/, $line, 2);
- if($left =~ /(^[A-Za-z0-9_-]+$)/) {
my $key = $1; # Got alphanumeric key
$manualpages{$key} = $value;
- }
+} +close($file);
+# Check configuration +if(! defined $manualpages{'BASE_URL'}) {
- die "ERROR: User manual base URL not configured!\n";
+} +my $baseurl = $manualpages{'BASE_URL'}; +delete $manualpages{'BASE_URL'};
+if ($baseurl =~ //\s*$/) {
- die "ERROR: User manual base URL must not end with a slash!\n";
+}
+# Loop trough configured manual pages +foreach my $page (keys %manualpages) {
- # Build absolute path and URL
- my $cgifile = "${basedir}/html/cgi-bin/${page}.cgi";
- my $url = "${baseurl}/$manualpages{$page}";
- print "${page}.cgi -> '$url'\n";
- # Check CGI file exists
- if(! -f $cgifile) {
print "WARNING: Obsolete link, page '$cgifile' doesn't exist!\n";
- }
- # Check obvious invalid characters
- if($url =~ /[^[:graph:]]/) {
die("ERROR: URL contains invalid characters!\n");
- }
- # Check HTTP 200 "OK" result, follow up to 1 redirect (e.g. HTTP -> HTTPS)
- my $status = `curl --silent --show-error --output /dev/null --location --max-redirs 1 --max-time 10 --write-out "%{http_code}" --url "${url}"`;
- if($status != 200) {
die("ERROR: Received unexpected HTTP '$status'!\n");
- }
- print "SUCCESS: Received HTTP '$status'.\n";
+}
+# Clean exit +exit 0;
This patch fixes two wrong translations now used by the new user manual links feature and removes an abandoned constant.
Signed-off-by: Leo-Andres Hofmann hofmann@leo-andres.de --- config/cfgroot/general-functions.pl | 1 - langs/de/cgi-bin/de.pl | 2 +- langs/fr/cgi-bin/fr.pl | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/config/cfgroot/general-functions.pl b/config/cfgroot/general-functions.pl index de608e38b..355f8d372 100644 --- a/config/cfgroot/general-functions.pl +++ b/config/cfgroot/general-functions.pl @@ -24,7 +24,6 @@ $|=1; # line buffering $General::version = 'VERSION'; $General::swroot = 'CONFIG_ROOT'; $General::noipprefix = 'noipg-'; -$General::adminmanualurl = 'http://wiki.ipfire.org';
require "${General::swroot}/network-functions.pl";
diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl index 70dcb10a6..ba57698e7 100644 --- a/langs/de/cgi-bin/de.pl +++ b/langs/de/cgi-bin/de.pl @@ -1828,7 +1828,7 @@ 'one month' => 'Ein Monat', 'one week' => 'Eine Woche', 'one year' => 'Ein Jahr', -'online help en' => 'Online-Hilfe (auf Deutsch)', +'online help en' => 'Online-Hilfe (auf Englisch)', 'only digits allowed in holdoff field' => 'Im Holdoff-Feld sind nur Ziffern erlaubt', 'only digits allowed in max retries field' => 'Im Feld "Maximale Wiederholversuche" sind nur Ziffern erlaubt.', 'only digits allowed in the idle timeout' => 'Im Feld "Leerlauf-Wartezeit" sind nur Ziffern erlaubt.', diff --git a/langs/fr/cgi-bin/fr.pl b/langs/fr/cgi-bin/fr.pl index 7f8239773..43dafe73d 100644 --- a/langs/fr/cgi-bin/fr.pl +++ b/langs/fr/cgi-bin/fr.pl @@ -1869,7 +1869,7 @@ 'one month' => 'Un mois', 'one week' => 'Une semaine', 'one year' => 'Un an', -'online help en' => 'Aide en ligne (en français)', +'online help en' => 'Aide en ligne (en anglais)', 'only digits allowed in holdoff field' => 'Seuls les chiffres sont autorisés dans le champ holdoff', 'only digits allowed in max retries field' => 'Seuls les chiffres sont autorisés dans le champ nombre d'essais maximum.', 'only digits allowed in the idle timeout' => 'Seuls les chiffres sont autorisés pour le délai d'inactivité.',
Reviewed-by: Bernhard Bitsch bbitsch@ipfire.org Tested-by: Bernhard Bitsch bbitsch@ipfire.org
Am 28.09.2021 um 13:09 schrieb Leo-Andres Hofmann:
This patch fixes two wrong translations now used by the new user manual links feature and removes an abandoned constant.
Signed-off-by: Leo-Andres Hofmann hofmann@leo-andres.de
config/cfgroot/general-functions.pl | 1 - langs/de/cgi-bin/de.pl | 2 +- langs/fr/cgi-bin/fr.pl | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/config/cfgroot/general-functions.pl b/config/cfgroot/general-functions.pl index de608e38b..355f8d372 100644 --- a/config/cfgroot/general-functions.pl +++ b/config/cfgroot/general-functions.pl @@ -24,7 +24,6 @@ $|=1; # line buffering $General::version = 'VERSION'; $General::swroot = 'CONFIG_ROOT'; $General::noipprefix = 'noipg-'; -$General::adminmanualurl = 'http://wiki.ipfire.org';
require "${General::swroot}/network-functions.pl";
diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl index 70dcb10a6..ba57698e7 100644 --- a/langs/de/cgi-bin/de.pl +++ b/langs/de/cgi-bin/de.pl @@ -1828,7 +1828,7 @@ 'one month' => 'Ein Monat', 'one week' => 'Eine Woche', 'one year' => 'Ein Jahr', -'online help en' => 'Online-Hilfe (auf Deutsch)', +'online help en' => 'Online-Hilfe (auf Englisch)', 'only digits allowed in holdoff field' => 'Im Holdoff-Feld sind nur Ziffern erlaubt', 'only digits allowed in max retries field' => 'Im Feld "Maximale Wiederholversuche" sind nur Ziffern erlaubt.', 'only digits allowed in the idle timeout' => 'Im Feld "Leerlauf-Wartezeit" sind nur Ziffern erlaubt.', diff --git a/langs/fr/cgi-bin/fr.pl b/langs/fr/cgi-bin/fr.pl index 7f8239773..43dafe73d 100644 --- a/langs/fr/cgi-bin/fr.pl +++ b/langs/fr/cgi-bin/fr.pl @@ -1869,7 +1869,7 @@ 'one month' => 'Un mois', 'one week' => 'Une semaine', 'one year' => 'Un an', -'online help en' => 'Aide en ligne (en français)', +'online help en' => 'Aide en ligne (en anglais)', 'only digits allowed in holdoff field' => 'Seuls les chiffres sont autorisés dans le champ holdoff', 'only digits allowed in max retries field' => 'Seuls les chiffres sont autorisés dans le champ nombre d'essais maximum.', 'only digits allowed in the idle timeout' => 'Seuls les chiffres sont autorisés pour le délai d'inactivité.',
Reviewed-by: Bernhard Bitsch bbitsch@ipfire.org Tested-by: Bernhard Bitsch bbitsch@ipfire.org
Am 28.09.2021 um 13:09 schrieb Leo-Andres Hofmann:
This patch adds a little "help" icon to the page header. If a manual entry exists for a configuration page, the icon appears and offers a quick way to access the wiki. Wiki pages can be configured in the "manualpages" file.
Signed-off-by: Leo-Andres Hofmann hofmann@leo-andres.de
config/cfgroot/header.pl | 20 +++++++++++++++++++ config/cfgroot/manualpages | 7 +++++++ html/html/themes/ipfire/include/css/style.css | 13 ++++++++++++ html/html/themes/ipfire/include/functions.pl | 17 +++++++++++++++- 4 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 config/cfgroot/manualpages
diff --git a/config/cfgroot/header.pl b/config/cfgroot/header.pl index 79accbe8a..e97f90d67 100644 --- a/config/cfgroot/header.pl +++ b/config/cfgroot/header.pl @@ -91,7 +91,11 @@ if ( -d "/var/ipfire/langs/${language}/" ) { }; };
+### Initialize user manual +my %manualpages = (); +&General::readhash("${General::swroot}/main/manualpages", %manualpages);
+### Load selected language and theme functions require "${swroot}/langs/en.pl"; require "${swroot}/langs/${language}.pl"; eval `/bin/cat /srv/web/ipfire/html/themes/ipfire/include/functions.pl`; @@ -553,3 +557,19 @@ sub colorize { return $string; } }
+# Get user manual URL for the specified configuration page, returns empty if no entry is configured +sub get_manualpage_url() {
- my ($cgi_page) = @_;
- # Ensure base url is configured
- return unless($manualpages{'BASE_URL'});
- # Return URL
- if($cgi_page && defined($manualpages{$cgi_page})) {
return "$manualpages{'BASE_URL'}/$manualpages{$cgi_page}";
- }
- # No manual page configured, return nothing
- return;
+} diff --git a/config/cfgroot/manualpages b/config/cfgroot/manualpages new file mode 100644 index 000000000..e5ab1a13c --- /dev/null +++ b/config/cfgroot/manualpages @@ -0,0 +1,7 @@ +# User manual base URL (without trailing slash) +BASE_URL=https://wiki.ipfire.org
+# Assign manual page URL path to CGI file ([cgi basename]=[path/to/page]) +index=configuration/system/startpage +pppsetup=configuration/system/dial +qos=configuration/services/qos diff --git a/html/html/themes/ipfire/include/css/style.css b/html/html/themes/ipfire/include/css/style.css index b92f476c4..661773675 100644 --- a/html/html/themes/ipfire/include/css/style.css +++ b/html/html/themes/ipfire/include/css/style.css @@ -169,6 +169,19 @@ iframe { margin-bottom: 1em; }
+#main_header > * {
- display: inline-block;
- vertical-align: baseline;
+}
+#main_header > span {
- margin-left: 0.8em;
+}
+#main_header img {
- padding: 0;
+}
- #footer { height: 2.5em; margin-bottom: 1em;
diff --git a/html/html/themes/ipfire/include/functions.pl b/html/html/themes/ipfire/include/functions.pl index 9f12bbe59..18931428e 100644 --- a/html/html/themes/ipfire/include/functions.pl +++ b/html/html/themes/ipfire/include/functions.pl @@ -170,7 +170,22 @@ END print <<END
<div class="bigbox fixed"> <div id="main_inner" class="fixed"> - <h1>$title</h1> + <div id="main_header"> + <h1>$title</h1> +END +; + +# Print user manual link +my $manual_url = &Header::get_manualpage_url($scriptName); +if($manual_url) { + print <<END + <span><a href="$manual_url" title="$Lang::tr{'online help en'}" target="_blank"><img src="/images/help-browser.png" alt="$Lang::tr{'online help en'}"></a></span> +END +; +} + +print <<END + </div> END ; }
Hi all,
@Bernhard, Thank you again for testing this patch!
@Jon, This is the file format of the manualpages configuration:
[cgi basename]=[path/to/page]
For example:
BASE_URL=https://wiki.ipfire.org index=configuration/system/startpage
Results in "index.cgi" linking to "https://wiki.ipfire.org/configuration/system/startpage". Please note that the path does not start with a slash, because the get_manualpage_url function always adds one between the base url and the path.
Unfortunately, I couldn't figure out how to include all this in the installer and I need help with that. So I would suggest we wait until this has been approved and integrated.
Regards, Leo
Am 28.09.2021 um 14:55 schrieb Bernhard Bitsch:
Reviewed-by: Bernhard Bitsch bbitsch@ipfire.org Tested-by: Bernhard Bitsch bbitsch@ipfire.org
Am 28.09.2021 um 13:09 schrieb Leo-Andres Hofmann:
This patch adds a little "help" icon to the page header. If a manual entry exists for a configuration page, the icon appears and offers a quick way to access the wiki. Wiki pages can be configured in the "manualpages" file.
Signed-off-by: Leo-Andres Hofmann hofmann@leo-andres.de
config/cfgroot/header.pl | 20 +++++++++++++++++++ config/cfgroot/manualpages | 7 +++++++ html/html/themes/ipfire/include/css/style.css | 13 ++++++++++++ html/html/themes/ipfire/include/functions.pl | 17 +++++++++++++++- 4 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 config/cfgroot/manualpages
diff --git a/config/cfgroot/header.pl b/config/cfgroot/header.pl index 79accbe8a..e97f90d67 100644 --- a/config/cfgroot/header.pl +++ b/config/cfgroot/header.pl @@ -91,7 +91,11 @@ if ( -d "/var/ipfire/langs/${language}/" ) { }; }; +### Initialize user manual +my %manualpages = (); +&General::readhash("${General::swroot}/main/manualpages", %manualpages); +### Load selected language and theme functions require "${swroot}/langs/en.pl"; require "${swroot}/langs/${language}.pl"; eval `/bin/cat /srv/web/ipfire/html/themes/ipfire/include/functions.pl`; @@ -553,3 +557,19 @@ sub colorize { return $string; } }
+# Get user manual URL for the specified configuration page, returns empty if no entry is configured +sub get_manualpage_url() { + my ($cgi_page) = @_;
+ # Ensure base url is configured + return unless($manualpages{'BASE_URL'});
+ # Return URL + if($cgi_page && defined($manualpages{$cgi_page})) { + return "$manualpages{'BASE_URL'}/$manualpages{$cgi_page}"; + }
+ # No manual page configured, return nothing + return; +} diff --git a/config/cfgroot/manualpages b/config/cfgroot/manualpages new file mode 100644 index 000000000..e5ab1a13c --- /dev/null +++ b/config/cfgroot/manualpages @@ -0,0 +1,7 @@ +# User manual base URL (without trailing slash) +BASE_URL=https://wiki.ipfire.org
+# Assign manual page URL path to CGI file ([cgi basename]=[path/to/page]) +index=configuration/system/startpage +pppsetup=configuration/system/dial +qos=configuration/services/qos diff --git a/html/html/themes/ipfire/include/css/style.css b/html/html/themes/ipfire/include/css/style.css index b92f476c4..661773675 100644 --- a/html/html/themes/ipfire/include/css/style.css +++ b/html/html/themes/ipfire/include/css/style.css @@ -169,6 +169,19 @@ iframe { margin-bottom: 1em; } +#main_header > * { + display: inline-block; + vertical-align: baseline; +}
+#main_header > span { + margin-left: 0.8em; +}
+#main_header img { + padding: 0; +}
#footer { height: 2.5em; margin-bottom: 1em; diff --git a/html/html/themes/ipfire/include/functions.pl b/html/html/themes/ipfire/include/functions.pl index 9f12bbe59..18931428e 100644 --- a/html/html/themes/ipfire/include/functions.pl +++ b/html/html/themes/ipfire/include/functions.pl @@ -170,7 +170,22 @@ END print <<END <div class="bigbox fixed"> <div id="main_inner" class="fixed"> - <h1>$title</h1> + <div id="main_header"> + <h1>$title</h1> +END +;
+# Print user manual link +my $manual_url = &Header::get_manualpage_url($scriptName); +if($manual_url) { + print <<END + <span><a href="$manual_url" title="$Lang::tr{'online help en'}" target="_blank"><img src="/images/help-browser.png" alt="$Lang::tr{'online help en'}"></a></span> +END +; +}
+print <<END + </div> END ; }
Hi all,
Am 04.10.2021 um 19:42 schrieb Leo Hofmann:
Hi all,
@Bernhard, Thank you again for testing this patch!
@Jon, This is the file format of the manualpages configuration:
[cgi basename]=[path/to/page]
For example:
BASE_URL=https://wiki.ipfire.org index=configuration/system/startpage
Results in "index.cgi" linking to "https://wiki.ipfire.org/configuration/system/startpage". Please note that the path does not start with a slash, because the get_manualpage_url function always adds one between the base url and the path.
Unfortunately, I couldn't figure out how to include all this in the installer and I need help with that.
Another part is the sampling of all help pages. Should this be done in several patches for different pages or by collecting the contributions by one person ( Leo? ), which submit one patch? ( I've applied the mechanism to other pages, yet. And are very satisfied with it! Great idea! )
Regards, Bernhard
So I would suggest we wait until this has been approved and integrated.
Regards, Leo
Am 28.09.2021 um 14:55 schrieb Bernhard Bitsch:
Reviewed-by: Bernhard Bitsch bbitsch@ipfire.org Tested-by: Bernhard Bitsch bbitsch@ipfire.org
Am 28.09.2021 um 13:09 schrieb Leo-Andres Hofmann:
This patch adds a little "help" icon to the page header. If a manual entry exists for a configuration page, the icon appears and offers a quick way to access the wiki. Wiki pages can be configured in the "manualpages" file.
Signed-off-by: Leo-Andres Hofmann hofmann@leo-andres.de
config/cfgroot/header.pl | 20 +++++++++++++++++++ config/cfgroot/manualpages | 7 +++++++ html/html/themes/ipfire/include/css/style.css | 13 ++++++++++++ html/html/themes/ipfire/include/functions.pl | 17 +++++++++++++++- 4 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 config/cfgroot/manualpages
diff --git a/config/cfgroot/header.pl b/config/cfgroot/header.pl index 79accbe8a..e97f90d67 100644 --- a/config/cfgroot/header.pl +++ b/config/cfgroot/header.pl @@ -91,7 +91,11 @@ if ( -d "/var/ipfire/langs/${language}/" ) { }; }; +### Initialize user manual +my %manualpages = (); +&General::readhash("${General::swroot}/main/manualpages", %manualpages); +### Load selected language and theme functions require "${swroot}/langs/en.pl"; require "${swroot}/langs/${language}.pl"; eval `/bin/cat /srv/web/ipfire/html/themes/ipfire/include/functions.pl`; @@ -553,3 +557,19 @@ sub colorize { return $string; } }
+# Get user manual URL for the specified configuration page, returns empty if no entry is configured +sub get_manualpage_url() { + my ($cgi_page) = @_;
+ # Ensure base url is configured + return unless($manualpages{'BASE_URL'});
+ # Return URL + if($cgi_page && defined($manualpages{$cgi_page})) { + return "$manualpages{'BASE_URL'}/$manualpages{$cgi_page}"; + }
+ # No manual page configured, return nothing + return; +} diff --git a/config/cfgroot/manualpages b/config/cfgroot/manualpages new file mode 100644 index 000000000..e5ab1a13c --- /dev/null +++ b/config/cfgroot/manualpages @@ -0,0 +1,7 @@ +# User manual base URL (without trailing slash) +BASE_URL=https://wiki.ipfire.org
+# Assign manual page URL path to CGI file ([cgi basename]=[path/to/page]) +index=configuration/system/startpage +pppsetup=configuration/system/dial +qos=configuration/services/qos diff --git a/html/html/themes/ipfire/include/css/style.css b/html/html/themes/ipfire/include/css/style.css index b92f476c4..661773675 100644 --- a/html/html/themes/ipfire/include/css/style.css +++ b/html/html/themes/ipfire/include/css/style.css @@ -169,6 +169,19 @@ iframe { margin-bottom: 1em; } +#main_header > * { + display: inline-block; + vertical-align: baseline; +}
+#main_header > span { + margin-left: 0.8em; +}
+#main_header img { + padding: 0; +}
#footer { height: 2.5em; margin-bottom: 1em; diff --git a/html/html/themes/ipfire/include/functions.pl b/html/html/themes/ipfire/include/functions.pl index 9f12bbe59..18931428e 100644 --- a/html/html/themes/ipfire/include/functions.pl +++ b/html/html/themes/ipfire/include/functions.pl @@ -170,7 +170,22 @@ END print <<END <div class="bigbox fixed"> <div id="main_inner" class="fixed"> - <h1>$title</h1> + <div id="main_header"> + <h1>$title</h1> +END +;
+# Print user manual link +my $manual_url = &Header::get_manualpage_url($scriptName); +if($manual_url) { + print <<END + <span><a href="$manual_url" title="$Lang::tr{'online help en'}" target="_blank"><img src="/images/help-browser.png" alt="$Lang::tr{'online help en'}"></a></span> +END +; +}
+print <<END + </div> END ; }
Hi,
Am 04.10.2021 um 22:34 schrieb Bernhard Bitsch:
Hi all,
Am 04.10.2021 um 19:42 schrieb Leo Hofmann:
Hi all,
@Bernhard, Thank you again for testing this patch!
@Jon, This is the file format of the manualpages configuration:
[cgi basename]=[path/to/page]
For example:
> BASE_URL=https://wiki.ipfire.org > index=configuration/system/startpage
Results in "index.cgi" linking to "https://wiki.ipfire.org/configuration/system/startpage". Please note that the path does not start with a slash, because the get_manualpage_url function always adds one between the base url and the path.
Unfortunately, I couldn't figure out how to include all this in the installer and I need help with that.
Another part is the sampling of all help pages. Should this be done in several patches for different pages or by collecting the contributions by one person ( Leo? ), which submit one patch?
I suggest everyone sends their contribution as a patch so that git shows the correct author later on. But if that doesn't work, of course I'm happy to collect everything!
( I've applied the mechanism to other pages, yet. And are very satisfied with it! Great idea! )
:)
Regards, Bernhard
Regards, Leo
So I would suggest we wait until this has been approved and integrated.
Regards, Leo
Am 28.09.2021 um 14:55 schrieb Bernhard Bitsch:
Reviewed-by: Bernhard Bitsch bbitsch@ipfire.org Tested-by: Bernhard Bitsch bbitsch@ipfire.org
Am 28.09.2021 um 13:09 schrieb Leo-Andres Hofmann:
This patch adds a little "help" icon to the page header. If a manual entry exists for a configuration page, the icon appears and offers a quick way to access the wiki. Wiki pages can be configured in the "manualpages" file.
Signed-off-by: Leo-Andres Hofmann hofmann@leo-andres.de
config/cfgroot/header.pl | 20 +++++++++++++++++++ config/cfgroot/manualpages | 7 +++++++ html/html/themes/ipfire/include/css/style.css | 13 ++++++++++++ html/html/themes/ipfire/include/functions.pl | 17 +++++++++++++++- 4 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 config/cfgroot/manualpages
diff --git a/config/cfgroot/header.pl b/config/cfgroot/header.pl index 79accbe8a..e97f90d67 100644 --- a/config/cfgroot/header.pl +++ b/config/cfgroot/header.pl @@ -91,7 +91,11 @@ if ( -d "/var/ipfire/langs/${language}/" ) { }; }; +### Initialize user manual +my %manualpages = (); +&General::readhash("${General::swroot}/main/manualpages", %manualpages); +### Load selected language and theme functions require "${swroot}/langs/en.pl"; require "${swroot}/langs/${language}.pl"; eval `/bin/cat /srv/web/ipfire/html/themes/ipfire/include/functions.pl`; @@ -553,3 +557,19 @@ sub colorize { return $string; } }
+# Get user manual URL for the specified configuration page, returns empty if no entry is configured +sub get_manualpage_url() { + my ($cgi_page) = @_;
+ # Ensure base url is configured + return unless($manualpages{'BASE_URL'});
+ # Return URL + if($cgi_page && defined($manualpages{$cgi_page})) { + return "$manualpages{'BASE_URL'}/$manualpages{$cgi_page}"; + }
+ # No manual page configured, return nothing + return; +} diff --git a/config/cfgroot/manualpages b/config/cfgroot/manualpages new file mode 100644 index 000000000..e5ab1a13c --- /dev/null +++ b/config/cfgroot/manualpages @@ -0,0 +1,7 @@ +# User manual base URL (without trailing slash) +BASE_URL=https://wiki.ipfire.org
+# Assign manual page URL path to CGI file ([cgi basename]=[path/to/page]) +index=configuration/system/startpage +pppsetup=configuration/system/dial +qos=configuration/services/qos diff --git a/html/html/themes/ipfire/include/css/style.css b/html/html/themes/ipfire/include/css/style.css index b92f476c4..661773675 100644 --- a/html/html/themes/ipfire/include/css/style.css +++ b/html/html/themes/ipfire/include/css/style.css @@ -169,6 +169,19 @@ iframe { margin-bottom: 1em; } +#main_header > * { + display: inline-block; + vertical-align: baseline; +}
+#main_header > span { + margin-left: 0.8em; +}
+#main_header img { + padding: 0; +}
#footer { height: 2.5em; margin-bottom: 1em; diff --git a/html/html/themes/ipfire/include/functions.pl b/html/html/themes/ipfire/include/functions.pl index 9f12bbe59..18931428e 100644 --- a/html/html/themes/ipfire/include/functions.pl +++ b/html/html/themes/ipfire/include/functions.pl @@ -170,7 +170,22 @@ END print <<END <div class="bigbox fixed"> <div id="main_inner" class="fixed"> - <h1>$title</h1> + <div id="main_header"> + <h1>$title</h1> +END +;
+# Print user manual link +my $manual_url = &Header::get_manualpage_url($scriptName); +if($manual_url) { + print <<END + <span><a href="$manual_url" title="$Lang::tr{'online help en'}" target="_blank"><img src="/images/help-browser.png" alt="$Lang::tr{'online help en'}"></a></span> +END +; +}
+print <<END + </div> END ; }
Here is a quick template to get started:
I'll keep going tomorrow.
Jon
On Oct 4, 2021, at 12:42 PM, Leo Hofmann hofmann@leo-andres.de wrote:
Hi all,
@Bernhard, Thank you again for testing this patch!
@Jon, This is the file format of the manualpages configuration:
[cgi basename]=[path/to/page]
For example:
BASE_URL=https://wiki.ipfire.org index=configuration/system/startpage
Results in "index.cgi" linking to "https://wiki.ipfire.org/configuration/system/startpage". Please note that the path does not start with a slash, because the get_manualpage_url function always adds one between the base url and the path.
Unfortunately, I couldn't figure out how to include all this in the installer and I need help with that. So I would suggest we wait until this has been approved and integrated.
Regards, Leo
Am 28.09.2021 um 14:55 schrieb Bernhard Bitsch:
Reviewed-by: Bernhard Bitsch bbitsch@ipfire.org Tested-by: Bernhard Bitsch bbitsch@ipfire.org
Am 28.09.2021 um 13:09 schrieb Leo-Andres Hofmann:
This patch adds a little "help" icon to the page header. If a manual entry exists for a configuration page, the icon appears and offers a quick way to access the wiki. Wiki pages can be configured in the "manualpages" file.
Signed-off-by: Leo-Andres Hofmann hofmann@leo-andres.de
config/cfgroot/header.pl | 20 +++++++++++++++++++ config/cfgroot/manualpages | 7 +++++++ html/html/themes/ipfire/include/css/style.css | 13 ++++++++++++ html/html/themes/ipfire/include/functions.pl | 17 +++++++++++++++- 4 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 config/cfgroot/manualpages
diff --git a/config/cfgroot/header.pl b/config/cfgroot/header.pl index 79accbe8a..e97f90d67 100644 --- a/config/cfgroot/header.pl +++ b/config/cfgroot/header.pl @@ -91,7 +91,11 @@ if ( -d "/var/ipfire/langs/${language}/" ) { }; }; +### Initialize user manual +my %manualpages = (); +&General::readhash("${General::swroot}/main/manualpages", %manualpages); +### Load selected language and theme functions require "${swroot}/langs/en.pl"; require "${swroot}/langs/${language}.pl"; eval `/bin/cat /srv/web/ipfire/html/themes/ipfire/include/functions.pl`; @@ -553,3 +557,19 @@ sub colorize { return $string; } }
+# Get user manual URL for the specified configuration page, returns empty if no entry is configured +sub get_manualpage_url() {
- my ($cgi_page) = @_;
- # Ensure base url is configured
- return unless($manualpages{'BASE_URL'});
- # Return URL
- if($cgi_page && defined($manualpages{$cgi_page})) {
return "$manualpages{'BASE_URL'}/$manualpages{$cgi_page}";
- }
- # No manual page configured, return nothing
- return;
+} diff --git a/config/cfgroot/manualpages b/config/cfgroot/manualpages new file mode 100644 index 000000000..e5ab1a13c --- /dev/null +++ b/config/cfgroot/manualpages @@ -0,0 +1,7 @@ +# User manual base URL (without trailing slash) +BASE_URL=https://wiki.ipfire.org
+# Assign manual page URL path to CGI file ([cgi basename]=[path/to/page]) +index=configuration/system/startpage +pppsetup=configuration/system/dial +qos=configuration/services/qos diff --git a/html/html/themes/ipfire/include/css/style.css b/html/html/themes/ipfire/include/css/style.css index b92f476c4..661773675 100644 --- a/html/html/themes/ipfire/include/css/style.css +++ b/html/html/themes/ipfire/include/css/style.css @@ -169,6 +169,19 @@ iframe { margin-bottom: 1em; } +#main_header > * {
- display: inline-block;
- vertical-align: baseline;
+}
+#main_header > span {
- margin-left: 0.8em;
+}
+#main_header img {
- padding: 0;
+}
- #footer { height: 2.5em; margin-bottom: 1em;
diff --git a/html/html/themes/ipfire/include/functions.pl b/html/html/themes/ipfire/include/functions.pl index 9f12bbe59..18931428e 100644 --- a/html/html/themes/ipfire/include/functions.pl +++ b/html/html/themes/ipfire/include/functions.pl @@ -170,7 +170,22 @@ END print <<END <div class="bigbox fixed"> <div id="main_inner" class="fixed">
<h1>$title</h1>
<div id="main_header">
<h1>$title</h1>
+END +;
+# Print user manual link +my $manual_url = &Header::get_manualpage_url($scriptName); +if($manual_url) {
- print <<END
<span><a href="$manual_url" title="$Lang::tr{'online help en'}" target="_blank"><img src="/images/help-browser.png" alt="$Lang::tr{'online help en'}"></a></span>
+END +; +}
+print <<END
END ; }</div>
Leo,
This should be complete. But I don't know how to test.
Jon
On Oct 4, 2021, at 10:40 PM, Jon Murphy jcmurphy26@gmail.com wrote:
Here is a quick template to get started:
<manualpages>
I'll keep going tomorrow.
Jon
On Oct 4, 2021, at 12:42 PM, Leo Hofmann hofmann@leo-andres.de wrote:
Hi all,
@Bernhard, Thank you again for testing this patch!
@Jon, This is the file format of the manualpages configuration:
[cgi basename]=[path/to/page]
For example:
BASE_URL=https://wiki.ipfire.org index=configuration/system/startpage
Results in "index.cgi" linking to "https://wiki.ipfire.org/configuration/system/startpage". Please note that the path does not start with a slash, because the get_manualpage_url function always adds one between the base url and the path.
Unfortunately, I couldn't figure out how to include all this in the installer and I need help with that. So I would suggest we wait until this has been approved and integrated.
Regards, Leo
Am 28.09.2021 um 14:55 schrieb Bernhard Bitsch:
Reviewed-by: Bernhard Bitsch bbitsch@ipfire.org Tested-by: Bernhard Bitsch bbitsch@ipfire.org
Am 28.09.2021 um 13:09 schrieb Leo-Andres Hofmann:
This patch adds a little "help" icon to the page header. If a manual entry exists for a configuration page, the icon appears and offers a quick way to access the wiki. Wiki pages can be configured in the "manualpages" file.
Signed-off-by: Leo-Andres Hofmann hofmann@leo-andres.de
config/cfgroot/header.pl | 20 +++++++++++++++++++ config/cfgroot/manualpages | 7 +++++++ html/html/themes/ipfire/include/css/style.css | 13 ++++++++++++ html/html/themes/ipfire/include/functions.pl | 17 +++++++++++++++- 4 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 config/cfgroot/manualpages
diff --git a/config/cfgroot/header.pl b/config/cfgroot/header.pl index 79accbe8a..e97f90d67 100644 --- a/config/cfgroot/header.pl +++ b/config/cfgroot/header.pl @@ -91,7 +91,11 @@ if ( -d "/var/ipfire/langs/${language}/" ) { }; }; +### Initialize user manual +my %manualpages = (); +&General::readhash("${General::swroot}/main/manualpages", %manualpages); +### Load selected language and theme functions require "${swroot}/langs/en.pl"; require "${swroot}/langs/${language}.pl"; eval `/bin/cat /srv/web/ipfire/html/themes/ipfire/include/functions.pl`; @@ -553,3 +557,19 @@ sub colorize { return $string; } }
+# Get user manual URL for the specified configuration page, returns empty if no entry is configured +sub get_manualpage_url() {
- my ($cgi_page) = @_;
- # Ensure base url is configured
- return unless($manualpages{'BASE_URL'});
- # Return URL
- if($cgi_page && defined($manualpages{$cgi_page})) {
return "$manualpages{'BASE_URL'}/$manualpages{$cgi_page}";
- }
- # No manual page configured, return nothing
- return;
+} diff --git a/config/cfgroot/manualpages b/config/cfgroot/manualpages new file mode 100644 index 000000000..e5ab1a13c --- /dev/null +++ b/config/cfgroot/manualpages @@ -0,0 +1,7 @@ +# User manual base URL (without trailing slash) +BASE_URL=https://wiki.ipfire.org
+# Assign manual page URL path to CGI file ([cgi basename]=[path/to/page]) +index=configuration/system/startpage +pppsetup=configuration/system/dial +qos=configuration/services/qos diff --git a/html/html/themes/ipfire/include/css/style.css b/html/html/themes/ipfire/include/css/style.css index b92f476c4..661773675 100644 --- a/html/html/themes/ipfire/include/css/style.css +++ b/html/html/themes/ipfire/include/css/style.css @@ -169,6 +169,19 @@ iframe { margin-bottom: 1em; } +#main_header > * {
- display: inline-block;
- vertical-align: baseline;
+}
+#main_header > span {
- margin-left: 0.8em;
+}
+#main_header img {
- padding: 0;
+}
#footer { height: 2.5em; margin-bottom: 1em; diff --git a/html/html/themes/ipfire/include/functions.pl b/html/html/themes/ipfire/include/functions.pl index 9f12bbe59..18931428e 100644 --- a/html/html/themes/ipfire/include/functions.pl +++ b/html/html/themes/ipfire/include/functions.pl @@ -170,7 +170,22 @@ END print <<END <div class="bigbox fixed"> <div id="main_inner" class="fixed">
<h1>$title</h1>
<div id="main_header">
<h1>$title</h1>
+END +;
+# Print user manual link +my $manual_url = &Header::get_manualpage_url($scriptName); +if($manual_url) {
- print <<END
<span><a href="$manual_url" title="$Lang::tr{'online help en'}" target="_blank"><img src="/images/help-browser.png" alt="$Lang::tr{'online help en'}"></a></span>
+END +; +}
+print <<END
</div>
END ; }
Hi,
I've just included the file into my system. There are no problems. So a new patch with this file can start the formal verification and test process.
The original patch has some flaws ( function name, location in source ) I will comment in an extra answer.
Regards, Bernhard
Am 06.10.2021 um 05:18 schrieb Jon Murphy:
Leo,
This should be complete. But I don't know how to test.
Jon
On Oct 4, 2021, at 10:40 PM, Jon Murphy jcmurphy26@gmail.com wrote:
Here is a quick template to get started:
<manualpages>
I'll keep going tomorrow.
Jon
On Oct 4, 2021, at 12:42 PM, Leo Hofmann hofmann@leo-andres.de wrote:
Hi all,
@Bernhard, Thank you again for testing this patch!
@Jon, This is the file format of the manualpages configuration:
[cgi basename]=[path/to/page]
For example:
BASE_URL=https://wiki.ipfire.org index=configuration/system/startpage
Results in "index.cgi" linking to "https://wiki.ipfire.org/configuration/system/startpage". Please note that the path does not start with a slash, because the get_manualpage_url function always adds one between the base url and the path.
Unfortunately, I couldn't figure out how to include all this in the installer and I need help with that. So I would suggest we wait until this has been approved and integrated.
Regards, Leo
Am 28.09.2021 um 14:55 schrieb Bernhard Bitsch:
Reviewed-by: Bernhard Bitsch bbitsch@ipfire.org Tested-by: Bernhard Bitsch bbitsch@ipfire.org
Am 28.09.2021 um 13:09 schrieb Leo-Andres Hofmann:
This patch adds a little "help" icon to the page header. If a manual entry exists for a configuration page, the icon appears and offers a quick way to access the wiki. Wiki pages can be configured in the "manualpages" file.
Signed-off-by: Leo-Andres Hofmann hofmann@leo-andres.de
config/cfgroot/header.pl | 20 +++++++++++++++++++ config/cfgroot/manualpages | 7 +++++++ html/html/themes/ipfire/include/css/style.css | 13 ++++++++++++ html/html/themes/ipfire/include/functions.pl | 17 +++++++++++++++- 4 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 config/cfgroot/manualpages
diff --git a/config/cfgroot/header.pl b/config/cfgroot/header.pl index 79accbe8a..e97f90d67 100644 --- a/config/cfgroot/header.pl +++ b/config/cfgroot/header.pl @@ -91,7 +91,11 @@ if ( -d "/var/ipfire/langs/${language}/" ) { }; }; +### Initialize user manual +my %manualpages = (); +&General::readhash("${General::swroot}/main/manualpages", %manualpages); +### Load selected language and theme functions require "${swroot}/langs/en.pl"; require "${swroot}/langs/${language}.pl"; eval `/bin/cat /srv/web/ipfire/html/themes/ipfire/include/functions.pl`; @@ -553,3 +557,19 @@ sub colorize { return $string; } }
+# Get user manual URL for the specified configuration page, returns empty if no entry is configured +sub get_manualpage_url() {
- my ($cgi_page) = @_;
- # Ensure base url is configured
- return unless($manualpages{'BASE_URL'});
- # Return URL
- if($cgi_page && defined($manualpages{$cgi_page})) {
return "$manualpages{'BASE_URL'}/$manualpages{$cgi_page}";
- }
- # No manual page configured, return nothing
- return;
+} diff --git a/config/cfgroot/manualpages b/config/cfgroot/manualpages new file mode 100644 index 000000000..e5ab1a13c --- /dev/null +++ b/config/cfgroot/manualpages @@ -0,0 +1,7 @@ +# User manual base URL (without trailing slash) +BASE_URL=https://wiki.ipfire.org
+# Assign manual page URL path to CGI file ([cgi basename]=[path/to/page]) +index=configuration/system/startpage +pppsetup=configuration/system/dial +qos=configuration/services/qos diff --git a/html/html/themes/ipfire/include/css/style.css b/html/html/themes/ipfire/include/css/style.css index b92f476c4..661773675 100644 --- a/html/html/themes/ipfire/include/css/style.css +++ b/html/html/themes/ipfire/include/css/style.css @@ -169,6 +169,19 @@ iframe { margin-bottom: 1em; } +#main_header > * {
- display: inline-block;
- vertical-align: baseline;
+}
+#main_header > span {
- margin-left: 0.8em;
+}
+#main_header img {
- padding: 0;
+}
- #footer { height: 2.5em; margin-bottom: 1em;
diff --git a/html/html/themes/ipfire/include/functions.pl b/html/html/themes/ipfire/include/functions.pl index 9f12bbe59..18931428e 100644 --- a/html/html/themes/ipfire/include/functions.pl +++ b/html/html/themes/ipfire/include/functions.pl @@ -170,7 +170,22 @@ END print <<END <div class="bigbox fixed"> <div id="main_inner" class="fixed">
<h1>$title</h1>
<div id="main_header">
<h1>$title</h1>
+END +;
+# Print user manual link +my $manual_url = &Header::get_manualpage_url($scriptName); +if($manual_url) {
- print <<END
<span><a href="$manual_url" title="$Lang::tr{'online help en'}" target="_blank"><img src="/images/help-browser.png" alt="$Lang::tr{'online help en'}"></a></span>
+END +; +}
+print <<END
END ; }</div>
Hi Bernhard,
Am 06.10.2021 um 11:23 schrieb Bernhard Bitsch:
Hi,
I've just included the file into my system. There are no problems. So a new patch with this file can start the formal verification and test process.
The original patch has some flaws ( function name, location in source ) I will comment in an extra answer.
Have you had time to collect the issues yet? I'd like to continue working on them.
Best regards, Leo
Regards, Bernhard
Am 06.10.2021 um 05:18 schrieb Jon Murphy:
Leo,
This should be complete. But I don't know how to test.
Jon
On Oct 4, 2021, at 10:40 PM, Jon Murphy jcmurphy26@gmail.com wrote:
Here is a quick template to get started:
<manualpages>
I'll keep going tomorrow.
Jon
On Oct 4, 2021, at 12:42 PM, Leo Hofmann hofmann@leo-andres.de wrote:
Hi all,
@Bernhard, Thank you again for testing this patch!
@Jon, This is the file format of the manualpages configuration:
[cgi basename]=[path/to/page]
For example:
BASE_URL=https://wiki.ipfire.org index=configuration/system/startpage
Results in "index.cgi" linking to "https://wiki.ipfire.org/configuration/system/startpage". Please note that the path does not start with a slash, because the get_manualpage_url function always adds one between the base url and the path.
Unfortunately, I couldn't figure out how to include all this in the installer and I need help with that. So I would suggest we wait until this has been approved and integrated.
Regards, Leo
Am 28.09.2021 um 14:55 schrieb Bernhard Bitsch:
Reviewed-by: Bernhard Bitsch bbitsch@ipfire.org Tested-by: Bernhard Bitsch bbitsch@ipfire.org
Am 28.09.2021 um 13:09 schrieb Leo-Andres Hofmann:
This patch adds a little "help" icon to the page header. If a manual entry exists for a configuration page, the icon appears and offers a quick way to access the wiki. Wiki pages can be configured in the "manualpages" file.
Signed-off-by: Leo-Andres Hofmann hofmann@leo-andres.de
config/cfgroot/header.pl | 20 +++++++++++++++++++ config/cfgroot/manualpages | 7 +++++++ html/html/themes/ipfire/include/css/style.css | 13 ++++++++++++ html/html/themes/ipfire/include/functions.pl | 17 +++++++++++++++- 4 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 config/cfgroot/manualpages
diff --git a/config/cfgroot/header.pl b/config/cfgroot/header.pl index 79accbe8a..e97f90d67 100644 --- a/config/cfgroot/header.pl +++ b/config/cfgroot/header.pl @@ -91,7 +91,11 @@ if ( -d "/var/ipfire/langs/${language}/" ) { }; }; +### Initialize user manual +my %manualpages = (); +&General::readhash("${General::swroot}/main/manualpages", %manualpages); +### Load selected language and theme functions require "${swroot}/langs/en.pl"; require "${swroot}/langs/${language}.pl"; eval `/bin/cat /srv/web/ipfire/html/themes/ipfire/include/functions.pl`; @@ -553,3 +557,19 @@ sub colorize { return $string; } }
+# Get user manual URL for the specified configuration page, returns empty if no entry is configured +sub get_manualpage_url() { + my ($cgi_page) = @_;
+ # Ensure base url is configured + return unless($manualpages{'BASE_URL'});
+ # Return URL + if($cgi_page && defined($manualpages{$cgi_page})) { + return "$manualpages{'BASE_URL'}/$manualpages{$cgi_page}"; + }
+ # No manual page configured, return nothing + return; +} diff --git a/config/cfgroot/manualpages b/config/cfgroot/manualpages new file mode 100644 index 000000000..e5ab1a13c --- /dev/null +++ b/config/cfgroot/manualpages @@ -0,0 +1,7 @@ +# User manual base URL (without trailing slash) +BASE_URL=https://wiki.ipfire.org
+# Assign manual page URL path to CGI file ([cgi basename]=[path/to/page]) +index=configuration/system/startpage +pppsetup=configuration/system/dial +qos=configuration/services/qos diff --git a/html/html/themes/ipfire/include/css/style.css b/html/html/themes/ipfire/include/css/style.css index b92f476c4..661773675 100644 --- a/html/html/themes/ipfire/include/css/style.css +++ b/html/html/themes/ipfire/include/css/style.css @@ -169,6 +169,19 @@ iframe { margin-bottom: 1em; } +#main_header > * { + display: inline-block; + vertical-align: baseline; +}
+#main_header > span { + margin-left: 0.8em; +}
+#main_header img { + padding: 0; +}
#footer { height: 2.5em; margin-bottom: 1em; diff --git a/html/html/themes/ipfire/include/functions.pl b/html/html/themes/ipfire/include/functions.pl index 9f12bbe59..18931428e 100644 --- a/html/html/themes/ipfire/include/functions.pl +++ b/html/html/themes/ipfire/include/functions.pl @@ -170,7 +170,22 @@ END print <<END <div class="bigbox fixed"> <div id="main_inner" class="fixed"> - <h1>$title</h1> + <div id="main_header"> + <h1>$title</h1> +END +;
+# Print user manual link +my $manual_url = &Header::get_manualpage_url($scriptName); +if($manual_url) { + print <<END + <span><a href="$manual_url" title="$Lang::tr{'online help en'}" target="_blank"><img src="/images/help-browser.png" alt="$Lang::tr{'online help en'}"></a></span> +END +; +}
+print <<END + </div> END ; }
Hello,
I think the function is the place where it should be.
Reviewed-by: Michael Tremer michael.tremer@ipfire.org
-Michael
On 19 Oct 2021, at 21:27, Leo Hofmann hofmann@leo-andres.de wrote:
Hi Bernhard,
Am 06.10.2021 um 11:23 schrieb Bernhard Bitsch:
Hi,
I've just included the file into my system. There are no problems. So a new patch with this file can start the formal verification and test process.
The original patch has some flaws ( function name, location in source ) I will comment in an extra answer.
Have you had time to collect the issues yet? I'd like to continue working on them.
Best regards, Leo
Regards, Bernhard
Am 06.10.2021 um 05:18 schrieb Jon Murphy:
Leo,
This should be complete. But I don't know how to test.
Jon
On Oct 4, 2021, at 10:40 PM, Jon Murphy jcmurphy26@gmail.com wrote:
Here is a quick template to get started:
<manualpages>
I'll keep going tomorrow.
Jon
On Oct 4, 2021, at 12:42 PM, Leo Hofmann hofmann@leo-andres.de wrote:
Hi all,
@Bernhard, Thank you again for testing this patch!
@Jon, This is the file format of the manualpages configuration:
[cgi basename]=[path/to/page]
For example:
BASE_URL=https://wiki.ipfire.org index=configuration/system/startpage
Results in "index.cgi" linking to "https://wiki.ipfire.org/configuration/system/startpage". Please note that the path does not start with a slash, because the get_manualpage_url function always adds one between the base url and the path.
Unfortunately, I couldn't figure out how to include all this in the installer and I need help with that. So I would suggest we wait until this has been approved and integrated.
Regards, Leo
Am 28.09.2021 um 14:55 schrieb Bernhard Bitsch:
Reviewed-by: Bernhard Bitsch bbitsch@ipfire.org Tested-by: Bernhard Bitsch bbitsch@ipfire.org
Am 28.09.2021 um 13:09 schrieb Leo-Andres Hofmann: > This patch adds a little "help" icon to the page header. > If a manual entry exists for a configuration page, the icon > appears and offers a quick way to access the wiki. > Wiki pages can be configured in the "manualpages" file. > > Signed-off-by: Leo-Andres Hofmann hofmann@leo-andres.de > --- > config/cfgroot/header.pl | 20 +++++++++++++++++++ > config/cfgroot/manualpages | 7 +++++++ > html/html/themes/ipfire/include/css/style.css | 13 ++++++++++++ > html/html/themes/ipfire/include/functions.pl | 17 +++++++++++++++- > 4 files changed, 56 insertions(+), 1 deletion(-) > create mode 100644 config/cfgroot/manualpages > > diff --git a/config/cfgroot/header.pl b/config/cfgroot/header.pl > index 79accbe8a..e97f90d67 100644 > --- a/config/cfgroot/header.pl > +++ b/config/cfgroot/header.pl > @@ -91,7 +91,11 @@ if ( -d "/var/ipfire/langs/${language}/" ) { > }; > }; > +### Initialize user manual > +my %manualpages = (); > +&General::readhash("${General::swroot}/main/manualpages", %manualpages); > +### Load selected language and theme functions > require "${swroot}/langs/en.pl"; > require "${swroot}/langs/${language}.pl"; > eval `/bin/cat /srv/web/ipfire/html/themes/ipfire/include/functions.pl`; > @@ -553,3 +557,19 @@ sub colorize { > return $string; > } > } > + > +# Get user manual URL for the specified configuration page, returns empty if no entry is configured > +sub get_manualpage_url() { > + my ($cgi_page) = @_; > + > + # Ensure base url is configured > + return unless($manualpages{'BASE_URL'}); > + > + # Return URL > + if($cgi_page && defined($manualpages{$cgi_page})) { > + return "$manualpages{'BASE_URL'}/$manualpages{$cgi_page}"; > + } > + > + # No manual page configured, return nothing > + return; > +} > diff --git a/config/cfgroot/manualpages b/config/cfgroot/manualpages > new file mode 100644 > index 000000000..e5ab1a13c > --- /dev/null > +++ b/config/cfgroot/manualpages > @@ -0,0 +1,7 @@ > +# User manual base URL (without trailing slash) > +BASE_URL=https://wiki.ipfire.org > + > +# Assign manual page URL path to CGI file ([cgi basename]=[path/to/page]) > +index=configuration/system/startpage > +pppsetup=configuration/system/dial > +qos=configuration/services/qos > diff --git a/html/html/themes/ipfire/include/css/style.css b/html/html/themes/ipfire/include/css/style.css > index b92f476c4..661773675 100644 > --- a/html/html/themes/ipfire/include/css/style.css > +++ b/html/html/themes/ipfire/include/css/style.css > @@ -169,6 +169,19 @@ iframe { > margin-bottom: 1em; > } > +#main_header > * { > + display: inline-block; > + vertical-align: baseline; > +} > + > +#main_header > span { > + margin-left: 0.8em; > +} > + > +#main_header img { > + padding: 0; > +} > + > #footer { > height: 2.5em; > margin-bottom: 1em; > diff --git a/html/html/themes/ipfire/include/functions.pl b/html/html/themes/ipfire/include/functions.pl > index 9f12bbe59..18931428e 100644 > --- a/html/html/themes/ipfire/include/functions.pl > +++ b/html/html/themes/ipfire/include/functions.pl > @@ -170,7 +170,22 @@ END > print <<END > <div class="bigbox fixed"> > <div id="main_inner" class="fixed"> > - <h1>$title</h1> > + <div id="main_header"> > + <h1>$title</h1> > +END > +; > + > +# Print user manual link > +my $manual_url = &Header::get_manualpage_url($scriptName); > +if($manual_url) { > + print <<END > + <span><a href="$manual_url" title="$Lang::tr{'online help en'}" target="_blank"><img src="/images/help-browser.png" alt="$Lang::tr{'online help en'}"></a></span> > +END > +; > +} > + > +print <<END > + </div> > END > ; > } >
Hi Jon,
I have just tested the file. Great job, it works flawlessly! Now I'm looking forward to more feedback and hope this will be integrated soon :)
Best regards, Leo
Am 06.10.2021 um 05:18 schrieb Jon Murphy:
Leo,
This should be complete. But I don't know how to test.
Jon
On Oct 4, 2021, at 10:40 PM, Jon Murphy jcmurphy26@gmail.com wrote:
Here is a quick template to get started:
<manualpages>
I'll keep going tomorrow.
Jon
On Oct 4, 2021, at 12:42 PM, Leo Hofmann hofmann@leo-andres.de wrote:
Hi all,
@Bernhard, Thank you again for testing this patch!
@Jon, This is the file format of the manualpages configuration:
[cgi basename]=[path/to/page]
For example:
BASE_URL=https://wiki.ipfire.org index=configuration/system/startpage
Results in "index.cgi" linking to "https://wiki.ipfire.org/configuration/system/startpage". Please note that the path does not start with a slash, because the get_manualpage_url function always adds one between the base url and the path.
Unfortunately, I couldn't figure out how to include all this in the installer and I need help with that. So I would suggest we wait until this has been approved and integrated.
Regards, Leo
Am 28.09.2021 um 14:55 schrieb Bernhard Bitsch:
Reviewed-by: Bernhard Bitsch bbitsch@ipfire.org Tested-by: Bernhard Bitsch bbitsch@ipfire.org
Am 28.09.2021 um 13:09 schrieb Leo-Andres Hofmann:
This patch adds a little "help" icon to the page header. If a manual entry exists for a configuration page, the icon appears and offers a quick way to access the wiki. Wiki pages can be configured in the "manualpages" file.
Signed-off-by: Leo-Andres Hofmann hofmann@leo-andres.de
config/cfgroot/header.pl | 20 +++++++++++++++++++ config/cfgroot/manualpages | 7 +++++++ html/html/themes/ipfire/include/css/style.css | 13 ++++++++++++ html/html/themes/ipfire/include/functions.pl | 17 +++++++++++++++- 4 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 config/cfgroot/manualpages
diff --git a/config/cfgroot/header.pl b/config/cfgroot/header.pl index 79accbe8a..e97f90d67 100644 --- a/config/cfgroot/header.pl +++ b/config/cfgroot/header.pl @@ -91,7 +91,11 @@ if ( -d "/var/ipfire/langs/${language}/" ) { }; }; +### Initialize user manual +my %manualpages = (); +&General::readhash("${General::swroot}/main/manualpages", %manualpages); +### Load selected language and theme functions require "${swroot}/langs/en.pl"; require "${swroot}/langs/${language}.pl"; eval `/bin/cat /srv/web/ipfire/html/themes/ipfire/include/functions.pl`; @@ -553,3 +557,19 @@ sub colorize { return $string; } }
+# Get user manual URL for the specified configuration page, returns empty if no entry is configured +sub get_manualpage_url() {
- my ($cgi_page) = @_;
- # Ensure base url is configured
- return unless($manualpages{'BASE_URL'});
- # Return URL
- if($cgi_page && defined($manualpages{$cgi_page})) {
return "$manualpages{'BASE_URL'}/$manualpages{$cgi_page}";
- }
- # No manual page configured, return nothing
- return;
+} diff --git a/config/cfgroot/manualpages b/config/cfgroot/manualpages new file mode 100644 index 000000000..e5ab1a13c --- /dev/null +++ b/config/cfgroot/manualpages @@ -0,0 +1,7 @@ +# User manual base URL (without trailing slash) +BASE_URL=https://wiki.ipfire.org
+# Assign manual page URL path to CGI file ([cgi basename]=[path/to/page]) +index=configuration/system/startpage +pppsetup=configuration/system/dial +qos=configuration/services/qos diff --git a/html/html/themes/ipfire/include/css/style.css b/html/html/themes/ipfire/include/css/style.css index b92f476c4..661773675 100644 --- a/html/html/themes/ipfire/include/css/style.css +++ b/html/html/themes/ipfire/include/css/style.css @@ -169,6 +169,19 @@ iframe { margin-bottom: 1em; } +#main_header > * {
- display: inline-block;
- vertical-align: baseline;
+}
+#main_header > span {
- margin-left: 0.8em;
+}
+#main_header img {
- padding: 0;
+}
- #footer { height: 2.5em; margin-bottom: 1em;
diff --git a/html/html/themes/ipfire/include/functions.pl b/html/html/themes/ipfire/include/functions.pl index 9f12bbe59..18931428e 100644 --- a/html/html/themes/ipfire/include/functions.pl +++ b/html/html/themes/ipfire/include/functions.pl @@ -170,7 +170,22 @@ END print <<END <div class="bigbox fixed"> <div id="main_inner" class="fixed">
<h1>$title</h1>
<div id="main_header">
<h1>$title</h1>
+END +;
+# Print user manual link +my $manual_url = &Header::get_manualpage_url($scriptName); +if($manual_url) {
- print <<END
<span><a href="$manual_url" title="$Lang::tr{'online help en'}" target="_blank"><img src="/images/help-browser.png" alt="$Lang::tr{'online help en'}"></a></span>
+END +; +}
+print <<END
END ; }</div>
Hello Jon, I have just been notified by Patchwork that this feature has been accepted! So now you could submit your completed manualpages file as a patch. Do you want to do it yourself, or do you want me to check the file and submit it for you? Best regards, Leo Am 06.10.2021 um 05:18 schrieb Jon Murphy:
Leo, This should be complete. But I don't know how to test. Jon On Oct 4, 2021, at 10:40 PM, Jon Murphy jcmurphy26@gmail.com (mailto:jcmurphy26@gmail.com) wrote: Here is a quick template to get started: <manualpages> I'll keep going tomorrow. Jon
On Oct 4, 2021, at 12:42 PM, Leo Hofmann hofmann@leo-andres.de (mailto:hofmann@leo-andres.de) wrote: Hi all, @Bernhard, Thank you again for testing this patch! @Jon, This is the file format of the manualpages configuration: [cgi basename]=[path/to/page] For example:
BASE_URL=https://wiki.ipfire.org (https://wiki.ipfire.org) index=configuration/system/startpage
Results in "index.cgi" linking to "https://wiki.ipfire.org/configuration/system/startpage" (https://wiki.ipfire.org/configuration/system/startpage). Please note that the path does not start with a slash, because the get_manualpage_url function always adds one between the base url and the path. Unfortunately, I couldn't figure out how to include all this in the installer and I need help with that. So I would suggest we wait until this has been approved and integrated. Regards, Leo Am 28.09.2021 um 14:55 schrieb Bernhard Bitsch:
Reviewed-by: Bernhard Bitsch bbitsch@ipfire.org (mailto:bbitsch@ipfire.org) Tested-by: Bernhard Bitsch bbitsch@ipfire.org (mailto:bbitsch@ipfire.org) Am 28.09.2021 um 13:09 schrieb Leo-Andres Hofmann:
This patch adds a little "help" icon to the page header. If a manual entry exists for a configuration page, the icon appears and offers a quick way to access the wiki. Wiki pages can be configured in the "manualpages" file. Signed-off-by: Leo-Andres Hofmann hofmann@leo-andres.de (mailto:hofmann@leo-andres.de) --- config/cfgroot/header.pl | 20 +++++++++++++++++++ config/cfgroot/manualpages | 7 +++++++ html/html/themes/ipfire/include/css/style.css | 13 ++++++++++++ html/html/themes/ipfire/include/functions.pl | 17 +++++++++++++++- 4 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 config/cfgroot/manualpages diff --git a/config/cfgroot/header.pl b/config/cfgroot/header.pl index 79accbe8a..e97f90d67 100644 --- a/config/cfgroot/header.pl +++ b/config/cfgroot/header.pl @@ -91,7 +91,11 @@ if ( -d "/var/ipfire/langs/${language}/" ) { }; }; +### Initialize user manual +my %manualpages = (); +&General::readhash("${General::swroot}/main/manualpages", %manualpages); +### Load selected language and theme functions require "${swroot}/langs/en.pl"; require "${swroot}/langs/${language}.pl"; eval `/bin/cat /srv/web/ipfire/html/themes/ipfire/include/functions.pl`; @@ -553,3 +557,19 @@ sub colorize { return $string; } } + +# Get user manual URL for the specified configuration page, returns empty if no entry is configured +sub get_manualpage_url() { + my ($cgi_page) = @_; + + # Ensure base url is configured + return unless($manualpages{'BASE_URL'}); + + # Return URL + if($cgi_page && defined($manualpages{$cgi_page})) { + return "$manualpages{'BASE_URL'}/$manualpages{$cgi_page}"; + } + + # No manual page configured, return nothing + return; +} diff --git a/config/cfgroot/manualpages b/config/cfgroot/manualpages new file mode 100644 index 000000000..e5ab1a13c --- /dev/null +++ b/config/cfgroot/manualpages @@ -0,0 +1,7 @@ +# User manual base URL (without trailing slash) +BASE_URL=https://wiki.ipfire.org (https://wiki.ipfire.org) + +# Assign manual page URL path to CGI file ([cgi basename]=[path/to/page]) +index=configuration/system/startpage +pppsetup=configuration/system/dial +qos=configuration/services/qos diff --git a/html/html/themes/ipfire/include/css/style.css b/html/html/themes/ipfire/include/css/style.css index b92f476c4..661773675 100644 --- a/html/html/themes/ipfire/include/css/style.css +++ b/html/html/themes/ipfire/include/css/style.css @@ -169,6 +169,19 @@ iframe { margin-bottom: 1em; } +#main_header > * { + display: inline-block; + vertical-align: baseline; +} + +#main_header > span { + margin-left: 0.8em; +} + +#main_header img { + padding: 0; +} + #footer { height: 2.5em; margin-bottom: 1em; diff --git a/html/html/themes/ipfire/include/functions.pl b/html/html/themes/ipfire/include/functions.pl index 9f12bbe59..18931428e 100644 --- a/html/html/themes/ipfire/include/functions.pl +++ b/html/html/themes/ipfire/include/functions.pl @@ -170,7 +170,22 @@ END print <<END <div class="bigbox fixed"> <div id="main_inner" class="fixed"> - <h1>$title</h1> + <div id="main_header"> + <h1>$title</h1> +END +; + +# Print user manual link +my $manual_url = &Header::get_manualpage_url($scriptName); +if($manual_url) { + print <<END + <span><a href="$manual_url" title="$Lang::tr{'online help en'}" target="_blank"><img src="/images/help-browser.png" alt="$Lang::tr{'online help en'}"></a></span> +END +; +} + +print <<END + </div> END ; }
Hi Leo!
I have just been notified by Patchwork that this feature has been accepted!
Yay! Glad to hear it was accepted!
Do you want to do it yourself, or do you want me to check the file and submit it for you?
Yes, please do the submit for me.
Best regards, Jon
On Dec 4, 2021, at 2:41 AM, hofmann@leo-andres.de wrote:
Hello Jon, I have just been notified by Patchwork that this feature has been accepted! So now you could submit your completed manualpages file as a patch. Do you want to do it yourself, or do you want me to check the file and submit it for you? Best regards, Leo
Am 06.10.2021 um 05:18 schrieb Jon Murphy:
Leo, This should be complete. But I don't know how to test. Jon
On Oct 4, 2021, at 10:40 PM, Jon Murphy jcmurphy26@gmail.com mailto:jcmurphy26@gmail.com wrote: Here is a quick template to get started: <manualpages> I'll keep going tomorrow. Jon
On Oct 4, 2021, at 12:42 PM, Leo Hofmann hofmann@leo-andres.de mailto:hofmann@leo-andres.de wrote: Hi all, @Bernhard, Thank you again for testing this patch! @Jon, This is the file format of the manualpages configuration: [cgi basename]=[path/to/page] For example:
BASE_URL=https://wiki.ipfire.org https://wiki.ipfire.org/ index=configuration/system/startpage
Results in "index.cgi" linking to "https://wiki.ipfire.org/configuration/system/startpage" https://wiki.ipfire.org/configuration/system/startpage. Please note that the path does not start with a slash, because the get_manualpage_url function always adds one between the base url and the path. Unfortunately, I couldn't figure out how to include all this in the installer and I need help with that. So I would suggest we wait until this has been approved and integrated. Regards, Leo Am 28.09.2021 um 14:55 schrieb Bernhard Bitsch:
Reviewed-by: Bernhard Bitsch bbitsch@ipfire.org mailto:bbitsch@ipfire.org Tested-by: Bernhard Bitsch bbitsch@ipfire.org mailto:bbitsch@ipfire.org Am 28.09.2021 um 13:09 schrieb Leo-Andres Hofmann:
This patch adds a little "help" icon to the page header. If a manual entry exists for a configuration page, the icon appears and offers a quick way to access the wiki. Wiki pages can be configured in the "manualpages" file. Signed-off-by: Leo-Andres Hofmann hofmann@leo-andres.de mailto:hofmann@leo-andres.de --- config/cfgroot/header.pl | 20 +++++++++++++++++++ config/cfgroot/manualpages | 7 +++++++ html/html/themes/ipfire/include/css/style.css | 13 ++++++++++++ html/html/themes/ipfire/include/functions.pl | 17 +++++++++++++++- 4 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 config/cfgroot/manualpages diff --git a/config/cfgroot/header.pl b/config/cfgroot/header.pl index 79accbe8a..e97f90d67 100644 --- a/config/cfgroot/header.pl +++ b/config/cfgroot/header.pl @@ -91,7 +91,11 @@ if ( -d "/var/ipfire/langs/${language}/" ) { }; }; +### Initialize user manual +my %manualpages = (); +&General::readhash("${General::swroot}/main/manualpages", %manualpages); +### Load selected language and theme functions require "${swroot}/langs/en.pl"; require "${swroot}/langs/${language}.pl"; eval `/bin/cat /srv/web/ipfire/html/themes/ipfire/include/functions.pl`; @@ -553,3 +557,19 @@ sub colorize { return $string; } } + +# Get user manual URL for the specified configuration page, returns empty if no entry is configured +sub get_manualpage_url() { + my ($cgi_page) = @_; + + # Ensure base url is configured + return unless($manualpages{'BASE_URL'}); + + # Return URL + if($cgi_page && defined($manualpages{$cgi_page})) { + return "$manualpages{'BASE_URL'}/$manualpages{$cgi_page}"; + } + + # No manual page configured, return nothing + return; +} diff --git a/config/cfgroot/manualpages b/config/cfgroot/manualpages new file mode 100644 index 000000000..e5ab1a13c --- /dev/null +++ b/config/cfgroot/manualpages @@ -0,0 +1,7 @@ +# User manual base URL (without trailing slash) +BASE_URL=https://wiki.ipfire.org https://wiki.ipfire.org/ + +# Assign manual page URL path to CGI file ([cgi basename]=[path/to/page]) +index=configuration/system/startpage +pppsetup=configuration/system/dial +qos=configuration/services/qos diff --git a/html/html/themes/ipfire/include/css/style.css b/html/html/themes/ipfire/include/css/style.css index b92f476c4..661773675 100644 --- a/html/html/themes/ipfire/include/css/style.css +++ b/html/html/themes/ipfire/include/css/style.css @@ -169,6 +169,19 @@ iframe { margin-bottom: 1em; } +#main_header > * { + display: inline-block; + vertical-align: baseline; +} + +#main_header > span { + margin-left: 0.8em; +} + +#main_header img { + padding: 0; +} + #footer { height: 2.5em; margin-bottom: 1em; diff --git a/html/html/themes/ipfire/include/functions.pl b/html/html/themes/ipfire/include/functions.pl index 9f12bbe59..18931428e 100644 --- a/html/html/themes/ipfire/include/functions.pl +++ b/html/html/themes/ipfire/include/functions.pl @@ -170,7 +170,22 @@ END print <<END <div class="bigbox fixed"> <div id="main_inner" class="fixed"> - <h1>$title</h1> + <div id="main_header"> + <h1>$title</h1> +END +; + +# Print user manual link +my $manual_url = &Header::get_manualpage_url($scriptName); +if($manual_url) { + print <<END + <span><a href="$manual_url" title="$Lang::tr{'online help en'}" target="_blank"><img src="/images/help-browser.png" alt="$Lang::tr{'online help en'}"></a></span> +END +; +} + +print <<END + </div> END ; }
From: Jon Murphy jcmurphy26@gmail.com
Jon Murphy gathered all the links and made the updated file available on the mailing list: https://lists.ipfire.org/pipermail/development/2021-October/011383.html https://lists.ipfire.org/pipermail/development/2021-December/011737.html
With kind permission from him, this patch contains the completed list. The list was successfully checked with "./make.sh check-manualpages".
Signed-off-by: Leo-Andres Hofmann hofmann@leo-andres.de Reported-by: Jon Murphy jcmurphy26@gmail.com --- config/cfgroot/manualpages | 81 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 78 insertions(+), 3 deletions(-)
diff --git a/config/cfgroot/manualpages b/config/cfgroot/manualpages index e5ab1a13c..97246e6f0 100644 --- a/config/cfgroot/manualpages +++ b/config/cfgroot/manualpages @@ -1,7 +1,82 @@ -# User manual base URL (without trailing slash) +# Assign manual page URL path to CGI file ([cgi basename]=[path/to/page]) + +# Base URL (without trailing slash) BASE_URL=https://wiki.ipfire.org +index=configuration/system/startpage
-# Assign manual page URL path to CGI file ([cgi basename]=[path/to/page]) +# System menu index=configuration/system/startpage -pppsetup=configuration/system/dial +mail=configuration/system/mail_service +remote=configuration/system/ssh +backup=configuration/system/backup +gui=configuration/system/userinterface +fireinfo=fireinfo +vulnerabilities=configuration/system/vulnerabilities +shutdown=configuration/system/shutdown +credits=configuration/system/credits + +# Status menu +system=configuration/status/system +memory=configuration/status/memory +services=configuration/status/services +media=configuration/status/drives +netexternal=configuration/status/network_ext +netinternal=configuration/status/network_int +netother=configuration/status/network_int +netovpnrw=configuration/status/network_ovpnrw +#netovpnsrv= +hardwaregraphs=configuration/status/hardware_diagrams +entropy=configuration/status/entropy +connections=configuration/status/connections +traffic=configuration/status/nettraffic +#mdstat= + +# Network menu +zoneconf=configuration/network/zoneconf +dns=dns +proxy=configuration/network/proxy +urlfilter=configuration/network/proxy/url-filter +#updatexlrator=configuration/network/proxy/update_accelerator +dhcp=configuration/network/dhcp +captive=configuration/network/captive +connscheduler=configuration/network/connectionscheduler +hosts=configuration/network/hosts +dnsforward=configuration/network/dnsforward +routing=configuration/network/static +mac=configuration/network/mac-address +wakeonlan=configuration/network/wake-on-lan + +# Services menu +vpnmain=configuration/services/ipsec +ovpnmain=configuration/services/openvpn +ddns=configuration/services/dyndns +time=configuration/services/ntp qos=configuration/services/qos +extrahd=configuration/services/extrahd + +# Firewall menu +firewall=configuration/firewall +fwhosts=configuration/firewall/fwgroups +optionsfw=configuration/firewall/options +ids=configuration/firewall/ips +p2p-block=configuration/firewall/p2p-block +location-block=configuration/firewall/geoip-block +wireless=configuration/firewall/accesstoblue +iptables=configuration/firewall/iptables + +# IPfire menu +pakfire=configuration/ipfire/pakfire + +# Logs menu +summary=configuration/logs/summary +config=configuration/logs/logsettings +proxylog=configuration/logs/proxy +calamaris=configuration/logs/proxyreports +firewalllog=configuration/logs/firewall +firewalllogip=configuration/logs/firewall-ip +firewalllogport=configuration/logs/firewall-port +firewalllogcountry=configuration/logs/firewall-country +ids=configuration/logs/ips +#ovpnclients= +urlfilter=configuration/logs/url-filter +log=configuration/logs/system
Hi,
this looks good to me. I will apply it into the temporary branch for Core Update 163, as C162 is already closed and in testing.
Reviewed-by: Peter Müller peter.mueller@ipfire.org
Thanks, and best regards, Peter Müller
From: Jon Murphy jcmurphy26@gmail.com
Jon Murphy gathered all the links and made the updated file available on the mailing list: https://lists.ipfire.org/pipermail/development/2021-October/011383.html https://lists.ipfire.org/pipermail/development/2021-December/011737.html
With kind permission from him, this patch contains the completed list. The list was successfully checked with "./make.sh check-manualpages".
Signed-off-by: Leo-Andres Hofmann hofmann@leo-andres.de Reported-by: Jon Murphy jcmurphy26@gmail.com
config/cfgroot/manualpages | 81 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 78 insertions(+), 3 deletions(-)
diff --git a/config/cfgroot/manualpages b/config/cfgroot/manualpages index e5ab1a13c..97246e6f0 100644 --- a/config/cfgroot/manualpages +++ b/config/cfgroot/manualpages @@ -1,7 +1,82 @@ -# User manual base URL (without trailing slash) +# Assign manual page URL path to CGI file ([cgi basename]=[path/to/page])
+# Base URL (without trailing slash) BASE_URL=https://wiki.ipfire.org +index=configuration/system/startpage
-# Assign manual page URL path to CGI file ([cgi basename]=[path/to/page]) +# System menu index=configuration/system/startpage -pppsetup=configuration/system/dial +mail=configuration/system/mail_service +remote=configuration/system/ssh +backup=configuration/system/backup +gui=configuration/system/userinterface +fireinfo=fireinfo +vulnerabilities=configuration/system/vulnerabilities +shutdown=configuration/system/shutdown +credits=configuration/system/credits
+# Status menu +system=configuration/status/system +memory=configuration/status/memory +services=configuration/status/services +media=configuration/status/drives +netexternal=configuration/status/network_ext +netinternal=configuration/status/network_int +netother=configuration/status/network_int +netovpnrw=configuration/status/network_ovpnrw +#netovpnsrv= +hardwaregraphs=configuration/status/hardware_diagrams +entropy=configuration/status/entropy +connections=configuration/status/connections +traffic=configuration/status/nettraffic +#mdstat=
+# Network menu +zoneconf=configuration/network/zoneconf +dns=dns +proxy=configuration/network/proxy +urlfilter=configuration/network/proxy/url-filter +#updatexlrator=configuration/network/proxy/update_accelerator +dhcp=configuration/network/dhcp +captive=configuration/network/captive +connscheduler=configuration/network/connectionscheduler +hosts=configuration/network/hosts +dnsforward=configuration/network/dnsforward +routing=configuration/network/static +mac=configuration/network/mac-address +wakeonlan=configuration/network/wake-on-lan
+# Services menu +vpnmain=configuration/services/ipsec +ovpnmain=configuration/services/openvpn +ddns=configuration/services/dyndns +time=configuration/services/ntp qos=configuration/services/qos +extrahd=configuration/services/extrahd
+# Firewall menu +firewall=configuration/firewall +fwhosts=configuration/firewall/fwgroups +optionsfw=configuration/firewall/options +ids=configuration/firewall/ips +p2p-block=configuration/firewall/p2p-block +location-block=configuration/firewall/geoip-block +wireless=configuration/firewall/accesstoblue +iptables=configuration/firewall/iptables
+# IPfire menu +pakfire=configuration/ipfire/pakfire
+# Logs menu +summary=configuration/logs/summary +config=configuration/logs/logsettings +proxylog=configuration/logs/proxy +calamaris=configuration/logs/proxyreports +firewalllog=configuration/logs/firewall +firewalllogip=configuration/logs/firewall-ip +firewalllogport=configuration/logs/firewall-port +firewalllogcountry=configuration/logs/firewall-country +ids=configuration/logs/ips +#ovpnclients= +urlfilter=configuration/logs/url-filter +log=configuration/logs/system
Will this mean the code change is in Core 162 and the manualpages (text file) will be in Core 163 ?
On Dec 5, 2021, at 4:37 AM, Peter Müller peter.mueller@ipfire.org wrote:
Hi,
this looks good to me. I will apply it into the temporary branch for Core Update 163, as C162 is already closed and in testing.
Reviewed-by: Peter Müller peter.mueller@ipfire.org
Thanks, and best regards, Peter Müller
From: Jon Murphy jcmurphy26@gmail.com
Jon Murphy gathered all the links and made the updated file available on the mailing list: https://lists.ipfire.org/pipermail/development/2021-October/011383.html https://lists.ipfire.org/pipermail/development/2021-December/011737.html
With kind permission from him, this patch contains the completed list. The list was successfully checked with "./make.sh check-manualpages".
Signed-off-by: Leo-Andres Hofmann hofmann@leo-andres.de Reported-by: Jon Murphy jcmurphy26@gmail.com
config/cfgroot/manualpages | 81 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 78 insertions(+), 3 deletions(-)
diff --git a/config/cfgroot/manualpages b/config/cfgroot/manualpages index e5ab1a13c..97246e6f0 100644 --- a/config/cfgroot/manualpages +++ b/config/cfgroot/manualpages @@ -1,7 +1,82 @@ -# User manual base URL (without trailing slash) +# Assign manual page URL path to CGI file ([cgi basename]=[path/to/page])
+# Base URL (without trailing slash) BASE_URL=https://wiki.ipfire.org +index=configuration/system/startpage
-# Assign manual page URL path to CGI file ([cgi basename]=[path/to/page]) +# System menu index=configuration/system/startpage -pppsetup=configuration/system/dial +mail=configuration/system/mail_service +remote=configuration/system/ssh +backup=configuration/system/backup +gui=configuration/system/userinterface +fireinfo=fireinfo +vulnerabilities=configuration/system/vulnerabilities +shutdown=configuration/system/shutdown +credits=configuration/system/credits
+# Status menu +system=configuration/status/system +memory=configuration/status/memory +services=configuration/status/services +media=configuration/status/drives +netexternal=configuration/status/network_ext +netinternal=configuration/status/network_int +netother=configuration/status/network_int +netovpnrw=configuration/status/network_ovpnrw +#netovpnsrv= +hardwaregraphs=configuration/status/hardware_diagrams +entropy=configuration/status/entropy +connections=configuration/status/connections +traffic=configuration/status/nettraffic +#mdstat=
+# Network menu +zoneconf=configuration/network/zoneconf +dns=dns +proxy=configuration/network/proxy +urlfilter=configuration/network/proxy/url-filter +#updatexlrator=configuration/network/proxy/update_accelerator +dhcp=configuration/network/dhcp +captive=configuration/network/captive +connscheduler=configuration/network/connectionscheduler +hosts=configuration/network/hosts +dnsforward=configuration/network/dnsforward +routing=configuration/network/static +mac=configuration/network/mac-address +wakeonlan=configuration/network/wake-on-lan
+# Services menu +vpnmain=configuration/services/ipsec +ovpnmain=configuration/services/openvpn +ddns=configuration/services/dyndns +time=configuration/services/ntp qos=configuration/services/qos +extrahd=configuration/services/extrahd
+# Firewall menu +firewall=configuration/firewall +fwhosts=configuration/firewall/fwgroups +optionsfw=configuration/firewall/options +ids=configuration/firewall/ips +p2p-block=configuration/firewall/p2p-block +location-block=configuration/firewall/geoip-block +wireless=configuration/firewall/accesstoblue +iptables=configuration/firewall/iptables
+# IPfire menu +pakfire=configuration/ipfire/pakfire
+# Logs menu +summary=configuration/logs/summary +config=configuration/logs/logsettings +proxylog=configuration/logs/proxy +calamaris=configuration/logs/proxyreports +firewalllog=configuration/logs/firewall +firewalllogip=configuration/logs/firewall-ip +firewalllogport=configuration/logs/firewall-port +firewalllogcountry=configuration/logs/firewall-country +ids=configuration/logs/ips +#ovpnclients= +urlfilter=configuration/logs/url-filter +log=configuration/logs/system
Hello,
I am quite confused, too.
I thought all of this was already in the update. We seem to at least be missing this patch which isn’t a problem.
Is there anything else that needs to go into 162 to make this fully work?
-Michael
On 5 Dec 2021, at 17:13, Jon Murphy jcmurphy26@gmail.com wrote:
Will this mean the code change is in Core 162 and the manualpages (text file) will be in Core 163 ?
On Dec 5, 2021, at 4:37 AM, Peter Müller peter.mueller@ipfire.org wrote:
Hi,
this looks good to me. I will apply it into the temporary branch for Core Update 163, as C162 is already closed and in testing.
Reviewed-by: Peter Müller peter.mueller@ipfire.org
Thanks, and best regards, Peter Müller
From: Jon Murphy jcmurphy26@gmail.com
Jon Murphy gathered all the links and made the updated file available on the mailing list: https://lists.ipfire.org/pipermail/development/2021-October/011383.html https://lists.ipfire.org/pipermail/development/2021-December/011737.html
With kind permission from him, this patch contains the completed list. The list was successfully checked with "./make.sh check-manualpages".
Signed-off-by: Leo-Andres Hofmann hofmann@leo-andres.de Reported-by: Jon Murphy jcmurphy26@gmail.com
config/cfgroot/manualpages | 81 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 78 insertions(+), 3 deletions(-)
diff --git a/config/cfgroot/manualpages b/config/cfgroot/manualpages index e5ab1a13c..97246e6f0 100644 --- a/config/cfgroot/manualpages +++ b/config/cfgroot/manualpages @@ -1,7 +1,82 @@ -# User manual base URL (without trailing slash) +# Assign manual page URL path to CGI file ([cgi basename]=[path/to/page])
+# Base URL (without trailing slash) BASE_URL=https://wiki.ipfire.org +index=configuration/system/startpage
-# Assign manual page URL path to CGI file ([cgi basename]=[path/to/page]) +# System menu index=configuration/system/startpage -pppsetup=configuration/system/dial +mail=configuration/system/mail_service +remote=configuration/system/ssh +backup=configuration/system/backup +gui=configuration/system/userinterface +fireinfo=fireinfo +vulnerabilities=configuration/system/vulnerabilities +shutdown=configuration/system/shutdown +credits=configuration/system/credits
+# Status menu +system=configuration/status/system +memory=configuration/status/memory +services=configuration/status/services +media=configuration/status/drives +netexternal=configuration/status/network_ext +netinternal=configuration/status/network_int +netother=configuration/status/network_int +netovpnrw=configuration/status/network_ovpnrw +#netovpnsrv= +hardwaregraphs=configuration/status/hardware_diagrams +entropy=configuration/status/entropy +connections=configuration/status/connections +traffic=configuration/status/nettraffic +#mdstat=
+# Network menu +zoneconf=configuration/network/zoneconf +dns=dns +proxy=configuration/network/proxy +urlfilter=configuration/network/proxy/url-filter +#updatexlrator=configuration/network/proxy/update_accelerator +dhcp=configuration/network/dhcp +captive=configuration/network/captive +connscheduler=configuration/network/connectionscheduler +hosts=configuration/network/hosts +dnsforward=configuration/network/dnsforward +routing=configuration/network/static +mac=configuration/network/mac-address +wakeonlan=configuration/network/wake-on-lan
+# Services menu +vpnmain=configuration/services/ipsec +ovpnmain=configuration/services/openvpn +ddns=configuration/services/dyndns +time=configuration/services/ntp qos=configuration/services/qos +extrahd=configuration/services/extrahd
+# Firewall menu +firewall=configuration/firewall +fwhosts=configuration/firewall/fwgroups +optionsfw=configuration/firewall/options +ids=configuration/firewall/ips +p2p-block=configuration/firewall/p2p-block +location-block=configuration/firewall/geoip-block +wireless=configuration/firewall/accesstoblue +iptables=configuration/firewall/iptables
+# IPfire menu +pakfire=configuration/ipfire/pakfire
+# Logs menu +summary=configuration/logs/summary +config=configuration/logs/logsettings +proxylog=configuration/logs/proxy +calamaris=configuration/logs/proxyreports +firewalllog=configuration/logs/firewall +firewalllogip=configuration/logs/firewall-ip +firewalllogport=configuration/logs/firewall-port +firewalllogcountry=configuration/logs/firewall-country +ids=configuration/logs/ips +#ovpnclients= +urlfilter=configuration/logs/url-filter +log=configuration/logs/system
Hi,
On 08/12/2021 11:35, Michael Tremer wrote:
Hello,
I am quite confused, too.
I thought all of this was already in the update. We seem to at least be missing this patch which isn’t a problem.
My understanding is that the original patch provided the code to be able to show the help symbols if there was a link provided but the only link was for the main page. This additional patch now provides the list of links for each of the menu pages in the WUI that have a page in the wiki.
Regards,
Adolf.
Is there anything else that needs to go into 162 to make this fully work?
-Michael
On 5 Dec 2021, at 17:13, Jon Murphy jcmurphy26@gmail.com wrote:
Will this mean the code change is in Core 162 and the manualpages (text file) will be in Core 163 ?
On Dec 5, 2021, at 4:37 AM, Peter Müller peter.mueller@ipfire.org wrote:
Hi,
this looks good to me. I will apply it into the temporary branch for Core Update 163, as C162 is already closed and in testing.
Reviewed-by: Peter Müller peter.mueller@ipfire.org
Thanks, and best regards, Peter Müller
From: Jon Murphy jcmurphy26@gmail.com
Jon Murphy gathered all the links and made the updated file available on the mailing list: https://lists.ipfire.org/pipermail/development/2021-October/011383.html https://lists.ipfire.org/pipermail/development/2021-December/011737.html
With kind permission from him, this patch contains the completed list. The list was successfully checked with "./make.sh check-manualpages".
Signed-off-by: Leo-Andres Hofmann hofmann@leo-andres.de Reported-by: Jon Murphy jcmurphy26@gmail.com
config/cfgroot/manualpages | 81 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 78 insertions(+), 3 deletions(-)
diff --git a/config/cfgroot/manualpages b/config/cfgroot/manualpages index e5ab1a13c..97246e6f0 100644 --- a/config/cfgroot/manualpages +++ b/config/cfgroot/manualpages @@ -1,7 +1,82 @@ -# User manual base URL (without trailing slash) +# Assign manual page URL path to CGI file ([cgi basename]=[path/to/page])
+# Base URL (without trailing slash) BASE_URL=https://wiki.ipfire.org +index=configuration/system/startpage
-# Assign manual page URL path to CGI file ([cgi basename]=[path/to/page]) +# System menu index=configuration/system/startpage -pppsetup=configuration/system/dial +mail=configuration/system/mail_service +remote=configuration/system/ssh +backup=configuration/system/backup +gui=configuration/system/userinterface +fireinfo=fireinfo +vulnerabilities=configuration/system/vulnerabilities +shutdown=configuration/system/shutdown +credits=configuration/system/credits
+# Status menu +system=configuration/status/system +memory=configuration/status/memory +services=configuration/status/services +media=configuration/status/drives +netexternal=configuration/status/network_ext +netinternal=configuration/status/network_int +netother=configuration/status/network_int +netovpnrw=configuration/status/network_ovpnrw +#netovpnsrv= +hardwaregraphs=configuration/status/hardware_diagrams +entropy=configuration/status/entropy +connections=configuration/status/connections +traffic=configuration/status/nettraffic +#mdstat=
+# Network menu +zoneconf=configuration/network/zoneconf +dns=dns +proxy=configuration/network/proxy +urlfilter=configuration/network/proxy/url-filter +#updatexlrator=configuration/network/proxy/update_accelerator +dhcp=configuration/network/dhcp +captive=configuration/network/captive +connscheduler=configuration/network/connectionscheduler +hosts=configuration/network/hosts +dnsforward=configuration/network/dnsforward +routing=configuration/network/static +mac=configuration/network/mac-address +wakeonlan=configuration/network/wake-on-lan
+# Services menu +vpnmain=configuration/services/ipsec +ovpnmain=configuration/services/openvpn +ddns=configuration/services/dyndns +time=configuration/services/ntp qos=configuration/services/qos +extrahd=configuration/services/extrahd
+# Firewall menu +firewall=configuration/firewall +fwhosts=configuration/firewall/fwgroups +optionsfw=configuration/firewall/options +ids=configuration/firewall/ips +p2p-block=configuration/firewall/p2p-block +location-block=configuration/firewall/geoip-block +wireless=configuration/firewall/accesstoblue +iptables=configuration/firewall/iptables
+# IPfire menu +pakfire=configuration/ipfire/pakfire
+# Logs menu +summary=configuration/logs/summary +config=configuration/logs/logsettings +proxylog=configuration/logs/proxy +calamaris=configuration/logs/proxyreports +firewalllog=configuration/logs/firewall +firewalllogip=configuration/logs/firewall-ip +firewalllogport=configuration/logs/firewall-port +firewalllogcountry=configuration/logs/firewall-country +ids=configuration/logs/ips +#ovpnclients= +urlfilter=configuration/logs/url-filter +log=configuration/logs/system
Hi all,
Please excuse the confusion, I'll try to explain.
Most important first: This does not fail in Core 162! The code is complete and does not generate errors or incorrect links. (I just checked that again and I also always make sure my patches don't break stuff before submitting.)
When I presented the idea on the mailing list in September, I included three sample links in my patch and asked for help in collecting more.
https://patchwork.ipfire.org/project/ipfire/patch/20210919143444.1739-1-hofm... https://patchwork.ipfire.org/project/ipfire/patch/20210928110906.1089-1-hofm...
The incomplete file had to be there for the code to work and anyone to add more links to it. But strictly speaking, the feature wasn't yet complete.
I should have made it clearer that the revised patchset did not come with a complete list either and still required more work. This was obvious to me, but I did not communicate it well. I wasn't paying attention and I do apologize for that.
If we leave it as it is now, core 162 will enable only three links and core 163 will then bring the complete feature. The links point to the correct wiki page and appear on the following pages: Index, PPP setup, QoS
Regards Leo
Am 08.12.2021 um 12:29 schrieb Adolf Belka:
Hi,
On 08/12/2021 11:35, Michael Tremer wrote:
Hello,
I am quite confused, too.
I thought all of this was already in the update. We seem to at least be missing this patch which isn’t a problem.
My understanding is that the original patch provided the code to be able to show the help symbols if there was a link provided but the only link was for the main page. This additional patch now provides the list of links for each of the menu pages in the WUI that have a page in the wiki.
Regards,
Adolf.
Is there anything else that needs to go into 162 to make this fully work?
-Michael
On 5 Dec 2021, at 17:13, Jon Murphy jcmurphy26@gmail.com wrote:
Will this mean the code change is in Core 162 and the manualpages (text file) will be in Core 163 ?
On Dec 5, 2021, at 4:37 AM, Peter Müller peter.mueller@ipfire.org wrote:
Hi,
this looks good to me. I will apply it into the temporary branch for Core Update 163, as C162 is already closed and in testing.
Reviewed-by: Peter Müller peter.mueller@ipfire.org
Thanks, and best regards, Peter Müller
From: Jon Murphy jcmurphy26@gmail.com
Jon Murphy gathered all the links and made the updated file available on the mailing list: https://lists.ipfire.org/pipermail/development/2021-October/011383.html https://lists.ipfire.org/pipermail/development/2021-December/011737.html
With kind permission from him, this patch contains the completed list. The list was successfully checked with "./make.sh check-manualpages".
Signed-off-by: Leo-Andres Hofmann hofmann@leo-andres.de Reported-by: Jon Murphy jcmurphy26@gmail.com
config/cfgroot/manualpages | 81 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 78 insertions(+), 3 deletions(-)
diff --git a/config/cfgroot/manualpages b/config/cfgroot/manualpages index e5ab1a13c..97246e6f0 100644 --- a/config/cfgroot/manualpages +++ b/config/cfgroot/manualpages @@ -1,7 +1,82 @@ -# User manual base URL (without trailing slash) +# Assign manual page URL path to CGI file ([cgi basename]=[path/to/page])
+# Base URL (without trailing slash) BASE_URL=https://wiki.ipfire.org +index=configuration/system/startpage
-# Assign manual page URL path to CGI file ([cgi basename]=[path/to/page]) +# System menu index=configuration/system/startpage -pppsetup=configuration/system/dial +mail=configuration/system/mail_service +remote=configuration/system/ssh +backup=configuration/system/backup +gui=configuration/system/userinterface +fireinfo=fireinfo +vulnerabilities=configuration/system/vulnerabilities +shutdown=configuration/system/shutdown +credits=configuration/system/credits
+# Status menu +system=configuration/status/system +memory=configuration/status/memory +services=configuration/status/services +media=configuration/status/drives +netexternal=configuration/status/network_ext +netinternal=configuration/status/network_int +netother=configuration/status/network_int +netovpnrw=configuration/status/network_ovpnrw +#netovpnsrv= +hardwaregraphs=configuration/status/hardware_diagrams +entropy=configuration/status/entropy +connections=configuration/status/connections +traffic=configuration/status/nettraffic +#mdstat=
+# Network menu +zoneconf=configuration/network/zoneconf +dns=dns +proxy=configuration/network/proxy +urlfilter=configuration/network/proxy/url-filter +#updatexlrator=configuration/network/proxy/update_accelerator +dhcp=configuration/network/dhcp +captive=configuration/network/captive +connscheduler=configuration/network/connectionscheduler +hosts=configuration/network/hosts +dnsforward=configuration/network/dnsforward +routing=configuration/network/static +mac=configuration/network/mac-address +wakeonlan=configuration/network/wake-on-lan
+# Services menu +vpnmain=configuration/services/ipsec +ovpnmain=configuration/services/openvpn +ddns=configuration/services/dyndns +time=configuration/services/ntp qos=configuration/services/qos +extrahd=configuration/services/extrahd
+# Firewall menu +firewall=configuration/firewall +fwhosts=configuration/firewall/fwgroups +optionsfw=configuration/firewall/options +ids=configuration/firewall/ips +p2p-block=configuration/firewall/p2p-block +location-block=configuration/firewall/geoip-block +wireless=configuration/firewall/accesstoblue +iptables=configuration/firewall/iptables
+# IPfire menu +pakfire=configuration/ipfire/pakfire
+# Logs menu +summary=configuration/logs/summary +config=configuration/logs/logsettings +proxylog=configuration/logs/proxy +calamaris=configuration/logs/proxyreports +firewalllog=configuration/logs/firewall +firewalllogip=configuration/logs/firewall-ip +firewalllogport=configuration/logs/firewall-port +firewalllogcountry=configuration/logs/firewall-country +ids=configuration/logs/ips +#ovpnclients= +urlfilter=configuration/logs/url-filter +log=configuration/logs/system
My apologies for causing all of the confusion and all of the mailing list noise.
Jon
On Dec 8, 2021, at 6:43 AM, Leo Hofmann hofmann@leo-andres.de wrote:
Hi all,
Please excuse the confusion, I'll try to explain.
Most important first: This does not fail in Core 162! The code is complete and does not generate errors or incorrect links. (I just checked that again and I also always make sure my patches don't break stuff before submitting.)
When I presented the idea on the mailing list in September, I included three sample links in my patch and asked for help in collecting more.
https://patchwork.ipfire.org/project/ipfire/patch/20210919143444.1739-1-hofm... https://patchwork.ipfire.org/project/ipfire/patch/20210928110906.1089-1-hofm...
The incomplete file had to be there for the code to work and anyone to add more links to it. But strictly speaking, the feature wasn't yet complete.
I should have made it clearer that the revised patchset did not come with a complete list either and still required more work. This was obvious to me, but I did not communicate it well. I wasn't paying attention and I do apologize for that.
If we leave it as it is now, core 162 will enable only three links and core 163 will then bring the complete feature. The links point to the correct wiki page and appear on the following pages: Index, PPP setup, QoS
Regards Leo
Am 08.12.2021 um 12:29 schrieb Adolf Belka:
Hi,
On 08/12/2021 11:35, Michael Tremer wrote:
Hello,
I am quite confused, too.
I thought all of this was already in the update. We seem to at least be missing this patch which isn’t a problem.
My understanding is that the original patch provided the code to be able to show the help symbols if there was a link provided but the only link was for the main page. This additional patch now provides the list of links for each of the menu pages in the WUI that have a page in the wiki.
Regards,
Adolf.
Is there anything else that needs to go into 162 to make this fully work?
-Michael
On 5 Dec 2021, at 17:13, Jon Murphy jcmurphy26@gmail.com wrote:
Will this mean the code change is in Core 162 and the manualpages (text file) will be in Core 163 ?
On Dec 5, 2021, at 4:37 AM, Peter Müller peter.mueller@ipfire.org wrote:
Hi,
this looks good to me. I will apply it into the temporary branch for Core Update 163, as C162 is already closed and in testing.
Reviewed-by: Peter Müller peter.mueller@ipfire.org
Thanks, and best regards, Peter Müller
From: Jon Murphy jcmurphy26@gmail.com
Jon Murphy gathered all the links and made the updated file available on the mailing list: https://lists.ipfire.org/pipermail/development/2021-October/011383.html https://lists.ipfire.org/pipermail/development/2021-December/011737.html
With kind permission from him, this patch contains the completed list. The list was successfully checked with "./make.sh check-manualpages".
Signed-off-by: Leo-Andres Hofmann hofmann@leo-andres.de Reported-by: Jon Murphy jcmurphy26@gmail.com
config/cfgroot/manualpages | 81 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 78 insertions(+), 3 deletions(-)
diff --git a/config/cfgroot/manualpages b/config/cfgroot/manualpages index e5ab1a13c..97246e6f0 100644 --- a/config/cfgroot/manualpages +++ b/config/cfgroot/manualpages @@ -1,7 +1,82 @@ -# User manual base URL (without trailing slash) +# Assign manual page URL path to CGI file ([cgi basename]=[path/to/page])
+# Base URL (without trailing slash) BASE_URL=https://wiki.ipfire.org +index=configuration/system/startpage
-# Assign manual page URL path to CGI file ([cgi basename]=[path/to/page]) +# System menu index=configuration/system/startpage -pppsetup=configuration/system/dial +mail=configuration/system/mail_service +remote=configuration/system/ssh +backup=configuration/system/backup +gui=configuration/system/userinterface +fireinfo=fireinfo +vulnerabilities=configuration/system/vulnerabilities +shutdown=configuration/system/shutdown +credits=configuration/system/credits
+# Status menu +system=configuration/status/system +memory=configuration/status/memory +services=configuration/status/services +media=configuration/status/drives +netexternal=configuration/status/network_ext +netinternal=configuration/status/network_int +netother=configuration/status/network_int +netovpnrw=configuration/status/network_ovpnrw +#netovpnsrv= +hardwaregraphs=configuration/status/hardware_diagrams +entropy=configuration/status/entropy +connections=configuration/status/connections +traffic=configuration/status/nettraffic +#mdstat=
+# Network menu +zoneconf=configuration/network/zoneconf +dns=dns +proxy=configuration/network/proxy +urlfilter=configuration/network/proxy/url-filter +#updatexlrator=configuration/network/proxy/update_accelerator +dhcp=configuration/network/dhcp +captive=configuration/network/captive +connscheduler=configuration/network/connectionscheduler +hosts=configuration/network/hosts +dnsforward=configuration/network/dnsforward +routing=configuration/network/static +mac=configuration/network/mac-address +wakeonlan=configuration/network/wake-on-lan
+# Services menu +vpnmain=configuration/services/ipsec +ovpnmain=configuration/services/openvpn +ddns=configuration/services/dyndns +time=configuration/services/ntp qos=configuration/services/qos +extrahd=configuration/services/extrahd
+# Firewall menu +firewall=configuration/firewall +fwhosts=configuration/firewall/fwgroups +optionsfw=configuration/firewall/options +ids=configuration/firewall/ips +p2p-block=configuration/firewall/p2p-block +location-block=configuration/firewall/geoip-block +wireless=configuration/firewall/accesstoblue +iptables=configuration/firewall/iptables
+# IPfire menu +pakfire=configuration/ipfire/pakfire
+# Logs menu +summary=configuration/logs/summary +config=configuration/logs/logsettings +proxylog=configuration/logs/proxy +calamaris=configuration/logs/proxyreports +firewalllog=configuration/logs/firewall +firewalllogip=configuration/logs/firewall-ip +firewalllogport=configuration/logs/firewall-port +firewalllogcountry=configuration/logs/firewall-country +ids=configuration/logs/ips +#ovpnclients= +urlfilter=configuration/logs/url-filter +log=configuration/logs/system
Hello,
No need to freak out. We caught this all in the testing phase and that is exactly what it is there for.
We just don’t want to break shit in production :)
-Michael
On 8 Dec 2021, at 17:35, Jon Murphy jcmurphy26@gmail.com wrote:
My apologies for causing all of the confusion and all of the mailing list noise.
Jon
On Dec 8, 2021, at 6:43 AM, Leo Hofmann hofmann@leo-andres.de wrote:
Hi all,
Please excuse the confusion, I'll try to explain.
Most important first: This does not fail in Core 162! The code is complete and does not generate errors or incorrect links. (I just checked that again and I also always make sure my patches don't break stuff before submitting.)
When I presented the idea on the mailing list in September, I included three sample links in my patch and asked for help in collecting more.
https://patchwork.ipfire.org/project/ipfire/patch/20210919143444.1739-1-hofm... https://patchwork.ipfire.org/project/ipfire/patch/20210928110906.1089-1-hofm...
The incomplete file had to be there for the code to work and anyone to add more links to it. But strictly speaking, the feature wasn't yet complete.
I should have made it clearer that the revised patchset did not come with a complete list either and still required more work. This was obvious to me, but I did not communicate it well. I wasn't paying attention and I do apologize for that.
If we leave it as it is now, core 162 will enable only three links and core 163 will then bring the complete feature. The links point to the correct wiki page and appear on the following pages: Index, PPP setup, QoS
Regards Leo
Am 08.12.2021 um 12:29 schrieb Adolf Belka:
Hi,
On 08/12/2021 11:35, Michael Tremer wrote:
Hello,
I am quite confused, too.
I thought all of this was already in the update. We seem to at least be missing this patch which isn’t a problem.
My understanding is that the original patch provided the code to be able to show the help symbols if there was a link provided but the only link was for the main page. This additional patch now provides the list of links for each of the menu pages in the WUI that have a page in the wiki.
Regards,
Adolf.
Is there anything else that needs to go into 162 to make this fully work?
-Michael
On 5 Dec 2021, at 17:13, Jon Murphy jcmurphy26@gmail.com wrote:
Will this mean the code change is in Core 162 and the manualpages (text file) will be in Core 163 ?
On Dec 5, 2021, at 4:37 AM, Peter Müller peter.mueller@ipfire.org wrote:
Hi,
this looks good to me. I will apply it into the temporary branch for Core Update 163, as C162 is already closed and in testing.
Reviewed-by: Peter Müller peter.mueller@ipfire.org
Thanks, and best regards, Peter Müller
> From: Jon Murphy jcmurphy26@gmail.com > > Jon Murphy gathered all the links and made the updated file > available on the mailing list: > https://lists.ipfire.org/pipermail/development/2021-October/011383.html > https://lists.ipfire.org/pipermail/development/2021-December/011737.html > > With kind permission from him, this patch contains the completed list. > The list was successfully checked with "./make.sh check-manualpages". > > Signed-off-by: Leo-Andres Hofmann hofmann@leo-andres.de > Reported-by: Jon Murphy jcmurphy26@gmail.com > --- > config/cfgroot/manualpages | 81 ++++++++++++++++++++++++++++++++++++-- > 1 file changed, 78 insertions(+), 3 deletions(-) > > diff --git a/config/cfgroot/manualpages b/config/cfgroot/manualpages > index e5ab1a13c..97246e6f0 100644 > --- a/config/cfgroot/manualpages > +++ b/config/cfgroot/manualpages > @@ -1,7 +1,82 @@ > -# User manual base URL (without trailing slash) > +# Assign manual page URL path to CGI file ([cgi basename]=[path/to/page]) > + > +# Base URL (without trailing slash) > BASE_URL=https://wiki.ipfire.org > +index=configuration/system/startpage > > -# Assign manual page URL path to CGI file ([cgi basename]=[path/to/page]) > +# System menu > index=configuration/system/startpage > -pppsetup=configuration/system/dial > +mail=configuration/system/mail_service > +remote=configuration/system/ssh > +backup=configuration/system/backup > +gui=configuration/system/userinterface > +fireinfo=fireinfo > +vulnerabilities=configuration/system/vulnerabilities > +shutdown=configuration/system/shutdown > +credits=configuration/system/credits > + > +# Status menu > +system=configuration/status/system > +memory=configuration/status/memory > +services=configuration/status/services > +media=configuration/status/drives > +netexternal=configuration/status/network_ext > +netinternal=configuration/status/network_int > +netother=configuration/status/network_int > +netovpnrw=configuration/status/network_ovpnrw > +#netovpnsrv= > +hardwaregraphs=configuration/status/hardware_diagrams > +entropy=configuration/status/entropy > +connections=configuration/status/connections > +traffic=configuration/status/nettraffic > +#mdstat= > + > +# Network menu > +zoneconf=configuration/network/zoneconf > +dns=dns > +proxy=configuration/network/proxy > +urlfilter=configuration/network/proxy/url-filter > +#updatexlrator=configuration/network/proxy/update_accelerator > +dhcp=configuration/network/dhcp > +captive=configuration/network/captive > +connscheduler=configuration/network/connectionscheduler > +hosts=configuration/network/hosts > +dnsforward=configuration/network/dnsforward > +routing=configuration/network/static > +mac=configuration/network/mac-address > +wakeonlan=configuration/network/wake-on-lan > + > +# Services menu > +vpnmain=configuration/services/ipsec > +ovpnmain=configuration/services/openvpn > +ddns=configuration/services/dyndns > +time=configuration/services/ntp > qos=configuration/services/qos > +extrahd=configuration/services/extrahd > + > +# Firewall menu > +firewall=configuration/firewall > +fwhosts=configuration/firewall/fwgroups > +optionsfw=configuration/firewall/options > +ids=configuration/firewall/ips > +p2p-block=configuration/firewall/p2p-block > +location-block=configuration/firewall/geoip-block > +wireless=configuration/firewall/accesstoblue > +iptables=configuration/firewall/iptables > + > +# IPfire menu > +pakfire=configuration/ipfire/pakfire > + > +# Logs menu > +summary=configuration/logs/summary > +config=configuration/logs/logsettings > +proxylog=configuration/logs/proxy > +calamaris=configuration/logs/proxyreports > +firewalllog=configuration/logs/firewall > +firewalllogip=configuration/logs/firewall-ip > +firewalllogport=configuration/logs/firewall-port > +firewalllogcountry=configuration/logs/firewall-country > +ids=configuration/logs/ips > +#ovpnclients= > +urlfilter=configuration/logs/url-filter > +log=configuration/logs/system >
Hello,
On 8 Dec 2021, at 12:43, Leo Hofmann hofmann@leo-andres.de wrote:
Hi all,
Please excuse the confusion, I'll try to explain.
Most important first: This does not fail in Core 162! The code is complete and does not generate errors or incorrect links. (I just checked that again and I also always make sure my patches don't break stuff before submitting.)
That is a very good approach :)
When I presented the idea on the mailing list in September, I included three sample links in my patch and asked for help in collecting more.
https://patchwork.ipfire.org/project/ipfire/patch/20210919143444.1739-1-hofm... https://patchwork.ipfire.org/project/ipfire/patch/20210928110906.1089-1-hofm...
The incomplete file had to be there for the code to work and anyone to add more links to it. But strictly speaking, the feature wasn't yet complete.
Oh, I didn’t realise this. I clicked on a link and it worked :)
I should have made it clearer that the revised patchset did not come with a complete list either and still required more work. This was obvious to me, but I did not communicate it well. I wasn't paying attention and I do apologize for that.
No need to apologise.
If we leave it as it is now, core 162 will enable only three links and core 163 will then bring the complete feature. The links point to the correct wiki page and appear on the following pages: Index, PPP setup, QoS
Adding the latest patch with the extra links is no trouble. We have to build the entire update again due to some breaks in suricata. I just wanted to make sure that we catch it all.
Best, -Michael
Regards Leo
Am 08.12.2021 um 12:29 schrieb Adolf Belka:
Hi,
On 08/12/2021 11:35, Michael Tremer wrote:
Hello,
I am quite confused, too.
I thought all of this was already in the update. We seem to at least be missing this patch which isn’t a problem.
My understanding is that the original patch provided the code to be able to show the help symbols if there was a link provided but the only link was for the main page. This additional patch now provides the list of links for each of the menu pages in the WUI that have a page in the wiki.
Regards,
Adolf.
Is there anything else that needs to go into 162 to make this fully work?
-Michael
On 5 Dec 2021, at 17:13, Jon Murphy jcmurphy26@gmail.com wrote:
Will this mean the code change is in Core 162 and the manualpages (text file) will be in Core 163 ?
On Dec 5, 2021, at 4:37 AM, Peter Müller peter.mueller@ipfire.org wrote:
Hi,
this looks good to me. I will apply it into the temporary branch for Core Update 163, as C162 is already closed and in testing.
Reviewed-by: Peter Müller peter.mueller@ipfire.org
Thanks, and best regards, Peter Müller
From: Jon Murphy jcmurphy26@gmail.com
Jon Murphy gathered all the links and made the updated file available on the mailing list: https://lists.ipfire.org/pipermail/development/2021-October/011383.html https://lists.ipfire.org/pipermail/development/2021-December/011737.html
With kind permission from him, this patch contains the completed list. The list was successfully checked with "./make.sh check-manualpages".
Signed-off-by: Leo-Andres Hofmann hofmann@leo-andres.de Reported-by: Jon Murphy jcmurphy26@gmail.com
config/cfgroot/manualpages | 81 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 78 insertions(+), 3 deletions(-)
diff --git a/config/cfgroot/manualpages b/config/cfgroot/manualpages index e5ab1a13c..97246e6f0 100644 --- a/config/cfgroot/manualpages +++ b/config/cfgroot/manualpages @@ -1,7 +1,82 @@ -# User manual base URL (without trailing slash) +# Assign manual page URL path to CGI file ([cgi basename]=[path/to/page])
+# Base URL (without trailing slash) BASE_URL=https://wiki.ipfire.org +index=configuration/system/startpage
-# Assign manual page URL path to CGI file ([cgi basename]=[path/to/page]) +# System menu index=configuration/system/startpage -pppsetup=configuration/system/dial +mail=configuration/system/mail_service +remote=configuration/system/ssh +backup=configuration/system/backup +gui=configuration/system/userinterface +fireinfo=fireinfo +vulnerabilities=configuration/system/vulnerabilities +shutdown=configuration/system/shutdown +credits=configuration/system/credits
+# Status menu +system=configuration/status/system +memory=configuration/status/memory +services=configuration/status/services +media=configuration/status/drives +netexternal=configuration/status/network_ext +netinternal=configuration/status/network_int +netother=configuration/status/network_int +netovpnrw=configuration/status/network_ovpnrw +#netovpnsrv= +hardwaregraphs=configuration/status/hardware_diagrams +entropy=configuration/status/entropy +connections=configuration/status/connections +traffic=configuration/status/nettraffic +#mdstat=
+# Network menu +zoneconf=configuration/network/zoneconf +dns=dns +proxy=configuration/network/proxy +urlfilter=configuration/network/proxy/url-filter +#updatexlrator=configuration/network/proxy/update_accelerator +dhcp=configuration/network/dhcp +captive=configuration/network/captive +connscheduler=configuration/network/connectionscheduler +hosts=configuration/network/hosts +dnsforward=configuration/network/dnsforward +routing=configuration/network/static +mac=configuration/network/mac-address +wakeonlan=configuration/network/wake-on-lan
+# Services menu +vpnmain=configuration/services/ipsec +ovpnmain=configuration/services/openvpn +ddns=configuration/services/dyndns +time=configuration/services/ntp qos=configuration/services/qos +extrahd=configuration/services/extrahd
+# Firewall menu +firewall=configuration/firewall +fwhosts=configuration/firewall/fwgroups +optionsfw=configuration/firewall/options +ids=configuration/firewall/ips +p2p-block=configuration/firewall/p2p-block +location-block=configuration/firewall/geoip-block +wireless=configuration/firewall/accesstoblue +iptables=configuration/firewall/iptables
+# IPfire menu +pakfire=configuration/ipfire/pakfire
+# Logs menu +summary=configuration/logs/summary +config=configuration/logs/logsettings +proxylog=configuration/logs/proxy +calamaris=configuration/logs/proxyreports +firewalllog=configuration/logs/firewall +firewalllogip=configuration/logs/firewall-ip +firewalllogport=configuration/logs/firewall-port +firewalllogcountry=configuration/logs/firewall-country +ids=configuration/logs/ips +#ovpnclients= +urlfilter=configuration/logs/url-filter +log=configuration/logs/system