You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
69 lines
2.1 KiB
69 lines
2.1 KiB
{% extends 'myadmin/base.html' %}
|
|
{% load static %}
|
|
|
|
{% block content %}
|
|
|
|
<div class="ui grid">
|
|
<div class="row">
|
|
<h3 class="ui header six wide column">视频列表</h3>
|
|
<div class="v-title-extra ten wide column">
|
|
<div class="ui action input v-admin-search">
|
|
<input type="text" placeholder="Search..." value="{{q}}" id="v-search">
|
|
<button class="ui small button" id="search">搜索</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="ui divider"></div>
|
|
<div class="row">
|
|
<table class="ui unstackable single line striped selectable table">
|
|
<thead>
|
|
<tr><th>#id</th><th>标题</th><th>分类</th><th>状态</th><th>访问次数</th><th>创建时间</th><th>操作</th></tr>
|
|
</thead>
|
|
<tbody class="video-list">
|
|
|
|
{% for item in video_list %}
|
|
<tr video-id="{{item.id}}">
|
|
<td> {{item.id}}</td>
|
|
<td> {{item.title|default:""}}</td>
|
|
<td> {{item.classification|default:""}}</td>
|
|
<td> {{item.get_status_display}}</td>
|
|
<td> {{item.view_count}}</td>
|
|
<td> {{item.create_time|date:'Y-m-d H:i'}}</td>
|
|
<td>
|
|
<a class="ui primary button video-edit" href="{% url 'myadmin:video_edit' item.id %}">编辑</a>
|
|
<a class="ui button video-delete">删除</a>
|
|
</td>
|
|
</tr>
|
|
{% empty %}
|
|
<h3>暂无数据</h3>
|
|
{% endfor %}
|
|
|
|
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<th colspan="6">
|
|
{% include 'myadmin/page_nav.html' %}
|
|
</th>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
{% endblock content %}
|
|
|
|
{% block modal %}
|
|
{% include "myadmin/video_list_modal.html" %}
|
|
{% endblock modal %}
|
|
|
|
{% block javascript %}
|
|
<script>
|
|
var api_video_delete = "{% url 'myadmin:video_delete' %}";
|
|
var search_url = "{% url 'myadmin:video_list' %}"
|
|
|
|
</script>
|
|
<script src="{% static 'js/myadmin/video_list.js' %}"></script>
|
|
{% endblock javascript %}
|