tazpanel diff settings.cgi @ rev 501

*.cgi: Implement TazPanel title and sub-title; hardware.cgi: fix and improve modules search; index.cgi: complex code using awk was prevented 'make pot' to collect all messages, fix terminal history removing; tazpanel.js: disable buttons when no packages selected (pkgs.cgi: up / search / category lists); network.cgi: complex comment was prevented 'make pot' to collect all messages; powersaving.cgi: starting development; *.po: rebuild; tazpanel.ttf: add messages icons, so remove all the style/png images and change libtazpanel; *.css: title and sub-title, messages icons; test.cgi: add new icons.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Jun 08 04:32:19 2015 +0300 (2015-06-08)
parents 2a891cb47520
children a8ff72f76e0d
line diff
     1.1 --- a/settings.cgi	Sat May 23 17:20:17 2015 +0300
     1.2 +++ b/settings.cgi	Mon Jun 08 04:32:19 2015 +0300
     1.3 @@ -13,7 +13,7 @@
     1.4  . lib/libtazpanel
     1.5  get_config
     1.6  
     1.7 -TITLE=$(_ 'TazPanel - Settings')
     1.8 +TITLE=$(_ 'System settings')
     1.9  
    1.10  
    1.11  # Get system database. LDAP compatible.
    1.12 @@ -199,20 +199,17 @@
    1.13  #
    1.14  
    1.15  header
    1.16 -xhtml_header
    1.17  
    1.18  case " $(GET) " in
    1.19  	*\ group*)
    1.20  		#
    1.21  		# Groups management
    1.22  		#
    1.23 +		xhtml_header "$(_ 'Manage groups')"
    1.24  		check_root_tazpanel
    1.25  
    1.26  		cat <<EOT
    1.27 -<h2 id="groups">$(_ 'Manage groups')</h2>
    1.28 -
    1.29 -
    1.30 -<section>
    1.31 +<section id="groups">
    1.32  	<form class="wide">
    1.33  		<header>
    1.34  			<input type="hidden" name="groups"/>
    1.35 @@ -286,12 +283,11 @@
    1.36  		#
    1.37  		# Users management
    1.38  		#
    1.39 +		xhtml_header "$(_ 'Manage users')"
    1.40  		check_root_tazpanel
    1.41  
    1.42  		cat <<EOT
    1.43 -<h2 id="users">$(_ 'Manage users')</h2>
    1.44 -
    1.45 -<section>
    1.46 +<section id="users">
    1.47  	<form class="wide">
    1.48  		<header>
    1.49  			<!--$(_ 'Selection:')-->
    1.50 @@ -396,17 +392,14 @@
    1.51  		#
    1.52  		# Choose locale
    1.53  		#
    1.54 +		xhtml_header "$(_ 'Choose locale')"
    1.55  		check_root_tazpanel
    1.56  
    1.57  		loading_msg "$(_ 'Please wait...')"
    1.58  
    1.59  		cur_loc=$(locale | grep LANG | cut -d= -f2)
    1.60  		cat <<EOT
    1.61 -
    1.62 -
    1.63 -<h2 id="locale">$(_ 'Choose locale')</h2>
    1.64 -
    1.65 -<section>
    1.66 +<section id="locale">
    1.67  	<header>$(_ 'Current locale settings:')</header>
    1.68  	<div>
    1.69  		<pre>$(locale)</pre>
    1.70 @@ -478,8 +471,9 @@
    1.71  		#
    1.72  		# Small tweaks for user
    1.73  		#
    1.74 +		user="$REMOTE_USER"; host="$(hostname)"
    1.75 +		xhtml_header "$(_ 'Small quick tweaks for user %s' "$user")"
    1.76  
    1.77 -		user="$REMOTE_USER"; host="$(hostname)"
    1.78  		HOME="$(awk -F: -vu=$user '$1==u{print $6}' /etc/passwd)"
    1.79  		font="${TERM_FONT:-monospace}"; palette=$(echo $TERM_PALETTE | tr A-Z a-z)
    1.80  		case $user in
    1.81 @@ -592,13 +586,10 @@
    1.82  		#
    1.83  		# Default system settings page
    1.84  		#
    1.85 +		xhtml_header "$(_ 'Manage system time, users or language settings')"
    1.86  		check_root_tazpanel
    1.87  
    1.88  		cat <<EOT
    1.89 -<h2>$(_ 'System settings')</h2>
    1.90 -
    1.91 -<p>$(_ 'Manage system time, users or language settings')<p>
    1.92 -
    1.93  <form><!--
    1.94  	--><button name="users"  data-icon="user" >$(_ 'Manage users' )</button><!--
    1.95  	--><button name="groups" data-icon="group">$(_ 'Manage groups')</button>