newmediamonitoring/management/templates/management/add-group-admin-and-user.html

197 lines
14 KiB
HTML
Raw Normal View History

2020-09-17 08:10:13 +00:00
{% extends 'dashboard/base/base.html' %}
{% load static %}
{% block content %}
<body class=" ">
<!-- START TOPBAR -->
<!-- START CONTAINER -->
<div class="page-container row-fluid">
<div class="page-sidebar ">
{% include 'dashboard/base/left.html' %}
</div>
<section id="main-content" class=" ">
<section class="wrapper" style='margin-top:60px;display:inline-block;width:100%;padding:15px 0 0 15px;'>
{% if messages %}
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert">
<span aria-hidden="true">&times;</span>
<span class="sr-only">Close</span>
</button>
{% for message in messages %}
{{ message }}.<br/>
{% endfor %}
</div>
{% endif %}
<div class='col-lg-12 col-md-12 col-sm-12 col-xs-12'>
<div class="page-title">
<div class="pull-left">
<h1 class="title">编辑矩阵</h1></div>
</div>
</div>
<div class="clearfix"></div>
<div class="col-lg-12 col-md-12 col-xs-12 col-sm-12">
<section class="box ">
<header class="panel_header">
<h2 class="title pull-left">矩阵信息表单</h2>
</header>
<div class="content-body">
<div class="row">
<div class="col-md-8 col-sm-9 col-xs-10">
<form method="post"
action="{% url 'group-management-update' group.id %}" enctype="multipart/form-data">{% csrf_token %}
<div class="form-group">
<label class="form-label" for="name">矩阵名称</label>
<div class="controls">
<input type="text" class="form-control" name="name"
value="{{ group.name }}">
</div>
</div>
<div class="form-group">
<label class="form-label" for="presentation">矩阵介绍</label>
<div class="controls">
<input type="text" class="form-control"
name="presentation" value="{{ group.presentation }}">
</div>
</div>
<div class="form-group">
<label class="form-label" for="image">图标
<div class="controls">
<input type="file" name="image"><img
src="{{ group.image.url }}"
style="width: 80px;height: 80px;"
class="img-circle">
</div>
</label>
</div>
<div class="form-group">
<label class="form-label" for="type">矩阵类型</label>
<div class="controls">
<select class="form-control" name="type">
<option value="{{ group.type.id }}">{{ group.type }}</option>
{% for g in group_type %}
<option value="{{ g.id }}">{{ g.type }}</option>
{% endfor %}
</select>
</div>
</div>
<div class="form-group">
<label class="form-label" for="status">矩阵状态</label>
<div class="controls">
<select class="form-control" name="status">
<option value="{{ group.status }}">{{ group.status }}</option>
{% for g in group_status_choices_list %}
<option value="{{ g }}">{{ g }}</option>
{% endfor %}
</select>
</div>
</div>
<div class="form-group">
<label class="form-label" for="administrativedivision">行政区划</label>
<div class="controls">
<select id="province" name="province">
<option value="{{ group.province }}">{{ group.province }}</option>
</select>
<select id="city" name="city" style="margin-left: 20px">
<option value="{{ group.cities }}">{{ group.cities }}</option>
</select>
<select id="district" name="district" style="margin-left: 20px">
<option value="{{ group.district }}">{{ group.district }}</option>
</select>
<select id="town" name="town" style="margin-left: 20px">
<option value="{{ group.town }}">{{ group.town }}</option>
</select>
<select id="village" name="village" style="margin-left: 20px">
<option value="{{ group.village }}">{{ group.village }}</option>
</select>
</div>
</div>
<div class="form-group">
<label class="form-label" for="stauts">管理员</label>
<div class="controls" style="margin-left: 5%">
<a href="{% url 'group-admin-create' group.id %}"><span class="glyphicon glyphicon-plus" aria-hidden="true">添加管理员</span></a>
<table class="table table-hover" style="margin-top: 20px">
<thead>
<tr>
<th style="text-align: center">头像</th>
<th style="text-align: center">用户名</th>
<th style="text-align: center">姓名</th>
<th style="text-align: center">单位名称</th>
<th style="text-align: center">行政区划</th>
<th style="text-align: center">操作</th>
</tr>
</thead>
<tbody>
{% for g_a in g_a_list %}
<tr>
<td style="vertical-align: middle;text-align: center"><img
src="{{ g_a.image }}"
style="width: 80px;height: 80px;"
class="img-circle"></td>
<td style="vertical-align: middle;text-align: center">{{ g_a.username }}</td>
<td style="vertical-align: middle;text-align: center">{{ g_a.name }}</td>
<td style="vertical-align: middle;text-align: center">{{ g_a.organization }}</td>
<td style="vertical-align: middle;text-align: center">{{ g_a.administrativedivision }}</td>
<td style="vertical-align: middle;text-align: center">
<a href="{% url 'group-admin-delete' g_a.id group.id %}"
class="btn btn-danger btn-mini">删除</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<div class="form-group">
<label class="form-label" for="stauts">成员</label>
<div class="controls" style="margin-left: 5%">
<a href="{% url 'group-user-create' group.id %}"><span class="glyphicon glyphicon-plus" aria-hidden="true">添加成员</span></a>
<table class="table table-hover" style="margin-top: 20px">
<thead>
<tr>
<th style="text-align: center">头像</th>
<th style="text-align: center">用户名</th>
<th style="text-align: center">姓名</th>
<th style="text-align: center">单位名称</th>
<th style="text-align: center">行政区划</th>
<th style="text-align: center">操作</th>
</tr>
</thead>
<tbody>
{% for g_u in g_u_list %}
<tr>
<td style="vertical-align: middle;text-align: center"><img
src="{{ g_u.image }}"
style="width: 80px;height: 80px;"
class="img-circle"></td>
<td style="vertical-align: middle;text-align: center">{{ g_u.username }}</td>
<td style="vertical-align: middle;text-align: center">{{ g_u.name }}</td>
<td style="vertical-align: middle;text-align: center">{{ g_u.organization }}</td>
<td style="vertical-align: middle;text-align: center">{{ g_u.administrativedivision }}</td>
<td style="vertical-align: middle;text-align: center">
<a href="{% url 'group-user-delete' g_u.id group.id %}"
class="btn btn-danger btn-mini">删除</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<button type="submit" class="btn btn-success">提交</button>
</form>
</div>
</div>
</div>
</section>
</div>
</section>
</section>
<div class="chatapi-windows "></div>
</div>
</body>
{% endblock %}