You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
www_admin/root/tt/sound_edit_files.tt

63 lines
3.5 KiB

<h3>Manage sound sets</h3>
<a href="/sound"><span class="button-back">Back</span></a>
<div class="hspace-20"</div>
<h3>Edit sound files for sound set [% set.name %]</h3>
[% IF messages.sound_set_err %]<div class="error">[% messages.sound_set_err %]</div>[% END %]
[% IF messages.sound_set_msg %]<div class="success">[% messages.sound_set_msg %]</div>[% END %]
<ul class="cleanlist">
<li class="ui-state-default">
<div class="span-5">Handle</div>
<div class="span-2">Loop</div>
<div class="span-6">Filename</div>
</li>
[% FOREACH h IN set.handles %]
<li class="ui-state-default" [% IF handle_id == h.id %]style="border:1px solid #459e00"[% END %]>
<div class="span-5">[% h.name %]</div>
[% IF NOT h.filename.length %] [%# kein file %]
<form action="/sound/set/[% set.id %]/handle/[% h.id %]/save" method="post" enctype="multipart/form-data">
<div class="span-2"><input type="checkbox" class="checkbox" id="loopplay_"[% h.id %] name="loopplay"></div>
<div class="span-6">
<input id="soundfile" name="soundfile" class="file" type="file" size="10" value=""/>
</div>
<div class="prepend-1 span-1">
<button class="button-add" id="soundadd">Add</button>
</div>
</form>
[% ELSIF handle_id == h.id %] [%# edit %]
<form action="/sound/set/[% set.id %]/handle/[% h.id %]/save" method="post" enctype="multipart/form-data">
<div class="span-2"><input type="checkbox" class="checkbox" id="loopplay_"[% h.id %] name="loopplay" [% IF h.loopplay %]checked=
"checked"[% END %]></div>
<div class="span-6">
[%# value='' is ignored by browsers for security reasons for file-input-fields %]
<input id="soundfile" name="soundfile" class="file" type="file" size="10" value="">
</div>
<div class="prepend-1 span-1">
<button class="button-save" id="handlesave[% id %]">Save</button>
</div>
<div class="span-1">
<a href="/sound/set/[% set.id %]/edithandles"><span class="button-cancel">Cancel</span></a>
</div>
</form>
[% ELSE %] [%# view %]
<div class="span-2"><input type="checkbox" class="checkbox" id="loopplay_"[% h.id %] name="loopplay" [% IF h.loopplay %]checked="checked"[% END %] disabled="disabled"></div>
<div class="span-6"><a href="/sound/set/[% set.id %]/handle/[% h.id %]/soundfile/get">[% h.filename %]</a></div>
<form action="/sound/set/[% set.id %]/handle/[% h.id %]/delete" method="post">
[% UNLESS Catalyst.session.admin.read_only %]
<div class="prepend-1 span-1">
<a href="/sound/set/[% set.id %]/handle/[% h.id %]/edit"><span class="button-edit">Edit</span></a>
</div>
<div class="span-1">
<button class="button-delete" id="setdel[% id %]">Delete</button>
</div>
[% END %]
</form>
[% END %]
</li>
[% END %]
</ul>