From: Leo-Andres Hofmann Date: Mon, 27 Dec 2021 13:21:37 +0000 (+0100) Subject: pakfire.cgi: Improve HTML output and layout X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=219dacef2c36a00dc5d26a9c42b86513281683fa;p=people%2Fmfischer%2Fipfire-2.x.git pakfire.cgi: Improve HTML output and layout Add missing closing tags, indentation and CSS styling. Add link to reboot notice, left-align info list and resize packages lists for better readability. Signed-off-by: Leo-Andres Hofmann Acked-by: Peter Müller --- diff --git a/html/cgi-bin/pakfire.cgi b/html/cgi-bin/pakfire.cgi index 8516b07b1d..51f586aa25 100644 --- a/html/cgi-bin/pakfire.cgi +++ b/html/cgi-bin/pakfire.cgi @@ -100,6 +100,32 @@ if($cgiparams{'ACTION'} eq 'json-getstatus') { ###--- HTML HEAD ---### my $extraHead = < + /* Main screen */ + table#pfmain { + width: 100%; + border-style: hidden; + table-layout: fixed; + } + + #pfmain td { + padding: 5px 20px 0; + text-align: center; + } + #pfmain tr:not(:last-child) > td { + padding-bottom: 1.5em; + } + #pfmain tr > td.heading { + padding: 0; + font-weight: bold; + background-color: $color{'color20'}; + } + + .pflist { + width: 100%; + text-align: left; + margin-bottom: 0.8em; + } + /* Pakfire log viewer */ section#pflog-header { width: 100%; @@ -173,20 +199,23 @@ END print "$_\n"; } print < - $Lang::tr{'pakfire accept all'} -   + + $Lang::tr{'pakfire accept all'} +  
+
+ + END &Header::closebox(); @@ -210,20 +239,23 @@ END print "$_\n"; } print < - $Lang::tr{'pakfire uninstall all'} -   + + $Lang::tr{'pakfire uninstall all'} +  
+
+ + END &Header::closebox(); @@ -311,70 +343,69 @@ my $packages_update_age = &General::age("/opt/pakfire/db/lists/packages_list.db" &Header::openbox("100%", "center", "Pakfire"); print < + END if ( -e "/var/run/need_reboot") { - print ""; - print "" + print "\t\t\n"; } print < - - + + + + + + + - + +
$Lang::tr{'needreboot'}!
 
$Lang::tr{'needreboot'}!
$Lang::tr{'pakfire system state'}: - - $Lang::tr{'available updates'}:
$Lang::tr{'pakfire core update level'}: $core_release
- $Lang::tr{'pakfire last update'} $core_update_age $Lang::tr{'pakfire ago'}
- $Lang::tr{'pakfire last serverlist update'} $server_update_age $Lang::tr{'pakfire ago'}
- $Lang::tr{'pakfire last core list update'} $corelist_update_age $Lang::tr{'pakfire ago'}
+
$Lang::tr{'pakfire system state'}:$Lang::tr{'available updates'}:
$Lang::tr{'pakfire core update level'}: $core_release +
+
+ $Lang::tr{'pakfire last update'} $core_update_age $Lang::tr{'pakfire ago'}
+ $Lang::tr{'pakfire last serverlist update'} $server_update_age $Lang::tr{'pakfire ago'}
+ $Lang::tr{'pakfire last core list update'} $corelist_update_age $Lang::tr{'pakfire ago'}
$Lang::tr{'pakfire last package update'} $packages_update_age $Lang::tr{'pakfire ago'} -
-
-
-
-
-
+
- + +
+
+
+
+
$Lang::tr{'pakfire available addons'}$Lang::tr{'pakfire installed addons'}
  -
$Lang::tr{'pakfire available addons'} - $Lang::tr{'pakfire installed addons'} -
-

$Lang::tr{'pakfire install description'}

-
-

$Lang::tr{'pakfire install description'}

+ + - - - -
-

$Lang::tr{'pakfire uninstall description'}

-
- + +
+

$Lang::tr{'pakfire uninstall description'}

+
+ - -
+ &Pakfire::dblist("installed", "forweb"); + print < + + + +
END