1 | {combine_script id="farbtastic" require="jquery" path=$TYPETAGS_PATH|cat:"template/farbtastic/farbtastic.js"} |
---|
2 | {combine_css path=$TYPETAGS_PATH|cat:"template/farbtastic/farbtastic.css"} |
---|
3 | {combine_css path=$TYPETAGS_PATH|cat:"template/style.css"} |
---|
4 | |
---|
5 | {footer_script} |
---|
6 | // init colorpicker |
---|
7 | jQuery('#colorpicker').farbtastic('#hexval'); |
---|
8 | {/footer_script} |
---|
9 | |
---|
10 | <div class="titrePage"> |
---|
11 | <h2>Colored Tags</h2> |
---|
12 | </div> |
---|
13 | |
---|
14 | <form action="{$F_ACTION}" method="post" name="form"> |
---|
15 | <fieldset> |
---|
16 | {if isset($IN_EDIT)} |
---|
17 | <legend>{'Edit color'|translate}</legend> |
---|
18 | <div class="edit-container"> |
---|
19 | <div id="colorpicker"></div> |
---|
20 | <p><b>{'Edit color'|translate} : <input type="text" readonly="readonly" size="18" style="background-color:{$typetag.OLD_COLOR};color:{$typetag.COLOR_TEXT};" value="{$typetag.OLD_NAME}"></b></p> |
---|
21 | <p> </p> |
---|
22 | <p>{'New name'|translate} : <input type="text" size="18" name="typetag_name" value="{$typetag.NAME}"></p> |
---|
23 | <p>{'New color'|translate} : <input type="text" id="hexval" name="typetag_color" size="7" maxlength="7" value="{$typetag.COLOR}"></p> |
---|
24 | <p> </p> |
---|
25 | <p> |
---|
26 | <input type="hidden" name="edited_typetag" value="{$edited_typetag}"> |
---|
27 | <input class="submit" type="submit" name="edittypetag" value="{'Save'|translate}"> |
---|
28 | <input class="submit" type="submit" name="cancel" value="{'Reset'|translate}"> |
---|
29 | </p> |
---|
30 | </div> |
---|
31 | {else} |
---|
32 | <legend>{'Add a new color'|translate}</legend> |
---|
33 | <div class="edit-container"> |
---|
34 | <div id="colorpicker"></div> |
---|
35 | <p> </p> |
---|
36 | <p>{'Name'|translate} : <input type="text" size="18" name="typetag_name" value="{if isset($typetag.NAME)}{$typetag.NAME}{/if}"></p> |
---|
37 | <p>{'Color'|translate} : <input type="text" id="hexval" name="typetag_color" size="7" maxlength="7" value="{if isset($typetag.COLOR)}{$typetag.COLOR}{else}#444444{/if}"></p> |
---|
38 | <p> </p> |
---|
39 | <p> |
---|
40 | <input class="submit" type="submit" name="addtypetag" value="{'Add'|translate}"> |
---|
41 | </p> |
---|
42 | </div> |
---|
43 | {/if} |
---|
44 | </fieldset> |
---|
45 | </form> |
---|
46 | |
---|
47 | {if !empty($typetags)} |
---|
48 | <fieldset> |
---|
49 | <legend>{'Manage colors'|translate}</legend> |
---|
50 | |
---|
51 | <ul class="tagSelection typetagSelection"> |
---|
52 | {foreach from=$typetags item=typetag} |
---|
53 | <li style="background-color:{$typetag.color};color:{$typetag.color_text};"> |
---|
54 | <span class="buttons"> |
---|
55 | <a href="{$typetag.u_edit}" title="{'edit'|translate}"><img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/edit_s.png" class="button" alt="{'edit'|translate}"></a> |
---|
56 | <a href="{$typetag.u_delete}" title="{'delete'|translate}" onclick="return confirm('{'Are you sure?'|translate}');"><img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/delete.png" class="button" alt="{'delete'|translate}"></a> |
---|
57 | </span> |
---|
58 | {$typetag.name} |
---|
59 | </li> |
---|
60 | {/foreach} |
---|
61 | </ul> |
---|
62 | |
---|
63 | <p style="text-align:left;">{'Go to <a href="%s">Photos/Tags</a> to manage associations.'|translate:($ROOT_URL|cat:'admin.php?page=tags')}</p> |
---|
64 | </fieldset> |
---|
65 | {/if} |
---|
66 | |
---|
67 | |
---|
68 | <form action="{$F_ACTION}" method="post" name="form"> |
---|
69 | <fieldset> |
---|
70 | <legend>{'Configuration'|translate}</legend> |
---|
71 | |
---|
72 | <b>{'Display colored tags'|translate}</b> |
---|
73 | <label><input type="radio" name="show_all" value="false" {if not $SHOW_ALL}checked="checked"{/if}> {'Only on tags page'|translate}</label> |
---|
74 | <label><input type="radio" name="show_all" value="true" {if $SHOW_ALL}checked="checked"{/if}> {'Everywhere'|translate}</label> |
---|
75 | |
---|
76 | <p><input class="submit" type="submit" name="save_config" value="{'Submit'|translate}"></p> |
---|
77 | </fieldset> |
---|
78 | </form> |
---|