More work on displaying and editing an LDAP entry
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
<!-- $o=Attribute::class -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div id="{{ $o->name_lc }}">
|
||||
|
@@ -0,0 +1,18 @@
|
||||
<!-- $o=Binary\JpegPhoto::class -->
|
||||
<table class="table table-borderless p-0 m-0">
|
||||
<tr>
|
||||
@foreach ($o->values as $value)
|
||||
@switch ($x=$f->buffer($value,FILEINFO_MIME_TYPE))
|
||||
@case('image/jpeg')
|
||||
@default
|
||||
<td>
|
||||
<img class="jpegphoto" src="data:{{ $x }};base64, {{ base64_encode($value) }}" />
|
||||
|
||||
@if($edit)
|
||||
<br><span class="btn btn-sm btn-danger"><i class="fas fa-trash-alt"></i> @lang('Delete')</span>
|
||||
@endif
|
||||
</td>
|
||||
@endswitch
|
||||
@endforeach
|
||||
</tr>
|
||||
</table>
|
5
resources/views/components/attribute/internal.blade.php
Normal file
5
resources/views/components/attribute/internal.blade.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<!-- $o=Internal\Timestamp::class -->
|
||||
@foreach (old($o->name_lc,$o->values) as $value)
|
||||
@if($loop->index)<br>@endif
|
||||
{{ $value }}
|
||||
@endforeach
|
@@ -0,0 +1,5 @@
|
||||
<!-- $o=Internal\Timestamp::class -->
|
||||
@foreach (old($o->name_lc,$o->values) as $value)
|
||||
@if($loop->index)<br>@endif
|
||||
{{ \Carbon\Carbon::createFromTimestamp(strtotime($value))->format(config('ldap.datetime_format','Y-m-d H:i:s')) }}
|
||||
@endforeach
|
24
resources/views/components/attribute/objectclass.blade.php
Normal file
24
resources/views/components/attribute/objectclass.blade.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<!-- $o=Attribute::class -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div id="{{ $o->name_lc }}">
|
||||
@foreach (old($o->name_lc,$o->values) as $value)
|
||||
@if ($edit && ! $o->is_structural)
|
||||
<input class="form-control mb-1 @if($x=($o->values->search($value) === FALSE)) border-danger @endif" type="text" name="{{ $o->name_lc }}[]" value="{{ $value }}" @if($x)placeholder="{{ Arr::get($o->values,$loop->index) }}"@endif>
|
||||
@else
|
||||
{{ $value }}@if ($o->is_structural)@lang('structural')@endif<br>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6 col-lg-4">
|
||||
@if($o->is_rdn)
|
||||
<span class="btn btn-sm btn-outline-focus mt-3 mb-3"><i class="fas fa-fw fa-exchange"></i> {{ __('Rename') }}</span>
|
||||
@elseif($edit && $o->can_addvalues)
|
||||
<div class="p-0 m-0 addable" id="{{ $o->name_lc }}">
|
||||
<span class="btn btn-sm btn-outline-primary mt-3 mb-3"><i class="fas fa-fw fa-plus"></i> {{ __('Add Value') }}</span>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
18
resources/views/components/attribute/password.blade.php
Normal file
18
resources/views/components/attribute/password.blade.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<!-- $o=Password::class -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div id="{{ $o->name_lc }}">
|
||||
@foreach (old($o->name_lc,$o->values) as $value)
|
||||
@if ($edit)
|
||||
<input type="password" class="form-control mb-1 @if($x=($o->values->search($value) === FALSE)) border-danger @endif" type="text" name="{{ $o->name_lc }}[]" value="{{ str_repeat('*',10) }}">
|
||||
@else
|
||||
{{ $value }}<br>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6 col-lg-4">
|
||||
<span class="btn btn-sm btn-outline-dark mt-3 mb-3"><i class="fas fa-user-check"></i> @lang('Check Password')</span>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,9 @@
|
||||
{!! $o->values
|
||||
->transform(function($item) use ($o) {
|
||||
return sprintf('<abbr class="pb-1" title="%s"><i class="fas fa-book pe-2"></i>%s</abbr>%s<p class="mb-0">%s</p>',
|
||||
$item,
|
||||
$o->get($item,'title'),
|
||||
($x=$o->get($item,'ref')) ? sprintf('<abbr class="ps-2" title="%s"><i class="fas fa-comment-dots"></i></abbr>',$x) : '',
|
||||
$o->get($item,'desc'),
|
||||
);
|
||||
})->join('<br>') !!}
|
11
resources/views/components/attribute/schema/oid.blade.php
Normal file
11
resources/views/components/attribute/schema/oid.blade.php
Normal file
@@ -0,0 +1,11 @@
|
||||
{!! $o->values
|
||||
->transform(function($item) use ($o) {
|
||||
return preg_match('/[0-9]+\.[0-9]+\.[0-9]+/',$item)
|
||||
? sprintf('<abbr class="pb-1" title="%s"><i class="fas fa-list-ol pe-2"></i>%s</abbr>%s<p class="mb-0">%s</p>',
|
||||
$item,
|
||||
$o->get($item,'title'),
|
||||
($x=$o->get($item,'ref')) ? sprintf('<abbr class="ps-2" title="%s"><i class="fas fa-comment-dots"></i></abbr>',$x) : '',
|
||||
$o->get($item,'desc'),
|
||||
)
|
||||
: $item;
|
||||
})->join('<br>') !!}
|
@@ -3,7 +3,7 @@
|
||||
@section('page_title')
|
||||
<table class="table table-borderless">
|
||||
<tr>
|
||||
<td class="{{ ($x=Arr::get($o->getAttributes(),'jpegphoto')) ? 'border' : '' }}" rowspan="2">{!! $x ?: sprintf('<div class="page-title-icon f32"><i class="%s"></i></div>',$o->icon() ?? "fas fa-info") !!}</td>
|
||||
<td class="{{ ($x=Arr::get($o->getAttributes(),'jpegphoto')) ? 'border' : '' }}" rowspan="2">{!! $x ? $x->render() : sprintf('<div class="page-title-icon f32"><i class="%s"></i></div>',$o->icon() ?? "fas fa-info") !!}</td>
|
||||
<td class="text-end align-text-top p-0 {{ $x ? 'ps-5' : 'pt-2' }}"><strong>{{ $dn }}</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -11,11 +11,11 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td class="p-1 m-1">Created</td>
|
||||
<th class="p-1 m-1">{{ ($x=Arr::get($o->getAttributes(),'createtimestamp')) ? $x : __('Unknown') }} [{{ ($x=Arr::get($o->getAttributes(),'creatorsname')) ? $x : __('Unknown') }}]</th>
|
||||
<th class="p-1 m-1">{{ ($x=Arr::get($o->getAttributes(),'createtimestamp')) ? $x->render() : __('Unknown') }} [{{ ($x=Arr::get($o->getAttributes(),'creatorsname')) ? $x->render() : __('Unknown') }}]</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="p-1 m-1">Modified</td>
|
||||
<th class="p-1 m-1">{{ ($x=Arr::get($o->getAttributes(),'modifytimestamp')) ? $x : __('Unknown') }} [{{ ($x=Arr::get($o->getAttributes(),'modifiersname')) ? $x : __('Unknown') }}]</th>
|
||||
<th class="p-1 m-1">{{ ($x=Arr::get($o->getAttributes(),'modifytimestamp')) ? $x->render() : __('Unknown') }} [{{ ($x=Arr::get($o->getAttributes(),'modifiersname')) ? $x->render() : __('Unknown') }}]</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="p-1 m-1">UUID</td>
|
||||
|
@@ -19,7 +19,9 @@
|
||||
? sprintf('<a class="attributetype" id="strtolower(%s)" href="%s">%s</a>',$x->name_lc,url('schema/attributetypes',$x->name_lc),$x->name)
|
||||
: $attribute !!}
|
||||
</th>
|
||||
<td>{!! $ao !!}</td>
|
||||
<td>
|
||||
<x-attribute :edit="false" :o="$ao"/>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
|
Reference in New Issue
Block a user