tiki-admin_menus.tpl 6.09 KB
Newer Older
1
{title help="Menus" admpage="general&cookietab=3"}{tr}Admin Menus{/tr}{/title}
mose's avatar
mose committed
2

3 4 5 6 7 8
{if $tiki_p_admin eq 'y'}
	<div class="navbar">
		{button href="tiki-admin_modules.php" _text="{tr}Admin Modules{/tr}"}
	</div>
{/if}

9
{tabset name="admin_menus"}
pkdille's avatar
pkdille committed
10 11 12 13 14 15 16 17 18 19 20 21
	{tab name="{tr}Menus{/tr}"}
		{include file='find.tpl'}
		<table class="normal">
			<tr>
				<th>{self_link _sort_arg='sort_mode' _sort_field='menuId'}{tr}ID{/tr}{/self_link}</th>
				<th>{self_link _sort_arg='sort_mode' _sort_field='name'}{tr}Name{/tr}{/self_link}</th>
				<th>{self_link _sort_arg='sort_mode' _sort_field='type'}{tr}Type{/tr}{/self_link}</th>
				<th>{tr}Options{/tr}</th>
				<th>{tr}Action{/tr}</th>
			</tr>
			{cycle values="odd,even" print=false}
			{section name=user loop=$channels}
22
				<tr class="{cycle}">
23 24
					<td class="id">{$channels[user].menuId}</td>
					<td class="text">
25
						{if $tiki_p_edit_menu_option eq 'y' and $channels[user].menuId neq 42}
pkdille's avatar
pkdille committed
26
							<a class="link" href="tiki-admin_menu_options.php?menuId={$channels[user].menuId}" title="{tr}Configure/Options{/tr}">{$channels[user].name|escape}</a>
27 28
						{else}
							{$channels[user].name|escape}
pkdille's avatar
pkdille committed
29 30 31 32
						{/if}
						<br />
						{$channels[user].description|escape|nl2br}
					</td>
33 34 35
					<td class="text">{$channels[user].type}</td>
					<td class="integer">{$channels[user].options}&nbsp;</td>
					<td class="action">
36 37 38 39 40 41 42 43 44 45
						{if $channels[user].menuId neq 42}
							{if $tiki_p_edit_menu eq 'y'}
								{self_link menuId=$channels[user].menuId cookietab="2" _title="{tr}Edit{/tr}"}{icon _id='page_edit'}{/self_link}
							{/if}
							{if $tiki_p_edit_menu_option eq 'y'}
								<a class="link" href="tiki-admin_menu_options.php?menuId={$channels[user].menuId}" title="{tr}Configure/Options{/tr}">{icon _id='table' alt="{tr}Configure/Options{/tr}"}</a>
							{/if}
							{if $tiki_p_edit_menu eq 'y'}
								{self_link remove=$channels[user].menuId _title="{tr}Delete{/tr}"}{icon _id='cross' alt="{tr}Delete{/tr}"}{/self_link}
							{/if}
pkdille's avatar
pkdille committed
46
						{else}
47
							{if $tiki_p_admin eq 'y'}
48
								{button reset="y" menuId=$channels[user].menuId _text="{tr}RESET{/tr}" _auto_args="reset,menuId"}
49
							{/if}
50 51
						{/if}
						{if $tiki_p_edit_menu eq 'y'}
marclaporte's avatar
typo  
marclaporte committed
52
							{self_link  menuId=$channels[user].menuId clone="y" _title="{tr}Clone this menu and its options{/tr}" _icon="page_copy"}{/self_link}
pkdille's avatar
pkdille committed
53 54 55 56
						{/if}
					</td>
				</tr>
			{sectionelse}
57
				{norecords _colspan=5}
pkdille's avatar
pkdille committed
58 59
			{/section}
		</table>
60
		{pagination_links cant=$cant step=$maxRecords offset=$offset}{/pagination_links} 
pkdille's avatar
pkdille committed
61
	{/tab}
62

pkdille's avatar
pkdille committed
63 64 65 66 67 68 69
	{tab name="{tr}Create/Edit Menu{/tr}"}
		{if $menuId > 0}
			<h2>{tr}Edit this Menu:{/tr} {$info.name}</h2>
			{button href="tiki-admin_menus.php" _text="{tr}Create new Menu{/tr}"}
		{else}
			<h2>{tr}Create new Menu{/tr}</h2>
		{/if}
70

