group-detail.html 4.32 KB
Newer Older
1 2 3
{% extends "dashboard/base.html" %}
{% load i18n %}

4 5 6
{% block content %}
<div class="body-content">
  <div class="page-header">
7 8 9 10 11 12
    <div class="pull-right" style="padding-top: 15px;">
      <a title="{% trans "Rename" %}" href="#" class="btn btn-default btn-xs group-details-rename-button"><i class="icon-pencil"></i></a>
      <a title="{% trans "Delete" %}" data-group-pk="{{ group.pk }}" class="btn btn-default btn-xs real-link group-delete" href="{% url "dashboard.views.delete-group" pk=group.pk %}"><i class="icon-trash"></i></a>
      <a title="{% trans "Help" %}" href="#" class="btn btn-default btn-xs group-details-help-button"><i class="icon-question"></i></a>
    </div>
   <h1>
13 14 15 16 17 18
      <div id="group-details-rename">
        <form action="" method="POST" id="group-details-rename-form">
          {% csrf_token %}
          <input id="group-details-rename-name" class="form-control" name="new_name" type="text" value="{{ group.name }}"/> 
          <button type="submit" id="group-details-rename-submit" class="btn">{% trans "Rename" %}</button>
        </form>
19
      </div>
20 21 22
      <div id="group-details-h1-name">
        {{ group.name }} 
      </div>
23
    </h1>
24 25 26 27
  </div>
  <div class="row">
    <div class="col-md-4" id="group-info-pane">
      <div class="big">
28 29
 	 <div class="btn-group">
          <button type="button" class="btn btn-warning nojs-dropdown-toogle dropdown-toggle" data-toggle="dropdown">Action 		<i class="icon-caret-down"></i></button>
30
          <ul class="nojs-dropdown-menu dropdown-menu" role="menu">
31 32 33
            <li><a href="#" class="group-details-rename-button"><i class="icon-pencil"></i>{% trans "Rename" %}</a></li>
            <li><a data-group-pk="{{ group.pk }}" class="group-delete" href="{% url "dashboard.views.delete-group" pk=group.pk %}"><i class="icon-remove"></i> Discard</a></li>
	</ul>
34 35 36
        </div>
      </div>
    </div>
37 38 39
    <div class="col-md-8" id="group-detail-pane">
      <div class="panel panel-default" id="group-detail-panel">
        <div class="tab-content panel-body">
40

41 42 43 44 45 46 47 48 49 50 51 52 53 54
<h3>{% trans "User list"|capfirst %}</h3>
<table class="table table-striped table-with-form-fields">
    <tbody>
     <thead><tr><th></th><th>{% trans "Who" %}</th><th></th><th></th></tr></thead>
        {% for i in users %}
	<tr><td><i class="icon-user"></i></td><td>{{i.username}}</td>
		<td><a data-group-pk="{{ i.pk }}" href="#" class="real-link groupuser-delete btn btn-link btn-xs"><i class="icon-remove"><span class="sr-only">{% trans "remove" %}</span></i></a></td></tr>
        {% endfor %}
        <tr><td><i class="icon-plus"></i></td>
            <td><input type="text" class="form-control" name="perm-new-name"
                placeholder="{% trans "Name of group or user" %}"></td>
        </tr>
  </tbody>
  </table>
55

56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
<h3>{% trans "Permissions"|capfirst %}</h3>
  <form action="{{acl.url}}" method="post">{% csrf_token %}
  <table class="table table-striped table-with-form-fields">
    <thead><tr><th></th><th>{% trans "Who" %}</th><th>{% trans "What" %}</th><th></th></tr></thead>
    <tbody>
        {% for i in acl.users %}
        <tr><td><i class="icon-user"></i></td><td>{{i.user}}</td>
            <td><select class="form-control" name="perm-u-{{i.user.id}}">
                    {% for id, name in acl.levels %}
                    <option{%if id = i.level%} selected="selected"{%endif%} value="{{id}}">{{name}}</option>
                    {% endfor %}
            </select></td>
            <td class="user-remove"><a href="#" class="btn btn-link btn-xs"><i class="icon-remove"><span class="sr-only">{% trans "remove" %}</span></i></a></td></tr>
        {% endfor %}
        <tr><td><i class="icon-plus"></i></td>
            <td><input type="text" class="form-control" name="perm-new-name"
                placeholder="{% trans "Name of group or user" %}"></td>
            <td><select class="form-control" name="perm-new">
                    {% for id, name in acl.levels %}
                    <option value="{{id}}">{{name}}</option>
                    {% endfor %}
            </select></td><td></td>
        </tr>
  </tbody>
  </table>
	  <textarea class="form-control"></textarea>
82

83 84 85 86
  <div class="form-actions panel-body">
    <button type="submit" class="btn btn-success">{% trans "Save" %}</button>
  </div>
  </form>
87 88


89 90 91 92 93 94
	</div>
     </div>
    </div>
  </div>
</div>
<script src="{{ STATIC_URL}}dashboard/group-details.js"></script>
95
{% endblock %}