-
Notifications
You must be signed in to change notification settings - Fork 169
/
index.tt
37 lines (31 loc) · 1.46 KB
/
index.tt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
[%# Manage theme categories
Authors:
Andrea Nall <anall@andreanall.com>
Copyright (c) 2015 by Dreamwidth Studios, LLC.
This program is free software; you may redistribute it and/or modify it under
the same terms as Perl itself. For a copy of the license, please reference
'perldoc perlartistic' or 'perldoc perlgpl'.
%]
[%- sections.title = '.admin.link' | ml -%]
[%- dw.need_res( { group => 'jquery' }, 'js/admin/themes/index.js' ) -%]
[%- CALL dw.active_resource_group( 'jquery' ) -%]
<form action="/admin/themes/theme" method="get"><strong>[% '.edit_theme.label' | ml %]</strong>
<select name="theme" id="edit_theme">
[%- FOREACH lay IN layers.keys.sort -%]
<optgroup label="[% lay %]">
[%- FOREACH theme IN layers.$lay.sort -%]
<option value="[% lay %]/[% theme %]">[% theme %]</option>
[%- END -%]
</optgroup>
[%- END -%]
</select> <input type="submit" value="[% '.edit_theme.btn' | ml %]" /></form>
<form action="/admin/themes/category" method="get"><strong>[% '.edit_category.label' | ml %]</strong>
<select name="category" id="cat_sel">[% FOREACH cat IN categories %]
<option value="[% cat %]" [% IF cat == "featured" %]selected='selected'[% END %]>[% cat %]</option>
[% END %]</select>
<input type="submit" value="[% '.edit_category.btn' | ml %]" />
</form>
<form action="/admin/themes/category" method="get"><strong>[% '.add_category.label' | ml %]</strong>
<input name="category" id="cat_text" />
<input type="submit" value="[% '.add_category.btn' | ml %]" />
</form>