tiki-admin_structures.tpl 10.4 KB
Newer Older
1
{* $Id$ *}
2
{title help="Structures"}{tr}Structures{/tr}{/title}
awcolley's avatar
awcolley committed
3

4
{if $tiki_p_admin eq 'y'}
gezzzan's avatar
gezzzan committed
5
	<div class="t_navbar margin-bottom-md">
6 7 8
		<a role="link" href="tiki-import_xml_zip.php" class="btn btn-link" title="{tr}XML Zip Import{/tr}">
			{icon name="zip"} {tr}XML Zip Import{/tr}
		</a>
9
	</div>
10 11
{/if}

12
{if $just_created neq 'n' && $tiki_p_edit_structures == 'y'}
13 14
	{remarksbox type="feedback" title="{tr}Feedback{/tr}"}
		{tr}Structure created{/tr}: <a class='alert-link' href='tiki-edit_structure.php?page_ref_id={$just_created}'>{$just_created_name|escape}</a> <a class='alert-link tips' href='tiki-index.php?page={$just_created_name|escape:"url"}' title=":{tr}View Page{/tr}">{icon name="view"}</a>
15
	{/remarksbox}
16
{/if}
17 18

{if $askremove eq 'y'}
19
	{remarksbox type='confirm' title="{tr}Please Confirm{/tr}"}
20
		{tr}You will remove structure:{/tr} {$removename|escape}<br>
21 22 23 24 25
		{button href="?rremove=$remove&amp;page=$removename" _text="{tr}Destroy the structure leaving the wiki pages{/tr}"}
		{if $tiki_p_remove == 'y'}
			{button href="?rremovex=$remove&amp;page=$removename" _text="{tr}Destroy the structure and remove the pages{/tr}"}
		{/if}
	{/remarksbox}
26
{/if}
27 28

{if count($alert_in_st) > 0}
29 30 31 32 33 34
	{remarksbox type='warning' title="{tr}Warning{/tr}"}
		{tr}Note that the following pages are also part of another structure. Make sure that access permissions (if any) do not conflict:{/tr}
		{foreach from=$alert_in_st item=thest}
			&nbsp;&nbsp;<a class='tablename' href='tiki-index.php?page={$thest|escape:"url"}' target="_blank">{$thest}</a>
		{/foreach}
	{/remarksbox}
35 36 37
{/if}

{if count($alert_categorized) > 0}
38 39 40 41 42 43
	{remarksbox type='feedback' title="{tr}Feedback{/tr}"}
		{tr}The following pages have automatically been categorized with the same categories as the structure:{/tr}
		{foreach from=$alert_categorized item=thecat}
			&nbsp;&nbsp;<a class='tablename' href='tiki-index.php?page={$thecat|escape:"url"}' target="_blank">{$thecat}</a>
		{/foreach}
	{/remarksbox}
44 45 46
{/if}

{if count($alert_to_remove_cats) > 0}
47 48 49 50 51 52
	{remarksbox type='warning' title="{tr}Warning{/tr}"}
		{tr}The following pages have categories but the structure has none. You may wish to uncategorize them to be consistent:{/tr}
		{foreach from=$alert_to_remove_cats item=thecat}
			&nbsp;&nbsp;<a class='tablename' href='tiki-index.php?page={$thecat|escape:"url"}' target="_blank">{$thecat}</a>
		{/foreach}
	{/remarksbox}
53 54 55
{/if}

{if count($alert_to_remove_extra_cats) > 0}
56 57 58 59 60 61
	{remarksbox type='warning' title="{tr}Warning{/tr}"}
		{tr}The following pages are in categories that the structure is not in. You may wish to recategorize them in order to be consistent:{/tr}
		{foreach from=$alert_to_remove_extra_cats item=theextracat}
			&nbsp;&nbsp;<a class='tablename' href='tiki-index.php?page={$theextracat|escape:"url"}' target="_blank">{$theextracat}</a>
		{/foreach}
	{/remarksbox}
62
{/if}
sylvieg's avatar
sylvieg committed
63

64 65 66 67 68 69
{if !empty($error)}
	{remarksbox type='warning' title="{tr}Error{/tr}"}
		{$error|escape}
	{/remarksbox}
{/if}

sylvieg's avatar
sylvieg committed
70
{tabset}
71 72
	{tab name="{tr}Existing Structures{/tr}"}
		<h2>{tr}Existing Structures{/tr}</h2>
73
		{if $channels or ($find ne '')}
74 75 76
			<div class="clearfix">
				{include file='find.tpl' find_show_languages='y' find_show_categories='y' find_show_num_rows='y'}
			</div>
77
		{/if}
