diff --git a/app/Classes/LDAP/Attribute.php b/app/Classes/LDAP/Attribute.php
index 9b027d1..4cab883 100644
--- a/app/Classes/LDAP/Attribute.php
+++ b/app/Classes/LDAP/Attribute.php
@@ -144,16 +144,6 @@ class Attribute
};
}
- /**
- * Determine how we render this attribute's value
- *
- * @return string
- */
- public function __toString(): string
- {
- return $this->values->join('
');
- }
-
/**
* Return the hints about this attribute, ie: RDN, Required, etc
*
@@ -182,7 +172,13 @@ class Attribute
return $result->toArray();
}
- public function render(bool $edit): View
+ /**
+ * Display the attribute value
+ *
+ * @param bool $edit
+ * @return View
+ */
+ public function render(bool $edit=FALSE): View
{
return view('components.attribute')
->with('edit',$edit)
diff --git a/app/Classes/LDAP/Attribute/Binary/JpegPhoto.php b/app/Classes/LDAP/Attribute/Binary/JpegPhoto.php
index f93621d..e86dabc 100644
--- a/app/Classes/LDAP/Attribute/Binary/JpegPhoto.php
+++ b/app/Classes/LDAP/Attribute/Binary/JpegPhoto.php
@@ -2,6 +2,8 @@
namespace App\Classes\LDAP\Attribute\Binary;
+use Illuminate\Contracts\View\View;
+
use App\Classes\LDAP\Attribute\Binary;
/**
@@ -16,26 +18,11 @@ final class JpegPhoto extends Binary
$this->internal = FALSE;
}
- public function __toString(): string
+ public function render(bool $edit=FALSE): View
{
- // We'll use finfo to try and figure out what type of image is stored
- $f = new \finfo;
-
- $result = '
%s | ', - $x, - base64_encode($value), - $this->is_deletable ? sprintf('
%s
', - $item, - static::get($item,'title'), - ($x=static::get($item,'ref')) ? sprintf('',$x) : '', - static::get($item,'desc'), - ); - - return $format; - })->join('%s
', - $item, - static::get($item,'title'), - ($x=static::get($item,'ref')) ? sprintf('',$x) : '', - static::get($item,'desc'), - ); - - return $format; - - } else - return $item; - })->join('
+
+
+ @if($edit)
+ @lang('Delete') + @endif + |
+ @endswitch
+ @endforeach
+
%s
', + $item, + $o->get($item,'title'), + ($x=$o->get($item,'ref')) ? sprintf('',$x) : '', + $o->get($item,'desc'), + ); + })->join('%s
', + $item, + $o->get($item,'title'), + ($x=$o->get($item,'ref')) ? sprintf('',$x) : '', + $o->get($item,'desc'), + ) + : $item; + })->join('{!! $x ?: sprintf(' | + ',$o->icon() ?? "fas fa-info") !!}{!! $x ? $x->render() : sprintf(' | ',$o->icon() ?? "fas fa-info") !!}{{ $dn }} | ||||||
Created | -{{ ($x=Arr::get($o->getAttributes(),'createtimestamp')) ? $x : __('Unknown') }} [{{ ($x=Arr::get($o->getAttributes(),'creatorsname')) ? $x : __('Unknown') }}] | +{{ ($x=Arr::get($o->getAttributes(),'createtimestamp')) ? $x->render() : __('Unknown') }} [{{ ($x=Arr::get($o->getAttributes(),'creatorsname')) ? $x->render() : __('Unknown') }}] |
---|---|---|
Modified | -{{ ($x=Arr::get($o->getAttributes(),'modifytimestamp')) ? $x : __('Unknown') }} [{{ ($x=Arr::get($o->getAttributes(),'modifiersname')) ? $x : __('Unknown') }}] | +{{ ($x=Arr::get($o->getAttributes(),'modifytimestamp')) ? $x->render() : __('Unknown') }} [{{ ($x=Arr::get($o->getAttributes(),'modifiersname')) ? $x->render() : __('Unknown') }}] |
UUID | diff --git a/resources/views/frames/info.blade.php b/resources/views/frames/info.blade.php index ce89771..353601f 100644 --- a/resources/views/frames/info.blade.php +++ b/resources/views/frames/info.blade.php @@ -19,7 +19,9 @@ ? sprintf('%s',$x->name_lc,url('schema/attributetypes',$x->name_lc),$x->name) : $attribute !!} -{!! $ao !!} | +
+ |