new project

This commit is contained in:
RobbieHan
2018-10-15 18:54:19 +08:00
commit bb8ef8c563
1178 changed files with 273992 additions and 0 deletions

38
templates/base-layer.html Normal file
View File

@@ -0,0 +1,38 @@
{% load staticfiles %}
<!DOCTYPE html>
<!--
This is a starter template page. Use this page to start your new project from
scratch. This page gets rid of all links and provides the needed markup only.
-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<link rel="stylesheet" href="{% static 'bootstrap/css/bootstrap.min.css' %}">
<link rel="stylesheet" href="{% static 'dist/css/AdminLTE.min.css' %}">
<link rel="stylesheet" href="{% static 'dist/css/myself.css' %}">
<link rel="stylesheet" href="{% static 'dist/css/skins/skin-blue.min.css' %}">
<link rel="stylesheet" href="{% static 'js/plugins/layer/skin/layer.css' %}">
{% block css %} {% endblock %}
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
{% block main %}
{% endblock %}
<script src="{% static 'plugins/jQuery/jquery-2.2.3.min.js' %}"></script>
<script src="{% static 'js/plugins/layer/layer.js' %}"></script>
{% block javascripts %}{% endblock %}
</body>
</html>

56
templates/base-left.html Normal file
View File

@@ -0,0 +1,56 @@
{% extends "head-footer.html" %}
{% load staticfiles %}
{% block middle %}
<aside class="main-sidebar">
<!-- sidebar: style can be found in sidebar.less -->
<section class="sidebar">
<!-- search form (Optional) -->
<form action="#" method="get" class="sidebar-form">
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="Search...">
<span class="input-group-btn">
<button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
</button>
</span>
</div>
</form>
<!-- /.search form -->
<!-- Sidebar Menu -->
<ul class="sidebar-menu">
<li class="header"></li>
<!-- Optionally, you can add icons to the links -->
<li class="treeview">
<a href="#"><i class="fa fa-calendar"></i> <span>一级菜单</span>
<span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i>
</span>
</a>
<ul class="treeview-menu">
<li><a href="#"><i class="fa fa-caret-right"></i>二级菜单</a></li>
<li><a href="#"><i class="fa fa-caret-right"></i>二级菜单</a></li>
</ul>
</li>
</ul>
<!-- /.sidebar-menu -->
</section>
<!-- /.sidebar -->
</aside>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
{% block content %}
{% endblock %}
</div>
<!-- /.content-wrapper -->
{% endblock %}

111
templates/base-static.html Normal file
View File

@@ -0,0 +1,111 @@
{% load staticfiles %}
<!DOCTYPE html>
<!--
This is a starter template page. Use this page to start your new project from
scratch. This page gets rid of all links and provides the needed markup only.
-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>SandBoxOA</title>
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<link rel="stylesheet" href="{% static 'bootstrap/css/bootstrap.min.css' %}">
<link rel="stylesheet" href="{% static 'plugins/font-awesome/css/font-awesome.min.css' %}">
<link rel="stylesheet" href="{% static 'dist/css/AdminLTE.min.css' %}">
<link rel="stylesheet" href="{% static 'dist/css/myself.css' %}">
<link rel="stylesheet" href="{% static 'dist/css/skins/skin-blue.min.css' %}">
{% block css %} {% endblock %}
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
{% block main %}
{% endblock %}
<!-- Control Sidebar -->
<aside class="control-sidebar control-sidebar-dark">
<!-- Create the tabs -->
<ul class="nav nav-tabs nav-justified control-sidebar-tabs">
<li class="active"><a href="#control-sidebar-home-tab" data-toggle="tab"><i class="fa fa-home"></i></a></li>
<li><a href="#control-sidebar-settings-tab" data-toggle="tab"><i class="fa fa-gears"></i></a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<!-- Home tab content -->
<div class="tab-pane active" id="control-sidebar-home-tab">
<h3 class="control-sidebar-heading">备用空间</h3>
<ul class="control-sidebar-menu">
<li>
<a href="javascript:;">
<i class="menu-icon fa fa-birthday-cake bg-red"></i>
<div class="menu-info">
<h4 class="control-sidebar-subheading">SandBox</h4>
<p>沙盒协同办公平台</p>
</div>
</a>
</li>
<li>
<a href="javascript:;">
<div class="menu-info">
<p>乘风破浪前程广,鼎立创新步步高</p>
</div>
</a>
</li>
</ul>
<!-- /.control-sidebar-menu -->
<!-- /.control-sidebar-menu -->
</div>
<!-- /.tab-pane -->
<!-- Stats tab content -->
<div class="tab-pane" id="control-sidebar-stats-tab">Stats Tab Content</div>
<!-- /.tab-pane -->
<!-- Settings tab content -->
<div class="tab-pane" id="control-sidebar-settings-tab">
<form method="post">
<h3 class="control-sidebar-heading">江苏沙盒科技</h3>
<div class="form-group">
<p>
乘风破浪前程广,鼎立创新步步高
</p>
</div>
<!-- /.form-group -->
</form>
</div>
<!-- /.tab-pane -->
</div>
</aside>
<!-- /.control-sidebar -->
<!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar -->
<div class="control-sidebar-bg"></div>
</div>
<!-- ./wrapper -->
<!-- REQUIRED JS SCRIPTS -->
<!-- jQuery 2.2.3 -->
<script src="{% static 'plugins/jQuery/jquery-2.2.3.min.js' %}"></script>
<!-- Bootstrap 3.3.6 -->
<script src="{% static 'bootstrap/js/bootstrap.min.js' %}"></script>
<!-- AdminLTE App -->
<script src="{% static 'dist/js/app.min.js' %}"></script>
{% block javascripts %}{% endblock %}
</body>
</html>

