<style>
	#admin-tools-list li a.not-installed:after {
		content: " ({"click to install"})";
	}
	#admin-tools-list li a.needs-upgrade:after {
		content: " ({"click to upgrade"})";
	}
</style>
{% if is_apps %}
	<a href="#preview" class="admin-tools-show-preview" data-trigger="p" data-trigger-label="{"Toggle preview mode"}">{"Preview"}</a>
	<a href="/" id="admin-tools-website" data-trigger="w" data-trigger-label="{"Go to website"}">{"Website"}</a>
	{% if count($data->tools) || $data->editable %}
		<span id="admin-tools" data-trigger="t" data-trigger-label="{"Toggle tools menu"}">{"Tools"} &nbsp; &nbsp;
		<ul id="admin-tools-list">
		{% if editable %}<li><a href="/admin/toolbar"><em>{"Edit Toolbar"}</em></a></li>{% end %}
		{% foreach tools %}
			<li><a href="/{{ loop_index }}"{% if loop_value['class'] %} class="{{ loop_value['class'] }}"{% end %}>{{ loop_value['name']|__ }}</a></li>
		{% end %}
		</ul>
		</span>
	{% end %}
	<a href="/user" id="admin-tools-user" data-trigger="u" data-trigger-label="{"Go to user profile"}">{{ user }}</a>
	<a href="/user/logout" id="admin-tools-logout" data-trigger="q" data-trigger-label="{"Log out"}">{"Log out"}</a>
{% else %}
	<a href="#preview" class="admin-tools-show-preview" data-trigger="p" data-trigger-label="{"Toggle preview mode"}">{"Preview"}</a>
	<a href="/" id="admin-tools-website" data-trigger="w" data-trigger-label="{"Go to website"}">{"Website"}</a>
	{% if count($data->tools) || $data->editable %}
		<div id="admin-tools-list" class="admin-tools-custom">
		{% if editable %}<a class="admin-tools-edit" href="/admin/toolbar">{"Edit Toolbar"}</a>{% end %}
		<?php $data->row_count = 0; ?>
		{% foreach tools as section, group %}
			<?php $data->row_count++; ?>
			<div class="admin-tools-section">
			<h3 class="admin-tools-section-header">{{section|__}}</h3>
			<ul class="admin-tools-list">
			{% foreach group as tool %}
				<li><a href="/{{ loop_index }}"{% if tool['class'] %}class="{{ tool['class'] }}"{% end %}>{{ tool['name']|__ }}</a></li>
			{% end %}
			</ul>
			</div>
			{% if row_count % 5 === 0 %}<br class="clear">{% end %}
		{% end %}
		</div>
	{% end %}
	<a href="/user" id="admin-tools-user" data-trigger="u" data-trigger-label="{"Go to user profile"}">{{ user }}</a>
	<a href="/user/logout" id="admin-tools-logout" data-trigger="q" data-trigger-label="{"Log out"}">{"Log out"}</a>
{% end %}