Move langtag rendering from dn/Entry into Attribute - more enhancements for #16,

Reduce use of style= tags,
Cosmetic layout changes,
Layout change to enable rendering template views,
<attribute> id tags are now lowecase
This commit is contained in:
2025-06-01 10:39:27 +10:00
parent bd40ab0e84
commit d623f3c26d
43 changed files with 311 additions and 249 deletions

View File

@@ -1,12 +1,13 @@
<div id="newattrs"></div>
<hr class="opacity-05">
<!-- Add new attributes -->
<div class="row">
<div class="col-12 col-sm-1 col-md-2"></div>
<div class="col-12 col-sm-10 col-md-8">
<div class="d-none" id="newattr-select">
<div class="col-12 offset-lg-1 col-lg-10">
<div class="d-none round" id="newattr-select">
<div class="row">
<div class="col-12 bg-dark text-light p-2">
<div class="col-12 bg-dark text-light p-2 rounded-2">
<i class="fas fa-plus-circle"></i> Add New Attribute
</div>
</div>

View File

@@ -1,3 +1,5 @@
@use(App\Ldap\Entry)
<table class="table table-borderless">
<tr class="border-bottom line-height-2">
<td class="p-1 pt-0" rowspan="2">
@@ -6,7 +8,7 @@
<td class="text-end align-bottom pb-0 mb-0 pt-2 pe-3 {{ $x ? 'ps-3' : '' }}"><strong class="user-select-all">{{ $o->getDn() }}</strong></td>
</tr>
<tr>
<td class="align-bottom" style="font-size: 55%" colspan="2">
<td class="align-bottom font-size-xs" colspan="2">
<table class="table table-condensed table-borderless w-100">
<tr class="mt-1">
<td class="p-0 pe-2">Created</td>
@@ -26,10 +28,17 @@
<x-attribute :o="$o->getObject('entryuuid')"/>
</th>
</tr>
@if($langtags->count())
<!-- It is assumed that langtags contains at least Entry::TAG_NOTAG -->
@if(($x=$o->getLangTags()
->flatMap(fn($item)=>$item->values())
->unique()
->sort()
->filter(fn($item)=>($item !== Entry::TAG_NOTAG))
->map(fn($item)=>preg_replace('/'.Entry::LANG_TAG_PREFIX.'/','',$item)))
->count())
<tr class="mt-1">
<td class="p-0 pe-2">Tags</td>
<th class="p-0">{{ $langtags->join(', ') }}</th>
<th class="p-0">{{ $x->join(', ') }}</th>
</tr>
@endif
</table>