Can edit files in administration

This commit is contained in:
nemunaire 2014-01-14 18:49:38 +01:00
commit 8e7d652688
4 changed files with 44 additions and 12 deletions

View file

@ -45,7 +45,9 @@
<div class="panel-body">
<div class="form-group">
<label for="k{$k+1}_type">Type</label>
<input type="text" class="form-control" name="k{$k+1}_type" id="k{$k+1}_type" value="raw">
<select name="k{$k+1}_type" id="k{$k+1}_type" class="form-control">
{html_options options=$fortyp selected=$key.format}
</select>
</div>
<div class="form-group">
<label for="k{$k+1}_value">Valeur</label>
@ -53,18 +55,27 @@
</div>
</div>
</div>
{foreach from=$ex->files item=file key=k}
<div class="panel panel-warning">
<div class="panel-heading">
<h3 class="panel-title">Fichiers</h3>
<h3 class="panel-title">Fichier</h3>
</div>
<div class="panel-body">
<ul>
{foreach from=$ex->files item=file key=k}
<li><a href="{$file.path}">{$file.name}</a>: {$file.sha1}</li>
{/foreach}
</ul>
<div class="form-group">
<label for="f{$k}_name">Nom du affich&eacute; fichier</label>
<input type="text" class="form-control" name="f{$k}_name" id="f{$k}_name" value="{$file.name|escape}">
</div>
<div class="form-group">
<label for="f{$k}_path">Chemin</label> <span class="label {if !is_file($file.path)}label-danger">File not found{else}label-success">File found{/if}</span>
<input type="text" class="form-control" name="f{$k}_path" id="f{$k}_path" value="{$file.path_orig|escape}">
</div>
<div class="form-group">
<label for="f{$k}_sha1">SHA-1</label>{if is_file($file.path)} Calculated from {$file.path}: {sha1_file($file.path)}{/if}
<input type="text" class="form-control" name="f{$k}_sha1" id="f{$k}_sha1" value="{$file.sha1|escape}">
</div>
</div>
</div>
{/foreach}
<div class="form-group">
<button type="submit" class="btn btn-success">Modifier</button>
</div>