some improvements
This commit is contained in:
parent
6055bd1ec8
commit
3c44d27b12
@ -1,8 +1,6 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
{% block header %}
|
{% block title %}管理页面{% endblock %}
|
||||||
<h2 class="text-center">{% block title %}管理主页{% endblock %}</h2>
|
|
||||||
{% endblock %}
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<!-- <div>
|
<!-- <div>
|
||||||
<form method="post" class="">
|
<form method="post" class="">
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
|
{% block title %}管理页面{% endblock %}
|
||||||
{% block header %}
|
{% block header %}
|
||||||
<h2 class="text-center">{% block title %}管理主页{% endblock %}</h2>
|
<h2 class="text-center">管理主页</h2>
|
||||||
<script>
|
<script>
|
||||||
function control_modal(op, modal_id, uid='1'){
|
function control_modal(op, modal_id, uid='1'){
|
||||||
modal_elm = document.getElementById(modal_id);
|
modal_elm = document.getElementById(modal_id);
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
{% block header %}
|
{% block title %}管理页面{% endblock %}
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
|
{% block title %}登陆页面{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="columns " style="padding-top:5em;">
|
<div class="columns " style="padding-top:5em;">
|
||||||
<div class="column col-3"></div>
|
<div class="column col-3"></div>
|
||||||
|
|||||||
@ -1,16 +1,15 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
|
{% block title %}EBookMan{% endblock %}
|
||||||
{% block header %}
|
|
||||||
<h2 class="text-center">{% block title %}在访问前,需要登陆{% endblock %}</h1>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<div style="padding-top: 20vh;">
|
||||||
|
<h2 class="text-center">在访问前,需要登陆</h2>
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<div class="p-1">
|
<div class="p-1">
|
||||||
<a href="{{ url_for('auth.loginadmin') }}" class="btn">管理员登陆</a>
|
<a href="{{ url_for('auth.loginadmin') }}" class="btn">管理员登陆</a>
|
||||||
</div>
|
|
||||||
<div class="p-1">
|
|
||||||
<a href="{{ url_for('auth.loginuser') }}" class="btn">用户登陆</a>
|
<a href="{{ url_for('auth.loginuser') }}" class="btn">用户登陆</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -1,5 +1,5 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
|
{% block title %}登陆页面{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="columns " style="padding-top:5em;">
|
<div class="columns " style="padding-top:5em;">
|
||||||
<div class="column col-3"></div>
|
<div class="column col-3"></div>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<title>{% block title %}{% endblock %} - DBProject</title>
|
<title>{% block title %}{% endblock %}</title>
|
||||||
<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') }}">
|
||||||
|
|||||||
@ -16,8 +16,9 @@
|
|||||||
}
|
}
|
||||||
typeinput.value = typestr;
|
typeinput.value = typestr;
|
||||||
}
|
}
|
||||||
function create_type_button(typename) {
|
function clear_toast(toastid) {
|
||||||
|
toast_elm = document.getElementById(toastid);
|
||||||
|
toast_elm.classList.add('d-none');
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -25,11 +26,14 @@
|
|||||||
{% block user_content %}
|
{% block user_content %}
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
<div class="panel-header">
|
<div class="panel-header">
|
||||||
<h2>新建图书</h2>
|
<div class="panel-title text-center">
|
||||||
|
<h4>新建图书</h4>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
{%if error%}
|
{% if error%}
|
||||||
<div class="toast">
|
<div class="toast" id="toast1">
|
||||||
|
<button class="btn btn-clear float-right" onclick="clear_toast('toast1')"></button>
|
||||||
{{error}}
|
{{error}}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@ -1,5 +1,14 @@
|
|||||||
{% extends 'user/user_base.html' %}
|
{% extends 'user/user_base.html' %}
|
||||||
|
|
||||||
|
{% block header %}
|
||||||
|
<script>
|
||||||
|
function clear_toast(toastid) {
|
||||||
|
toast_elm = document.getElementById(toastid);
|
||||||
|
toast_elm.classList.add('d-none');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block user_content %}
|
{% block user_content %}
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
<div class="panel-header">
|
<div class="panel-header">
|
||||||
@ -9,24 +18,37 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
{% if error%}
|
{% if error%}
|
||||||
<div class="toast">
|
<div class="toast" id="toast1">
|
||||||
<button class="btn btn-clear float-right"></button>
|
<button class="btn btn-clear float-right" onclick="clear_toast('toast1')"></button>
|
||||||
{{error}}
|
{{error}}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<form method="post" class="input-group">
|
<div class="columns">
|
||||||
|
<div class="column col-2"></div>
|
||||||
|
<div class="column col-8">
|
||||||
|
<form method="post" class="input-group">
|
||||||
<label class="form-label px-1" for="typename">新建类型</label>
|
<label class="form-label px-1" for="typename">新建类型</label>
|
||||||
<input class="form-input" name="typename" id="typename" required>
|
<input class="form-input" name="typename" id="typename" required>
|
||||||
<input class="btn btn-primary input-group-btn" type="submit" value="提交">
|
<input class="btn btn-primary input-group-btn" type="submit" value="提交">
|
||||||
</form>
|
</form>
|
||||||
<ul>
|
<table class="table text-center m-2">
|
||||||
{% for atype in typelist%}
|
<thead >
|
||||||
<li>
|
<tr><th>TID</th><th>标签</th><th>操作</th></tr>
|
||||||
TID:{{ atype['type_id'] }}, 类型名: {{ atype['type_name'] }}
|
</thead>
|
||||||
<a href="/removetype?tid={{atype['type_id']}}">删除</a>
|
<tbody>
|
||||||
</li>
|
{% for atype in typelist%}
|
||||||
{% endfor %}
|
<tr>
|
||||||
</ul>
|
<td>{{ atype['type_id'] }}</td>
|
||||||
|
<td>{{ atype['type_name'] }}</td>
|
||||||
|
<td><a href="/removetype?tid={{atype['type_id']}}">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="column col-2"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -3,7 +3,7 @@
|
|||||||
{% block user_content %}
|
{% block user_content %}
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
<div class="panel-header">
|
<div class="panel-header">
|
||||||
<div class="panel-title">统计信息</div>
|
<div class="panel-title text-center"><h4>统计信息</h4></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<dl>
|
<dl>
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
{% block user_content %}
|
{% block user_content %}
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
<div class="panel-header">
|
<div class="panel-header">
|
||||||
<div class="panel-title">搜索图书</div>
|
<div class="panel-title text-center"><h4>搜索图书</h4></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<form class="form-group" method="get">
|
<form class="form-group" method="get">
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
|
{% block title %}EBookMan{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user