summaryrefslogtreecommitdiff
path: root/templates/structure_edit_content.tpl
blob: c5deee34c7bcdf1dc85a1134f48f6d113d0f44a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{strip}

<div class="header">
	<h1>{tr}Structure Content{/tr}</h1>
</div>

<div class="structurecontent">
	{form legend="Add Content"}
		<input type="hidden" name="structure_id" value="{$structureInfo.structure_id}" />
		<input type="hidden" name="tab" value="content" />

		{if $subpages}
			<div class="form-group">
				{formlabel label="After page" for="after_ref_id"}
				{forminput}
					<select name="after_ref_id" id="after_ref_id">
						{section name=iy loop=$subpages}
							<option value="{$subpages[iy].structure_id}" {if $insert_after eq $subpages[iy].structure_id}selected="selected"{/if}>{$subpages[iy].title|escape}</option>
						{/section}
					</select>
					{formhelp note=""}
				{/forminput}
			</div>
		{/if}

		<div class="form-group">
			{formlabel label="Content" for="lib-content"}
			{forminput}
				{html_options onchange="submit();" options=$contentTypes name=content_type_guid selected=$contentSelect}
			{/forminput}

			{forminput}
				{html_options multiple="multiple" id="lib-content" size="12" name="content[]" values=$contentList options=$contentList}
			{/forminput}

			{forminput}
				<input type="text" name="find" /> 
				<input type="submit" class="btn btn-default" value="{tr}Apply filter{/tr}" name="search_objects" />
				{formhelp note=""}
			{/forminput}
		</div>

		<div class="form-group submit">
			<input type="submit" class="btn btn-default" name="create" value="{tr}Add Content{/tr}" />
		</div>
	{/form}
</div>

<div class="structuretoc">
	<ul class="toc">
		<li>
			{section name=ix loop=$subtree}
				{if $subtree[ix].pos eq ''}
					{if $structureInfo.structure_id eq $subtree[ix].structure_id}<div class="highlight">{/if}
						<a href="{$smarty.server.SCRIPT_NAME}?structure_id={$subtree[ix].structure_id}">{$subtree[ix].title|escape}</a>
					{if $structureInfo.structure_id eq $subtree[ix].structure_id}</div>{/if}
				{else}
					{if $subtree[ix].first}<ul>{else}</li>{/if}
					{if $subtree[ix].last}</ul>{else}
						<li>
							{if $structureInfo.structure_id eq $subtree[ix].structure_id}<div class="highlight">{/if}
								<strong>{$subtree[ix].pos}</strong>&nbsp;
								<a href="{$smarty.server.SCRIPT_NAME}?structure_id={$subtree[ix].structure_id}">{$subtree[ix].title|escape}</a>
							{if $structureInfo.structure_id eq $subtree[ix].structure_id}</div>{/if}
					{/if}
				{/if}
			{/section}
		</li>
	</ul><!-- end outermost .toc -->
</div>
<div class="clear"></div>
{/strip}