cryptonas-branches/pythonrewrite/templates/show_volume.cs

72 lines
3.3 KiB
C#
Raw Normal View History

2006-08-14 17:40:12 +02:00
<?cs # $Id$ ?>
<h1><?cs var:html_escape(Lang.Title.Volume) ?> <i><?cs var:html_escape(Data.CurrentDisk.name) ?></i></h1>
<?cs # is the disc accessible? ?>
<?cs if:Data.CurrentDisk.encryption || Data.CurrentDisk.plaintext ?>
<?cs # is the disc active? ?>
<?cs if:!Data.CurrentDisk.active ?>
<h2>Mount container</h2>
<?cs call:print_form_header() ?>
<p>
<?cs if:Data.CurrentDisk.encryption ?>
<label for="crypto_passwort"><?cs var:html_escape(Lang.Text.EnterCurrentCryptoPassword) ?></label>
<input type="password" id="crypto_password" name="crypto_password" size="20" maxlength="40" />
<?cs /if ?>
<input type="hidden" name="device" value="<?cs var:html_escape(Data.CurrentDisk.device) ?>" />
<input type="hidden" name="action" value="mount_do" />
<button type="submit"><?cs var:html_escape(Lang.Button.Mount) ?></button></p>
</form>
<?cs else ?>
<h2>Unmount container</h2>
<?cs call:print_form_header() ?>
<p><input type="hidden" name="device" value="<?cs var:html_escape(Data.CurrentDisk.device) ?>" />
<input type="hidden" name="action" value="umount_do" />
<button type="submit"><?cs var:html_escape(Lang.Button.Umount) ?></button></p>
</form>
<?cs /if ?>
<?cs /if ?>
<?cs # name change is only possible if the volume is not mounted ?>
<?cs if:!Data.CurrentDisk.active ?>
<h2>Change the name of the container</h2>
<?cs call:print_form_header() ?>
<p><label for="vol_name"><?cs var:html_escape(Lang.Text.ContainerName) ?></label>
<input type="text" name="volume_name" size="20" id="volume_name" value="<?cs var:html_escape(Data.CurrentDisk.name) ?>" />
<input type="hidden" name="device" value="<?cs var:html_escape(Data.CurrentDisk.device) ?>" />
<input type="hidden" name="action" value="volume_name_set" />
<button type="submit"><?cs var:html_escape(Lang.Button.ContainerNameSet) ?></button></p>
</form>
<?cs /if ?>
<?cs # move initialization to the "system" menu ?>
<?cs if:!Data.CurrentDisk.active ?>
<h2>Reinitialize container</h2>
<?cs call:print_form_header() ?>
<p><input type="checkbox" name="encryption" id="encryption" value="selected" checked="checked" />
<label for="encryption"><?cs var:html_escape(Lang.Text.ContainerEncryption) ?></label>
<input type="hidden" name="device" value="<?cs var:html_escape(Data.CurrentDisk.device) ?>" />
<input type="hidden" name="action" value="volume_init_ask" />
<button type="submit"><?cs var:html_escape(Lang.Button.InitContainer) ?></button></p>
</form>
<?cs /if ?>
<h2>Some more stuff</h2>
<p>For example: changing password? / backup? / access control?</p>
<h2>Details</h2>
<p><ul>
<li>Name of container: <?cs var:html_escape(Data.CurrentDisk.name) ?></li>
<li>Name of device: <?cs var:html_escape(Data.CurrentDisk.device) ?></li>
<li>Current status: <?cs if:Data.CurrentDisk.active ?>active<?cs else ?>passive<?cs /if ?></li>
<li>Encryption: <?cs if:Data.CurrentDisk.encryption ?>on<?cs else ?>off<?cs /if ?></li>
<?cs if:Data.CurrentDisk.active ?>
<li>Size of container: <?cs var:html_escape(Data.CurrentDisk.capacity.size) ?></li>
<li>Available space of container: <?cs var:html_escape(Data.CurrentDisk.capacity.free) ?></li>
<li>Used space of container: <?cs var:html_escape(Data.CurrentDisk.capacity.used)
?> / <?cs var:html_escape(Data.CurrentDisk.capacity.percent) ?></li>
<?cs /if ?>
</ul></p>