pkdille's avatar
pkdille committed
71 72 73 74 75
		<form action="tiki-admin_menus.php?cookietab=1" method="post">
			<input type="hidden" name="menuId" value="{$menuId|escape}" />
			<table class="formcolor">
				<tr>
					<td>
changi67's avatar
changi67 committed
76
						<label for="menus_name">{tr}Name:{/tr}</label>
pkdille's avatar
pkdille committed
77 78 79 80 81 82 83
					</td>
					<td>
						<input type="text" name="name" id="menus_name" value="{$info.name|escape}" style="width:95%" />
					</td>
				</tr>
				<tr>
					<td>
changi67's avatar
changi67 committed
84
						<label for="menus_desc">{tr}Description:{/tr}</label>
pkdille's avatar
pkdille committed
85 86 87 88 89 90
					</td>
					<td>
						<textarea name="description" id="menus_desc" rows="4" cols="40" style="width:95%">{$info.description|escape}</textarea>
					</td>
				</tr>
				<tr>
changi67's avatar
changi67 committed
91
					<td><label for="menus_type">{tr}Type:{/tr}</label></td>
pkdille's avatar
pkdille committed
92 93 94 95 96 97 98 99 100 101 102 103 104
					<td>
						<select name="type" id="menus_type">
							<option value="d" {if $info.type eq 'd'}selected="selected"{/if}>{tr}dynamic collapsed{/tr} (d)</option>
							<option value="e" {if $info.type eq 'e'}selected="selected"{/if}>{tr}dynamic extended{/tr} (e)</option>
							<option value="f" {if $info.type eq 'f'}selected="selected"{/if}>{tr}fixed{/tr} (f)</option>
						</select>
					</td>
				</tr>
				{if $prefs.feature_menusfolderstyle eq 'y'}
					<tr>
						<td rowspan="2"><label for="icon">{tr}Icons:{/tr}</label></td>
						<td>
							<div>{tr}Folder Icon{/tr}</div>
105
							<input type="text" id="icon" name="icon" value="{$info.icon|escape}" style="width:95%" />
pkdille's avatar
pkdille committed
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
							<br />
							<em>{tr}Path and filename of closed folder icon{/tr}</em>.

							{remarksbox type="tip" title="{tr}Note{/tr}"}
								{tr}To use custom folder icons in menus, enter the path to the icon for the <strong>closed</strong> folder.{/tr} {tr}In the same directory, include an icon for the opened folder.{/tr} {tr}The "opened folder" icon name must be identical to the "closed folder" icon name, prefixed with the letter <strong>o</strong>.{/tr}
								<hr />
								{tr}For example, the default icon is: pics/icons/folder.png{/tr} {icon _id="folder"}
								<br />
								{tr}The name of the "open folder" icon is: pics/icons/ofolder.png{/tr} {icon _id="ofolder"}
							{/remarksbox}
						</td>
					</tr>
				{/if}
				{if $prefs.menus_items_icons eq 'y'}
					<tr>
						<td>
							<label for="use_items_icons">
								<input type="checkbox" id="use_items_icons" name="use_items_icons"{if $info.use_items_icons eq 'y'} checked="checked"{/if}/>
								{tr}Configure icons for menu entries{/tr}
							</label>
						</td>
					</tr>
				{/if}
			<tr>
				<td>&nbsp;</td>
				<td>
					<input type="submit" name="save" value="{tr}Save{/tr}" />
					{if $prefs.menus_items_icons neq 'y'}
						<input type="hidden" name="use_items_icons" value="{$info.use_items_icons}" />
					{/if}
				</td>
			</tr>
		</table>
139

pkdille's avatar
pkdille committed
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
		{remarksbox type="tip" title="{tr}Tip{/tr}"}
			{tr}To use menus in a <a href="tiki-admin_modules.php">module</a>, <a href="tiki-admin.php?page=look">Look and Feel</a> or a template, use {literal}{menu id=x}{/literal}, where x is the ID of the menu.{/tr}
			<hr />
			{tr}To use a menu in a tiki format:{/tr} {literal}{menu id=X}{/literal}
			<br />
			{if $prefs.feature_cssmenus eq 'y'}
				{tr}To use menu in a css/suckerfish format:{/tr}
				<ul>
					<li>{literal}{menu id=X css=y type=vert}{/literal}</li>
					<li>{literal}{menu id=X css=y type=horiz}{/literal}</li>
				</ul>
			{/if}
			{tr}To customize the menu's CSS id (#):{/tr} {literal}{menu id=X css_id=custom_name}{/literal}
		{/remarksbox}
		</form>
	{/tab}
156
{/tabset}