78 79 80 81 82 83 84 85 86 87
		{* Use css menus as fallback for item dropdown action menu if javascript is not being used *}
		{if $prefs.javascript_enabled !== 'y'}
			{$js = 'n'}
			{$libeg = '<li>'}
			{$liend = '</li>'}
		{else}
			{$js = 'y'}
			{$libeg = ''}
			{$liend = ''}
		{/if}
88
		<form class="form" role="form">
89
			<div class="{if $js === 'y'}table-responsive{/if}"> {* table-responsive class cuts off css drop-down menus *}
90
				<table class="table table-striped table-hover">
91
					<tr>
92
						{if $tiki_p_admin eq 'y'}<th width="15">{select_all checkbox_names='action[]'}</th>{/if}
93
						<th>{tr}Structure{/tr}</th>
94
						<th></th>
95 96 97 98 99 100 101 102 103 104
					</tr>

					{section loop=$channels name=ix}
						<tr>
							{if $tiki_p_admin eq 'y'}
								<td class="checkbox-cell">
									<input type="checkbox" name="action[]" value='{$channels[ix].page_ref_id}' style="border:1px;font-size:80%;">
								</td>
							{/if}
							<td class="text">
105
								<a class="tips" href="tiki-edit_structure.php?page_ref_id={$channels[ix].page_ref_id}" title=":{tr}View Structure{/tr}">
106
									{$channels[ix].pageName|escape}
107
									{if $channels[ix].page_alias}
108
										({$channels[ix].page_alias|escape})
109 110
									{/if}
								</a>
111
							</td>
112
							<td class="action">
113
								{if $prefs.lock_wiki_structures eq 'y'}
114
									{lock type='wiki structure' object=$channels[ix].pageName}
115 116
								{/if}

117 118
								{capture name=admin_structure_actions}
									{strip}
119
										{$libeg}<a href="tiki-edit_structure.php?page_ref_id={$channels[ix].page_ref_id}">
120
											{icon name="information" _menu_text='y' _menu_icon='y' alt="{tr}View structure{/tr}"}
121 122
										</a>{$liend}
										{$libeg}<a href='{sefurl page=$channels[ix].pageName structure=$channels[ix].pageName page_ref_id=$channels[ix].page_ref_id}'>
123
											{icon name="view" _menu_text='y' _menu_icon='y' alt="{tr}View page{/tr}"}
124
										</a>{$liend}
125
										{if $channels[ix].admin_structure == 'y' or $tiki_p_admin == 'y'} {* A check for object perm tiki_p_assign_perm_wiki_page if not admin is needed here for WYSIWYCA *}
126
											{$libeg}
127
												{permission_link mode=text objectType='wiki page' type='wiki structure' id=$channels[ix].pageName title=$channels[ix].pageName}
128 129
											{$liend}
										{/if}
130

131
										{if $prefs.feature_wiki_export eq 'y' and $channels[ix].admin_structure eq 'y'}
132
											{$libeg}<a href="tiki-admin_structures.php?export={$channels[ix].page_ref_id|escape:"url"}">
133
												{icon name="export" _menu_text='y' _menu_icon='y' alt="{tr}Export pages{/tr}"}
134
											</a>{$liend}
135 136 137
										{/if}

										{if $pdf_export eq 'y'}
138
											{$libeg}<a href="tiki-print_multi_pages.php?printstructures=%255B%2522{$channels[ix].page_ref_id}%2522%255D&amp;display=pdf&amp;print=pdf">
139
												{icon name='pdf' _menu_text='y' _menu_icon='y' alt="{tr}PDF{/tr}"}
140
											</a>{$liend}
141 142
										{/if}

143
										{if $channels[ix].edit_structure == 'y' or $channels[ix].admin_structure == 'y'}
144
											{$libeg}<a href="tiki-admin_structures.php?export_tree={$channels[ix].page_ref_id|escape:"url"}">
145
												{icon name="structure" _menu_text='y' _menu_icon='y' alt="{tr}Dump tree{/tr}"}
146
											</a>{$liend}
147 148
										{/if}

149
										{if $channels[ix].admin_structure == 'y'}
150
											{$libeg}<a href="tiki-admin_structures.php?remove={$channels[ix].page_ref_id|escape:"url"}">
151
												{icon name="remove" _menu_text='y' _menu_icon='y' alt="{tr}Remove{/tr}"}
152
											</a>{$liend}
153 154
										{/if}

155
										{if $prefs.feature_create_webhelp == 'y' && $channels[ix].edit_structure == 'y'}
156
											{$libeg}<a href="tiki-create_webhelp.php?struct={$channels[ix].page_ref_id|escape:"url"}">
157
												{icon name="help" _menu_text='y' _menu_icon='y' alt="{tr}Create WebHelp{/tr}"}
158
											</a>{$liend}
