From 23d70a2fac1b65b36c218fb8e31d33151abd8fe1 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 18 Jan 2025 17:20:21 +0100 Subject: [PATCH] Rename to settings --- .../Admin/ConfigurationController.php | 6 +++--- app/Http/Controllers/Admin/LinkController.php | 10 +++++----- .../Controllers/Admin/NotificationController.php | 6 +++--- app/Http/Controllers/Admin/UpdateController.php | 6 +++--- app/Http/Controllers/Admin/UserController.php | 16 ++++++++-------- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/app/Http/Controllers/Admin/ConfigurationController.php b/app/Http/Controllers/Admin/ConfigurationController.php index f5058a1165..7e7403fb57 100644 --- a/app/Http/Controllers/Admin/ConfigurationController.php +++ b/app/Http/Controllers/Admin/ConfigurationController.php @@ -45,7 +45,7 @@ class ConfigurationController extends Controller $this->middleware( static function ($request, $next) { - app('view')->share('title', (string) trans('firefly.administration')); + app('view')->share('title', (string) trans('firefly.system_settings')); app('view')->share('mainTitleIcon', 'fa-hand-spock-o'); return $next($request); @@ -73,7 +73,7 @@ class ConfigurationController extends Controller $siteOwner = config('firefly.site_owner'); return view( - 'admin.configuration.index', + 'settings.configuration.index', compact('subTitle', 'subTitleIcon', 'singleUserMode', 'isDemoSite', 'siteOwner') ); } @@ -96,6 +96,6 @@ class ConfigurationController extends Controller session()->flash('success', (string) trans('firefly.configuration_updated')); app('preferences')->mark(); - return redirect()->route('admin.configuration.index'); + return redirect()->route('settings.configuration.index'); } } diff --git a/app/Http/Controllers/Admin/LinkController.php b/app/Http/Controllers/Admin/LinkController.php index 0ed8801810..d14aede448 100644 --- a/app/Http/Controllers/Admin/LinkController.php +++ b/app/Http/Controllers/Admin/LinkController.php @@ -51,7 +51,7 @@ class LinkController extends Controller $this->middleware( function ($request, $next) { - app('view')->share('title', (string) trans('firefly.administration')); + app('view')->share('title', (string) trans('firefly.system_settings')); app('view')->share('mainTitleIcon', 'fa-hand-spock-o'); $this->repository = app(LinkTypeRepositoryInterface::class); @@ -91,7 +91,7 @@ class LinkController extends Controller if (false === $linkType->editable) { $request->session()->flash('error', (string) trans('firefly.cannot_edit_link_type', ['name' => e($linkType->name)])); - return redirect(route('admin.links.index')); + return redirect(route('settings.links.index')); } Log::channel('audit')->info(sprintf('User wants to delete link type #%d', $linkType->id)); @@ -142,7 +142,7 @@ class LinkController extends Controller if (false === $linkType->editable) { $request->session()->flash('error', (string) trans('firefly.cannot_edit_link_type', ['name' => e($linkType->name)])); - return redirect(route('admin.links.index')); + return redirect(route('settings.links.index')); } $subTitle = (string) trans('firefly.edit_link_type', ['name' => $linkType->name]); $subTitleIcon = 'fa-link'; @@ -217,7 +217,7 @@ class LinkController extends Controller // set value so create routine will not overwrite URL: $request->session()->put('link-types.create.fromStore', true); - $redirect = redirect(route('admin.links.create'))->withInput(); + $redirect = redirect(route('settings.links.create'))->withInput(); } // redirect to previous URL. @@ -234,7 +234,7 @@ class LinkController extends Controller if (false === $linkType->editable) { $request->session()->flash('error', (string) trans('firefly.cannot_edit_link_type', ['name' => e($linkType->name)])); - return redirect(route('admin.links.index')); + return redirect(route('settings.links.index')); } $data = [ diff --git a/app/Http/Controllers/Admin/NotificationController.php b/app/Http/Controllers/Admin/NotificationController.php index fb16ac7c74..1fc2c9256d 100644 --- a/app/Http/Controllers/Admin/NotificationController.php +++ b/app/Http/Controllers/Admin/NotificationController.php @@ -38,7 +38,7 @@ class NotificationController extends Controller public function index(): View { Log::channel('audit')->info('User visits notifications index.'); - $title = (string) trans('firefly.administration'); + $title = (string) trans('firefly.system_settings'); $mainTitleIcon = 'fa-hand-spock-o'; $subTitle = (string) trans('firefly.title_owner_notifications'); $subTitleIcon = 'envelope-o'; @@ -115,7 +115,7 @@ class NotificationController extends Controller session()->flash('success', (string) trans('firefly.notification_settings_saved')); - return redirect(route('admin.notification.index')); + return redirect(route('settings.notification.index')); } public function testNotification(Request $request): RedirectResponse @@ -140,6 +140,6 @@ class NotificationController extends Controller session()->flash('success', (string) trans('firefly.notification_test_executed', ['channel' => $channel])); } - return redirect(route('admin.notification.index')); + return redirect(route('settings.notification.index')); } } diff --git a/app/Http/Controllers/Admin/UpdateController.php b/app/Http/Controllers/Admin/UpdateController.php index 4a83da8ad9..4a165a896f 100644 --- a/app/Http/Controllers/Admin/UpdateController.php +++ b/app/Http/Controllers/Admin/UpdateController.php @@ -47,7 +47,7 @@ class UpdateController extends Controller parent::__construct(); $this->middleware( static function ($request, $next) { - app('view')->share('title', (string) trans('firefly.administration')); + app('view')->share('title', (string) trans('firefly.system_settings')); app('view')->share('mainTitleIcon', 'fa-hand-spock-o'); return $next($request); @@ -100,7 +100,7 @@ class UpdateController extends Controller app('fireflyconfig')->set('update_channel', $channel); session()->flash('success', (string) trans('firefly.configuration_updated')); - return redirect(route('admin.update-check')); + return redirect(route('settings.update-check')); } /** @@ -112,6 +112,6 @@ class UpdateController extends Controller session()->flash($release['level'], $release['message']); - return redirect(route('admin.update-check')); + return redirect(route('settings.update-check')); } } diff --git a/app/Http/Controllers/Admin/UserController.php b/app/Http/Controllers/Admin/UserController.php index b6f6c4cf57..52b8b5edd4 100644 --- a/app/Http/Controllers/Admin/UserController.php +++ b/app/Http/Controllers/Admin/UserController.php @@ -55,7 +55,7 @@ class UserController extends Controller $this->middleware( function ($request, $next) { - app('view')->share('title', (string) trans('firefly.administration')); + app('view')->share('title', (string) trans('firefly.system_settings')); app('view')->share('mainTitleIcon', 'fa-hand-spock-o'); $this->repository = app(UserRepositoryInterface::class); @@ -74,12 +74,12 @@ class UserController extends Controller if ($this->externalIdentity) { request()->session()->flash('error', trans('firefly.external_user_mgt_disabled')); - return redirect(route('admin.users')); + return redirect(route('settings.users')); } $subTitle = (string) trans('firefly.delete_user', ['email' => $user->email]); - return view('admin.users.delete', compact('user', 'subTitle')); + return view('settings.users.delete', compact('user', 'subTitle')); } public function deleteInvite(InvitedUser $invitedUser): JsonResponse @@ -108,12 +108,12 @@ class UserController extends Controller if ($this->externalIdentity) { request()->session()->flash('error', trans('firefly.external_user_mgt_disabled')); - return redirect(route('admin.users')); + return redirect(route('settings.users')); } $this->repository->destroy($user); session()->flash('success', (string) trans('firefly.user_deleted')); - return redirect(route('admin.users')); + return redirect(route('settings.users')); } /** @@ -186,7 +186,7 @@ class UserController extends Controller // event! event(new InvitationCreated($invitee)); - return redirect(route('admin.users')); + return redirect(route('settings.users')); } /** @@ -196,7 +196,7 @@ class UserController extends Controller */ public function show(User $user) { - $title = (string) trans('firefly.administration'); + $title = (string) trans('firefly.system_settings'); $mainTitleIcon = 'fa-hand-spock-o'; $subTitle = (string) trans('firefly.single_user_administration', ['email' => $user->email]); $subTitleIcon = 'fa-user'; @@ -248,7 +248,7 @@ class UserController extends Controller if (1 === (int) $request->get('return_to_edit')) { session()->put('users.edit.fromUpdate', true); - $redirect = redirect(route('admin.users.edit', [$user->id]))->withInput(['return_to_edit' => 1]); + $redirect = redirect(route('settings.users.edit', [$user->id]))->withInput(['return_to_edit' => 1]); } // redirect to previous URL.