
{% extends "base.html" %}

{% block title %} | Create new map{% endblock %}

{% block main %}
		<div class="page-header">
            <div class="container">
                <div class="row">
                    <div class="col-sm-6">
                        <h1 class="smaller"><a href="{% url 'admin:project_overview' project.id %}">{{project.name}}</a></h1>
                        <a href="{% url 'admin:project_overview' project.id %}"><span class="glyphicon glyphicon-arrow-left"></span> Project home page</a>
                    </div>
                    <ul class="header-nav">
	                    <li><a href="{% url 'admin:category_list' project.id %}">Categories <span class="badge">{{ project.categories.count }}</span></a></li>
	                    <li class="active"><a href="{% url 'admin:grouping_list' project.id %}">Data groupings <span class="badge">{{ project.groupings.count }}</span></a></li>
	                    <li><a href="{% url 'admin:usergroup_list' project.id %}">User groups <span class="badge">{{ project.usergroups.count }}</span></a></li>
	                </ul>
                </div>
            </div>
        </div>

		<div class="container">
			<div class="row">
				<form  role="form" class="col-md-8 col-md-offset-2 col-lg-8 col-lg-offset-2" method="POST" action="{% url 'admin:grouping_create' project.id %}" novalidate>
					<h3 class="header">Create a new data grouping</h3>
					{% csrf_token %}
					<div class="form-group">
						<label for="name" class="control-label">Name (required)</label>
						<input type="text" class="form-control input-lg" id="name" name="name" maxlength="100" required>
					</div>

					<div class="form-group">
						<label for="description" class="control-label">Description</label>
						<textarea class="form-control input-lg" rows="5" name="description" id="description"></textarea>
					</div>

					<div class="form-group">
						<button type="submit" class="btn btn-primary">Save</button>
						<a href="{% url 'admin:project_settings' project.id %}" class="btn btn-default" role="button">Cancel</a>
					</div>
				</form>
			</div>
		</div>
{% endblock %}

{% block libraries %}
			<script src="/static/js/admin.ui.forms.validate.js"></script>
{% endblock %}