114
templates/head-footer.html Normal file
View File

@@ -0,0 +1,114 @@
{% extends "base-static.html" %}
{% load staticfiles %}
{% block main %}
<!-- Main Header -->
<header class="main-header">
<!-- Logo -->
<a href="#" class="logo">
<!-- mini logo for sidebar mini 50x50 pixels -->
<span class="logo-mini"><b>SMP</b></span>
<!-- logo for regular state and mobile devices -->
<span class="logo-lg"><b>SandboxMP</b></span>
</a>
<!-- Header Navbar -->
<nav class="navbar navbar-static-top" role="navigation">
<!-- Sidebar toggle button-->
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
<span class="sr-only">Toggle navigation</span>
</a>
<div class="collapse navbar-collapse pull-left" id="navbar-collapse">
<ul class="nav navbar-nav">
<li class="active" ><a href="#" id="index">头部导航</a></li>
</ul>
</div>
{% if request.user.is_authenticated %}
<div class="navbar-custom-menu">
<!-- Navbar Right Menu -->
<ul class="nav navbar-nav">
<!-- Notifications Menu -->
<li class="dropdown notifications-menu">
<!-- Menu toggle button -->
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-bell-o"></i>
<span class="label label-danger"></span>
</a>
<ul class="dropdown-menu">
<li class="header">信息:</li>
<li>
<!-- Inner Menu: contains the notifications -->
<ul class="menu">
<li><!-- start notification -->
<a href="#">
<i class="fa fa-users text-aqua"></i> 消息中心功能暂未开放,敬请期待。 --RobbieHan
</a>
</li>
<!-- end notification -->
</ul>
</li>
<li class="footer"><a href="#">查看全部消息</a></li>
</ul>
</li>
<!-- User Account Menu -->
{% if request.user.is_authenticated %}
<li class="dropdown user user-menu">
<!-- Menu Toggle Button -->
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<!-- The user image in the navbar-->
<img src="/media/{{ request.user.image }}" class="user-image" alt="用户头像">
<!-- hidden-xs hides the username on small devices so only the image appears. -->
<span class="hidden-xs">{{ request.user.name }}</span>
<!--上面 request.user 会返回用户姓名user.models.UserProfile.Meta定义该值-->
</a>
<ul class="dropdown-menu">
<!-- The user image in the menu -->
<li class="user-header">
<img src="/media/{{ request.user.image }}" class="img-circle" alt="User Image">
<p>
{{ request.user.name }} - {{ request.user.department.title }}
<small>{{ request.user.email }}</small>
</p>
</li>
{% endif %}
<!-- Menu Footer-->
<li class="user-footer">
<div class="pull-left">
<a href="" class="btn btn-default btn-flat">个人中心</a>
</div>
<div class="pull-right">
<a href="/logout/" class="btn btn-default btn-flat">注销用户</a>
</div>
</li>
</ul>
</li>
<!-- Control Sidebar Toggle Button -->
<li>
<a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
</li>
</ul>
</div>
{% endif %}
</nav>
</header>
<!-- Left side column. contains the logo and sidebar -->
{% block middle %}
{% endblock %}
<!-- Main Footer -->
<footer class="main-footer text-center">
<strong>
Copyright © 2016-2017 沙盒科技
</strong>
技术支持:<a href="https://zhuanlan.zhihu.com/sandbox" target="_blank">RobbieHan</a>
</footer>
{% endblock %}

