tazpanel rev 288 1.5.2

live: make live usb into tazpanle, new input and button style
author Christophe Lincoln <pankso@slitaz.org>
date Mon Apr 02 11:22:06 2012 +0200 (2012-04-02)
parents 2e6d97c044c2
children 1d3917aabe6a
files live.cgi network.cgi styles/default/header.html styles/default/images/down.png
line diff
     1.1 --- a/live.cgi	Mon Apr 02 10:12:40 2012 +0200
     1.2 +++ b/live.cgi	Mon Apr 02 11:22:06 2012 +0200
     1.3 @@ -56,11 +56,6 @@
     1.4  		$TERMINAL $TERM_OPTS \
     1.5  			-T "write-iso" \
     1.6  			-e "tazlito writeiso $(GET write_iso)" & ;;
     1.7 -	*\ gen_liveusb\ *)
     1.8 -		$TERMINAL $TERM_OPTS \
     1.9 -			-T "Tazusb gen-liveusb" \
    1.10 -			-e "tazusb gen-liveusb $(GET gen_liveusb); \
    1.11 -				gettext \"ENTER to quit\"; read i" & ;;
    1.12  	*\ loramoutput\ *)
    1.13  		$TERMINAL $TERM_OPTS \
    1.14  			-T "build loram iso" \
    1.15 @@ -86,27 +81,23 @@
    1.16  		# Step by step interface and store files in cache.
    1.17  		#
    1.18  		gettext "TODO" ;;
    1.19 -	*)
    1.20 -		#
    1.21 -		# Default xHTML content
    1.22 -		#
    1.23 +	*\ liveusb\ *)
    1.24  		xhtml_header
    1.25  		cat << EOT
    1.26  <div id="wrapper">
    1.27 -	<h2>`gettext "SliTaz Live Systems"`</h2>
    1.28 -	<p>`gettext "Create and manage Live CD or USB SliTaz systems"`<p>
    1.29 +	<h2>$(gettext "SliTaz LiveUSB")</h2>
    1.30 +	<p>$(gettext "Create Live USB SliTaz systems")<p>
    1.31  </div>
    1.32  
    1.33 -<a name="liveusb"></a>
    1.34 -<h3>`gettext "Live USB"`</h3>
    1.35  <p>
    1.36 -	`gettext "Generate SliTaz LiveUSB media and boot in RAM! Insert a
    1.37 +	$(gettext "Generate SliTaz LiveUSB media and boot in RAM! Insert a
    1.38  	LiveCD into the cdrom drive, select the correct device and press
    1.39 -	Generate."`
    1.40 +	Generate.")
    1.41  </p>
    1.42  <form method="get" action="$SCRIPT_NAME">
    1.43 -	`gettext "USB Media to use:"`
    1.44 -	<select name="gen_liveusb">
    1.45 +	<input type="hidden" name="liveusb" />
    1.46 +	$(gettext "USB Media to use:")
    1.47 +	<select name="gen">
    1.48  EOT
    1.49  		# List disk if there is a plugged USB device
    1.50  		if [ -d /proc/scsi/usb-storage ]; then
    1.51 @@ -120,6 +111,29 @@
    1.52  	</select>
    1.53  	<input type="submit" value="`gettext "Generate"`" />
    1.54  </form>
    1.55 +EOT
    1.56 +		if [ "$(GET gen)" ]; then
    1.57 +			echo "<h3>tazusb gen-liveusb $(GET gen)</h3>"
    1.58 +			echo '<pre>'
    1.59 +			# No pipe here so output is displayed in realtime
    1.60 +			tazusb gen-liveusb $(GET gen)
    1.61 +			echo '</pre>'
    1.62 +		fi ;;
    1.63 +	*)
    1.64 +		#
    1.65 +		# Default xHTML content
    1.66 +		#
    1.67 +		xhtml_header
    1.68 +		cat << EOT
    1.69 +<div id="wrapper">
    1.70 +	<h2>`gettext "SliTaz Live Systems"`</h2>
    1.71 +	<p>`gettext "Create and manage Live CD or USB SliTaz systems"`<p>
    1.72 +</div>
    1.73 +
    1.74 +<div id="actions">
    1.75 +	<a class="button" href="$SCRIPT_NAME?liveusb">
    1.76 +		<img src="$IMAGES/harddisk.png" />$(gettext "Create LiveUSB")</a>
    1.77 +</div>
    1.78  
    1.79  <a name="livecd"></a>
    1.80  <h3>`gettext "Write a Live CD"`</h3>
     2.1 --- a/network.cgi	Mon Apr 02 10:12:40 2012 +0200
     2.2 +++ b/network.cgi	Mon Apr 02 11:22:06 2012 +0200
     2.3 @@ -285,7 +285,6 @@
     2.4  </p>
     2.5  <div id="actions">
     2.6  	<div class="float-left">
     2.7 -		`gettext "Connection:"`
     2.8  		<a class="button" href="$SCRIPT_NAME?start">
     2.9  			<img src="$IMAGES/start.png" />$(gettext "Start")</a>
    2.10  		<a class="button" href="$SCRIPT_NAME?stop">
     3.1 --- a/styles/default/header.html	Mon Apr 02 10:12:40 2012 +0200
     3.2 +++ b/styles/default/header.html	Mon Apr 02 11:22:06 2012 +0200
     3.3 @@ -78,7 +78,7 @@
     3.4  		</li>
     3.5  		<li><a href="/live.cgi">Live</a>
     3.6  			<ul>
     3.7 -				<li><a href="/live.cgi#liveusb">Create a live USB key</a></li>
     3.8 +				<li><a href="/live.cgi?liveusb">Create a live USB key</a></li>
     3.9  				<li><a href="/live.cgi#liveiso">Create a live CD-ROM</a></li>
    3.10  				<li><a href="/live.cgi#loram">Convert ISO to loram</a></li>
    3.11  				<li><a href="/live.cgi#meta">Build a meta ISO</a></li>
     4.1 Binary file styles/default/images/down.png has changed