My Account: Extracted/tweaked profile text, removed old index
This commit is contained in:
parent
c1b01639c1
commit
03c44b3992
|
@ -31,6 +31,8 @@ class ApiDocsController extends ApiController
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Redirect to the API docs page.
|
* Redirect to the API docs page.
|
||||||
|
* Required as a controller method, instead of the Route::redirect helper,
|
||||||
|
* to ensure the URL is generated correctly.
|
||||||
*/
|
*/
|
||||||
public function redirect()
|
public function redirect()
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,15 +26,13 @@ class UserAccountController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the overview for user preferences.
|
* Redirect the root my-account path to the main/first category.
|
||||||
|
* Required as a controller method, instead of the Route::redirect helper,
|
||||||
|
* to ensure the URL is generated correctly.
|
||||||
*/
|
*/
|
||||||
public function index()
|
public function redirect()
|
||||||
{
|
{
|
||||||
$mfaMethods = user()->mfaValues->groupBy('method');
|
return redirect('/my-account/profile');
|
||||||
|
|
||||||
return view('users.account.index', [
|
|
||||||
'mfaMethods' => $mfaMethods,
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -52,6 +52,7 @@ return [
|
||||||
'filter_clear' => 'Clear Filter',
|
'filter_clear' => 'Clear Filter',
|
||||||
'download' => 'Download',
|
'download' => 'Download',
|
||||||
'open_in_tab' => 'Open in Tab',
|
'open_in_tab' => 'Open in Tab',
|
||||||
|
'open' => 'Open',
|
||||||
|
|
||||||
// Sort Options
|
// Sort Options
|
||||||
'sort_options' => 'Sort Options',
|
'sort_options' => 'Sort Options',
|
||||||
|
|
|
@ -35,5 +35,12 @@ return [
|
||||||
'auth_change_password_success' => 'Password has been updated!',
|
'auth_change_password_success' => 'Password has been updated!',
|
||||||
|
|
||||||
'profile' => 'Profile Details',
|
'profile' => 'Profile Details',
|
||||||
'profile_overview_desc' => 'Manage your user profile details including preferred language and authentication options.',
|
'profile_desc' => 'Manage the details of your account which represents you to other users, in addition to details that are used for communication and system personalisation.',
|
||||||
|
'profile_view_public' => 'View Public Profile',
|
||||||
|
'profile_name_desc' => 'Configure your display name which will be visible to other users in the system through the activity you perform, and content you own.',
|
||||||
|
'profile_email_desc' => 'This email will be used for notifications and, depending on active system authentication, system access.',
|
||||||
|
'profile_email_no_permission' => 'Unfortunately you don\'t have permission to change your email address. If you want to change this, you\'d need to ask an administrator to change this for you.',
|
||||||
|
'profile_avatar_desc' => 'Select an image which will be used to represent yourself to others in the system. Ideally this image should be square and about 256px in width and height.',
|
||||||
|
'profile_admin_options' => 'Administrator Options',
|
||||||
|
'profile_admin_options_desc' => 'Additional administrator-level options, like those to manage role assignments, can be found for your user account in the "Settings > Users" area of the application.',
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,62 +0,0 @@
|
||||||
@extends('layouts.simple')
|
|
||||||
|
|
||||||
@section('body')
|
|
||||||
<div class="container small my-xl">
|
|
||||||
|
|
||||||
<section class="card content-wrap auto-height items-center justify-space-between gap-m flex-container-row wrap">
|
|
||||||
<div class="flex min-width-m">
|
|
||||||
<h2 class="list-heading">{{ trans('preferences.shortcuts_interface') }}</h2>
|
|
||||||
<p class="text-muted">{{ trans('preferences.shortcuts_overview_desc') }}</p>
|
|
||||||
</div>
|
|
||||||
<div class="text-right">
|
|
||||||
<a href="{{ url('/my-account/shortcuts') }}" class="button outline">{{ trans('common.manage') }}</a>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
@if(!user()->isGuest() && userCan('receive-notifications'))
|
|
||||||
<section class="card content-wrap auto-height items-center justify-space-between gap-m flex-container-row wrap">
|
|
||||||
<div class="flex min-width-m">
|
|
||||||
<h2 class="list-heading">{{ trans('preferences.notifications') }}</h2>
|
|
||||||
<p class="text-muted">{{ trans('preferences.notifications_desc') }}</p>
|
|
||||||
</div>
|
|
||||||
<div class="text-right">
|
|
||||||
<a href="{{ url('/my-account/notifications') }}" class="button outline">{{ trans('common.manage') }}</a>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
@if(!user()->isGuest())
|
|
||||||
<section class="card content-wrap auto-height items-center justify-space-between gap-m flex-container-row wrap">
|
|
||||||
<div class="flex min-width-m">
|
|
||||||
<h2 class="list-heading">{{ trans('settings.users_edit_profile') }}</h2>
|
|
||||||
<p class="text-muted">{{ trans('preferences.profile_overview_desc') }}</p>
|
|
||||||
</div>
|
|
||||||
<div class="text-right">
|
|
||||||
<a href="{{ user()->getEditUrl() }}" class="button outline">{{ trans('common.manage') }}</a>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
@if(!user()->isGuest())
|
|
||||||
<section class="card content-wrap auto-height items-center flex-container-row gap-m gap-x-l wrap justify-space-between">
|
|
||||||
<div class="flex-min-width-m">
|
|
||||||
<h2 class="list-heading">{{ trans('settings.users_mfa') }}</h2>
|
|
||||||
<p class="text-muted">{{ trans('settings.users_mfa_desc') }}</p>
|
|
||||||
<p class="text-muted">
|
|
||||||
@if ($mfaMethods->count() > 0)
|
|
||||||
<span class="text-pos">@icon('check-circle')</span>
|
|
||||||
@else
|
|
||||||
<span class="text-neg">@icon('cancel')</span>
|
|
||||||
@endif
|
|
||||||
{{ trans_choice('settings.users_mfa_x_methods', $mfaMethods->count()) }}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="text-right">
|
|
||||||
<a href="{{ url('/mfa/setup') }}"
|
|
||||||
class="button outline">{{ trans('common.manage') }}</a>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
</div>
|
|
||||||
@stop
|
|
|
@ -10,24 +10,18 @@
|
||||||
<div class="flex-container-row gap-l items-center wrap justify-space-between">
|
<div class="flex-container-row gap-l items-center wrap justify-space-between">
|
||||||
<h1 class="list-heading">{{ trans('preferences.profile') }}</h1>
|
<h1 class="list-heading">{{ trans('preferences.profile') }}</h1>
|
||||||
<div>
|
<div>
|
||||||
<a href="{{ user()->getProfileUrl() }}" class="button outline">View Public Profile</a>
|
<a href="{{ user()->getProfileUrl() }}" class="button outline">{{ trans('preferences.profile_view_public') }}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p class="text-muted text-small mb-none">
|
<p class="text-muted text-small mb-none">{{ trans('preferences.profile_desc') }}</p>
|
||||||
Manage the details of your account that represent you to other users, in addition to
|
|
||||||
details that are used for communication and system personalisation.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="setting-list">
|
<div class="setting-list">
|
||||||
|
|
||||||
<div class="flex-container-row gap-l items-center wrap">
|
<div class="flex-container-row gap-l items-center wrap">
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<label class="setting-list-label" for="name">{{ trans('auth.name') }}</label>
|
<label class="setting-list-label" for="name">{{ trans('auth.name') }}</label>
|
||||||
<p class="text-small mb-none">
|
<p class="text-small mb-none">{{ trans('preferences.profile_name_desc') }}</p>
|
||||||
Configure your display name which will be visible to other users in the system
|
|
||||||
within the activity you perform, and content you own.
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="flex stretch-inputs">
|
<div class="flex stretch-inputs">
|
||||||
@include('form.text', ['name' => 'name'])
|
@include('form.text', ['name' => 'name'])
|
||||||
|
@ -38,19 +32,14 @@
|
||||||
<div class="flex-container-row gap-l items-center wrap">
|
<div class="flex-container-row gap-l items-center wrap">
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<label class="setting-list-label" for="email">{{ trans('auth.email') }}</label>
|
<label class="setting-list-label" for="email">{{ trans('auth.email') }}</label>
|
||||||
<p class="text-small mb-none">
|
<p class="text-small mb-none">{{ trans('preferences.profile_email_desc') }}</p>
|
||||||
This email will be used for notifications and, depending on active system authentication, system access.
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="flex stretch-inputs">
|
<div class="flex stretch-inputs">
|
||||||
@include('form.text', ['name' => 'email', 'disabled' => !userCan('users-manage')])
|
@include('form.text', ['name' => 'email', 'disabled' => !userCan('users-manage')])
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@if(!userCan('users-manage'))
|
@if(!userCan('users-manage'))
|
||||||
<p class="text-small text-muted">
|
<p class="text-small text-muted">{{ trans('preferences.profile_email_no_permission') }}</p>
|
||||||
Unfortunately you don't have permission to change your email address.
|
|
||||||
If you want to change this, you'd need to ask an administrator to change this for you.
|
|
||||||
</p>
|
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -58,10 +47,7 @@
|
||||||
<div>
|
<div>
|
||||||
<label for="user-avatar"
|
<label for="user-avatar"
|
||||||
class="setting-list-label">{{ trans('settings.users_avatar') }}</label>
|
class="setting-list-label">{{ trans('settings.users_avatar') }}</label>
|
||||||
<p class="text-small">
|
<p class="text-small">{{ trans('preferences.profile_avatar_desc') }}</p>
|
||||||
Select an image which will be used to represent yourself to others
|
|
||||||
in the system. Ideally this image should be square and about 256px in width and height.
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@include('form.image-picker', [
|
@include('form.image-picker', [
|
||||||
|
@ -92,14 +78,11 @@
|
||||||
<section class="card content-wrap auto-height">
|
<section class="card content-wrap auto-height">
|
||||||
<div class="flex-container-row gap-l items-center wrap">
|
<div class="flex-container-row gap-l items-center wrap">
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<h2 class="list-heading">Administrator Options</h2>
|
<h2 class="list-heading">{{ trans('preferences.profile_admin_options') }}</h2>
|
||||||
<p class="text-small">
|
<p class="text-small">{{ trans('preferences.profile_admin_options_desc') }}</p>
|
||||||
Additional administrator-level options, like role options, can be found for your user account in the
|
|
||||||
<nobr>"Settings > Users"</nobr> area of the application.
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="text-m-right">
|
<div class="text-m-right">
|
||||||
<a class="button outline" href="{{ user()->getEditUrl() }}">Open</a>
|
<a class="button outline" href="{{ user()->getEditUrl() }}">{{ trans('common.open') }}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -233,7 +233,7 @@ Route::middleware('auth')->group(function () {
|
||||||
Route::delete('/settings/users/{id}', [UserControllers\UserController::class, 'destroy']);
|
Route::delete('/settings/users/{id}', [UserControllers\UserController::class, 'destroy']);
|
||||||
|
|
||||||
// User Account
|
// User Account
|
||||||
Route::get('/my-account', [UserControllers\UserAccountController::class, 'index']);
|
Route::get('/my-account', [UserControllers\UserAccountController::class, 'redirect']);
|
||||||
Route::get('/my-account/profile', [UserControllers\UserAccountController::class, 'showProfile']);
|
Route::get('/my-account/profile', [UserControllers\UserAccountController::class, 'showProfile']);
|
||||||
Route::put('/my-account/profile', [UserControllers\UserAccountController::class, 'updateProfile']);
|
Route::put('/my-account/profile', [UserControllers\UserAccountController::class, 'updateProfile']);
|
||||||
Route::get('/my-account/shortcuts', [UserControllers\UserAccountController::class, 'showShortcuts']);
|
Route::get('/my-account/shortcuts', [UserControllers\UserAccountController::class, 'showShortcuts']);
|
||||||
|
|
Loading…
Reference in New Issue