20
templates/index.html Normal file
View File

@@ -0,0 +1,20 @@
{% extends "base-left.html" %}
{% load staticfiles %}
{% block content %}
<!-- Main content -->
<section class="content">
</section>
<!-- /.content -->
{% endblock %}
{% block javascripts %}
{% endblock %}

34
templates/page404.html Normal file
View File

@@ -0,0 +1,34 @@
{% extends "base-layer.html" %}
{% load staticfiles %}
{% block main %}
<!-- Content Header (Page header) -->
<section class="content-header margin-bottom">
<ol class="breadcrumb">
<li class="active">404错误</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<section class="content">
<div class="error-page">
<h2 class="headline text-yellow"> 404</h2>
<p>&nbsp</p>
<div class="error-content">
<h3><i class="fa fa-warning text-yellow"></i> 请求的页面不存在或你无权访问该功能</h3>
</div>
<!-- /.error-content -->
</div>
<!-- /.error-page -->
</section>
</section>
<!-- /.content -->
{% endblock %}

View File

@@ -0,0 +1,40 @@
{% extends "system/users/user-base.html" %}
{% block user-content %}
<!-- /.login-logo -->
<div class="login-box-body form-">
<p class="login-box-msg"></p>
<p></p>
<form action="" method="post">
<div class="form-group has-feedback {% if login_form.errors.username %}has-error{% endif %}">
<input name="username" class="form-control" placeholder="用户名或手机号" value="{{ login_form.username.value }}"> <!--type="email"前端控制email输入验证-->
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
</div>
<div class="form-group has-feedback {% if login_form.errors.password %}has-error{% endif %}">
<input name="password" type="password" class="form-control" placeholder="密码"
value="{{ login_form.password.value }}">
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
<div class="row">
<div class="col-xs-8">
</div>
<!-- /.col -->
<div class="col-xs-4">
<button type="submit" class="btn btn-primary btn-block btn-flat">登录</button>
</div>
<!-- /.col -->
</div>
{% csrf_token %}
</form>
{% if msg %} <!--判断如果后端返回用户验证错误信息,前端页面输出错误信息-->
<p class="text-red">{{ msg }}</p>
{% endif %}
</div>
<!-- /.login-box-body -->
</div>
<!-- /.login-box -->
{% endblock %}

View File

@@ -0,0 +1,48 @@
{% load staticfiles %}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{% if system_setup.HeadTitle %}{{ system_setup.HeadTitle }}{% else %}SandBox{% endif %}</title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Bootstrap 3.3.6 -->
<link rel="stylesheet" href="{% static 'bootstrap/css/bootstrap.min.css' %}">
<!-- Font Awesome -->
<link rel="stylesheet" href="{% static 'dist/css/AdminLTE.min.css' %}">
<!-- iCheck -->
<link rel="stylesheet" href="{% static 'plugins/iCheck/square/blue.css' %}">
<link rel="stylesheet" href="{% static 'dist/css/myself.css' %}">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="hold-transition login-page">
<div class="login-box">
<div class="login-logo">
{% if system_setup.loginTitle %}{{ system_setup.loginTitle }}{% else %}沙盒协同办公平台{% endif %}
</div>
{% block user-content %}
{% endblock %}
</div>
<!-- /.login-box -->
<!-- jQuery 2.2.3 -->
<script src="{% static 'plugins/jQuery/jquery-2.2.3.min.js' %}"></script>
<!-- Bootstrap 3.3.6 -->
<script src="{% static 'bootstrap/js/bootstrap.min.js' %}"></script>
<!-- iCheck -->
{% block script %}
{% endblock %}
</body>
</html>