source: extensions/header_manager/admin/template/config.tpl @ 20169

Revision 20169, 4.3 KB checked in by mistic100, 7 years ago (diff)

display banners size, list specific album banners

Line 
1{combine_css path=$HEADER_MANAGER_PATH|@cat:"admin/template/style.css"}
2
3{footer_script require="jquery"}{literal}
4jQuery("input[name='display']").change(function() {
5  jQuery(".display-help:not(#"+ jQuery(this).val() +")").slideUp();
6  jQuery("#"+ jQuery(this).val()).slideDown();
7});
8jQuery(".showImage").tipTip({
9  delay: 0,
10  fadeIn: 200,
11  fadeOut: 200,
12  maxWidth: '300px',
13  defaultPosition: 'top'
14});
15{/literal}{/footer_script}
16
17<div class="titrePage">
18        <h2>Header Manager</h2>
19</div>
20
21<form method="post" action="{$CONFIG_URL}" class="properties">
22  <fieldset>
23    <legend>{'Display'|@translate}</legend>
24   
25    <label><input type="radio" name="display" value="image_only" {if $BANNER_DISPLAY=='image_only'}checked="checked"{/if}> {'Image only'|@translate}</label><br>
26   
27    <label><input type="radio" name="display" value="with_title" {if $BANNER_DISPLAY=='with_title'}checked="checked"{/if}> {'Gallery title above image'|@translate}</label><br>
28    <div class="display-help" id="with_title" {if $BANNER_DISPLAY!='with_title'}style="display:none;"{/if}>
29      <i>{'You can customize the display by adding CSS rules to'|@translate}</i>
30      <span style="font-family:monospace;font-size:14px;color:#000;background:#eee;padding:0 2px;">#<span style="color:#09f;font-weight:bold;">theHeader</span> <span style="color:#00f;">div</span>.<span style="color:#f00;">banner</span></span>
31    </div>
32   
33    <label><input type="radio" name="display" value="with_text" {if $BANNER_DISPLAY=='with_text'}checked="checked"{/if}> {'With text'|@translate}</label><br>
34    <div class="display-help" id="with_text" {if $BANNER_DISPLAY!='with_text'}style="display:none;"{/if}>
35      <textarea rows="5" cols="50" class="description" name="conf_page_banner">{$CONF_PAGE_BANNER}</textarea><br>
36      <i>{'Put <b>%header_manager%</b> where you want to display the image.'|@translate}</i>
37    </div>
38   
39    <label><input style="margin-top:20px;" type="checkbox" name="banner_on_picture" value="true" {if $BANNER_ON_PICTURE}checked="checked"{/if}> <b>{'Display banner on photo page'|@translate}</b></label>
40  </fieldset>
41 
42  <fieldset id="batchManagerGlobal">
43    <legend>{'Banner'|@translate}</legend>
44   
45  {if $banners}
46    <div class="banner-radio" style="display:block;">
47      <input type="radio" name="image" value="random" id="banner-random" {if $BANNER_IMAGE=='random'}checked="checked"{/if}>
48      <label for="banner-random"><b>{'Random'|@translate}</b></label>
49    </div>
50    {foreach from=$banners item=image key=name}
51    <div class="banner-radio">
52      <span class="actions">
53        <input type="radio" name="image" value="{$image.NAME}" id="banner-{$image.NAME}" {if $BANNER_IMAGE==$image.NAME}checked="checked"{/if}><br>
54      </span>
55      <span class="banner-wrapper">
56        <a href="{$CONFIG_URL}&amp;delete_banner={$image.NAME}" title="{'Delete'|@translate}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');" class="delete-banner">&times;</a>
57        <span class="banner-size">{$image.SIZE[0]} &times; {$image.SIZE[1]} px</span>
58        <label for="banner-{$image.NAME}" title="{$name}"><img src="{$image.THUMB}" alt="{$image.NAME}"></label>
59      </span>
60    </div>
61    {/foreach}
62  {else}
63    {'No banner added yet'|@translate}
64  {/if}
65   
66    <br><br>
67    <a href="{$ADD_IMAGE_URL}">{'Add a banner'|@translate}</a>
68  </fieldset>
69
70  <p class="formButtons"><input type="submit" name="save_config" value="{'Submit'|@translate}" class="submit"></p>
71 
72  <fieldset>
73    <legend>{'Album specific banners'|@translate}</legend>
74    <i>{'In order to add a specific banner, go to the admin page of the desired album.'|@translate}</i>
75   
76  {if $categories}
77    <ul id="album_banners">
78    {foreach from=$categories item=cat}
79      <li>
80        {$cat.NAME}
81        <a class="showImage" title="<img src='{$banners[$cat.IMAGE].THUMB}'>"><img src="{$HEADER_MANAGER_PATH}admin/template/image_{$cat.DEEP}.png"></a>
82        <a href="{$cat.U_DELETE}" title="{'Restore default banner'|@translate}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');"><img src="{$themeconf.admin_icon_dir}/delete.png"></a>
83      </li>
84    {/foreach}
85    </ul>
86   
87    <p>
88      <img src="{$HEADER_MANAGER_PATH}admin/template/image_0.png"> : {'Non recursive'|@translate} &bull;
89      <img src="{$HEADER_MANAGER_PATH}admin/template/image_1.png"> : {'Recursive'|@translate}
90    </p>
91  {/if}
92  </fieldset>
93</form>
Note: See TracBrowser for help on using the repository browser.