source: extensions/AdditionalPages/admin/template/manage.tpl @ 9261

Last change on this file since 9261 was 9261, checked in by patdenice, 10 years ago

New administration pannel for additional pages.
Better url.
Add permalinks.

File size: 3.0 KB
Line 
1{known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"}
2{known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js" }
3{known_script id="jquery.ui.sortable" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.sortable.packed.js" }
4
5{html_head}
6<script type="text/javascript">
7  jQuery().ready(function(){ldelim}
8    jQuery(".menuPos").hide();
9    jQuery(".drag_button").show();
10    jQuery(".menuLi").css("cursor","move");
11    jQuery(".menuUl").sortable({ldelim}
12      axis: "y",
13      opacity: 0.8
14    });
15    jQuery("input[name^='hide_']").click(function() {ldelim}
16      men = this.name.split('hide_');
17      if (this.checked) {ldelim}
18        jQuery("#menu_"+men[1]).addClass('menuLi_hidden');
19      } else {ldelim}
20        jQuery("#menu_"+men[1]).removeClass('menuLi_hidden');
21      }
22    });
23    jQuery("#menuOrdering").submit(function(){ldelim}
24      ar = jQuery('.menuUl').sortable('toArray');
25      for(i=0;i<ar.length;i++) {ldelim}
26        men = ar[i].split('menu_');
27        document.getElementsByName('position[' + men[1] + ']')[0].value = i;
28      }
29    });
30  });
31</script>
32<style type="text/css">#menuOrdering a:hover {ldelim} border:none; }</style>
33{/html_head}
34
35<div class="titrePage">
36        <h2>Additional Pages - {'Manage'|@translate}</h2>
37</div>
38
39<form id="menuOrdering" action="{$F_ACTION}" method="post">
40  <ul class="menuUl">
41    {foreach from=$pages item=page}
42    <li class="menuLi {if $page.pos<0}menuLi_hidden{/if}" id="menu_{$page.id}">
43      <p>
44        <span style="margin:2px 5px;">
45          <a href="{$page.U_DELETE}"><img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/category_delete.png" alt="{'delete'|@translate}" title="{'delete'|@translate}" onClick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');"></a>
46        </span>
47        <span style="margin:2px 5px;">
48          <a href="{$page.U_EDIT}"><img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/category_edit.png" alt="{'edit'|@translate}" title="{'edit'|@translate}"></a>
49        </span>
50
51        <img src="{$themeconf.admin_icon_dir}/cat_move.png" class="button drag_button" style="display:none;" alt="{'Drag to re-order'|@translate}" title="{'Drag to re-order'|@translate}">
52        <strong><a href="{$page.U_PAGE}">{$page.title}</a></strong> {if $page.id == $HOMEPAGE} - {'Home'|@translate}{/if} {if !empty($page.language)}<i>({$page.language})</i>{/if}
53      </p>
54
55      <p class="menuAuthor" style="margin-top:7px;">
56        {'Hide'|@translate} <input type="checkbox" name="hide_{$page.id}" {if $page.pos<0}checked="checked"{/if}>
57      </p>
58
59      <p class="menuPos">
60        <label>
61          {'Position'|@translate} :
62          <input type="text" size="4" name="position[{$page.id}]" maxlength="4" value="{math equation="abs(pos)" pos=$page.pos}">
63        </label>
64      </p>
65    </li>
66    {/foreach}
67  </ul>
68  <p class="menuSubmit">
69    <input type="submit" name="submit" value="{'Submit'|@translate}">
70    <input type="submit" name="reset" value="{'Reset'|@translate}">
71  </p>
72
73</form>
Note: See TracBrowser for help on using the repository browser.