{% extends "page.html" %}

{% block subtitle %}{{ _("Tag Manager") }}{% endblock %}

{% block breadcrumb_content %}
  <li class="active">{{ h.nav_link(_('Tag Manager'), controller='ckanext.tagmanager.controller:TagmanagerController', action='index', highlight_actions = 'new index') }}</li>
{% endblock %}

{% block page_header %}{% endblock %}

{% block primary_content_inner %}
	
	<h1 class="hide-heading">{{ _('Tags') }}</h1>
	{% if h.check_access('group_create') %} <!-- TODO Tag create access! -->
	<p><b><em> {{ _('Welcome to the CKAN Tag Manager Plugin.') }}</em></b> <br><br>  	  
	
		{% block tags_stats %}
			{% snippet "tagmanager/snippets/tags_stats.html" %}
		{% endblock %}

		<hr>

		{% if h.tagmanager_has_suggestions() != 0 %}
	
			{% block merge_preview %}
				{% snippet "tagmanager/snippets/merge_preview.html" %}
			{% endblock %}

		{% endif %}	

		{% block calculate_suggestions %}
			{% snippet "tagmanager/snippets/process_suggestions.html" %}
		{% endblock %}


	{% else %}
		{% block tags_list %}
			 {% snippet "tagmanager/snippets/tags_list.html" %}
		{% endblock %}

	{% endif %} <!-- tag create access -->
{% endblock %} <!--primary content inner -->

{% block secondary_content %}
  {% snippet "tagmanager/snippets/menu.html" %}
{% endblock %}

