termplate reconstruct
This commit is contained in:
parent
473fcb047f
commit
6055bd1ec8
@ -3,20 +3,8 @@
|
|||||||
<link rel="stylesheet" href="{{ url_for('static', filename='spectre-exp.min.css') }}">
|
<link rel="stylesheet" href="{{ url_for('static', filename='spectre-exp.min.css') }}">
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='spectre-icons.min.css') }}">
|
<link rel="stylesheet" href="{{ url_for('static', filename='spectre-icons.min.css') }}">
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='spectre.min.css') }}">
|
<link rel="stylesheet" href="{{ url_for('static', filename='spectre.min.css') }}">
|
||||||
<!-- <script src="{{ url_for('static', filename='axios.min.js')}}"></script> -->
|
|
||||||
|
|
||||||
<!-- <nav>
|
|
||||||
<h1>BookManage</h1>
|
|
||||||
<ul>
|
|
||||||
{% if g.user %}
|
|
||||||
<li><span>{{ g.user['user_name'] }}</span>
|
|
||||||
<li><a href="{{ url_for('auth.logout') }}">登出</a>
|
|
||||||
{% else %}
|
|
||||||
<li><a href="{{ url_for('auth.loginadmin') }}">管理员登陆</a>
|
|
||||||
<li><a href="{{ url_for('auth.loginuser') }}">用户登陆</a>
|
|
||||||
{% endif %}
|
|
||||||
</ul>
|
|
||||||
</nav> -->
|
|
||||||
<style>
|
<style>
|
||||||
html, body{
|
html, body{
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|||||||
@ -1,15 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="zh">
|
|
||||||
<head>
|
|
||||||
<title>DBProject</title>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>简单的电子书归档系统</h1>
|
|
||||||
<div>
|
|
||||||
<p>首先需要登陆</p>
|
|
||||||
<a href="/auth/loginuser">用户登陆</a>
|
|
||||||
<a href="/auth/loginadmin">管理员登陆</a>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@ -1,25 +1,6 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'user/user_base.html' %}
|
||||||
|
|
||||||
{% block header %}
|
{% block header %}
|
||||||
<style>
|
|
||||||
.maindiv {
|
|
||||||
height: 100%;
|
|
||||||
width: 100%;
|
|
||||||
position: fixed;
|
|
||||||
z-index: 1;
|
|
||||||
top: 20;
|
|
||||||
left: 0;
|
|
||||||
|
|
||||||
padding-left: 1.2rem;
|
|
||||||
padding-right: 2rem;
|
|
||||||
}
|
|
||||||
.sidenav {
|
|
||||||
height: 100%;
|
|
||||||
max-width: 160px;
|
|
||||||
z-index: 1;
|
|
||||||
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<script>
|
<script>
|
||||||
var typelist = {};
|
var typelist = {};
|
||||||
function switch_type(typename) {
|
function switch_type(typename) {
|
||||||
@ -41,61 +22,41 @@
|
|||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block user_content %}
|
||||||
<div class="container">
|
<div class="panel">
|
||||||
<div class="columns">
|
<div class="panel-header">
|
||||||
<div class="column col-2 text-center">
|
<h2>新建图书</h2>
|
||||||
<ul class="nav">
|
</div>
|
||||||
<li class="nav-item">
|
<div class="panel-body">
|
||||||
<a href="/home"><b>主页</b></a>
|
{%if error%}
|
||||||
</li>
|
<div class="toast">
|
||||||
<li class="nav-item">
|
{{error}}
|
||||||
<a href="/search"><b>搜索</b></a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="/addbook"><b>增加</b></a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="/tags"><b>分类</b></a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="column col-9 panel">
|
|
||||||
<div class="panel-header">
|
|
||||||
<h2>新建图书</h2>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
{% endif %}
|
||||||
{%if error%}
|
<form method="post" class="form-group m-2">
|
||||||
<div class="toast">
|
<label class="form-label" for="bookname">书名*</label>
|
||||||
{{error}}
|
<input class="form-input" name="bookname" id="bookname" required>
|
||||||
|
<label class="form-label" for="bookisbn">ISBN</label>
|
||||||
|
<input class="form-input" name="bookisbn" id="bookisbn">
|
||||||
|
<label class="form-label" for="bookpublisher">出版社</label>
|
||||||
|
<input class="form-input" name="bookpublisher" id="bookpublisher">
|
||||||
|
<label class="form-label" for="bookauthor">作者</label>
|
||||||
|
<input class="form-input" name="bookauthor" id="bookauthor">
|
||||||
|
<label class="form-label" for="booklang">语言</label>
|
||||||
|
<select class="form-select" name="booklang" id="booklang">
|
||||||
|
<option selected>CN</option>
|
||||||
|
<option>EN</option>
|
||||||
|
<option>Other</option>
|
||||||
|
</select>
|
||||||
|
<label class="form-label" for="booktype">分类</label>
|
||||||
|
<input class="form-input" name="booktype" id="booktype">
|
||||||
|
<div>
|
||||||
|
{% for atype in typelist%}
|
||||||
|
<span class="chip btn" onclick="switch_type('{{atype['type_name']}}')">{{atype['type_name']}}</span>
|
||||||
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
<input class="btn btn-primary input-group-btn p-centered" type="submit" value="提交">
|
||||||
<form method="post" class="form-group">
|
</form>
|
||||||
<label class="form-label" for="bookname">书名*</label>
|
|
||||||
<input class="form-input" name="bookname" id="bookname" required>
|
|
||||||
<label class="form-label" for="bookisbn">ISBN</label>
|
|
||||||
<input class="form-input" name="bookisbn" id="bookisbn">
|
|
||||||
<label class="form-label" for="bookpublisher">出版社</label>
|
|
||||||
<input class="form-input" name="bookpublisher" id="bookpublisher">
|
|
||||||
<label class="form-label" for="bookauthor">作者</label>
|
|
||||||
<input class="form-input" name="bookauthor" id="bookauthor">
|
|
||||||
<label class="form-label" for="booklang">语言</label>
|
|
||||||
<select class="form-select" name="booklang" id="booklang">
|
|
||||||
<option selected>CN</option>
|
|
||||||
<option>EN</option>
|
|
||||||
<option>Other</option>
|
|
||||||
</select>
|
|
||||||
<label class="form-label" for="booktype">分类</label>
|
|
||||||
<input class="form-input" name="booktype" id="booktype">
|
|
||||||
<div>
|
|
||||||
{% for atype in typelist%}
|
|
||||||
<span class="chip btn" onclick="switch_type('{{atype['type_name']}}')">{{atype['type_name']}}</span>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
<input class="btn btn-primary input-group-btn p-centered" type="submit" value="提交">
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -1,72 +1,32 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'user/user_base.html' %}
|
||||||
|
|
||||||
{% block header %}
|
{% block user_content %}
|
||||||
<style>
|
<div class="panel">
|
||||||
.maindiv {
|
<div class="panel-header">
|
||||||
height: 100%;
|
<div class="panel-title text-center">
|
||||||
width: 100%;
|
<h4>图书分类管理</h4>
|
||||||
position: fixed;
|
|
||||||
z-index: 1;
|
|
||||||
top: 20;
|
|
||||||
left: 0;
|
|
||||||
|
|
||||||
padding-left: 1.2rem;
|
|
||||||
padding-right: 2rem;
|
|
||||||
}
|
|
||||||
.sidenav {
|
|
||||||
height: 100%;
|
|
||||||
max-width: 160px;
|
|
||||||
z-index: 1;
|
|
||||||
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<div class="container">
|
|
||||||
<div class="columns">
|
|
||||||
<div class="column col-2 text-center">
|
|
||||||
<ul class="nav">
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="/home"><b>主页</b></a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="/search"><b>搜索</b></a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="/addbook"><b>增加</b></a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="/tags"><b>分类</b></a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="column col-9 panel">
|
|
||||||
<div class="panel-header">
|
|
||||||
<div class="panel-title">图书分类</div>
|
|
||||||
</div>
|
|
||||||
<div class="panel-body">
|
|
||||||
{% if error%}
|
|
||||||
<div class="toast">
|
|
||||||
<button class="btn btn-clear float-right"></button>
|
|
||||||
{{error}}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
<form method="post" class="input-group">
|
|
||||||
<label class="form-label px-1" for="typename">新建类型</label>
|
|
||||||
<input class="form-input" name="typename" id="typename" required>
|
|
||||||
<input class="btn btn-primary input-group-btn" type="submit" value="提交">
|
|
||||||
</form>
|
|
||||||
<ul>
|
|
||||||
{% for atype in typelist%}
|
|
||||||
<li>
|
|
||||||
TID:{{ atype['type_id'] }}, 类型名: {{ atype['type_name'] }}
|
|
||||||
<a href="/removetype?tid={{atype['type_id']}}">删除</a>
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
{% if error%}
|
||||||
|
<div class="toast">
|
||||||
|
<button class="btn btn-clear float-right"></button>
|
||||||
|
{{error}}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
<form method="post" class="input-group">
|
||||||
|
<label class="form-label px-1" for="typename">新建类型</label>
|
||||||
|
<input class="form-input" name="typename" id="typename" required>
|
||||||
|
<input class="btn btn-primary input-group-btn" type="submit" value="提交">
|
||||||
|
</form>
|
||||||
|
<ul>
|
||||||
|
{% for atype in typelist%}
|
||||||
|
<li>
|
||||||
|
TID:{{ atype['type_id'] }}, 类型名: {{ atype['type_name'] }}
|
||||||
|
<a href="/removetype?tid={{atype['type_id']}}">删除</a>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -1,151 +1,130 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'user/user_base.html' %}
|
||||||
|
|
||||||
{% block header %}
|
{% block header %}
|
||||||
<script>
|
<script>
|
||||||
function control_modal(op, modal_id){
|
function control_modal(op, modal_id) {
|
||||||
modal_elm = document.getElementById(modal_id);
|
modal_elm = document.getElementById(modal_id);
|
||||||
if (op == 'active') {
|
if (op == 'active') {
|
||||||
modal_elm.classList.add('active');
|
modal_elm.classList.add('active');
|
||||||
} else {
|
} else {
|
||||||
modal_elm.classList.remove('active');
|
modal_elm.classList.remove('active');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block user_content %}
|
||||||
<div class="container">
|
<div class="panel">
|
||||||
<div class="columns">
|
<div class="modal" id="modal-addnote">
|
||||||
<div class="column col-2 text-center">
|
<a onclick="control_modal('diactiate', 'modal-addnote')" class="modal-overlay" aria-label="Close"></a>
|
||||||
<ul class="nav">
|
<div class="modal-container">
|
||||||
<li class="nav-item">
|
<div class="modal-header">
|
||||||
<a href="/home"><b>主页</b></a>
|
<a onclick="control_modal('diactiate', 'modal-addnote')" class="btn btn-clear float-right"
|
||||||
</li>
|
aria-label="Close"></a>
|
||||||
<li class="nav-item">
|
<div class="modal-title h5">新建评论</div>
|
||||||
<a href="/search"><b>搜索</b></a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="/addbook"><b>增加</b></a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="/tags"><b>分类</b></a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="column col-9 panel">
|
|
||||||
<div class="modal" id="modal-addnote">
|
|
||||||
<a onclick="control_modal('diactiate', 'modal-addnote')" class="modal-overlay" aria-label="Close"></a>
|
|
||||||
<div class="modal-container">
|
|
||||||
<div class="modal-header">
|
|
||||||
<a onclick="control_modal('diactiate', 'modal-addnote')" class="btn btn-clear float-right" aria-label="Close"></a>
|
|
||||||
<div class="modal-title h5">新建评论</div>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<form id="modal-form" method="post" class="form-group" action="/note/create/{{book['book_id']}}/">
|
|
||||||
<label class="form-label" for="notename" >标题</label>
|
|
||||||
<input class="form-input" name="notename" id="notename" required>
|
|
||||||
<label class="form-label" for="notecontent">评论</label>
|
|
||||||
<textarea name="notecontent" id="notecontent" class="form-input" placeholder="添加评论..."rows="8" required></textarea>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<input form="modal-form" class="btn btn-primary" type="submit" value="提交">
|
|
||||||
<a href="" class="btn">取消</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-header m-2">
|
<div class="modal-body">
|
||||||
<div class="panel-title h3">{{book['book_name']}}</div>
|
<form id="modal-form" method="post" class="form-group" action="/note/create/{{book['book_id']}}/">
|
||||||
{%if booktype|length > 0 %}
|
<label class="form-label" for="notename">标题</label>
|
||||||
<div>
|
<input class="form-input" name="notename" id="notename" required>
|
||||||
<mark>分类标签:</mark>
|
<label class="form-label" for="notecontent">评论</label>
|
||||||
{% for atype in booktype %}
|
<textarea name="notecontent" id="notecontent" class="form-input" placeholder="添加评论..." rows="8"
|
||||||
<span class="chip"> {{atype['type_name']}}</span>
|
required></textarea>
|
||||||
{% endfor %}
|
|
||||||
</div>
|
</form>
|
||||||
{%endif%}
|
|
||||||
{%if book['book_author']%}
|
|
||||||
<div class="py-1">
|
|
||||||
<mark>作者:</mark><span class="px-2">{{book['book_author']}}</span>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
{%if book['book_publisher']%}
|
|
||||||
<div class="py-1">
|
|
||||||
<mark>出版社:</mark><span class="px-2">{{book['book_publisher']}}</span>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
{%if book['book_isbn']%}
|
|
||||||
<div class="py-1">
|
|
||||||
<mark>ISBN:</mark><span class="px-2">{{book['book_isbn']}}</span>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
{%if book['book_lang']%}
|
|
||||||
<div class="py-1">
|
|
||||||
<mark>语言:</mark><span class="px-2">{{book['book_lang']}}</span>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
<div class="columns">
|
|
||||||
<div class="column col-2">
|
|
||||||
<a href="/book/update/{{book['book_id']}}/" class="btn btn-primary">编辑图书信息</a>
|
|
||||||
</div>
|
|
||||||
<div class="divider-vert"></div>
|
|
||||||
<div class="column col-6">
|
|
||||||
<form method="post" class="form-group p-centered" action="/doc/upload/{{book['book_id']}}/"
|
|
||||||
enctype="multipart/form-data">
|
|
||||||
<input class="form-input form-inline col-9" type="file" name="file" required>
|
|
||||||
<input class="btn btn-primary input-group-btn form-inline" type="submit" value="上传">
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
<div class="divider-vert"></div>
|
|
||||||
<div class="column">
|
|
||||||
<button href="" class="btn btn-primary" onclick="control_modal('active', 'modal-addnote')">添加评论</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="modal-footer">
|
||||||
<div class="divider text-center" data-content="文档"></div>
|
<input form="modal-form" class="btn btn-primary" type="submit" value="提交">
|
||||||
{% if document|length <= 0 %}
|
<a href="" class="btn">取消</a>
|
||||||
<div class="text-center">暂无</div>
|
|
||||||
{%endif%}
|
|
||||||
{% for document in documents %}
|
|
||||||
<div id="doc{{document['doc_id']}}" class="card">
|
|
||||||
<div class="card-header">
|
|
||||||
<div class="card-title h5">{{document['doc_name']}}</div>
|
|
||||||
<div class="card-subtitle">
|
|
||||||
<span><mark>大小</mark> {{document['doc_size']}} KB</span>
|
|
||||||
<span><mark>日期</mark>{{document['doc_date']}}</span>
|
|
||||||
<div class="float-right">
|
|
||||||
<a href="/doc/download/{{document['doc_id']}}/" class="btn btn-primary">下载</a>
|
|
||||||
<a href="/doc/delete/{{document['doc_id']}}/" class="btn">删除</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
<div class="divider text-center" data-content="评论"></div>
|
|
||||||
{% if notes|length <= 0 %}
|
|
||||||
<div class="text-center">暂无</div>
|
|
||||||
{%endif%}
|
|
||||||
{% for note in notes %}
|
|
||||||
<div id="note{{note['note_id']}}" class="card m-2">
|
|
||||||
<div class="card-header">
|
|
||||||
<div class="card-title h5">{{note['note_name']}}</div>
|
|
||||||
<div class="card-subtitle">
|
|
||||||
<span><mark>日期</mark>{{note['note_date']}}</span>
|
|
||||||
<div class="float-right">
|
|
||||||
<a href="/note/delete/{{note['note_id']}}/" class="btn">删除</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="card-body">
|
|
||||||
<p style="word-wrap:break-word; word-break:break-all; white-space:pre-wrap;">{{note['note_content']}}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
<div class="divider text-center"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="panel-header m-2">
|
||||||
|
<div class="panel-title h3">图书:{{book['book_name']}}</div>
|
||||||
|
<div class="divider"></div>
|
||||||
|
{%if booktype|length > 0 %}
|
||||||
|
<div>
|
||||||
|
<mark>分类标签:</mark>
|
||||||
|
{% for atype in booktype %}
|
||||||
|
<span class="chip"> {{atype['type_name']}}</span>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{%endif%}
|
||||||
|
{%if book['book_author']%}
|
||||||
|
<div class="py-1">
|
||||||
|
<mark>作者:</mark><span class="px-2">{{book['book_author']}}</span>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{%if book['book_publisher']%}
|
||||||
|
<div class="py-1">
|
||||||
|
<mark>出版社:</mark><span class="px-2">{{book['book_publisher']}}</span>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{%if book['book_isbn']%}
|
||||||
|
<div class="py-1">
|
||||||
|
<mark>ISBN:</mark><span class="px-2">{{book['book_isbn']}}</span>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{%if book['book_lang']%}
|
||||||
|
<div class="py-1">
|
||||||
|
<mark>语言:</mark><span class="px-2">{{book['book_lang']}}</span>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
<div class="divider"></div>
|
||||||
|
<div class="columns">
|
||||||
|
<div class="column col-2">
|
||||||
|
<a href="/book/update/{{book['book_id']}}/" class="btn btn-primary">编辑图书信息</a>
|
||||||
|
</div>
|
||||||
|
<div class="divider-vert"></div>
|
||||||
|
<div class="column col-6">
|
||||||
|
<form method="post" class="form-group p-centered" action="/doc/upload/{{book['book_id']}}/"
|
||||||
|
enctype="multipart/form-data">
|
||||||
|
<input class="form-input form-inline col-9" type="file" name="file" required>
|
||||||
|
<input class="btn btn-primary input-group-btn form-inline" type="submit" value="上传">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="divider-vert"></div>
|
||||||
|
<div class="column">
|
||||||
|
<button href="" class="btn btn-primary" onclick="control_modal('active', 'modal-addnote')">添加评论</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
<div class="divider text-center" data-content="文档"></div>
|
||||||
|
{% if document|length <= 0 %} <div class="text-center">暂无</div>{%endif%}
|
||||||
|
{% for document in documents %}
|
||||||
|
<div id="doc{{document['doc_id']}}" class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<div class="card-title h5">{{document['doc_name']}}</div>
|
||||||
|
<div class="card-subtitle">
|
||||||
|
<span><mark>大小</mark> {{document['doc_size']}} KB</span>
|
||||||
|
<span><mark>日期</mark>{{document['doc_date']}}</span>
|
||||||
|
<div class="float-right">
|
||||||
|
<a href="/doc/download/{{document['doc_id']}}/" class="btn btn-primary">下载</a>
|
||||||
|
<a href="/doc/delete/{{document['doc_id']}}/" class="btn">删除</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
<div class="divider text-center" data-content="评论"></div>
|
||||||
|
{% if notes|length <= 0 %} <div class="text-center">暂无</div> {%endif%}
|
||||||
|
{% for note in notes %}
|
||||||
|
<div id="note{{note['note_id']}}" class="card m-2">
|
||||||
|
<div class="card-header">
|
||||||
|
<div class="card-title h5">{{note['note_name']}}</div>
|
||||||
|
<div class="card-subtitle">
|
||||||
|
<span><mark>日期</mark>{{note['note_date']}}</span>
|
||||||
|
<div class="float-right">
|
||||||
|
<a href="/note/delete/{{note['note_id']}}/" class="btn">删除</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<p style="word-wrap:break-word; word-break:break-all; white-space:pre-wrap;">{{note['note_content']}}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
<div class="divider text-center"></div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -1,64 +1,23 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'user/user_base.html' %}
|
||||||
|
|
||||||
{% block header %}
|
{% block user_content %}
|
||||||
<style>
|
<div class="panel">
|
||||||
.maindiv {
|
<div class="panel-header">
|
||||||
height: 100%;
|
<div class="panel-title">统计信息</div>
|
||||||
width: 100%;
|
|
||||||
position: fixed;
|
|
||||||
z-index: 1;
|
|
||||||
top: 20;
|
|
||||||
left: 0;
|
|
||||||
|
|
||||||
padding-left: 1.2rem;
|
|
||||||
padding-right: 2rem;
|
|
||||||
}
|
|
||||||
.sidenav {
|
|
||||||
height: 100%;
|
|
||||||
max-width: 160px;
|
|
||||||
z-index: 1;
|
|
||||||
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<div class="container">
|
|
||||||
<div class="columns">
|
|
||||||
<div class="column col-2 text-center">
|
|
||||||
<ul class="nav">
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="/home"><b>主页</b></a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="/search"><b>搜索</b></a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="/addbook"><b>增加</b></a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="/tags"><b>分类</b></a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="column col-9 panel">
|
|
||||||
<div class="panel-header">
|
|
||||||
<div class="panel-title">统计信息</div>
|
|
||||||
</div>
|
|
||||||
<div class="panel-body">
|
|
||||||
<dl>
|
|
||||||
<dt> 当前占用的空间 </dt>
|
|
||||||
<dd> {{user_stat['user_usedspace'] / 1024}}MB /
|
|
||||||
{{user_stat['user_limit'] / 1024 / 1024}}GB</dd>
|
|
||||||
<dt> 图书数量 </dt>
|
|
||||||
<dd> {{user_stat['user_bookcount']}}本</dd>
|
|
||||||
<dt> 文件数量 </dt>
|
|
||||||
<dd> {{user_stat['user_doccount']}}个</dd>
|
|
||||||
<dt> 笔记数量 </dt>
|
|
||||||
<dd> {{user_stat['user_notecount']}}篇</dd>
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
<dl>
|
||||||
|
<dt> 当前占用的空间 </dt>
|
||||||
|
<dd> {{user_stat['user_usedspace'] / 1024}}MB /
|
||||||
|
{{user_stat['user_limit'] / 1024 / 1024}}GB</dd>
|
||||||
|
<dt> 图书数量 </dt>
|
||||||
|
<dd> {{user_stat['user_bookcount']}}本</dd>
|
||||||
|
<dt> 文件数量 </dt>
|
||||||
|
<dd> {{user_stat['user_doccount']}}个</dd>
|
||||||
|
<dt> 笔记数量 </dt>
|
||||||
|
<dd> {{user_stat['user_notecount']}}篇</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -1,57 +1,16 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'user/user_base.html' %}
|
||||||
|
{% block user_content %}
|
||||||
{% block header %}
|
<div class="panel">
|
||||||
<style>
|
<div class="panel-header">
|
||||||
.maindiv {
|
<div class="panel-title">{{opname}}</div>
|
||||||
height: 100%;
|
|
||||||
width: 100%;
|
|
||||||
position: fixed;
|
|
||||||
z-index: 1;
|
|
||||||
top: 20;
|
|
||||||
left: 0;
|
|
||||||
padding-left: 1.2rem;
|
|
||||||
padding-right: 2rem;
|
|
||||||
}
|
|
||||||
.sidenav {
|
|
||||||
height: 100%;
|
|
||||||
max-width: 160px;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<div class="container">
|
|
||||||
<div class="columns">
|
|
||||||
<div class="column col-2 text-center">
|
|
||||||
<ul class="nav">
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="/home"><b>主页</b></a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="/search"><b>搜索</b></a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="/addbook"><b>增加</b></a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="/tags"><b>分类</b></a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="column col-9 panel">
|
|
||||||
<div class="panel-header">
|
|
||||||
<div class="panel-title">{{opname}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="panel-body">
|
|
||||||
<p>{{opresult}}</p>
|
|
||||||
{% if ret_url %}
|
|
||||||
<p><a href="{{ret_url}}">返回</a></p>
|
|
||||||
{% else %}
|
|
||||||
<p><a href="javascript:history.back(-1)">返回</a></p>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
<p>{{opresult}}</p>
|
||||||
|
{% if ret_url %}
|
||||||
|
<p><a href="{{ret_url}}">返回</a></p>
|
||||||
|
{% else %}
|
||||||
|
<p><a href="javascript:history.back(-1)">返回</a></p>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -1,151 +1,91 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'user/user_base.html' %}
|
||||||
|
|
||||||
{% block header %}
|
{% block user_content %}
|
||||||
<style>
|
<div class="panel">
|
||||||
.maindiv {
|
<div class="panel-header">
|
||||||
height: 100%;
|
<div class="panel-title">搜索图书</div>
|
||||||
width: 100%;
|
|
||||||
position: fixed;
|
|
||||||
z-index: 1;
|
|
||||||
top: 20;
|
|
||||||
left: 0;
|
|
||||||
padding-left: 1.2rem;
|
|
||||||
padding-right: 2rem;
|
|
||||||
}
|
|
||||||
.sidenav {
|
|
||||||
height: 100%;
|
|
||||||
max-width: 160px;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<div class="container">
|
|
||||||
<div class="columns">
|
|
||||||
<div class="column col-2 text-center">
|
|
||||||
<ul class="nav">
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="/home"><b>主页</b></a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="/search"><b>搜索</b></a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="/addbook"><b>增加</b></a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="/tags"><b>分类</b></a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="column col-9 panel">
|
|
||||||
<div class="panel-header">
|
|
||||||
<div class="panel-title">搜索图书</div>
|
|
||||||
</div>
|
|
||||||
<div class="panel-body">
|
|
||||||
<form class="form-group" method="get">
|
|
||||||
<div class="container">
|
|
||||||
<select class="form-select col-3" name="bookattr" id="bookattr">
|
|
||||||
<!-- <option selected>书名</option>
|
|
||||||
<option>ISBN</option>
|
|
||||||
<option>作者</option>
|
|
||||||
<option>出版社</option>
|
|
||||||
<option>分类</option> -->
|
|
||||||
{% for opt in queryattr%}
|
|
||||||
{% if queryattr[opt]=="selected" %}
|
|
||||||
<option selected>{{opt}}</option>
|
|
||||||
{% else %}
|
|
||||||
<option>{{opt}}</option>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
</select>
|
|
||||||
{% if queryval%}
|
|
||||||
<input class="form-input form-inline col-8" name="bookname" id="bookname"
|
|
||||||
value="{{queryval}}">
|
|
||||||
{% else %}
|
|
||||||
<input class="form-input form-inline col-8" name="bookname" id="bookname">
|
|
||||||
{% endif %}
|
|
||||||
<input class="btn btn-primary input-group-btn form-inline" type="submit" value="搜索">
|
|
||||||
</div>
|
|
||||||
<!-- <div class="container">
|
|
||||||
<label class="form-label form-inline col-5" for="bookname"> 书名
|
|
||||||
<input class="form-input" name="bookname" id="bookname">
|
|
||||||
</label>
|
|
||||||
<label class="form-label form-inline col-2" for="author"> 作者
|
|
||||||
<input class="form-input" name="author" id="author">
|
|
||||||
</label>
|
|
||||||
<label class="form-label form-inline col-2" for="booktype"> 出版社
|
|
||||||
<input class="form-input" name="booktype" id="booktype">
|
|
||||||
</label>
|
|
||||||
<label class="form-label form-inline col-2" for="bookisbn"> 分类
|
|
||||||
<input class="form-input" name="bookisbn" id="bookisbn">
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<input class="btn btn-primary input-group-btn p-centered" type="submit" value="搜索"> -->
|
|
||||||
</form>
|
|
||||||
<div id="search-result">
|
|
||||||
{% if bookattr=="文档名称" %}
|
|
||||||
{% for document in queryresult%}
|
|
||||||
<div class="card-header">
|
|
||||||
<div class="card-title h5">
|
|
||||||
<a href="/book/{{document['book_id']}}/">{{document['doc_name']}}</a>
|
|
||||||
</div>
|
|
||||||
<div class="card-subtitle text-gray">
|
|
||||||
<span>文档大小: {{document['doc_size']}}KB</span>
|
|
||||||
<span>上传日期: {{document['doc_date']}}</span>
|
|
||||||
<span>文档类型: {{document['doc_type']|replace("application/", "")|truncate(20, False, '...')}}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
{% elif bookattr=="评论标题" %}
|
|
||||||
{% for note in queryresult%}
|
|
||||||
<div class="card-header">
|
|
||||||
<div class="card-title h5">
|
|
||||||
<a href="/book/{{note['book_id']}}/">{{note['note_name']}}</a>
|
|
||||||
</div>
|
|
||||||
<div class="card-subtitle text-gray">
|
|
||||||
<span>日期: {{note['note_date']}}</span>
|
|
||||||
<span>摘要: {{note['note_content']|truncate(30, False, '...')}}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
{% else %}
|
|
||||||
{% for book in queryresult%}
|
|
||||||
<div class="card-header">
|
|
||||||
<div class="card-title h5">
|
|
||||||
<a href="/book/{{book['book_id']}}/">{{book['book_name']}}</a>
|
|
||||||
</div>
|
|
||||||
<div class="card-subtitle text-gray">
|
|
||||||
<span>作者: {{book['book_author']}}</span>
|
|
||||||
<span>语言: {{book['book_lang']}}</span>
|
|
||||||
<span>出版社: {{book['book_publisher']}}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
<div id="pagination-wrapper" class="p-centered">
|
|
||||||
<ul class="pagination">
|
|
||||||
{% if page_first%}
|
|
||||||
<li class="page-item disabled">
|
|
||||||
{% else %}
|
|
||||||
<li class="page-item">
|
|
||||||
{% endif %}
|
|
||||||
<a href="{{prev_page_link}}">上一页</a>
|
|
||||||
</li>
|
|
||||||
{% if page_last%}
|
|
||||||
<li class="page-item disabled">
|
|
||||||
{% else %}
|
|
||||||
<li class="page-item">
|
|
||||||
{% endif %}
|
|
||||||
<a href="{{next_page_link}}">下一页</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
<form class="form-group" method="get">
|
||||||
|
<div class="container">
|
||||||
|
<select class="form-select col-3" name="bookattr" id="bookattr">
|
||||||
|
{% for opt in queryattr%}
|
||||||
|
{% if queryattr[opt]=="selected" %}
|
||||||
|
<option selected>{{opt}}</option>
|
||||||
|
{% else %}
|
||||||
|
<option>{{opt}}</option>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</select>
|
||||||
|
{% if queryval%}
|
||||||
|
<input class="form-input form-inline col-8" name="bookname" id="bookname"
|
||||||
|
value="{{queryval}}">
|
||||||
|
{% else %}
|
||||||
|
<input class="form-input form-inline col-8" name="bookname" id="bookname">
|
||||||
|
{% endif %}
|
||||||
|
<input class="btn btn-primary input-group-btn form-inline" type="submit" value="搜索">
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<div id="search-result">
|
||||||
|
{% if bookattr=="文档名称" %}
|
||||||
|
{% for document in queryresult%}
|
||||||
|
<div class="card-header">
|
||||||
|
<div class="card-title h5">
|
||||||
|
<a href="/book/{{document['book_id']}}/">{{document['doc_name']}}</a>
|
||||||
|
</div>
|
||||||
|
<div class="card-subtitle text-gray">
|
||||||
|
<span>文档大小: {{document['doc_size']}}KB</span>
|
||||||
|
<span>上传日期: {{document['doc_date']}}</span>
|
||||||
|
<span>文档类型: {{document['doc_type']|replace("application/", "")|truncate(20, False, '...')}}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
{% elif bookattr=="评论标题" %}
|
||||||
|
{% for note in queryresult%}
|
||||||
|
<div class="card-header">
|
||||||
|
<div class="card-title h5">
|
||||||
|
<a href="/book/{{note['book_id']}}/">{{note['note_name']}}</a>
|
||||||
|
</div>
|
||||||
|
<div class="card-subtitle text-gray">
|
||||||
|
<span>日期: {{note['note_date']}}</span>
|
||||||
|
<span>摘要: {{note['note_content']|truncate(30, False, '...')}}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
{% else %}
|
||||||
|
{% for book in queryresult%}
|
||||||
|
<div class="card-header">
|
||||||
|
<div class="card-title h5">
|
||||||
|
<a href="/book/{{book['book_id']}}/">{{book['book_name']}}</a>
|
||||||
|
</div>
|
||||||
|
<div class="card-subtitle text-gray">
|
||||||
|
<span>作者: {{book['book_author']}}</span>
|
||||||
|
<span>语言: {{book['book_lang']}}</span>
|
||||||
|
<span>出版社: {{book['book_publisher']}}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<div id="pagination-wrapper" class="p-centered">
|
||||||
|
<ul class="pagination">
|
||||||
|
{% if page_first%}
|
||||||
|
<li class="page-item disabled">
|
||||||
|
{% else %}
|
||||||
|
<li class="page-item">
|
||||||
|
{% endif %}
|
||||||
|
<a href="{{prev_page_link}}">上一页</a>
|
||||||
|
</li>
|
||||||
|
{% if page_last%}
|
||||||
|
<li class="page-item disabled">
|
||||||
|
{% else %}
|
||||||
|
<li class="page-item">
|
||||||
|
{% endif %}
|
||||||
|
<a href="{{next_page_link}}">下一页</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'user/user_base.html' %}
|
||||||
|
|
||||||
{% block header %}
|
{% block header %}
|
||||||
<script>
|
<script>
|
||||||
@ -22,61 +22,41 @@
|
|||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block user_content %}
|
||||||
<div class="container">
|
<div class="panel">
|
||||||
<div class="columns">
|
<div class="panel-header">
|
||||||
<div class="column col-2 text-center">
|
<h2>编辑图书</h2>
|
||||||
<ul class="nav">
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="/home"><b>主页</b></a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="/search"><b>搜索</b></a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="/addbook"><b>增加</b></a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="/tags"><b>分类</b></a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="column col-9 panel">
|
|
||||||
<div class="panel-header">
|
|
||||||
<h2>编辑图书</h2>
|
|
||||||
</div>
|
|
||||||
<div class="panel-body">
|
|
||||||
{%if error%}
|
|
||||||
<div class="toast">
|
|
||||||
{{error}}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
<form method="post" class="form-group">
|
|
||||||
<label class="form-label" for="bookname">书名</label>
|
|
||||||
<input class="form-input" name="bookname" id="bookname" value="{{book['book_name']}}" required>
|
|
||||||
<label class="form-label" for="bookisbn">ISBN</label>
|
|
||||||
<input class="form-input" name="bookisbn" id="bookisbn" value="{{book['book_isbn']}}">
|
|
||||||
<label class="form-label" for="bookpublisher">出版社</label>
|
|
||||||
<input class="form-input" name="bookpublisher" id="bookpublisher" value="{{book['book_publisher']}}">
|
|
||||||
<label class="form-label" for="bookauthor">作者</label>
|
|
||||||
<input class="form-input" name="bookauthor" id="bookauthor" value="{{book['book_author']}}">
|
|
||||||
<label class="form-label" for="booklang">语言</label>
|
|
||||||
<select class="form-select" name="booklang" id="booklang">
|
|
||||||
<option selected>CN</option>
|
|
||||||
<option>EN</option>
|
|
||||||
<option>Other</option>
|
|
||||||
</select>
|
|
||||||
<label class="form-label" for="booktype">分类</label>
|
|
||||||
<input class="form-input" name="booktype" id="booktype" value="{{booktype}}">
|
|
||||||
<div>
|
|
||||||
{% for atype in typelist%}
|
|
||||||
<span class="chip btn" onclick="switch_type('{{atype['type_name']}}')">{{atype['type_name']}}</span>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
<input class="btn btn-primary input-group-btn p-centered" type="submit" value="提交">
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
{%if error%}
|
||||||
|
<div class="toast">
|
||||||
|
{{error}}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
<form method="post" class="form-group">
|
||||||
|
<label class="form-label" for="bookname">书名</label>
|
||||||
|
<input class="form-input" name="bookname" id="bookname" value="{{book['book_name']}}" required>
|
||||||
|
<label class="form-label" for="bookisbn">ISBN</label>
|
||||||
|
<input class="form-input" name="bookisbn" id="bookisbn" value="{{book['book_isbn']}}">
|
||||||
|
<label class="form-label" for="bookpublisher">出版社</label>
|
||||||
|
<input class="form-input" name="bookpublisher" id="bookpublisher" value="{{book['book_publisher']}}">
|
||||||
|
<label class="form-label" for="bookauthor">作者</label>
|
||||||
|
<input class="form-input" name="bookauthor" id="bookauthor" value="{{book['book_author']}}">
|
||||||
|
<label class="form-label" for="booklang">语言</label>
|
||||||
|
<select class="form-select" name="booklang" id="booklang">
|
||||||
|
<option selected>CN</option>
|
||||||
|
<option>EN</option>
|
||||||
|
<option>Other</option>
|
||||||
|
</select>
|
||||||
|
<label class="form-label" for="booktype">分类</label>
|
||||||
|
<input class="form-input" name="booktype" id="booktype" value="{{booktype}}">
|
||||||
|
<div>
|
||||||
|
{% for atype in typelist%}
|
||||||
|
<span class="chip btn" onclick="switch_type('{{atype['type_name']}}')">{{atype['type_name']}}</span>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
<input class="btn btn-primary input-group-btn p-centered" type="submit" value="提交">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
27
src/templates/user/user_base.html
Normal file
27
src/templates/user/user_base.html
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="container">
|
||||||
|
<div class="columns">
|
||||||
|
<div class="column col-2 text-center">
|
||||||
|
<ul class="nav">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="/home"><b>主页</b></a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="/search"><b>搜索</b></a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="/addbook"><b>增加</b></a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="/tags"><b>分类</b></a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="column col-9">
|
||||||
|
{% block user_content %} {% endblock %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
Loading…
Reference in New Issue
Block a user