cryptonas-branches/pythonrewrite/plugins/partition/set_partitions.cs
lars 1c8db28989 added gray disc icon for unitialized volumes
simple partitioning interface finished
order in navigation bar changed
ignore extended partitions (in container list)
2006-09-18 10:16:05 +00:00

61 lines
2.2 KiB
C#

<?cs # $Id$ ?>
<h1><?cs var:html_escape(Lang.Plugins.partition.Title.Partition) ?></h1>
<div align="center">
<table class="partition">
<tr>
<th><?cs var:html_escape(Lang.Plugins.partition.Text.PartNum) ?></th>
<th><?cs var:html_escape(Lang.Plugins.partition.Text.Size) ?></th>
<th><?cs var:html_escape(Lang.Plugins.partition.Text.PartType) ?></th>
<th></th>
</tr>
<?cs loop: x = #0, subcount(Data.Plugins.partition.Parts)-1, #1 ?>
<tr>
<td><?cs var:x ?></td>
<td><?cs var:Data.Plugins.partition.Parts[x].Size ?></td>
<td><?cs var:Data.Plugins.partition.Parts[x].Type ?></td>
<td>
<?cs call:print_form_header("plugins/partition") ?>
<?cs include:Settings.PluginDir + "/partition/current_partition_info.cs" ?>
<input type="hidden" name="step" value="del_partition" />
<input type="hidden" name="del_num" value="<?cs var:x ?>" />
<button type="submit"><?cs var:html_escape(Lang.Plugins.partition.Button.DelPartition) ?></button>
</form>
</td>
</tr>
<?cs /loop ?></p>
<?cs # new partition input if space is available ?>
<?cs if:Data.Plugins.partition.availSize > 0 ?>
<tr>
<?cs call:print_form_header("plugins/partition") ?>
<?cs include:Settings.PluginDir + "/partition/current_partition_info.cs" ?>
<input type="hidden" name="step" value="add_partition" />
<?cs set: x = subcount(Data.Plugins.partition.Parts) ?>
<td><?cs var:x ?></td>
<td><input type="text" name="part<?cs var:x ?>_size" size="8" value="<?cs var:Data.Plugins.partition.availSize ?>" /></td>
<td><select name="part<?cs var:x ?>_type" size="0"><?cs each: t = Data.Plugins.partition.Types ?><option><?cs var:t ?></option><?cs /each ?></select></td>
<td>
<button type="submit"><?cs var:html_escape(Lang.Plugins.partition.Button.AddPartition) ?></button>
</td>
</form>
</tr>
<?cs /if ?>
</table>
</div>
<?cs if:subcount(Data.Plugins.partition.Parts) > 0 ?>
<p class="note">
<?cs var:html_escape(Lang.Plugins.partition.Text.WarningMessage) ?>
</p>
<?cs call:print_form_header("plugins/partition") ?>
<?cs include:Settings.PluginDir + "/partition/current_partition_info.cs" ?>
<input type="hidden" name="step" value="finish" />
<button type="submit"><?cs var:html_escape(Lang.Plugins.partition.Button.SavePartitions) ?></button>
</form>
<?cs /if ?>