Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
4b541857d7 | |||
4e9bdca2f5 | |||
e0333e352a | |||
f44d780e19 | |||
46df11f087 | |||
dc8983aa91 | |||
|
9db703d88f | ||
|
05d3caddf4 | ||
|
e3ebef90d9 | ||
|
d494400e7e |
@@ -1,37 +1,33 @@
|
|||||||
{
|
{
|
||||||
"name": "leenooks/laravel",
|
"name": "laravel/leenooks",
|
||||||
"description": "Leenooks standard templates and tools.",
|
"description": "Leenooks standard templates and tools.",
|
||||||
"keywords": ["laravel", "leenooks"],
|
"keywords": ["laravel","leenooks"],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Deon George",
|
"name": "Deon George",
|
||||||
"email": "deon@leenooks.net"
|
"email": "deon@dege.au"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"creativeorange/gravatar": "^1.0",
|
},
|
||||||
"orchestra/asset": "^6.0"
|
"require-dev": {
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"autoload": {
|
||||||
},
|
"psr-4": {
|
||||||
"autoload": {
|
"Leenooks\\": "src"
|
||||||
"psr-4": {
|
},
|
||||||
"Leenooks\\": "src"
|
"files": [
|
||||||
},
|
"src/helpers.php"
|
||||||
"files": [
|
]
|
||||||
"src/helpers.php"
|
},
|
||||||
]
|
"extra": {
|
||||||
},
|
"laravel": {
|
||||||
"extra": {
|
"providers": [
|
||||||
"laravel": {
|
"Leenooks\\Providers\\LeenooksServiceProvider",
|
||||||
"providers": [
|
"Leenooks\\Providers\\CustomBladeServiceProvider"
|
||||||
"Orchestra\\Asset\\AssetServiceProvider",
|
]
|
||||||
"Collective\\Html\\HtmlServiceProvider",
|
}
|
||||||
"Leenooks\\Providers\\LeenooksServiceProvider",
|
},
|
||||||
"Leenooks\\Providers\\CustomBladeServiceProvider"
|
"minimum-stability": "dev"
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"minimum-stability": "dev"
|
|
||||||
}
|
}
|
||||||
|
@@ -39,9 +39,6 @@
|
|||||||
@section('scripts')
|
@section('scripts')
|
||||||
@include('adminlte::layouts.partials.scripts')
|
@include('adminlte::layouts.partials.scripts')
|
||||||
|
|
||||||
{{-- Scripts --}}
|
|
||||||
{!! Asset::scripts() !!}
|
|
||||||
|
|
||||||
@yield('page-scripts')
|
@yield('page-scripts')
|
||||||
@show
|
@show
|
||||||
</body>
|
</body>
|
||||||
|
@@ -41,9 +41,6 @@
|
|||||||
<![endif]-->
|
<![endif]-->
|
||||||
--}}
|
--}}
|
||||||
|
|
||||||
<!-- STYLESHEETS -->
|
|
||||||
{!! Asset::styles() !!}
|
|
||||||
|
|
||||||
@yield('page-styles')
|
@yield('page-styles')
|
||||||
|
|
||||||
@if(file_exists('css/fixes.css'))
|
@if(file_exists('css/fixes.css'))
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
<div class="user-panel mt-3 pb-3 mb-3 d-flex">
|
<div class="user-panel mt-3 pb-3 mb-3 d-flex">
|
||||||
<div class="image">
|
<div class="image">
|
||||||
@if(isset($user) AND $user->exists)
|
@if(isset($user) AND $user->exists)
|
||||||
<img src="{{ Gravatar::get(($user->exists AND $user->email) ? $user->email : 'nobody@example.com') }}" class="img-circle elevation-2" alt="User">
|
<i class="fa fa-fw fa-2x fa-user text-white"></i>
|
||||||
@else
|
@else
|
||||||
<a name="login" href="{{ url()->current().'?login=1' }}" class="d-block"><i class="pl-1 fas fa-lock fa-2x"></i></a>
|
<a name="login" href="{{ url()->current().'?login=1' }}" class="d-block"><i class="pl-1 fas fa-lock fa-2x"></i></a>
|
||||||
@endif
|
@endif
|
||||||
|
@@ -1,9 +1,12 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="{{ $id }}">{{ $label }}</label>
|
<label for="{{ $id }}">{{ $label }}</label>
|
||||||
<div class="input-group">
|
<div class="input-group has-validation">
|
||||||
<div class="input-group-prepend">
|
@empty($icon)
|
||||||
<span class="input-group-text"><i class="fa-fw {{ $icon ?? 'fas fa-calendar' }}"></i></span>
|
@else
|
||||||
</div>
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa-fw {{ $icon }}"></i></span>
|
||||||
|
</div>
|
||||||
|
@endempty()
|
||||||
<input type="date" class="form-control @error($id) is-invalid @enderror" id="{{ $id }}" name="{{ $name ?? $id}}" value="{{ old($old,$value) }}">
|
<input type="date" class="form-control @error($id) is-invalid @enderror" id="{{ $id }}" name="{{ $name ?? $id}}" value="{{ old($old,$value) }}">
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@error($id)
|
@error($id)
|
||||||
|
39
resources/themes/adminlte/views/widget/form_file.blade.php
Normal file
39
resources/themes/adminlte/views/widget/form_file.blade.php
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
<div class="form-group">
|
||||||
|
<label for="{{ $id }}">{{ $label }}</label>
|
||||||
|
<div class="input-group has-validation">
|
||||||
|
@empty($icon)
|
||||||
|
@else
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa-fw {{ $icon }}"></i></span>
|
||||||
|
</div>
|
||||||
|
@endempty()
|
||||||
|
<div class="custom-file">
|
||||||
|
<input type="file" class="custom-file-input @error($id) is-invalid @enderror" id="{{ $id }}" name="{{ $name ?? $id}}">
|
||||||
|
<label class="custom-file-label input-group-text" for="{{ $id }}">Choose file</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{--
|
||||||
|
<div class="input-group-append">
|
||||||
|
<button type="submit" class="input-group-text btn btn-success" id="">Upload</button>
|
||||||
|
</div>
|
||||||
|
--}}
|
||||||
|
<span class="invalid-feedback @error($id) d-block @enderror" role="alert">
|
||||||
|
@error($id)
|
||||||
|
{{ $message }}
|
||||||
|
@enderror
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@section('page-scripts')
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#{{ $id }}').on('change',function(){
|
||||||
|
//get the file name
|
||||||
|
var fileName = $(this).val();
|
||||||
|
//replace the "Choose a file" label
|
||||||
|
$(this).next('.custom-file-label').html(fileName);
|
||||||
|
})
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
@append
|
@@ -1,18 +1,32 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="{{ $id }}">{{ $label }}</label>
|
<label for="{{ $id }}">{{ $label }}</label>
|
||||||
<div class="input-group">
|
<div class="input-group has-validation">
|
||||||
<div class="input-group-prepend">
|
@empty($icon)
|
||||||
<span class="input-group-text"><i class="fa-fw {{ $icon ?? 'fas fa-list' }}"></i></span>
|
@else
|
||||||
</div>
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa-fw {{ $icon }}"></i></span>
|
||||||
|
</div>
|
||||||
|
@endempty()
|
||||||
|
|
||||||
<select class="form-control @error($id) is-invalid @enderror" id="{{ $id }}" name="{{ $name ?? $id}}">
|
<select class="form-control @error($id) is-invalid @enderror" id="{{ $id }}" name="{{ $name ?? $id}}">
|
||||||
@if(! isset($addvalues) || ! $addvalues)
|
@if(! isset($addvalues) || ! $addvalues)
|
||||||
<option id="new"></option>
|
<option id="new"></option>
|
||||||
@endif
|
@endif
|
||||||
@foreach($options as $option)
|
@empty($groupby)
|
||||||
@empty(Arr::get($option,'value')) @continue @endempty
|
@foreach($options as $option)
|
||||||
<option value="{{ Arr::get($option,'id') }}" @if(Arr::get($option,'id') == old($old,$value))selected @endif>{{ Arr::get($option,'value') }}</option>
|
@empty(Arr::get($option,'value')) @continue @endempty
|
||||||
@endforeach
|
<option value="{{ Arr::get($option,'id') }}" @if(Arr::get($option,'id') == old($old,$value))selected @endif>{{ Arr::get($option,'value') }}</option>
|
||||||
|
@endforeach
|
||||||
|
@else
|
||||||
|
@foreach($options->groupBy($groupby) as $group)
|
||||||
|
<optgroup label="{{ $groupby == 'active' ? (Arr::get($group->first(),$groupby) ? 'Active' : 'Not Active') : Arr::get($group->first(),$groupby) }}">
|
||||||
|
@foreach($group as $option)
|
||||||
|
@empty(Arr::get($option,'value')) @continue @endempty
|
||||||
|
<option value="{{ Arr::get($option,'id') }}" @if(Arr::get($option,'id') == old($old,$value))selected @endif>{{ Arr::get($option,'value') }}</option>
|
||||||
|
@endforeach
|
||||||
|
</optgroup>
|
||||||
|
@endforeach
|
||||||
|
@endempty
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
|
@@ -1,14 +1,17 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="{{ $id }}">{{ $label }}</label>
|
<label for="{{ $id }}">{{ $label }}</label>
|
||||||
<div class="input-group">
|
<div class="input-group has-validation">
|
||||||
<div class="input-group-prepend">
|
@empty($icon)
|
||||||
<span class="input-group-text"><i class="fa-fw {{ $icon }}"></i></span>
|
@else
|
||||||
</div>
|
<div class="input-group-prepend">
|
||||||
<input type="text" class="form-control @error($id) is-invalid @enderror" id="{{ $id }}" name="{{ $name ?: $id}}" value="{{ old($old ?? $name,$value) }}">
|
<span class="input-group-text"><i class="fa-fw {{ $icon }}"></i></span>
|
||||||
|
</div>
|
||||||
|
@endempty()
|
||||||
|
<input type="text" class="form-control {{ $classes ?? ''}}@error($id) is-invalid @enderror" id="{{ $id }}" name="{{ $name ?: $id }}" value="{{ old($old ?? $name,$value) }}">
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@error($id)
|
@error($id)
|
||||||
{{ $message }}
|
{{ $message }}
|
||||||
@enderror
|
@enderror
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
11
resources/themes/adminlte/views/widget/form_toggle.blade.php
Normal file
11
resources/themes/adminlte/views/widget/form_toggle.blade.php
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<div class="form-group">
|
||||||
|
<div class="custom-control custom-switch custom-switch-off-danger custom-switch-on-success">
|
||||||
|
<input type="checkbox" class="custom-control-input" id="{{ $id }}" name="{{ $name ?: $id }}" {{ old($old ?? $name,$value) ? 'checked' : '' }}>
|
||||||
|
<label class="custom-control-label" for="{{ $id }}">{{ $label }}</label>
|
||||||
|
</div>
|
||||||
|
<span class="invalid-feedback @error($id) d-block @enderror" role="alert">
|
||||||
|
@error($id)
|
||||||
|
{{ $message }}
|
||||||
|
@enderror
|
||||||
|
</span>
|
||||||
|
</div>
|
@@ -0,0 +1 @@
|
|||||||
|
@if(session()->has('success'))<span class="ml-3 pt-0 pb-0 pr-1 pl-1 btn btn-outline-success float-right"><small>{{ session()->get('success') }}</small></span>@endif
|
@@ -38,9 +38,6 @@
|
|||||||
@section('scripts')
|
@section('scripts')
|
||||||
@include('architect::layouts.partials.scripts')
|
@include('architect::layouts.partials.scripts')
|
||||||
|
|
||||||
{{-- Scripts --}}
|
|
||||||
{!! Asset::scripts() !!}
|
|
||||||
|
|
||||||
@yield('page-scripts')
|
@yield('page-scripts')
|
||||||
@show
|
@show
|
||||||
</body>
|
</body>
|
||||||
|
@@ -12,9 +12,6 @@
|
|||||||
@section('scripts')
|
@section('scripts')
|
||||||
@include('architect::auth.partials.scripts')
|
@include('architect::auth.partials.scripts')
|
||||||
|
|
||||||
{{-- Scripts --}}
|
|
||||||
{!! Asset::scripts() !!}
|
|
||||||
|
|
||||||
@yield('page-scripts')
|
@yield('page-scripts')
|
||||||
@show
|
@show
|
||||||
</body>
|
</body>
|
||||||
|
@@ -35,9 +35,6 @@
|
|||||||
<link rel="stylesheet" href="{{ asset('/css/print.css') }}">
|
<link rel="stylesheet" href="{{ asset('/css/print.css') }}">
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<!-- STYLESHEETS -->
|
|
||||||
{!! Asset::styles() !!}
|
|
||||||
|
|
||||||
<!-- Theme style -->
|
<!-- Theme style -->
|
||||||
<link rel="stylesheet" href="{{ asset('/css/architect.min.css') }}">
|
<link rel="stylesheet" href="{{ asset('/css/architect.min.css') }}">
|
||||||
|
|
||||||
|
@@ -38,9 +38,6 @@
|
|||||||
@section('scripts')
|
@section('scripts')
|
||||||
@include('metronic::layouts.partials.scripts')
|
@include('metronic::layouts.partials.scripts')
|
||||||
|
|
||||||
{{-- Scripts --}}
|
|
||||||
{!! Asset::scripts() !!}
|
|
||||||
|
|
||||||
@yield('page-scripts')
|
@yield('page-scripts')
|
||||||
@show
|
@show
|
||||||
</body>
|
</body>
|
||||||
|
@@ -14,10 +14,10 @@
|
|||||||
--}}
|
--}}
|
||||||
|
|
||||||
<!-- Theme style -->
|
<!-- Theme style -->
|
||||||
@themecss('/css/components.css','components-css')
|
<link rel="stylesheet" href="{{ asset('theme/frontend/metronic/css/components.css') }}">
|
||||||
@themecss('/css/style.css','style-css')
|
<link rel="stylesheet" href="{{ asset('theme/frontend/metronic/css/style.css') }}">
|
||||||
@themecss('/css/style-responsive.css','style-responsive-css')
|
<link rel="stylesheet" href="{{ asset('theme/frontend/metronic/css/style-responsive.css') }}">
|
||||||
@themecss('/css/themes/blue.css','theme-blue-css')
|
<link rel="stylesheet" href="{{ asset('theme/frontend/metronic/css/themes/blue.css') }}">
|
||||||
|
|
||||||
<!-- Google Font: Source Sans Pro -->
|
<!-- Google Font: Source Sans Pro -->
|
||||||
<link href="//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700|PT+Sans+Narrow|Source+Sans+Pro:200,300,400,600,700,900&subset=all" rel="stylesheet" type="text/css">
|
<link href="//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700|PT+Sans+Narrow|Source+Sans+Pro:200,300,400,600,700,900&subset=all" rel="stylesheet" type="text/css">
|
||||||
@@ -32,10 +32,7 @@
|
|||||||
<link rel="shortcut icon" href="{{ object_get($site,'favicon','favicon.ico') }}" />
|
<link rel="shortcut icon" href="{{ object_get($site,'favicon','favicon.ico') }}" />
|
||||||
|
|
||||||
<!-- Custom CSS -->
|
<!-- Custom CSS -->
|
||||||
@php(Asset::add('custom-css','/css/custom.css'))
|
<link rel="stylesheet" href="{{ asset('theme/frontend/metronic/css/custom.css') }}">
|
||||||
|
|
||||||
<!-- STYLESHEETS -->
|
|
||||||
{!! Asset::styles() !!}
|
|
||||||
|
|
||||||
@yield('page-styles')
|
@yield('page-styles')
|
||||||
</head>
|
</head>
|
@@ -18,5 +18,5 @@
|
|||||||
|
|
||||||
@if(file_exists('js/custom.js'))
|
@if(file_exists('js/custom.js'))
|
||||||
<!-- Any Custom JS -->
|
<!-- Any Custom JS -->
|
||||||
<script src="{{ asset('js/custom.js') }}"></script>
|
<script type="text/javascript" src="{{ asset('js/custom.js') }}"></script>
|
||||||
@endif
|
@endif
|
@@ -13,7 +13,7 @@ class Carbon extends CarbonBase
|
|||||||
{
|
{
|
||||||
const MONTHS_PER_HALF = 6;
|
const MONTHS_PER_HALF = 6;
|
||||||
|
|
||||||
public function __get($name)
|
public function __get(string $name): mixed
|
||||||
{
|
{
|
||||||
switch ($name) {
|
switch ($name) {
|
||||||
case 'half':
|
case 'half':
|
||||||
@@ -57,7 +57,7 @@ class Carbon extends CarbonBase
|
|||||||
*
|
*
|
||||||
* @return static
|
* @return static
|
||||||
*/
|
*/
|
||||||
public function startOfHalf($dayOfWeek = null)
|
public function startOfHalf(int $dayOfWeek=NULL)
|
||||||
{
|
{
|
||||||
return $this->setDate($this->year, $this->half * static::MONTHS_PER_HALF - 5, 1)->firstOfMonth($dayOfWeek);
|
return $this->setDate($this->year, $this->half * static::MONTHS_PER_HALF - 5, 1)->firstOfMonth($dayOfWeek);
|
||||||
}
|
}
|
||||||
@@ -72,7 +72,7 @@ class Carbon extends CarbonBase
|
|||||||
*
|
*
|
||||||
* @return static
|
* @return static
|
||||||
*/
|
*/
|
||||||
public function endOfHalf($dayOfWeek = null)
|
public function endOfHalf(int $dayOfWeek=NULL)
|
||||||
{
|
{
|
||||||
return $this->setDate($this->year, $this->half * static::MONTHS_PER_HALF, 1)->lastOfMonth($dayOfWeek);
|
return $this->setDate($this->year, $this->half * static::MONTHS_PER_HALF, 1)->lastOfMonth($dayOfWeek);
|
||||||
}
|
}
|
||||||
|
@@ -146,6 +146,14 @@ class CustomBladeServiceProvider extends ServiceProvider
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'debounce':
|
||||||
|
switch ($content) {
|
||||||
|
case 'js':
|
||||||
|
$urls->put($type,'js/debounce.js');
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
case 'highcharts':
|
case 'highcharts':
|
||||||
switch ($content) {
|
switch ($content) {
|
||||||
case 'js':
|
case 'js':
|
||||||
@@ -172,13 +180,23 @@ class CustomBladeServiceProvider extends ServiceProvider
|
|||||||
$urls->put($key,'https://code.highcharts.com/modules/drilldown.js');
|
$urls->put($key,'https://code.highcharts.com/modules/drilldown.js');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'export':
|
||||||
|
$urls->put($key,'https://code.highcharts.com/modules/exporting.js');
|
||||||
|
$urls->put($key.'data','https://code.highcharts.com/modules/export-data.js');
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'funnel':
|
||||||
|
$urls->put($key,'https://code.highcharts.com/modules/funnel.js');
|
||||||
|
break;
|
||||||
|
|
||||||
case 'heatmap':
|
case 'heatmap':
|
||||||
$urls->put($key,'https://code.highcharts.com/modules/heatmap.js');
|
$urls->put($key,'https://code.highcharts.com/modules/heatmap.js');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'export':
|
case 'solidguage':
|
||||||
$urls->put($key,'https://code.highcharts.com/modules/exporting.js');
|
$urls->put($key,'https://code.highcharts.com/highcharts-more.js');
|
||||||
$urls->put($key.'data','https://code.highcharts.com/modules/export-data.js');
|
$urls->put($key.'accessiblity','https://code.highcharts.com/modules/accessibility.js');
|
||||||
|
$urls->put($key.'solid-guage','https://code.highcharts.com/modules/solid-gauge.js');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'theme-dark':
|
case 'theme-dark':
|
||||||
@@ -275,6 +293,16 @@ class CustomBladeServiceProvider extends ServiceProvider
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'validation':
|
||||||
|
switch ($content) {
|
||||||
|
case 'js':
|
||||||
|
// Base
|
||||||
|
$urls->put('validate','https://cdn.jsdelivr.net/npm/jquery-validation@1.19.3/dist/jquery.validate.min.js');
|
||||||
|
$urls->put('validate.additional','https://cdn.jsdelivr.net/npm/jquery-validation@1.19.3/dist/additional-methods.min.js');
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new \Exception(sprintf('Unknown Expression: [%s]',$expression));
|
throw new \Exception(sprintf('Unknown Expression: [%s]',$expression));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user