tazpanel rev 17

More in README and Makefile
author Christophe Lincoln <pankso@slitaz.org>
date Mon Apr 04 04:26:20 2011 +0200 (2011-04-04)
parents 969ebe1eaa22
children 1e335f462236
files Makefile README styles/default/header.html styles/default/images/clear.png styles/default/images/tazpkg-installed.png styles/default/images/tazpkg.png styles/default/images/user.png styles/default/images/users.png styles/default/style.css tazpkg.cgi
line diff
     1.1 --- a/Makefile	Sun Apr 03 17:44:44 2011 +0200
     1.2 +++ b/Makefile	Mon Apr 04 04:26:20 2011 +0200
     1.3 @@ -39,7 +39,7 @@
     1.4  		$(DESTDIR)$(SYSCONFDIR) \
     1.5  		$(DESTDIR)$(PANEL)
     1.6  	cp -f tazpanel $(DESTDIR)$(PREFIX)/bin
     1.7 -	cp -f *.conf $(DESTDIR)$(SYSCONFDIR)
     1.8 +	cp -f *.conf data/httpd.conf $(DESTDIR)$(SYSCONFDIR)
     1.9  	cp -a *.cgi lib/ styles/ $(DESTDIR)$(PANEL)	
    1.10  	#cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
    1.11  
     2.1 --- a/README	Sun Apr 03 17:44:44 2011 +0200
     2.2 +++ b/README	Mon Apr 04 04:26:20 2011 +0200
     2.3 @@ -4,7 +4,7 @@
     2.4  
     2.5  Tazpanel is the SliTaz Control Panel, a web interface who let you manage the
     2.6  full system  in a redically simple way. The output xHTML code is valid xHTML 5
     2.7 -and all theming is done with standard CSS.
     2.8 +and all theming is done with standard CSS 3.
     2.9  
    2.10  
    2.11  Web server
    2.12 @@ -15,8 +15,13 @@
    2.13  
    2.14  # httpd -p 8080 u root -c /etc/slitaz/tazpanel-httpd.conf
    2.15  
    2.16 +Or use tazpanel cmdline:
    2.17 +
    2.18 +# tazpanel start
    2.19 +
    2.20  Quick notes
    2.21  -----------
    2.22  
    2.23  	Panel password is defined in httpd.conf
    2.24  	When cat is used: `gettext "Text to translate"`
    2.25 +	Devel can run the web server with root in the src tree
     3.1 --- a/styles/default/header.html	Sun Apr 03 17:44:44 2011 +0200
     3.2 +++ b/styles/default/header.html	Mon Apr 04 04:26:20 2011 +0200
     3.3 @@ -9,7 +9,11 @@
     3.4  <body>
     3.5  
     3.6  <div id="tazbar">
     3.7 -	<div id="menu"><a href="./">Panel</a>
     3.8 +	<div id="icons">
     3.9 +		<a href="./"><img src="styles/default/images/home.png" /></a>
    3.10 +	</div>
    3.11 +	<div id="menu">
    3.12 +		<!-- <a href="./">Panel</a> -->
    3.13  		<a href="tazpkg.cgi">Packages</a>
    3.14  		<a href="index.cgi?boot">Boot</a>
    3.15  		<a href="index.cgi?users">Users</a>
    3.16 @@ -17,8 +21,10 @@
    3.17  		<a href="index.cgi?hardware">Hardware</a>
    3.18  	</div>
    3.19  </div>
    3.20 -	
    3.21 -<h1>TazPanel - %TITLE%</h1>
    3.22 +
    3.23 +<div id="header">
    3.24 +	<h1>TazPanel - %TITLE%</h1>
    3.25 +</div>
    3.26  
    3.27  <!-- Page content -->
    3.28  <div id="content">
     4.1 Binary file styles/default/images/clear.png has changed
     5.1 Binary file styles/default/images/tazpkg-installed.png has changed
     6.1 Binary file styles/default/images/tazpkg.png has changed
     7.1 Binary file styles/default/images/user.png has changed
     8.1 Binary file styles/default/images/users.png has changed
     9.1 --- a/styles/default/style.css	Sun Apr 03 17:44:44 2011 +0200
     9.2 +++ b/styles/default/style.css	Mon Apr 04 04:26:20 2011 +0200
     9.3 @@ -2,11 +2,21 @@
     9.4  	CSS style for TazPanel - (C) 2011 SliTaz GNU/Linux
     9.5  */
     9.6  
     9.7 -html { min-height:  102%; min-width: 300px; }
     9.8 -body { padding: 0; font: 13px sans;  }
     9.9 -h1 { color: #d66018; border-bottom: 1px dotted #ddd; }
    9.10 +/* To always have a scroll bar */
    9.11 +html {
    9.12 +	min-height:  102%;
    9.13 +} 
    9.14 + 
    9.15 +body {
    9.16 +	background: #ffffff;
    9.17 +	color: black;
    9.18 +	font: 13px sans-serif, vernada, arial;
    9.19 +	margin: 25px 0 0;
    9.20 +}
    9.21 +
    9.22 +h1 { color: #d66018; padding: 18px 0 0 40px;}
    9.23  h2 { color: #444; margin: 10px 0 10px; }
    9.24 -h3 { color: #666; font-size: 140%; margin: 0; }
    9.25 +h3 { color: #666; font-size: 140%; }
    9.26  h4 { color: #888; font-size: 120%; }
    9.27  img { border: 0pt none; vertical-align: middle; padding: 0 6px 0 0;}
    9.28  p { margin: 6px 0; }
    9.29 @@ -15,52 +25,32 @@
    9.30  a { text-decoration: none; color: #666; }
    9.31  a:hover { color: #000; }
    9.32  
    9.33 -pre { 
    9.34 -	background-color: #f8f8f8; 
    9.35 -	border: 1px solid #ddd; 
    9.36 -	padding: 10px;
    9.37 -	margin: 10px 0;
    9.38 -	overflow: auto;
    9.39 +/* Header and main title */
    9.40 +
    9.41 +#header {
    9.42 +	height: 68px;
    9.43 +	border-bottom: 1px dotted #ddd;
    9.44  }
    9.45  
    9.46 -.pre_main { margin: 40px 0 10px; }
    9.47 -
    9.48 -input[type=submit] {
    9.49 -	padding: 2px 4px;
    9.50 -	margin: 4px 0 0;
    9.51 -	background-color: #f1f1f1;
    9.52 -	border: 1px solid #ddd;
    9.53 -	cursor: pointer;
    9.54 -}
    9.55 -
    9.56 -input[type=submit]:hover {
    9.57 -	background-color: #ddd;
    9.58 -	border: 1px solid #999;
    9.59 -}
    9.60 -
    9.61 -input[type=text] { height: 15px; }
    9.62 -
    9.63  /* Blocks */
    9.64  
    9.65  #block { float: left; }
    9.66  
    9.67 -#sub_block { margin: 50px 0; }
    9.68 +#sub_block { margin: 20px 0; }
    9.69  
    9.70  /* Content */
    9.71  
    9.72 -#content { margin: 0; }
    9.73 -#wrapper { margin: 80px 0 20px; }
    9.74 +#content { margin: 20px 80px; }
    9.75 +#wrapper { margin: 20px 0 20px; }
    9.76  
    9.77  .search {
    9.78  	position: absolute;
    9.79 -	right: 48px;
    9.80 -	top: 200px;
    9.81 +	right: 80px;
    9.82 +	top: 39px;
    9.83  }
    9.84  
    9.85  #actions {
    9.86 -	position: absolute;
    9.87 -	left: 48px;
    9.88 -	top: 200px;
    9.89 +	
    9.90  }
    9.91  
    9.92  #actions p { padding: 0; }
    9.93 @@ -89,7 +79,6 @@
    9.94  table {
    9.95  	background-color: #f8f8f8;
    9.96  	border: 1px solid #ddd;
    9.97 -	margin: 40px 0 0 0;
    9.98  	padding: 10px 10px 10px 0;
    9.99  	width: 100%;
   9.100  }
   9.101 @@ -102,30 +91,53 @@
   9.102  	font-weight: bold;
   9.103  }
   9.104  
   9.105 -/* Desktop gui style */
   9.106 +/* Desktop gui style bar */
   9.107  
   9.108  #tazbar {
   9.109  	position: fixed;
   9.110  	top: 0;
   9.111  	left: 0;
   9.112 -	height: 22px;
   9.113 +	height: 24px;
   9.114  	width: 100%;
   9.115  	padding: 0 0 0 0;
   9.116  	background-color: #f1efeb;
   9.117 -	border-top: 1px solid #fefefe;
   9.118 -	border-bottom: 1px solid #d3cdc3;
   9.119 +	border-bottom: 1px solid #c1baad;
   9.120  	z-index: 200;
   9.121 +	cursor: default;
   9.122  }
   9.123 -#menu { margin: 2px 8px; }
   9.124 -#tazbar a { padding: 2px 4px;
   9.125 -color: #000; border: 1px solid #ECE9E4;
   9.126 -display: inline; }
   9.127 -#tazbar a:hover { background-color: #fdfcfa ;
   9.128 - border: 1px solid #827a6c;
   9.129 - -moz-border-radius: 2px;
   9.130 -	-webkit-border-radius: 2px;
   9.131 -	border-radius: 2px;}
   9.132 +#menu { margin: 4px 8px; }
   9.133 +#menu a { padding: 2px 4px; color: #000; cursor: default; }
   9.134 +#menu a:hover { color: #444; }
   9.135 +#icons { margin: 2px 8px; float: right; }
   9.136 +#icons img { padding: 0; }
   9.137  
   9.138 +.progress { cursor: progress; }
   9.139 +
   9.140 +
   9.141 +pre { 
   9.142 +	background-color: #f8f8f8; 
   9.143 +	border: 1px solid #ddd; 
   9.144 +	padding: 10px;
   9.145 +	margin: 10px 0;
   9.146 +	overflow: auto;
   9.147 +}
   9.148 +
   9.149 +.pre_main { margin: 20px 0 10px; }
   9.150 +
   9.151 +input[type=submit] {
   9.152 +	padding: 2px 4px;
   9.153 +	margin: 4px 0 0;
   9.154 +	background-color: #f1f1f1;
   9.155 +	border: 1px solid #ddd;
   9.156 +	cursor: pointer;
   9.157 +}
   9.158 +
   9.159 +input[type=submit]:hover {
   9.160 +	background-color: #ddd;
   9.161 +	border: 1px solid #999;
   9.162 +}
   9.163 +
   9.164 +input[type=text] { height: 15px; }
   9.165  
   9.166  /* Round corner */
   9.167  
    10.1 --- a/tazpkg.cgi	Sun Apr 03 17:44:44 2011 +0200
    10.2 +++ b/tazpkg.cgi	Mon Apr 04 04:26:20 2011 +0200
    10.3 @@ -11,7 +11,8 @@
    10.4  echo "Content-Type: text/html"
    10.5  echo ""
    10.6  
    10.7 -. tazpanel.conf
    10.8 +. lib/libtazpanel
    10.9 +get_config
   10.10  
   10.11  # Include gettext helper script.
   10.12  . /usr/bin/gettext.sh
   10.13 @@ -87,23 +88,22 @@
   10.14  # xHTML functions
   10.15  #
   10.16  
   10.17 +# ENTER will search but user may search for a button, so put one.
   10.18  search_form() {
   10.19  	cat << EOT
   10.20  <div class="search">
   10.21 -<form method="get" action="$SCRIPT_NAME">
   10.22 -	<p>
   10.23 -		<input type="text" name="search" size="20">
   10.24 -		<input type="submit" value="`gettext "Search"`">
   10.25 -	</p>
   10.26 -</form>
   10.27 +	<form method="get" action="$SCRIPT_NAME">
   10.28 +		<p>
   10.29 +			<input type="text" name="search" size="20">
   10.30 +			<input type="submit" value="`gettext "Search"`">
   10.31 +		</p>
   10.32 +	</form>
   10.33  </div>
   10.34  EOT
   10.35  }
   10.36  
   10.37 -table_start() {
   10.38 +table_head() {
   10.39  	cat << EOT
   10.40 -<table>
   10.41 -	<tbody>
   10.42  		<tr id="thead">
   10.43  			<td>`gettext "Name"`</td>
   10.44  			<td>`gettext "Version"`</td>
   10.45 @@ -113,13 +113,6 @@
   10.46  EOT
   10.47  }
   10.48  
   10.49 -table_end () {
   10.50 -	cat << EOT
   10.51 -	</tbody>
   10.52 -</table>
   10.53 -EOT
   10.54 -}
   10.55 -
   10.56  sub_block() {
   10.57  	cat << EOT
   10.58  <div id="sub_block">
   10.59 @@ -205,7 +198,6 @@
   10.60  	list-all)
   10.61  		# List all available packages on mirror
   10.62  		cd  $LOCALSTATE
   10.63 -		loader
   10.64  		search_form
   10.65  		sub_block
   10.66  		cat << EOT
   10.67 @@ -216,6 +208,7 @@
   10.68  		list_all_actions
   10.69  		echo '</div>'
   10.70  		table_start
   10.71 +		table_head
   10.72  		cat packages.desc | parse_packages_desc
   10.73  		table_end
   10.74  		list_all_actions
   10.75 @@ -227,13 +220,14 @@
   10.76  		search_form
   10.77  		sub_block
   10.78  		cat << EOT
   10.79 -<h2>`gettext "All packages"`</h2>
   10.80 +<h2>`gettext "Search packages"`</h2>
   10.81  <form method="get" action="$SCRIPT_NAME">
   10.82  <div id="actions">
   10.83  EOT
   10.84  		list_full_actions
   10.85  		echo '</div>'
   10.86  		table_start
   10.87 +		table_head
   10.88  		grep $pkg packages.desc | parse_packages_desc
   10.89  		table_end
   10.90  		echo '</form>' ;;
   10.91 @@ -268,6 +262,7 @@
   10.92  		tazpkg upgradeable
   10.93  		echo '</div>'
   10.94  		table_start
   10.95 +		table_head
   10.96  		for pkg in `cat upgradeable-packages.list`
   10.97  		do
   10.98  			grep "^$pkg |" $LOCALSTATE/packages.desc | parse_packages_desc
   10.99 @@ -350,15 +345,15 @@
  10.100  	<p>`gettext "Tazpkg configuration and settings"`</p>
  10.101  </div>
  10.102  <div>
  10.103 -	<h3>`gettext "Package in cache"`</h3>
  10.104  	<form method="get" action="$SCRIPT_NAME">
  10.105 -	<p>
  10.106 -		`gettext "Packages in the cache:"` $cache_files ($cache_size)
  10.107 -		<input type="hidden" name="config" value="clean" />
  10.108 -		<input type="submit" value="Clean" />
  10.109 -	</p>
  10.110 +		<p>
  10.111 +			`gettext "Packages in the cache:"` $cache_files ($cache_size)
  10.112 +			<input type="hidden" name="config" value="clean" />
  10.113 +			<input type="submit" value="Clean" />
  10.114 +		</p>
  10.115  	</form>
  10.116  </div>
  10.117 +
  10.118  <h3>`gettext "Current mirror list"`</h3>
  10.119  <div class="box">
  10.120  	<ul>