[WIP] Refactor project

This commit is contained in:
Ludovic CANDELLIER
2021-05-21 00:21:05 +02:00
parent 4ce0fa942d
commit b50f50ea62
347 changed files with 14104 additions and 1608 deletions

View File

@@ -0,0 +1,31 @@
<div class="card{{ isset($tabs) ? ($outline ? ' card-outline card-outline-tabs' : ' card-tabs') : ($outline ? ' card-outline' : '') }} card-{{ $color ?? config('boilerplate.theme.card.default_color', 'info') }} bg-{{ $bgColor ?? 'white' }}{{ $collapsed ? ' collapsed-card' : '' }}{{ !empty($class) ? ' '.$class : '' }}"{!! empty($attributes) ? '' : ' '.$attributes !!}>
@if($title ?? false || $header ?? false || $tools ?? false || $maximize || $reduce || $close)
<div class="card-header{{ isset($tabs) ? ($outline ? ' p-0' : ' p-0 pt-1') : '' }} border-bottom-0">
@if($header ?? false)
{{ $header }}
@else
<h3 class="card-title">@lang($title ?? '')</h3>
@if($tools ?? false || $maximize || $reduce || $close)
<div class="card-tools">
@isset($tools)
{{ $tools ?? '' }}
@endisset
@if($maximize)
<button type="button" class="btn btn-tool" data-card-widget="maximize"><i class="fas fa-expand"></i></button>
@endif
@if($reduce)
<button type="button" class="btn btn-tool" data-card-widget="collapse"><i class="fas fa-{{ $collapsed ? 'plus' : 'minus' }}"></i></button>
@endif
@if($close)
<button type="button" class="btn btn-tool" data-card-widget="remove"><i class="fas fa-times"></i></button>
@endif
</div>
@endisset
@endif
</div>
@endif
<div class="card-body{{ $title ?? false ? ($outline ? ' pt-0' : '') : '' }}">{{ $slot }}</div>
@isset($footer)
<div class="card-footer">{{ $footer }}</div>
@endisset
</div>

View File

@@ -0,0 +1,3 @@
{!! Form::open($attributes ?? []) !!}
{{ $slot }}
{!! Form::close() !!}

View File

@@ -0,0 +1,6 @@
<div class="form-group{{ !empty($class) ? ' '.$class : '' }}">
<div class="icheck-{{ $color ?? 'primary' }}"{!! !empty($attributes) ? ' '.$attributes : '' !!}>
<input type="{{ $type ?? 'checkbox' }}" id="{{ $id }}"{{ $checked ? ' checked' : '' }}{{ $disabled ? ' disabled' : '' }}{!! !empty($name) ? ' name="'.$name.'"' : '' !!}{!! !empty($value) ? ' value="'.$value.'"' : '' !!}>
<label for="{{ $id }}" class="font-weight-normal">@lang($label ?? '')</label>
</div>
</div>

View File

@@ -0,0 +1,15 @@
<div class="info-box bg-{{ $bgColor ?? 'white' }}{{ !empty($class) ? ' '.$class : '' }}"{!! empty($attributes) ? '' : ' '.$attributes !!}>
<span class="info-box-icon bg-{{ $color ?? config('boilerplate.theme.card.default_color', 'info') }}">
<i class="{{ $icon ?? 'fas fa-cubes' }}"></i>
</span>
<div class="info-box-content">
<span class="info-box-text">@lang($text ?? '')</span>
<span class="info-box-number">{{ $number ?? '' }}</span>
@if(!empty($progress))
<div class="progress"><div class="progress-bar" style="width:{{ $progress ?? 0 }}%"></div></div>
@endif
@if(!empty($description))
<span class="progress-description">@lang($description ?? '')</span>
@endif
</div>
</div>

View File

