{{ define "title" }}Administration Panel: {{ if eq .Section "sourcegroups" }}Source{{ else }}Metric{{ end }} Groups — 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="group-list" data-paneopts="section: {{ .Section }}">
			<header>
				<h1>Administration Panel — {{ if eq .Section "sourcegroups" }}Source{{ else }}Metric{{ end }} Groups</h1>

				<nav>{{ if not .ReadOnly }}
					<ul>
						<li><a class="icon icon-add" href="{{ .URLPrefix }}/admin/{{ .Section }}/add" title="Add Group"></a></li>
					</ul>{{ end }}
				</nav>

				<div class="filter icon icon-search">
					<input data-listfilter="{{ .Section }}" placeholder="Search for Group" type="text">
				</div>
			</header>

			<section class="scrollarea full">
				<div class="list" data-list="{{ .Section }}" data-listopts="init: true; url: library/{{ .Section }}/; messages: group">
					<h1>Groups List <span class="count"></span></h1>

					<div class="listmesg" data-listmesg="{{ .Section }}"></div>

					<div class="listitem" data-listtmpl="{{ .Section }}">{{ if not .ReadOnly }}
						<div class="actions">
							<a class="icon icon-remove" href="#remove-group" title="Remove Group"></a>
						</div>{{ end }}
						<div class="date">Last updated on <span></span></div>
						<div>
							<span class="name"></span>{{ if not .ReadOnly }}
							<span class="actions">
								<a class="icon icon-info" href="#show-info" title="Show Information"></a>
								<a class="icon icon-edit" href="#edit-group" title="Edit Group"></a>
								<a class="icon icon-copy" href="#clone-group" title="Clone Group"></a>
							</span>{{ end }}
						</div>
						<div class="desc"></div>
					</div>
				</div>

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