django_project_demo/app/templates/PrettyNumber_list.html

68 lines
2.2 KiB
HTML
Raw Normal View History

2024-08-24 11:25:23 +08:00
{% extends 'layout.html' %}
{% block content %}
<div class="container">
<div style="margin-bottom:10px" class="clearfix">
<a class="btn btn-success" href="/PrettyNumber/add/">
<span class="glyphicon glyphicon-user" aria-hidden="true"></span>
新建靓号ModelForm组件方式
</a>
<div style="float: right;width: 300px;">
<form>
<div class="input-group">
<input type="text" name="searchMobile" class="form-control" placeholder="关键字..."
value="{{ search_data }}">
<span class="input-group-btn">
<button class="btn btn-default" type="submit">
<span class="glyphicon glyphicon-search" aria-hidden="true"></span>
</button>
</span>
</div>
</form>
</div>
</div>
<div class="panel panel-default">
<!-- Default panel contents -->
<div class="panel-heading">
<span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
靓号列表
</div>
<!-- Table -->
<table class="table table-bordered">
<thead>
<tr>
<th>ID</th>
<th>号码</th>
<th>价格</th>
<th>级别</th>
<th>状态</th>
<th>操作</th>
</tr>
</thead>
<tbody>
{% for item in queryset%}
<tr>
<th>{{ item.id }}</th>
<td>{{ item.mobile }}</td>
<td>{{ item.price }}</td>
<th>{{ item.get_level_display }}</th>
<td>{{ item.get_status_display }}</td>
<td>
<a class="btn btn-primary btn-xs" href="/PrettyNumber/{{ item.id }}/edit/">修改</a>
<a class="btn btn-danger btn-xs" href="/PrettyNumber/{{ item.id }}/delete/">删除</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<ul class="pagination">
{{ page_nav }}
</ul>
</div>
{% endblock %}