@@ -0,0 +1,51 @@
@if(empty($name))
<code>
&lt;x-boilerplate::input>
The name attribute has not been set
</code>
@else
<div class="form-group">
@isset($label)
{{ Form::label($name, __($label)) }}
@endisset
@if($prepend || $prependText || $append || $appendText)
<div class="input-group">
@endif
@if($prepend || $prependText)
<div class="input-group-prepend">
@if($prepend)
{!! $prepend !!}
@else
<span class="input-group-text">{!! $prependText !!}</span>
@endif
</div>
@endif
@if($type === 'password')
{{ Form::password($name, array_merge(['class' => 'form-control'.$errors->first($name,' is-invalid').(isset($class) ? ' '.$class : '')], $attributes)) }}
@elseif($type === 'file')
{{ Form::file($name, array_merge(['class' => 'form-control-file'.$errors->first($name,' is-invalid').(isset($class) ? ' '.$class : '')], $attributes)) }}
@elseif($type === 'select')
{{ Form::select($name, $options ?? [], old($name, $value ?? ''), array_merge(['class' => 'form-control'.$errors->first($name,' is-invalid').(isset($class) ? ' '.$class : '')], $attributes)) }}
@else
{{ Form::{$type ?? 'text'}($name, old($name, $value ?? ''), array_merge(['class' => 'form-control'.$errors->first($name,' is-invalid').(isset($class) ? ' '.$class : '')], $attributes)) }}
@endif
@if($append || $appendText)
<div class="input-group-append">
@if($append)
{!! $append !!}
@else
<span class="input-group-text">{!! $appendText !!}</span>
@endif
</div>
@endif
@if($prepend || $prependText || $append || $appendText)
</div>
@endif
@if($help ?? false)
<small class="form-text text-muted">@lang($help)</small>
@endif
@error($name)
<div class="error-bubble"><div>{{ $message }}</div></div>
@enderror
</div>
@endif

View File

@@ -0,0 +1,47 @@
@if(empty($name))
<code>
&lt;x-boilerplate::select2>
The name attribute has not been set
</code>
@else
<div class="form-group">
@isset($label)
{{ Form::label($name, __($label)) }}
@endisset
<select id="{{ $id }}" name="{{ $name }}" class="form-control{{ $errors->first($name,' is-invalid') }}{{ isset($class) ? ' '.$class : '' }}"{!! !empty($attributes) ? ' '.$attributes : '' !!}>
@if(!isset($multiple))
<option></option>
@endif
{{ $slot }}
</select>
@if($help ?? false)
<small class="form-text text-muted">@lang($help)</small>
@endif
@error($name)
<div class="error-bubble"><div>{{ $message }}</div></div>
@enderror
</div>
@include('boilerplate::load.select2')
@push('js')
<script>
$(function () {
$('#{{ $id }}').select2({
placeholder: '{{ $placeholder ?? '' }}',
allowClear: {{ $allowClear }},
language: "{{ config('boilerplate.app.locale') }}",
direction: "@lang('boilerplate::layout.direction')",
minimumInputLength: {{ $minimumInputLength ?? 0 }},
minimumResultsForSearch: {{ $minimumResultsForSearch ?? 0 }},
width: '100%',
@isset($ajax)
ajax: {
delay: 200,
url: '{{ $ajax }}',
method: 'post'
}
@endisset
});
});
</script>
@endpush
@endif

View File

@@ -0,0 +1,12 @@
<div class="small-box bg-{{ $color ?? 'info' }}{{ !empty($class) ? ' '.$class : '' }}"{!! empty($attributes) ? '' : ' '.$attributes !!}>
<div class="inner">
<h3>{{ $nb ?? 0 }}</h3>
<p>@lang($text ?? '&nbsp;')</p>
</div>
<div class="icon"><i class="{{ $icon ?? 'fas fa-cubes' }}"></i></div>
@if(!empty($link))
<a href="{!! $link !!}" class="small-box-footer">
@lang($linkText ?? '') <i class="fas fa-arrow-circle-right"></i>
</a>
@endif
</div>

View File

@@ -0,0 +1,9 @@
<textarea id="{{ $id }}"{!! !empty($attributes) ? ' '.$attributes : '' !!}></textarea>
@if($hasMediaManager)
@include('boilerplate-media-manager::load.tinymce')
@else
@include('boilerplate::load.tinymce')
@endif
@push('js')
<script>$(function(){$('#{{ $id }}').tinymce({})});</script>
@endpush

View File

@@ -0,0 +1,6 @@
<div class="form-group{{ !empty($class) ? ' '.$class : '' }}">
<div class="custom-control custom-switch custom-switch-off-{{ $colorOff ?? 'light' }} custom-switch-on-{{ $colorOn ?? 'primary' }}"{!! !empty($attributes) ? ' '.$attributes : '' !!}>
<input type="{{ $type ?? 'checkbox' }}" class="custom-control-input" id="{{ $id }}"{{ $checked ? ' checked' : '' }}{!! !empty($name) ? ' name="'.$name.'"' : '' !!}{!! !empty($value) ? ' value="'.$value.'"' : '' !!}>
<label class="custom-control-label font-weight-normal" for="{{ $id }}">@lang($label ?? '')</label>
</div>
</div>