159 160 161
										{/if}

										{if $prefs.feature_create_webhelp == 'y' && $channels[ix].webhelp eq 'y'}
162
											{$libeg}<a href="whelp/{$channels[ix].pageName}/index.html">
163
												{icon name="documentation" _menu_text='y' _menu_icon='y' alt="{tr}View WebHelp{/tr}"}
164
											</a>{$liend}
165 166
										{/if}

167
										{if $channels[ix].admin_structure eq 'y'}
168
											{$libeg}<a href="tiki-admin_structures.php?zip={$channels[ix].page_ref_id|escape:"url"}">
169
												{icon name="zip" _menu_text='y' _menu_icon='y' alt="{tr}XML Zip{/tr}"}
170
											</a>{$liend}
171 172 173
										{/if}
									{/strip}
								{/capture}
174 175 176 177 178
								{if $js === 'n'}<ul class="cssmenu_horiz"><li>{/if}
								<a
									class="tips"
									title="{tr}Actions{/tr}"
									href="#"
179
									{if $js === 'y'}{popup fullhtml="1" center=true text=$smarty.capture.admin_structure_actions}{/if}
180 181
									style="padding:0; margin:0; border:0"
								>
182 183
									{icon name='wrench'}
								</a>
184 185 186
								{if $js === 'n'}
									<ul class="dropdown-menu" role="menu">{$smarty.capture.admin_structure_actions}</ul></li></ul>
								{/if}
187 188 189 190 191 192 193
							</td>
						</tr>
					{sectionelse}
						{if $tiki_p_admin eq 'y'}{norecords _colspan=3}{else}{norecords _colspan=2}{/if}
					{/section}
				</table>
			</div>
194 195

			{if $tiki_p_admin eq 'y'}
196
				<div class="form-group">
197
					<label for="batchaction" class="control-label">{tr}Perform action with selected{/tr}</label>
198 199 200 201 202 203 204
					<div class="input-group col-sm-6">
						<select name="batchaction" class="form-control">
							<option value="">{tr}...{/tr}</option>
							<option value="delete">{tr}Delete{/tr}</option>
							<option value="delete_with_page">{tr}Delete with the pages{/tr}</option>
						</select>
						<div class="input-group-btn">
205
							<input type="submit" class="btn btn-primary" name="act" value="{tr}Ok{/tr}">
206 207
						</div>
					</div>
208 209
				</div>
			</form>
210 211 212 213 214 215
		{/if}

		{pagination_links cant=$cant step=$maxRecords offset=$offset}{/pagination_links}
	{/tab}

	{if $tiki_p_edit_structures == 'y'}
216 217
		{tab name="{tr}Create Structure{/tr}"}
			<h2>{tr}Create Structure{/tr}</h2>
lphuberdeau's avatar
lphuberdeau committed
218 219
			<form class="form-horizontal" action="tiki-admin_structures.php" method="post">
				<div class="form-group">
220
					<label class="control-label col-md-3" for="name">{tr}Structure{/tr}</label>
lphuberdeau's avatar
lphuberdeau committed
221 222 223 224 225
					<div class="col-md-9">
						<input type="text" name="name" id="name" class="form-control">
					</div>
				</div>
				<div class="form-group">
226
					<label class="control-label col-md-3" for="alias">{tr}Alias{/tr}</label>
lphuberdeau's avatar
lphuberdeau committed
227 228 229 230 231
					<div class="col-md-9">
						<input type="text" name="alias" id="alias" class="form-control">
					</div>
				</div>
				<div class="form-group">
232
					<label class="control-label col-md-3" for="tree">{tr}Tree{/tr}</label>
lphuberdeau's avatar
lphuberdeau committed
233 234 235 236 237
					<div class="col-md-9">
						<textarea rows="5" cols="60" id="tree" name="tree" class="form-control"></textarea>
						<div class="help-block">{tr}Use single spaces to indent structure levels{/tr}</div>
					</div>
				</div>
238 239 240 241 242 243 244 245
				{if $prefs.lock_wiki_structures eq 'y'}
					<div class="form-group">
						<label class="col-sm-3 control-label">{tr}Lock{/tr}</label>
						<div class="col-sm-9">
							{lock type='wiki structure' object=0}
						</div>
					</div>
				{/if}
246 247 248
				{if $prefs.feature_categories eq 'y'}
					{include file='categorize.tpl'}
				{/if}
lphuberdeau's avatar
lphuberdeau committed
249 250 251 252 253
				<div class="form-group">
					<div class="submit col-md-9 col-md-push-3">
						<input type="submit" class="btn btn-primary" value="{tr}Create New Structure{/tr}" name="create">
					</div>
				</div>
254 255 256
			</form>
		{/tab}
	{/if}
sylvieg's avatar
sylvieg committed
257
{/tabset}