index.tpl 4.42 KB
{include file="tpl/header.tpl"}

<div id="wrapper">
	{include file="tpl/user_sidebar_wrapper.tpl"}
	{include file="tpl/menu_tray.tpl"}

		<div id="container2">
			<h1 id="container2-header">Slimspots Wiki
				<div class="btn-group pull-right" role="group" aria-label="...">
					<button id="delete_page" type="button" class="btn btn-danger" onclick="$('#delete_form').toggle(0);"><i class="fa fa-times fa-lg"></i></button>
					<button id="add_page" type="button" class="btn btn-success" onclick="$('#add_form').toggle(0);"><i class="fa fa-plus fa-lg"></i></button>
				</div>
			</h1>
		</div>

		<div id="add_form" style="display:none; margin-bottom:20px; padding:0px;">
			<form action="" method="post">
				<div class="row">
					<div class="col-lg-12">
							<div class="panel panel-default">
								<div class="panel-heading">Create</div>
								<div class="panel-body">
									<div class="form-group">
										<label class="col-sm-4 control-label">Create a new:</label>
										<div class="col-sm-8 margin-bottom-15">
											<select id="select_option_add" class="form-control" name="select_option" data-tags="true" data-placeholder="Choose what you want to create">
												<option value="page" selected>Page</option>
												<option value="section">Section</option>
											</select>
										</div>
									</div>

									<div class="methode_remove display-none" id="section">
										<div class="form-group">
											<label class="col-sm-4 control-label">Page to add the section to:</label>
											<div class="col-sm-8 margin-bottom-15">
												<select class="form-control" name="page_to_add_section_to" id="page_to_add_section_to">
													{foreach from=$db_page_title item=title}
													<option value='{$title}'>{$title}</option>
													{/foreach}
												</select>
											</div>
										</div>
									</div>


									<div class="form-group">
										<label class="col-sm-4 control-label">Title:</label>
										<div class="col-sm-8 margin-bottom-15">
											<input type="text" class="form-control" name="title" />
										</div>
									</div>
									<div class="form-group">
										<div class="col-sm-8 col-sm-offset-4">
											<button class="btn dark-blue" type="submit" name="create_btn_submit">Submit</button>
										</div>
									</div>
								</div>
							</div>
					</div>
				</div>
			</form>
		</div>

		<div id="delete_form" style="display:none; margin-bottom:20px; padding:0px;">
			<form class="form-horizontal" method="post" action="">
				<div class="panel panel-default">
					<div class="panel-heading">Remove</div>
					<div class="panel-body">
						<div class="form-group">
							<label class="col-sm-4 control-label">Remove:</label>
							<div class="col-sm-8">
								<select id="select_option_remove" class="form-control" name="select_option"  data-tags="true" data-placeholder="Choose what you want to remove">
									<option></option>
									<option value="page">Page</option>
									<option value="section">Section</option>
								</select>
							</div>
						</div>

						<div class="methode_remove display-none" id="page_remove">
							<div class="form-group">
								<label class="col-sm-4 control-label">Page to remove:</label>
								<div class="col-sm-8">
									<select class="form-control" name="page_to_remove" id="page_to_remove">
										{foreach from=$db_page_title item=title}
										<option value='{$title}'>{$title}</option>
										{/foreach}
									</select>
								</div>
							</div>
						</div>

						<div class="methode_remove display-none" id="section_remove">
							<div class="form-group">
								<label class="col-sm-4 control-label">Section to remove:</label>
								<div class="col-sm-8">
									<select class="form-control" name="section_to_remove" id="section_to_remove">
										{foreach from=$page_section item=title}
										<option value='{$title}'>{$title}</option>
										{/foreach}
									</select>
								</div>
							</div>
						</div>
						<div class="form-group">
							<div class="col-sm-8 col-sm-offset-4">
								<button class="btn dark-blue" type="submit" name="remove_btn_submit">Submit</button>
							</div>
						</div>
					</div>
				</div>
			</form>
		</div>

		{if isset($error) }
		<div class="alert alert-danger" role="alert">{$error}</div>
		{/if}

		{include file="tpl/content.tpl"}
	</div>
<!-- /#page-content-wrapper -->
</div>
<!-- /#wrapper -->

{include file="tpl/footer.tpl"}