Ideenbox-Moderation und Wochenüberblick per E-Mail (0.36.0)
Some checks failed
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 6m49s
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 7m19s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 7m29s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 7m39s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 9m38s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 9m25s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 7m57s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 8m4s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 46s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m9s
Some checks failed
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 6m49s
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 7m19s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 7m29s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 7m39s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 9m38s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 9m25s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 7m57s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 8m4s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 46s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m9s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
11c5ef5baf
commit
f9922f7308
172 changed files with 1524 additions and 363 deletions
|
|
@ -3,6 +3,7 @@
|
|||
namespace Inhaus\Plugins\Umfragen;
|
||||
|
||||
use App\Dashboard\Widgets;
|
||||
use App\Digest\Digest;
|
||||
use App\Editorial\Editorial;
|
||||
use App\Models\User;
|
||||
use App\Pagebuilder\Blocks;
|
||||
|
|
@ -19,6 +20,15 @@ class UmfragenPlugin extends Plugin
|
|||
public function register(): void
|
||||
{
|
||||
$this->app->make(Navigation::class)->add('umfragen', 'Umfragen', '/umfragen', active: 'polls.*', sort: 74);
|
||||
$this->app->make(Digest::class)->add('umfragen', 'Ihre Meinung ist gefragt', 30, fn (User $user) => Poll::query()
|
||||
->open()->visibleTo($user)->latest('published_at')->limit(10)->get()
|
||||
->reject(fn (Poll $poll) => $poll->hasVoted($user))->take(5)
|
||||
->map(fn (Poll $poll) => [
|
||||
'title' => $poll->title,
|
||||
'url' => route('polls.show', $poll),
|
||||
'meta' => $poll->closes_at ? 'Umfrage bis '.$poll->closes_at->timezone(config('app.timezone'))->format('d.m.') : 'Umfrage',
|
||||
])->values()->all());
|
||||
|
||||
$this->app->make(Abilities::class)->define('polls.manage', 'Umfragen anlegen und auswerten', 'Umfragen', portal: true);
|
||||
|
||||
$this->app->make(Editorial::class)->add('umfragen', 'Umfragen', 'umfragen::EditorialPolls', 32,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue