添加tab

pull/6/head
guanghongwei 2015-01-24 16:06:07 +08:00
parent 8738b517cc
commit de175eb3cd
1 changed files with 86 additions and 59 deletions

View File

@ -32,70 +32,97 @@
<div class="">
<a target="_blank" href="/jperm/perm_edit/" class="btn btn-sm btn-primary "> 娣诲姞 </a>
</div>
<div class="panel blank-panel">
<table class="table table-striped table-bordered table-hover " id="editable" >
<thead>
<tr>
<th class="text-center">鐢ㄦ埛鍚</th>
<th class="text-center">濮撳悕</th>
<th class="text-center">灞炵粍</th>
<th class="text-center">鎺堟潈鎬绘暟</th>
<th class="text-center">鎿嶄綔</th>
</tr>
</thead>
<tbody>
{% for user in contacts.object_list %}
<tr class="gradeX">
<td class="text-center"> {{ user.username }} </td>
<td class="text-center"> {{ user.name }} </td>
<td class="text-center"> {{ user.username|groups_str }} </td>
<td class="text-center"> {{ user.id|perm_count }} </td>
<td class="text-center">
<a href="../perm_detail/?id={{ user.id }}" class="iframe btn btn-xs btn-primary">璇︽儏</a>
<a href="../perm_edit/?id={{ user.id }}" class="btn btn-xs btn-info">缂栬緫</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="row">
<div class="col-sm-6">
<div class="dataTables_info" id="editable_info" role="status" aria-live="polite">
Showing {{ contacts.start_index }} to {{ contacts.end_index }} of {{ p.count }} entries
</div>
</div>
<div class="col-sm-6">
<div class="dataTables_paginate paging_simple_numbers" id="editable_paginate">
<ul class="pagination" style="margin-top: 0; float: right">
{% if contacts.has_previous %}
<li class="paginate_button previous" aria-controls="editable" tabindex="0" id="editable_previous">
<a href="?page={{ contacts.previous_page_number }}">Previous</a>
</li>
{% else %}
<li class="paginate_button previous disabled" aria-controls="editable" tabindex="0" id="editable_previous">
<a href="#">Previous</a>
</li>
{% endif %}
{% for page in p.page_range %}
{% ifequal offset1 page %}
<li class="paginate_button active" aria-controls="editable" tabindex="0"><a href="?page={{ page }}" title="绗瑊{ page }}椤">{{ page }}</a></li>
{% else %}
<li class="paginate_button" aria-controls="editable" tabindex="0"><a href="?page={{ page }}" title="绗瑊{ page }}椤">{{ page }}</a></li>
{% endifequal %}
{% endfor %}
{% if contacts.has_next %}
<li class="paginate_button next" aria-controls="editable" tabindex="0" id="editable_next">
<a href="?page={{ contacts.next_page_number }}">Next</a>
</li>
{% else %}
<li class="paginate_button next disabled" aria-controls="editable" tabindex="0" id="editable_next">
<a href="#">Next</a>
</li>
{% endif %}
<div class="panel-heading">
<div class="panel-options">
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#tab-1">鐢ㄦ埛鎺堟潈</a></li>
<li class=""><a data-toggle="tab" href="#tab-2">鐢ㄦ埛缁勬巿鏉</a></li>
</ul>
</div>
</div>
<div class="panel-body">
<div class="tab-content">
<div id="tab-1" class="tab-pane active">
<table class="table table-striped table-bordered table-hover " id="editable" >
<thead>
<tr>
<th class="text-center">鐢ㄦ埛鍚</th>
<th class="text-center">濮撳悕</th>
<th class="text-center">灞炵粍</th>
<th class="text-center">鎺堟潈鎬绘暟</th>
<th class="text-center">鎿嶄綔</th>
</tr>
</thead>
<tbody>
{% for user in contacts.object_list %}
<tr class="gradeX">
<td class="text-center"> {{ user.username }} </td>
<td class="text-center"> {{ user.name }} </td>
<td class="text-center"> {{ user.username|groups_str }} </td>
<td class="text-center"> {{ user.id|perm_count }} </td>
<td class="text-center">
<a href="../perm_detail/?id={{ user.id }}" class="iframe btn btn-xs btn-primary">璇︽儏</a>
<a href="../perm_edit/?id={{ user.id }}" class="btn btn-xs btn-info">缂栬緫</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="row">
<div class="col-sm-6">
<div class="dataTables_info" id="editable_info" role="status" aria-live="polite">
Showing {{ contacts.start_index }} to {{ contacts.end_index }} of {{ p.count }} entries
</div>
</div>
<div class="col-sm-6">
<div class="dataTables_paginate paging_simple_numbers" id="editable_paginate">
<ul class="pagination" style="margin-top: 0; float: right">
{% if contacts.has_previous %}
<li class="paginate_button previous" aria-controls="editable" tabindex="0" id="editable_previous">
<a href="?page={{ contacts.previous_page_number }}">Previous</a>
</li>
{% else %}
<li class="paginate_button previous disabled" aria-controls="editable" tabindex="0" id="editable_previous">
<a href="#">Previous</a>
</li>
{% endif %}
{% for page in p.page_range %}
{% ifequal offset1 page %}
<li class="paginate_button active" aria-controls="editable" tabindex="0"><a href="?page={{ page }}" title="绗瑊{ page }}椤">{{ page }}</a></li>
{% else %}
<li class="paginate_button" aria-controls="editable" tabindex="0"><a href="?page={{ page }}" title="绗瑊{ page }}椤">{{ page }}</a></li>
{% endifequal %}
{% endfor %}
{% if contacts.has_next %}
<li class="paginate_button next" aria-controls="editable" tabindex="0" id="editable_next">
<a href="?page={{ contacts.next_page_number }}">Next</a>
</li>
{% else %}
<li class="paginate_button next disabled" aria-controls="editable" tabindex="0" id="editable_next">
<a href="#">Next</a>
</li>
{% endif %}
</ul>
</div>
</div>
</div>
</div>
<div id="tab-2" class="tab-pane">
</div>
</div>
</div>
</div>
</div>
</div>
</div>