Blob Blame Raw
{% extends "master.html" %}
{% from "_formhelper.html" import render_field_in_row %}

{% block title %}Groups{% endblock %}
{%block tag %}admin{% endblock %}

{% block header %}
<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css"
  rel="stylesheet">
{% endblock %}

{% block content %}
<h2>Progit Groups</h2>

<section class="add_group">
  <h4>Create a new group</h4>
  <form action="{{ url_for('admin_groups') }}" method="post">
    <input id="group_name" name="group_name" title="group name"/>
    {{ form.csrf_token }}
  <input type="submit" class="submit positive button" value="Create">
  </form>
</section>

<section class="list_groups">
{% if groups %}
<ul>
    {% for group in groups %}
    <li>grpid: {{ group.id }} :
      <a href="{{ url_for('admin_group', group=group.group_name) }}">
         {{ group.group_name }}
      </a>
      <form class="icon" method="POST"
        action="{{ url_for('admin_group_delete', group=group.group_name) }}">
        {{ conf_form.csrf_token }}
        <button
          onclick="return confirm('Are you sure to delete group`{{
            group.group_name }}`?');"
          title="Delete group">
          <span class="icon icon-trash blue"></span>
        </button>
      </form>
    </li>
    {% endfor %}
</ul>
{% else %}
<p>No group found</p>
{% endif %}
</section>

{% endblock %}