{{ define "title" }}Administration Panel: Graphs — Facette{{ end }}

{{ define "head" }}
		<script src="{{ .URLPrefix }}{{ asset "/static/jquery.js" }}"></script>
		<script src="{{ .URLPrefix }}{{ asset "/static/i18next.js" }}"></script>
		<script src="{{ .URLPrefix }}{{ asset "/static/moment.js" }}"></script>
		<script src="{{ .URLPrefix }}{{ asset "/static/facette.js" }}"></script>
{{ end }}

{{ define "content" }}
		<article data-pane="graph-list" data-paneopts="section: {{ .Section }}">
			<header>
				<h1>Administration Panel — Graphs</h1>

				<nav>{{ if not .ReadOnly }}
					<ul>
						<li><a class="icon icon-add" href="{{ .URLPrefix }}/admin/graphs/add" title="Add Graph"></a></li>
						<li><a class="icon icon-template icon-stack icon-stack-add" href="{{ .URLPrefix }}/admin/graphs/add?linked=1" title="Add From Template"></a></li>
					</ul>{{ end }}
				</nav>

				<div class="filter icon icon-search">
					<input data-listfilter="graphs" placeholder="Search for Graph" type="text">
				</div>
			</header>

			<section class="scrollarea full">
				<div class="list" data-list="graphs" data-listopts="init: true; url: library/graphs/?type={{ if .Template }}template{{ else }}raw{{ end }}; messages: graph">
					<h1>{{ if .Template }}Graphs Templates List{{ else }}Graphs List{{ end }} <span class="count"></span></h1>

					<nav class="listmenu">
						<ul>
							<li{{ if not .Template }} class="current"{{ end }}><a href="{{ .URLPrefix }}/admin/graphs/">Graphs</a></li>
							<li{{ if .Template }} class="current"{{ end }}><a href="{{ .URLPrefix }}/admin/graphs/?templates=1">Templates</a></li>
						</ul>
					</nav>

					<div class="listmesg" data-listmesg="graphs"></div>

					<div class="listitem" data-listtmpl="graphs">{{ if not .ReadOnly }}
						<div class="actions">
							<a class="icon icon-remove" href="#remove-graph" title="Remove Graph"></a>
						</div>{{ end }}
						<div class="date">Last updated on <span></span></div>
						<div>
							<span class="name"></span>
							<span class="actions">{{ if not .ReadOnly }}
								<a class="icon icon-info" href="#show-info" title="Show Information"></a>
								<a class="icon icon-edit" href="#edit-graph" title="Edit Graph"></a>
								<a class="icon icon-copy" href="#clone-graph" title="Clone Graph"></a>{{ end }}
								<a class="icon icon-goto" href="#show-graph" title="Go to Graph"></a>
								<a class="icon icon-add" href="#add-graph" title="Create Graph from Template"></a>
							</span>
						</div>
						<div class="desc"></div>
					</div>
				</div>

				<button data-listmore="{{ .Section }}" disabled="disabled">Load More</button>
			</section>
		</article>
{{ end }}
