Mache die Übernahme aus Shinkan auffindbar und zeige den Zustand der Anbindung
CI Feature / test (push) Successful in 2m25s
CI Feature / test (push) Successful in 2m25s
Die Übungsliste verweist mit „Aus Shinkan übernehmen“ auf die Übernahmeseite. Die Seite zeigt Adresse (nur Host) und Schlüssel (nur ob hinterlegt) und prüft die Verbindung, ohne etwas zu übernehmen. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
881703ba0e
commit
bc140a0e83
5 files changed
+117
-7
No files matched your search
@@ -4,6 +4,7 @@
|
||||
|
||||
use App\Domain\Catalog\CompositionKind;
|
||||
use App\Domain\Catalog\ContentService;
|
||||
use App\Filament\Pages\Uebernahme;
|
||||
use App\Filament\Resources\ContentElements\ContentElementResource;
|
||||
use App\Filament\Support\ListsCompositions;
|
||||
use App\Filament\Support\ReportsDomainRules;
|
||||
@@ -55,6 +56,18 @@ public function content(Schema $schema): Schema
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
if ($this->kind() === CompositionKind::Exercise) {
|
||||
return [
|
||||
$this->createCompositionAction($this->kind()),
|
||||
Action::make('shinkan')
|
||||
->label('Aus Shinkan übernehmen')
|
||||
->icon('heroicon-o-arrow-down-tray')
|
||||
->color('gray')
|
||||
->visible(fn (): bool => ContentElementResource::editor())
|
||||
->url(fn (): string => Uebernahme::getUrl()),
|
||||
];
|
||||
}
|
||||
|
||||
if ($this->onDesk()) {
|
||||
return [$this->createCompositionAction($this->kind())];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user