WIP: User table populated and login
This commit is contained in:
@@ -1,52 +0,0 @@
|
||||
@extends('layouts.auth')
|
||||
|
||||
@section('htmlheader_title')
|
||||
Log in
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<body class="hold-transition login-page">
|
||||
<div id="app" v-cloak>
|
||||
<div class="login-box">
|
||||
<div class="login-logo">
|
||||
<a href="{{ url('/home') }}">{!! config('app.name_html_long') !!}</a>
|
||||
</div><!-- /.login-logo -->
|
||||
|
||||
@if (count($errors) > 0)
|
||||
<div class="alert alert-danger">
|
||||
<strong>Whoops!</strong> {{ trans('message.someproblems') }}<br><br>
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="login-box-body">
|
||||
<p class="login-box-msg"> {{ trans('message.siginsession') }} </p>
|
||||
|
||||
<login-form name="{{ config('auth.providers.users.field','email') }}"
|
||||
domain="{{ config('auth.defaults.domain','') }}"></login-form>
|
||||
|
||||
<a href="{{ url('/password/reset') }}">{{ trans('message.forgotpassword') }}</a><br>
|
||||
|
||||
@if(isset($site_social))
|
||||
@include('auth.partials.social_login')
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layouts.partials.scripts_auth')
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$('input').iCheck({
|
||||
checkboxClass: 'icheckbox_square-blue',
|
||||
radioClass: 'iradio_square-blue',
|
||||
increaseArea: '20%' // optional
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
@endsection
|
@@ -1,6 +0,0 @@
|
||||
<div class="social-auth-links text-center">
|
||||
<p>- OR -</p>
|
||||
@foreach($site_social as $o)
|
||||
<a href="{{ url('/auth/'.$o['name']) }}" class="btn btn-block btn-social btn-{{ $o['name'] }} btn-flat"><i class="fa fa-{{ $o['name'] }}"></i> {{ trans('message.sign'.$o['name']) }}</a>
|
||||
@endforeach
|
||||
</div><!-- /.social-auth-links -->
|
@@ -1,44 +0,0 @@
|
||||
@extends('layouts.auth')
|
||||
|
||||
@section('htmlheader_title')
|
||||
Register
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
|
||||
<body class="hold-transition register-page">
|
||||
<div id="app" v-cloak>
|
||||
<div class="register-box">
|
||||
<div class="register-logo">
|
||||
<a href="{{ url('/home') }}">{!! config('app.name_html_long') !!}</a>
|
||||
</div>
|
||||
|
||||
@if (count($errors) > 0)
|
||||
<div class="alert alert-danger">
|
||||
<strong>Whoops!</strong> {{ trans('message.someproblems') }}<br><br>
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="register-box-body">
|
||||
<p class="login-box-msg">Register for access</p>
|
||||
|
||||
<register-form></register-form>
|
||||
<!-- #include('auth.partials.social_login') -->
|
||||
|
||||
<a href="{{ url('/login') }}" class="text-center">I already have an account</a>
|
||||
</div><!-- /.form-box -->
|
||||
</div><!-- /.register-box -->
|
||||
</div>
|
||||
|
||||
@include('layouts.partials.scripts_auth')
|
||||
|
||||
@include('auth.terms')
|
||||
|
||||
</body>
|
||||
|
||||
@endsection
|
@@ -1,41 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
@section('htmlheader')
|
||||
@include('layouts.partials.htmlheader')
|
||||
@show
|
||||
|
||||
<body class="fixed skin-blue sidebar-mini">
|
||||
<div id="app" v-cloak>
|
||||
<div class="wrapper">
|
||||
@include('layouts.partials.mainheader')
|
||||
|
||||
@include('layouts.partials.sidebar')
|
||||
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
|
||||
@include('layouts.partials.contentheader')
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<!-- Your Page Content Here -->
|
||||
@yield('main-content')
|
||||
</div>
|
||||
</section><!-- /.content -->
|
||||
|
||||
</div><!-- /.content-wrapper -->
|
||||
|
||||
<!-- #include('layouts.partials.controlsidebar') -->
|
||||
@include('layouts.partials.footer')
|
||||
</div><!-- ./wrapper -->
|
||||
</div> <!-- ./app -->
|
||||
|
||||
@section('scripts')
|
||||
@include('layouts.partials.scripts')
|
||||
{{-- Scripts --}}
|
||||
{!! Asset::scripts() !!}
|
||||
@show
|
||||
</body>
|
||||
</html>
|
@@ -1,8 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
@include('layouts.partials.htmlheader')
|
||||
|
||||
@yield('content')
|
||||
|
||||
</html>
|
@@ -1,17 +0,0 @@
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<div id="search_results"></div>
|
||||
<h1>
|
||||
@yield('contentheader_title', 'Software Deployment')
|
||||
<small>@yield('contentheader_description')</small>
|
||||
</h1>
|
||||
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ url('/home') }}"><i class="fa fa-dashboard"></i>Home</a></li>
|
||||
@isset($breadcrumb)
|
||||
@foreach ($breadcrumb as $item => $url)
|
||||
<li><a href="{{url($url)}}">{{ $item }}</a></li>
|
||||
@endforeach
|
||||
@endisset
|
||||
</ol> <!-- /.breadcrumb -->
|
||||
</section> <!-- /.content-header -->
|
@@ -1,8 +0,0 @@
|
||||
<!-- Main Footer -->
|
||||
<footer class="main-footer">
|
||||
<!-- To the right -->
|
||||
<div class="pull-right hidden-xs">
|
||||
<a href="#"></a><b>{{ config('app.name') }}</b></a>
|
||||
</div>
|
||||
<strong>© Leenooks</strong>
|
||||
</footer>
|
@@ -1,31 +0,0 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{{ config('app.name') }} - @yield('htmlheader_title', 'Your title here')</title>
|
||||
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
|
||||
<!-- CSRF Token -->
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
|
||||
<link href="{{ asset('/css/all.css') }}" rel="stylesheet" type="text/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.2/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<script>
|
||||
//See https://laracasts.com/discuss/channels/vue/use-trans-in-vuejs
|
||||
window.trans =
|
||||
@php
|
||||
// copy all translations from /resources/lang/CURRENT_LOCALE/* to global JS variable
|
||||
$lang_files = File::files(resource_path() . '/lang/' . App::getLocale());
|
||||
$trans = [];
|
||||
foreach ($lang_files as $f) {
|
||||
$filename = pathinfo($f)['filename'];
|
||||
$trans[$filename] = trans($filename);
|
||||
}
|
||||
$trans['adminlte_lang_message'] = trans('message');
|
||||
echo json_encode($trans);
|
||||
@endphp
|
||||
</script>
|
||||
</head>
|
@@ -1,95 +0,0 @@
|
||||
<!-- Main Header -->
|
||||
<header class="main-header">
|
||||
|
||||
<!-- Logo -->
|
||||
<a href="{{ url('/home') }}" class="logo">
|
||||
<!-- mini logo for sidebar mini 50x50 pixels -->
|
||||
<span class="logo-mini">{!! config('name_html_short','<b>A</b>N') !!}</span>
|
||||
<!-- logo for regular state and mobile devices -->
|
||||
<span class="logo-lg">{!! config('name_html_long','<b>App</b>Name') !!}</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">{{ trans('message.togglenav') }}</span>
|
||||
</a>
|
||||
<!-- Navbar Right Menu -->
|
||||
<div class="navbar-custom-menu">
|
||||
<ul class="nav navbar-nav">
|
||||
<!-- Tasks Menu -->
|
||||
@if (Auth::guest())
|
||||
<li><a href="{{ url('/register') }}">{{ trans('message.register') }}</a></li>
|
||||
<li><a href="{{ url('/login') }}">{{ trans('message.login') }}</a></li>
|
||||
@else
|
||||
|
||||
@if (isset($topmenu))
|
||||
<!-- Available Data Menu -->
|
||||
<li class="dropdown tasks-menu" id="import_date">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="hidden-xs">Items</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li class="header">Header</li>
|
||||
<li>
|
||||
<ul class="menu small">
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<li class="footer"><a href="#">(Not Active)</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
<li class="dropdown user user-menu" id="user_menu">
|
||||
<!-- Menu Toggle Button -->
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<!-- The user image in the navbar-->
|
||||
<img src="{{ Gravatar::get($user->email) }}" class="user-image" alt="User Image"/>
|
||||
<!-- hidden-xs hides the username on small devices so only the image appears. -->
|
||||
<span class="hidden-xs">{{ $user->name }}</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<!-- The user image in the menu -->
|
||||
<li class="user-header">
|
||||
<img src="{{ Gravatar::get($user->email) }}" class="img-circle" alt="User Image" />
|
||||
<p>
|
||||
{{ $user->name }}
|
||||
<small>{{ trans('message.login') }}: @if($user->last_access) {{ $user->last_access->format('Y-m-d') }} @else Unknown @endif</small>
|
||||
</p>
|
||||
</li>
|
||||
<!-- Menu Footer-->
|
||||
<li class="user-footer">
|
||||
<div class="pull-left">
|
||||
<a href="{{ url('/settings') }}" class="btn btn-default btn-flat">{{ trans('message.profile') }}</a>
|
||||
</div>
|
||||
|
||||
<div class="pull-right">
|
||||
<a href="{{ url('/logout') }}" class="btn btn-default btn-flat" id="logout"
|
||||
onclick="event.preventDefault();
|
||||
document.getElementById('logout-form').submit();">
|
||||
{{ trans('message.signout') }}
|
||||
</a>
|
||||
|
||||
<form id="logout-form" action="{{ url('/logout') }}" method="POST" style="display: none;">
|
||||
{{ csrf_field() }}
|
||||
<input type="submit" value="logout" style="display: none;">
|
||||
</form>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
@endif
|
||||
|
||||
<!-- Control Sidebar Toggle Button -->
|
||||
@if (isset($controlbar))
|
||||
<li>
|
||||
<a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
@@ -1,13 +0,0 @@
|
||||
<!-- REQUIRED JS SCRIPTS -->
|
||||
|
||||
<!-- JQuery and bootstrap are required by Laravel 5.3 in resources/assets/js/bootstrap.js-->
|
||||
<!-- Laravel App -->
|
||||
<script src="{{ url (mix('/js/app.js')) }}" type="text/javascript"></script>
|
||||
|
||||
@yield('page-scripts')
|
||||
<!-- Optionally, you can add Slimscroll and FastClick plugins.
|
||||
Both of these plugins are recommended to enhance the
|
||||
user experience. Slimscroll is required when using the
|
||||
fixed layout. -->
|
||||
@js('/site/js/jquery.slimscroll.min.js',jquery)
|
||||
@js('/site/js/fastclick.min.js')
|
@@ -1,2 +0,0 @@
|
||||
<!-- Compiled app javascript -->
|
||||
<script src="{{ url (mix('/js/app.js')) }}"></script>
|
@@ -1,108 +0,0 @@
|
||||
<!-- Left side column. contains the logo and sidebar -->
|
||||
<aside class="main-sidebar">
|
||||
|
||||
<!-- sidebar: style can be found in sidebar.less -->
|
||||
<section class="sidebar">
|
||||
|
||||
<!-- Sidebar user panel (optional) -->
|
||||
@if (! Auth::guest())
|
||||
<div class="user-panel">
|
||||
<div class="pull-left image">
|
||||
<img src="{{ Gravatar::get($user->email) }}" class="img-circle" alt="User Image" />
|
||||
</div>
|
||||
<div class="pull-left info">
|
||||
<p>{{ Auth::user()->name }}</p>
|
||||
<!-- Status -->
|
||||
<a href="#"><i class="fa fa-circle text-success"></i> {{ trans('message.online') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- search form (Optional) -->
|
||||
<form action="#" method="get" class="sidebar-form">
|
||||
<div class="input-group">
|
||||
<input type="text" name="q" class="form-control" autocomplete="off" placeholder="{{ trans('message.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">Menu</li>
|
||||
<!-- Optionally, you can add icons to the links -->
|
||||
<li class="active"><a href="{{ url('home',['date'=>(isset($ido) ? $ido->id : NULL)]) }}"><i class='fa fa-link'></i> <span>{{ trans('message.home') }}</span></a></li>
|
||||
</ul><!-- /.sidebar-menu -->
|
||||
</section>
|
||||
<!-- /.sidebar -->
|
||||
</aside>
|
||||
|
||||
@section('page-scripts')
|
||||
@js('/site/js/bootstrap3-typeahead.min.js')
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("input[name=q]").typeahead({
|
||||
delay: 300,
|
||||
minLength: 2,
|
||||
fitToElement: false,
|
||||
appendTo: "#search_results",
|
||||
source: function (query,process) {
|
||||
search('{{ url("search",['date'=>isset($ido) ? $ido->id : NULL]) }}',query,process);
|
||||
},
|
||||
|
||||
matcher: function () { return true; },
|
||||
|
||||
updater: function (item) {
|
||||
window.parent.location.href = '{{ url("/") }}'+users[item];
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
var c=0;
|
||||
var search = _.debounce(function(url,query,process,icon){
|
||||
$.ajax({
|
||||
url : url,
|
||||
type : 'GET',
|
||||
data : 'term=' + query,
|
||||
dataType : 'JSON',
|
||||
async : false,
|
||||
cache : false,
|
||||
beforeSend : function() {
|
||||
if (c++ == 0) {
|
||||
if (icon)
|
||||
$('i[name='+icon+']').addClass("fa-spin");
|
||||
else
|
||||
$('i[name=searching]').removeClass("hidden");
|
||||
}
|
||||
},
|
||||
success : function(data) {
|
||||
// if json is null, means no match, won't do again.
|
||||
if(data==null || (data.length===0)) return;
|
||||
|
||||
users = {};
|
||||
userLabels = [];
|
||||
_.each(data,function(item,ix,list) {
|
||||
if (_.includes(users,item.label))
|
||||
item.label = item.label + ' #' + item.value;
|
||||
|
||||
userLabels.push(item.label);
|
||||
users[item.label] = item.value;
|
||||
});
|
||||
|
||||
process(userLabels);
|
||||
},
|
||||
complete : function() {
|
||||
if (--c == 0) {
|
||||
if (icon)
|
||||
$('i[name='+icon+']').removeClass("fa-spin");
|
||||
else
|
||||
$('i[name=searching]').addClass("hidden");
|
||||
}
|
||||
}
|
||||
})
|
||||
}, 500);
|
||||
</script>
|
||||
@append
|
Reference in New Issue
Block a user