2017-08-18 03:53:10 +08:00
|
|
|
<!doctype html>
|
|
|
|
<html lang="en">
|
2017-06-09 09:02:52 +08:00
|
|
|
<head>
|
2018-03-13 06:58:12 +08:00
|
|
|
<title>@yield('title') - {{ config('app.name') }} admin</title>
|
2017-08-18 03:53:10 +08:00
|
|
|
|
2017-12-17 05:12:44 +08:00
|
|
|
<meta charset="utf-8" />
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
2017-08-18 07:26:48 +08:00
|
|
|
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' />
|
|
|
|
<meta name="viewport" content="width=device-width" />
|
2018-03-13 09:14:55 +08:00
|
|
|
|
|
|
|
{{-- Start of required lines block. DON'T REMOVE THESE LINES! They're required or might break things --}}
|
2018-03-15 08:54:58 +08:00
|
|
|
<meta name="base-url" content="{{ url('') }}">
|
2018-03-13 00:00:12 +08:00
|
|
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
2018-03-13 09:14:55 +08:00
|
|
|
<meta name="api-key" content="{{ Auth::check() ? Auth::user()->api_key: '' }}">
|
|
|
|
{{-- End the required lines block --}}
|
2017-08-18 03:53:10 +08:00
|
|
|
|
2018-03-13 06:58:12 +08:00
|
|
|
<script src="{{ public_asset('/assets/system/js/jquery.js') }}"></script>
|
2017-12-31 02:03:45 +08:00
|
|
|
|
2018-03-13 06:58:12 +08:00
|
|
|
<link rel="icon" type="image/png" href="{{ public_asset('/assets/admin/img/favicon.png') }}">
|
2017-06-09 09:02:52 +08:00
|
|
|
|
2017-08-18 07:26:48 +08:00
|
|
|
<link href='https://fonts.googleapis.com/css?family=Muli:400,300' rel='stylesheet' type='text/css'>
|
2017-12-17 05:12:44 +08:00
|
|
|
<link href="http://fonts.googleapis.com/css?family=Roboto:400,700,300" rel="stylesheet" type="text/css">
|
|
|
|
|
2018-03-28 05:34:37 +08:00
|
|
|
{{--<link rel="stylesheet" href="{{ public_asset('/assets/system/css/vendor.min.css') }}"/>--}}
|
2017-12-18 06:58:53 +08:00
|
|
|
<link rel="stylesheet" href="{{ public_asset('/assets/admin/css/vendor.min.css') }}">
|
|
|
|
<link rel="stylesheet" href="{{ public_asset('/assets/admin/css/admin.css') }}">
|
2017-08-18 07:26:48 +08:00
|
|
|
|
2017-08-18 22:51:15 +08:00
|
|
|
<style type="text/css">
|
2017-08-18 07:26:48 +08:00
|
|
|
@yield('css')
|
2018-03-25 22:38:58 +08:00
|
|
|
/*label {
|
2018-02-07 02:58:48 +08:00
|
|
|
text-transform: uppercase;
|
|
|
|
font-size: 14px;
|
|
|
|
margin: 0;
|
2018-03-25 22:38:58 +08:00
|
|
|
}*/
|
2017-08-18 22:51:15 +08:00
|
|
|
</style>
|
|
|
|
|
2017-12-20 07:30:30 +08:00
|
|
|
<script>
|
2018-03-13 06:58:12 +08:00
|
|
|
const BASE_URL ='{{ url('/') }}';
|
2017-12-20 07:30:30 +08:00
|
|
|
@if (Auth::user())
|
2018-03-13 06:58:12 +08:00
|
|
|
const PHPVMS_USER_API_KEY = "{{ Auth::user()->api_key }}";
|
2017-12-20 07:30:30 +08:00
|
|
|
@else
|
|
|
|
const PHPVMS_USER_API_KEY = false;
|
|
|
|
@endif
|
|
|
|
</script>
|
|
|
|
|
2017-08-18 03:53:10 +08:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<div class="wrapper">
|
|
|
|
@include('admin.sidebar')
|
|
|
|
|
|
|
|
<div class="main-panel">
|
2017-08-18 07:26:48 +08:00
|
|
|
<nav class="navbar navbar-default">
|
2017-08-18 03:53:10 +08:00
|
|
|
<div class="container-fluid">
|
2017-08-19 01:02:32 +08:00
|
|
|
<div class="navbar-header">
|
2017-08-18 07:26:48 +08:00
|
|
|
<button type="button" class="navbar-toggle">
|
2017-08-18 03:53:10 +08:00
|
|
|
<span class="sr-only">Toggle navigation</span>
|
2017-08-18 07:26:48 +08:00
|
|
|
<span class="icon-bar bar1"></span>
|
|
|
|
<span class="icon-bar bar2"></span>
|
|
|
|
<span class="icon-bar bar3"></span>
|
2017-08-18 03:53:10 +08:00
|
|
|
</button>
|
2017-08-19 01:02:32 +08:00
|
|
|
<a class="navbar-brand" href="#">@yield('title')</a>
|
|
|
|
</div>
|
2017-08-18 03:53:10 +08:00
|
|
|
<div class="collapse navbar-collapse">
|
2017-08-18 07:26:48 +08:00
|
|
|
<ul class="nav navbar-nav navbar-right">
|
2017-08-19 01:02:32 +08:00
|
|
|
@yield('actions')
|
2017-08-18 03:53:10 +08:00
|
|
|
</ul>
|
2017-08-18 07:26:48 +08:00
|
|
|
|
2017-08-18 03:53:10 +08:00
|
|
|
</div>
|
2017-06-09 09:02:52 +08:00
|
|
|
</div>
|
2017-08-18 03:53:10 +08:00
|
|
|
</nav>
|
2017-06-09 09:02:52 +08:00
|
|
|
|
|
|
|
|
2017-08-18 03:53:10 +08:00
|
|
|
<div class="content">
|
|
|
|
<div class="container-fluid">
|
|
|
|
<div class="row">
|
2017-11-23 01:52:02 +08:00
|
|
|
<div class="col-12">
|
2018-01-08 05:09:22 +08:00
|
|
|
@include('admin.flash.message')
|
2017-11-23 01:52:02 +08:00
|
|
|
@yield('content')
|
|
|
|
</div>
|
2017-06-09 09:02:52 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-08-18 03:53:10 +08:00
|
|
|
|
2018-01-20 07:13:59 +08:00
|
|
|
<footer class="footer">
|
|
|
|
<div class="container-fluid">
|
|
|
|
<nav class="pull-left">
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
<div class="copyright pull-right">
|
|
|
|
powered by <a href="http://www.phpvms.net" target="_blank">phpvms</a>
|
|
|
|
@version
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</footer>
|
2017-06-09 09:02:52 +08:00
|
|
|
</div>
|
2017-08-18 03:53:10 +08:00
|
|
|
</div>
|
2017-06-09 09:02:52 +08:00
|
|
|
</body>
|
2017-08-18 03:53:10 +08:00
|
|
|
|
2018-02-23 03:28:12 +08:00
|
|
|
<script defer src="https://use.fontawesome.com/releases/v5.0.6/js/all.js"></script>
|
2018-03-13 06:58:12 +08:00
|
|
|
<script src="{{ public_asset('/assets/admin/js/vendor.js') }}"></script>
|
|
|
|
<script src="{{ public_asset('/assets/admin/js/admin.js') }}"></script>
|
2017-08-18 03:53:10 +08:00
|
|
|
|
|
|
|
<script>
|
2018-02-23 01:47:28 +08:00
|
|
|
const getStorage = function(key) {
|
|
|
|
const st = window.localStorage.getItem(key);
|
|
|
|
|
2017-08-22 02:06:10 +08:00
|
|
|
console.log('storage: ', key, st);
|
|
|
|
if(_.isNil(st)) {
|
|
|
|
return {
|
|
|
|
"menu": [],
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
return JSON.parse(st);
|
|
|
|
};
|
|
|
|
|
2018-02-23 01:47:28 +08:00
|
|
|
const saveStorage = function(key, obj) {
|
2017-08-22 02:06:10 +08:00
|
|
|
console.log('save: ', key, obj);
|
|
|
|
window.localStorage.setItem(key, JSON.stringify(obj));
|
|
|
|
};
|
|
|
|
|
2018-02-23 01:47:28 +08:00
|
|
|
const addItem = function(obj, item) {
|
2017-08-22 02:06:10 +08:00
|
|
|
|
2018-02-23 01:47:28 +08:00
|
|
|
if (_.isNil(obj)) { obj = []; }
|
|
|
|
|
|
|
|
const index = _.indexOf(obj, item);
|
2017-08-22 02:06:10 +08:00
|
|
|
if(index === -1) {
|
|
|
|
obj.push(item);
|
|
|
|
}
|
|
|
|
|
|
|
|
return obj;
|
|
|
|
};
|
|
|
|
|
2018-02-23 01:47:28 +08:00
|
|
|
const removeItem = function (obj, item) {
|
|
|
|
|
|
|
|
if (_.isNil(obj)) { obj = []; }
|
|
|
|
|
|
|
|
const index = _.indexOf(obj, item);
|
2017-08-22 02:06:10 +08:00
|
|
|
if (index !== -1) {
|
|
|
|
console.log("removing", item);
|
|
|
|
obj.splice(index, 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
return obj;
|
|
|
|
};
|
|
|
|
|
|
|
|
$(document).ready(function () {
|
|
|
|
|
2017-11-23 10:03:49 +08:00
|
|
|
$(".select2").select2();
|
2017-08-22 02:06:10 +08:00
|
|
|
|
2017-11-23 10:03:49 +08:00
|
|
|
$('input').iCheck({
|
2017-12-31 00:38:18 +08:00
|
|
|
checkboxClass: 'icheckbox_square-blue',
|
|
|
|
radioClass: 'icheckbox_square-blue'
|
2017-11-01 23:08:36 +08:00
|
|
|
});
|
2017-08-22 02:06:10 +08:00
|
|
|
|
2018-02-23 01:47:28 +08:00
|
|
|
let storage = getStorage("phpvms.admin");
|
2017-08-22 02:06:10 +08:00
|
|
|
|
|
|
|
// see what menu items should be open
|
2018-02-23 01:47:28 +08:00
|
|
|
for(let idx = 0; idx < storage.menu.length; idx++) {
|
|
|
|
const id = storage.menu[idx];
|
|
|
|
const elem = $(".collapse#" + id);
|
2017-08-22 02:06:10 +08:00
|
|
|
elem.addClass("in").trigger("show.bs.collapse");
|
|
|
|
|
2018-02-23 01:47:28 +08:00
|
|
|
const caret = $("a." + id + " b");
|
2017-08-22 02:06:10 +08:00
|
|
|
caret.addClass("pe-7s-angle-down");
|
2018-02-27 10:23:48 +08:00
|
|
|
caret.removeClass("pe-7s-angle-right");
|
2017-08-22 02:06:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
$(".collapse").on("hide.bs.collapse", function () {
|
|
|
|
console.log('hiding');
|
2018-02-23 01:47:28 +08:00
|
|
|
const id = $(this).attr('id');
|
|
|
|
const elem = $("a." + id + " b");
|
2017-08-22 02:06:10 +08:00
|
|
|
elem.removeClass("pe-7s-angle-down");
|
2018-02-27 10:23:48 +08:00
|
|
|
elem.addClass("pe-7s-angle-right");
|
2017-08-22 02:06:10 +08:00
|
|
|
|
|
|
|
removeItem(storage.menu, id);
|
|
|
|
saveStorage("phpvms.admin", storage);
|
|
|
|
});
|
|
|
|
|
|
|
|
$(".collapse").on("show.bs.collapse", function () {
|
|
|
|
console.log('showing');
|
2018-02-23 01:47:28 +08:00
|
|
|
const id = $(this).attr('id');
|
|
|
|
const caret = $("a." + id + " b");
|
2017-08-22 02:06:10 +08:00
|
|
|
caret.addClass("pe-7s-angle-down");
|
2018-02-27 10:23:48 +08:00
|
|
|
caret.removeClass("pe-7s-angle-right");
|
2017-08-22 02:06:10 +08:00
|
|
|
|
|
|
|
addItem(storage.menu, id);
|
|
|
|
saveStorage("phpvms.admin", storage);
|
2017-08-18 03:53:10 +08:00
|
|
|
});
|
2017-08-22 02:06:10 +08:00
|
|
|
|
|
|
|
});
|
2017-08-18 03:53:10 +08:00
|
|
|
</script>
|
2018-03-13 06:30:52 +08:00
|
|
|
|
2017-08-18 03:53:10 +08:00
|
|
|
@yield('scripts')
|
2017-06-09 09:02:52 +08:00
|
|
|
</html>
|