Skip to content

Commit

Permalink
Merge pull request rrze-mmz#185 from rrze-mmz/181-show-series-acls-on…
Browse files Browse the repository at this point in the history
…-series-public-page

Add acl information to series and clip pages
  • Loading branch information
stefanosgeo authored Nov 21, 2024
2 parents 593c60e + b7f9969 commit baffaca
Show file tree
Hide file tree
Showing 8 changed files with 139 additions and 107 deletions.
2 changes: 1 addition & 1 deletion app/Models/Series.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public function fetchClipsAcls(): string

//iterate every clip and get a unique acl name
return $clips->map(function ($clip) {
return $clip->acls->pluck('name');
return ($clip->acls->isEmpty()) ? \App\Enums\Acl::PUBLIC->lower() : $clip->acls->pluck('name');
})->flatten()->unique()->values()->implode(', ');
}

Expand Down
130 changes: 65 additions & 65 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions resources/views/backend/series/edit.blade.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
@extends('layouts.backend')

@section('content')
<div class="flex border-b border-black text-2xl flex-col dark:text-white dark:border-white font-normal">
<div class="font-semibold ">
<div class="flex border-b border-black flex-col dark:text-white dark:border-white font-normal">
<div class="font-semibold text-2xl">
{{ $series->title }} [ ID : {{ $series->id }}]
</div>
<div>
<span
class="text-sm font-normal italic"> {{ __('series.common.created at') }} {{$series->created_at }} </span>
<div class="py-4">
<span class="text-md font-normal italic">
- {{ __('common.metadata.accessible via') }} : {{$series->fetchClipsAcls() }} /
{{ __('series.common.created at') }} {{$series->created_at }}
</span>
</div>
</div>

Expand Down
Loading

0 comments on commit baffaca

Please sign in to comment.