CSS/JS updates, initial page rendering
This commit is contained in:
parent
4c90ce11f2
commit
f8717480fd
@ -4,12 +4,12 @@ root = true
|
|||||||
charset = utf-8
|
charset = utf-8
|
||||||
end_of_line = lf
|
end_of_line = lf
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
indent_style = space
|
indent_style = tab
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
[*.md]
|
[*.md]
|
||||||
trim_trailing_whitespace = false
|
trim_trailing_whitespace = false
|
||||||
|
|
||||||
[*.yml]
|
[*.{yml,yaml}]
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
@ -4,9 +4,15 @@ namespace App\Http\Controllers;
|
|||||||
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
use Leenooks\LDAP;
|
||||||
|
|
||||||
class HomeController extends Controller
|
class HomeController extends Controller
|
||||||
{
|
{
|
||||||
public function home() {
|
public function home() {
|
||||||
return view('home');
|
$o = new LDAP\Server;
|
||||||
}
|
|
||||||
|
return view('home')
|
||||||
|
->with('server',config('ldap.connections.default.name')) // @todo This connection name should be a config item
|
||||||
|
->with('bases',$o->getBaseDN());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -236,6 +236,7 @@ return [
|
|||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
|
'name' => 'OpenLDAP',
|
||||||
],
|
],
|
||||||
|
|
||||||
],
|
],
|
||||||
|
54
ldap/src/Server.php
Normal file
54
ldap/src/Server.php
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Leenooks\LDAP;
|
||||||
|
|
||||||
|
use Adldap\Adldap;
|
||||||
|
use Adldap\Models\Entry;
|
||||||
|
|
||||||
|
class Server
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Gets the root DN of the specified LDAPServer, or NULL if it
|
||||||
|
* can't find it (ie, the server won't give it to us, or it isnt
|
||||||
|
* specified in the configuration file).
|
||||||
|
*
|
||||||
|
* @return array array|NULL The root DN(s) of the server on success (string) or NULL if it cannot be determine.
|
||||||
|
* @todo Sort the entries, so that they are in the correct DN order.
|
||||||
|
*/
|
||||||
|
public function getBaseDN(): ?array
|
||||||
|
{
|
||||||
|
// If the base is set in the configuration file, then just return that after validating it exists.
|
||||||
|
// @todo
|
||||||
|
if (false) {
|
||||||
|
|
||||||
|
// We need to work out the baseDN
|
||||||
|
} else {
|
||||||
|
$result = $this->getDNAttrValues('',['namingcontexts']);
|
||||||
|
|
||||||
|
return $result ? $result->namingcontexts : NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Search for a DN and return its attributes
|
||||||
|
*
|
||||||
|
* @param $dn
|
||||||
|
* @param array $attrs
|
||||||
|
* @param int $deref // @todo
|
||||||
|
* @return Entry|bool
|
||||||
|
*/
|
||||||
|
protected function getDNAttrValues(string $dn,array $attrs=['*','+'],int $deref=LDAP_DEREF_NEVER): ?Entry
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
return ($x=(new Adldap)
|
||||||
|
->addProvider(config('ldap.connections.default.settings'))
|
||||||
|
->search()
|
||||||
|
->select($attrs)
|
||||||
|
->findByDn($dn)) ? $x : NULL;
|
||||||
|
|
||||||
|
// @todo Tidy up this exception
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
dd(['e'=>$e,'s'=>$s]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
17
public/css/adminlte.min.css
vendored
17
public/css/adminlte.min.css
vendored
File diff suppressed because one or more lines are too long
10671
public/css/app.css
vendored
10671
public/css/app.css
vendored
File diff suppressed because one or more lines are too long
47
public/css/fixes.css
vendored
47
public/css/fixes.css
vendored
@ -1,65 +1,60 @@
|
|||||||
/* Fixes for data tables */
|
/* Fixes for data tables */
|
||||||
.dataTables_wrapper .dataTables_paginate .paginate_button {
|
.dataTables_wrapper .dataTables_paginate .paginate_button {
|
||||||
padding: 0em 0em;
|
padding: 0em 0em;
|
||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
border: 0px solid;
|
border: 0px solid;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
|
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
|
||||||
border: 0px solid;
|
border: 0px solid;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataTables_wrapper .dataTables_paginate .paginate_button:active {
|
.dataTables_wrapper .dataTables_paginate .paginate_button:active {
|
||||||
box-shadow: 0 0 0px #fff;
|
box-shadow: 0 0 0px #fff;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.dataTable thead .sorting_asc {
|
table.dataTable thead .sorting_asc {
|
||||||
background-image: none !important;
|
background-image: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.dataTable thead .sorting_desc {
|
table.dataTable thead .sorting_desc {
|
||||||
background-image: none !important;
|
background-image: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.dataTable thead .sorting {
|
table.dataTable thead .sorting {
|
||||||
background-image: none !important;
|
background-image: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Remove blue border from chrome on buttons */
|
/* Remove blue border from chrome on buttons */
|
||||||
/* Remove outline for non-keyboard :focus */
|
/* Remove outline for non-keyboard :focus */
|
||||||
*:focus:not(.focus-visible) {
|
*:focus:not(.focus-visible) {
|
||||||
outline: none !important;
|
outline: none !important;
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Optional: Customize .focus-visible */
|
/* Optional: Customize .focus-visible */
|
||||||
.focus-visible {
|
.focus-visible {
|
||||||
outline-color: lightgreen;
|
outline-color: lightgreen;
|
||||||
}
|
|
||||||
|
|
||||||
div.login-box .input-group .input-group-append span.fa {
|
|
||||||
line-height: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
*:disabled {
|
*:disabled {
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
}
|
|
||||||
|
|
||||||
/* Login Box, icons when inputs disabled */
|
|
||||||
div.login-box .input-group-append .fa {
|
|
||||||
width: 2.5em;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#favourite.selected {
|
#favourite.selected {
|
||||||
color: orange;
|
color: orange;
|
||||||
}
|
}
|
||||||
|
|
||||||
#favourite:hover {
|
#favourite:hover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header h3.card-title {
|
||||||
|
font-size: 1.0rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-size: 0.85em;
|
font-size: 0.85em;
|
||||||
}
|
}
|
28
public/css/print.css
vendored
28
public/css/print.css
vendored
@ -1,19 +1,19 @@
|
|||||||
@media print {
|
@media print {
|
||||||
body {
|
body {
|
||||||
color: #333;
|
color: #333;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 12px;
|
font-size: 0.85em;
|
||||||
}
|
}
|
||||||
|
|
||||||
label {
|
label {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
tr { page-break-inside:avoid; }
|
tr { page-break-inside:avoid; }
|
||||||
thead { display:table-header-group; }
|
thead { display:table-header-group; }
|
||||||
tfoot { display:table-footer-group; }
|
tfoot { display:table-footer-group; }
|
||||||
|
|
||||||
.table-responsive {
|
.table-responsive {
|
||||||
overflow: visible !important;
|
overflow: visible !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
BIN
public/img/logo.png
Normal file
BIN
public/img/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
8
public/js/adminlte.min.js
vendored
8
public/js/adminlte.min.js
vendored
File diff suppressed because one or more lines are too long
49448
public/js/app.js
vendored
49448
public/js/app.js
vendored
File diff suppressed because one or more lines are too long
@ -1,18 +1,36 @@
|
|||||||
@extends('adminlte::layouts.app')
|
@extends('adminlte::layouts.app')
|
||||||
|
|
||||||
@section('htmlheader_title')
|
@section('htmlheader_title')
|
||||||
Home
|
Home
|
||||||
@endsection
|
|
||||||
@section('page_title')
|
|
||||||
{{ $user }}
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('contentheader_title')
|
@section('contentheader_title')
|
||||||
|
Home
|
||||||
@endsection
|
@endsection
|
||||||
@section('contentheader_description')
|
@section('contentheader_description')
|
||||||
Client Home
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('main-content')
|
@section('main-content')
|
||||||
@dump($user)
|
<div class="card card-solid">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 col-sm-6">
|
||||||
|
<h3 class="d-inline-block d-sm-none">phpLDAPadmin</h3>
|
||||||
|
<div class="col-12">
|
||||||
|
<img src="img/logo.png" class="product-image" alt="PLA Logo">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12 col-sm-6">
|
||||||
|
<h3 class="my-3">Welcome to phpLDAPadmin</h3>
|
||||||
|
<h4 class="my-3">Updated to v2</h4>
|
||||||
|
<p>phpLDAPadmin (or PLA for short) is an LDAP data management tool for administrators.</p>
|
||||||
|
<p>PLA aims to adhere to the LDAP standards (RFC4511) so that it can interact with any LDAP server that implements those standards.</p>
|
||||||
|
<hr>
|
||||||
|
<p>Version 2 is a complete re-write of PLA, leveraging the advancements and modernisation of web tools and methods, libraries since version 1 was released.</p>
|
||||||
|
<p>You can support this application by letting us know which LDAP server you use (including version and platform).</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
17
resources/views/vendor/adminlte/layouts/partials/sidebarmenu.blade.php
vendored
Normal file
17
resources/views/vendor/adminlte/layouts/partials/sidebarmenu.blade.php
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<li class="nav-header">{{ $server ?? 'Server Name' }}</li>
|
||||||
|
|
||||||
|
@foreach (($bases ?? []) as $base)
|
||||||
|
<li class="nav-item has-treeview">
|
||||||
|
<a href="#" class="nav-link">
|
||||||
|
<i class="nav-icon fas fa-tree"></i>
|
||||||
|
<p>
|
||||||
|
{{ $base }}
|
||||||
|
<i class="fas fa-angle-left right"></i>
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<ul class="nav nav-treeview">
|
||||||
|
<div id="{{ $base }}">
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
@endforeach
|
@ -1,99 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
|
|
||||||
<title>Laravel</title>
|
|
||||||
|
|
||||||
<!-- Fonts -->
|
|
||||||
<link href="https://fonts.googleapis.com/css?family=Nunito:200,600" rel="stylesheet">
|
|
||||||
|
|
||||||
<!-- Styles -->
|
|
||||||
<style>
|
|
||||||
html, body {
|
|
||||||
background-color: #fff;
|
|
||||||
color: #636b6f;
|
|
||||||
font-family: 'Nunito', sans-serif;
|
|
||||||
font-weight: 200;
|
|
||||||
height: 100vh;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.full-height {
|
|
||||||
height: 100vh;
|
|
||||||
}
|
|
||||||
|
|
||||||
.flex-center {
|
|
||||||
align-items: center;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.position-ref {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-right {
|
|
||||||
position: absolute;
|
|
||||||
right: 10px;
|
|
||||||
top: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
font-size: 84px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.links > a {
|
|
||||||
color: #636b6f;
|
|
||||||
padding: 0 25px;
|
|
||||||
font-size: 13px;
|
|
||||||
font-weight: 600;
|
|
||||||
letter-spacing: .1rem;
|
|
||||||
text-decoration: none;
|
|
||||||
text-transform: uppercase;
|
|
||||||
}
|
|
||||||
|
|
||||||
.m-b-md {
|
|
||||||
margin-bottom: 30px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="flex-center position-ref full-height">
|
|
||||||
@if (Route::has('login'))
|
|
||||||
<div class="top-right links">
|
|
||||||
@auth
|
|
||||||
<a href="{{ url('/home') }}">Home</a>
|
|
||||||
@else
|
|
||||||
<a href="{{ route('login') }}">Login</a>
|
|
||||||
|
|
||||||
@if (Route::has('register'))
|
|
||||||
<a href="{{ route('register') }}">Register</a>
|
|
||||||
@endif
|
|
||||||
@endauth
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
<div class="content">
|
|
||||||
<div class="title m-b-md">
|
|
||||||
Laravel
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="links">
|
|
||||||
<a href="https://laravel.com/docs">Docs</a>
|
|
||||||
<a href="https://laracasts.com">Laracasts</a>
|
|
||||||
<a href="https://laravel-news.com">News</a>
|
|
||||||
<a href="https://blog.laravel.com">Blog</a>
|
|
||||||
<a href="https://nova.laravel.com">Nova</a>
|
|
||||||
<a href="https://forge.laravel.com">Forge</a>
|
|
||||||
<a href="https://github.com/laravel/laravel">GitHub</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Loading…
Reference in New Issue
Block a user