mirror of
https://github.com/hequan2017/seal.git
synced 2026-05-12 03:26:44 +08:00
v0.1 基础版本
v0.1 基础版本
This commit is contained in:
23
templates/base/_css.html
Normal file
23
templates/base/_css.html
Normal file
@@ -0,0 +1,23 @@
|
||||
{% load static %}
|
||||
|
||||
<link href=" {% static "css/bootstrap.min.css" %}" rel="stylesheet">
|
||||
<link href="{% static "font-awesome/css/font-awesome.css" %}" rel="stylesheet">
|
||||
|
||||
<link href="{% static "css/animate.css" %}" rel="stylesheet">
|
||||
<link href="{% static "css/style.css" %} " rel="stylesheet">
|
||||
|
||||
<link href="{% static "css/datatables.min.css" %} " rel="stylesheet">
|
||||
|
||||
<link href="{% static "css/plugins/select2/select2.min.css" %} " rel="stylesheet">
|
||||
|
||||
|
||||
<link href="{% static "css/plugins/sweetalert/sweetalert.css" %}" rel="stylesheet">
|
||||
|
||||
<link href="{% static "css/animate.css" %}" rel="stylesheet">
|
||||
<link href="{% static "css/style.css" %}" rel="stylesheet">
|
||||
|
||||
|
||||
<link href="{% static "css/plugins/toastr/toastr.min.css" %}" rel="stylesheet">
|
||||
<link href="{% static "css/plugins/steps/jquery.steps.css" %}" rel="stylesheet">
|
||||
|
||||
|
||||
8
templates/base/_footer.html
Normal file
8
templates/base/_footer.html
Normal file
@@ -0,0 +1,8 @@
|
||||
<div class="footer">
|
||||
<div class="pull-right">
|
||||
<strong>Version 0.1 </strong>
|
||||
</div>
|
||||
<div>
|
||||
<strong>海豹 作者:何全 邮箱: hequan2011@sina.com </strong>
|
||||
</div>
|
||||
</div>
|
||||
88
templates/base/_js.html
Normal file
88
templates/base/_js.html
Normal file
@@ -0,0 +1,88 @@
|
||||
{% load static %}
|
||||
<script src="{% static "js/plugins/umd/popper.js" %}"></script>
|
||||
<script src="{% static "js/jquery-3.1.1.min.js" %}" type="text/javascript" ></script>
|
||||
<script src="{% static "js/bootstrap.min.js" %}"></script>
|
||||
<script src="{% static "js/plugins/metisMenu/jquery.metisMenu.js" %}"></script>
|
||||
<script src="{% static "js/plugins/slimscroll/jquery.slimscroll.min.js" %}"></script>
|
||||
|
||||
<!-- Custom and plugin javascript -->
|
||||
<script src="{% static "js/inspinia.js" %} "></script>
|
||||
<script src="{% static "js/plugins/pace/pace.min.js" %}"></script>
|
||||
|
||||
|
||||
<script src="{% static "js/datatables.min.js" %}"></script>
|
||||
|
||||
<script src="{% static "js/plugins/select2/select2.full.min.js" %}"></script>
|
||||
|
||||
<!-- Sweet alert -->
|
||||
<script src="{% static "js/plugins/sweetalert/sweetalert.min.js" %}"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/JavaScript">
|
||||
$.ajaxSetup({headers: {"X-CSRFToken": '{{ csrf_token }}'}});
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function () {
|
||||
$('.dataTables-example').DataTable({
|
||||
|
||||
|
||||
"oLanguage": {
|
||||
"sLengthMenu": "每页显示 _MENU_ 条记录",
|
||||
"sZeroRecords": "对不起,查询不到任何相关数据",
|
||||
"sInfo": "当前显示 _START_ 到 _END_ 条,共 _TOTAL_条记录",
|
||||
"sInfoEmtpy": "找不到相关数据",
|
||||
"sInfoFiltered": " 数据表中共为 _MAX_ 条记录",
|
||||
"sProcessing": "正在加载中...",
|
||||
"sSearch": "搜索",
|
||||
"oPaginate": {
|
||||
"sFirst": "第一页",
|
||||
"sPrevious": " 上一页 ",
|
||||
"sNext": " 下一页 ",
|
||||
"sLast": " 最后一页 "
|
||||
}
|
||||
},
|
||||
dom: '<"html5buttons"B>lTfgitp,',
|
||||
buttons: [ 'copy', 'csv', 'excel' ]
|
||||
});
|
||||
|
||||
|
||||
$('.dataTables-code').DataTable({
|
||||
|
||||
"oLanguage": {
|
||||
"sLengthMenu": "每页显示 _MENU_ 条记录",
|
||||
"sZeroRecords": "对不起,查询不到任何相关数据",
|
||||
"sInfo": "当前显示 _START_ 到 _END_ 条,共 _TOTAL_条记录",
|
||||
"sInfoEmtpy": "找不到相关数据",
|
||||
"sInfoFiltered": " 数据表中共为 _MAX_ 条记录",
|
||||
"sProcessing": "正在加载中...",
|
||||
"sSearch": "搜索",
|
||||
"oPaginate": {
|
||||
"sFirst": "第一页",
|
||||
"sPrevious": " 上一页 ",
|
||||
"sNext": " 下一页 ",
|
||||
"sLast": " 最后一页 "
|
||||
}
|
||||
},
|
||||
bFilter: false,
|
||||
"order": [[1, 'desc']],
|
||||
"info": false,//是否显示页脚信息
|
||||
destroy: true,
|
||||
"ordering": false,
|
||||
dom: '<"html5buttons"B>lTfgitp,',
|
||||
buttons: [],
|
||||
lengthMenu: [[-1], ["全部"]],
|
||||
"paging": false, // 禁止分页
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$(function () {
|
||||
$(".select2").select2();
|
||||
});
|
||||
|
||||
</script>
|
||||
72
templates/base/_nav.html
Normal file
72
templates/base/_nav.html
Normal file
@@ -0,0 +1,72 @@
|
||||
<nav class="navbar-default navbar-static-side" role="navigation">
|
||||
<div class="sidebar-collapse">
|
||||
<ul class="nav metismenu chrome-nav" id="side-menu">
|
||||
<li class="nav-header">
|
||||
<div class="dropdown profile-element">
|
||||
{% if user.avatar %}
|
||||
<span>
|
||||
<img alt="image" class="img-circle" style="width:48px; height:48px;" src="{{ user.avatar }}"/>
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
<a data-toggle="dropdown" class="dropdown-toggle" href="#">
|
||||
|
||||
|
||||
|
||||
<span class="clear"> <span class="block m-t-xs"> <strong
|
||||
class="font-bold">{{ user }}</strong>
|
||||
|
||||
</span> <span class="text-muted text-xs block">
|
||||
{% ifequal user.is_superuser 1 %}
|
||||
管理员 {% else %} {{ user.position }} {% endifequal %}
|
||||
|
||||
<b class="caret"></b></span> </span>
|
||||
</a>
|
||||
<ul class="dropdown-menu animated fadeInRight m-t-xs">
|
||||
<li><a href="{% url "system:password_update" %}">修改密码</a></li>
|
||||
<li><a href="{% url "system:logout" %}">退出</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="logo-element">
|
||||
海豹
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url "index" %}"> <i class="fa fa-dashboard"></i> <span class="nav-label">首页</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="assets">
|
||||
<a href="#"> <i class="fa fa-gitlab"></i> <span class="nav-label">资产管理</span></a>
|
||||
|
||||
|
||||
<ul class="nav nav-second-level">
|
||||
{% if perms.assets.add_ecs %}
|
||||
<li class="ecs-create">
|
||||
<a href="{% url "assets:ecs-create" %}">添加资产</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if perms.assets.view_ecs %}
|
||||
<li class="ecs-list">
|
||||
<a href="{% url "assets:ecs-list" %}">资产列表</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
{% ifequal user.is_superuser 1 %}
|
||||
|
||||
<li>
|
||||
<a href="/admin" target="_blank"><i class="fa fa-gears"></i> <span class="nav-label">管理界面</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endifequal %}
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
37
templates/base/_navbar-static-top.html
Normal file
37
templates/base/_navbar-static-top.html
Normal file
@@ -0,0 +1,37 @@
|
||||
<div class="row border-bottom">
|
||||
<nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
|
||||
|
||||
|
||||
<div class="navbar-header">
|
||||
<a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="#"><i class="fa fa-bars"></i> </a>
|
||||
{# <form role="search" class="navbar-form-custom" action="search_results.html">#}
|
||||
{# <div class="form-group">#}
|
||||
{# <input type="text" placeholder="请输入搜索内容" class="form-control" name="top-search" id="top-search">#}
|
||||
{# </div>#}
|
||||
{# </form>#}
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<ul class="nav navbar-top-links navbar-right">
|
||||
<li style="padding: 20px">
|
||||
<span class="m-r-sm text-muted welcome-message">欢迎 {{ user }} 来到 海豹管理后台</span>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<a href="{% url "system:logout" %}">
|
||||
<i class="fa fa-sign-out"></i> 注销
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
46
templates/base/base.html
Normal file
46
templates/base/base.html
Normal file
@@ -0,0 +1,46 @@
|
||||
{% load staticfiles %}
|
||||
{% load static %}
|
||||
{% load bootstrap4 %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>{% block title %}{% endblock %}</title>
|
||||
|
||||
{% include "base/_css.html" %}
|
||||
{% block header-css %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
|
||||
|
||||
{% include "base/_nav.html" %}
|
||||
|
||||
<div id="page-wrapper" class="gray-bg">
|
||||
{% include "base/_navbar-static-top.html" %}
|
||||
|
||||
{% block page-content %}
|
||||
|
||||
|
||||
{% endblock %}
|
||||
{% include "base/_footer.html" %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
{% include "base/_js.html" %}
|
||||
|
||||
{% block footer-js %}
|
||||
{% endblock %}
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user