Add side menu localization options

This commit also adds the option to specify your own logo, from the .env configuration file.
This commit is contained in:
Miguel Nogueira 2020-09-01 20:30:17 +01:00
parent 9b469c434b
commit b80e168dfb
3 changed files with 55 additions and 36 deletions

View File

@ -3,9 +3,9 @@ APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost
# This can be your main homepage, other than this site itself
APP_LOGO="https://www.raspberrypi.org/app/uploads/2020/05/Raspberry-Pi-OS-downloads-image-150x150-1.png"
APP_SITEHOMEPAGE=""
# This can be your main homepage, other than this site itself
LOG_CHANNEL=stack

View File

@ -14,7 +14,7 @@ return [
|
*/
'title' => 'Raspberry Net',
'title' => env('APP_NAME'),
'title_prefix' => '',
'title_postfix' => '',
@ -45,12 +45,12 @@ return [
|
*/
'logo' => 'RaspberryNet Staff',
'logo_img' => 'https://www.raspberrypi.org/app/uploads/2020/05/Raspberry-Pi-OS-downloads-image-150x150-1.png',
'logo' => env('APP_NAME'),
'logo_img' => env('APP_LOGO'),
'logo_img_class' => 'brand-image img-circle elevation-3',
'logo_img_xl' => null,
'logo_img_xl_class' => 'brand-image-xs',
'logo_img_alt' => 'Raspberry Network Staff Temporary Logo',
'logo_img_alt' => env('APP_NAME') . '\'s Temporary Logo',
/*
|--------------------------------------------------------------------------
@ -209,74 +209,74 @@ return [
'menu' => [
[
'text' => 'Home',
'text' => __('messages.home'),
'icon' => 'fas fa-home',
'url' => 'dashboard'
],
[
'text' => 'Directory',
'text' => __('messages.user.directory.directory'),
'icon' => 'fas fa-users',
'url' => 'users/directory',
'can' => 'profiles.view.others'
],
[
'header' => 'Applications',
'header' => __('messages.application_m.int_applications'),
'can' => 'applications.view.own'
],
[
'text' => 'My Applications',
'text' => __('messages.menu.my_apps'),
'icon' => 'fas fa-fw fa-list-ul',
'can' => 'applications.view.own',
'submenu' => [
[
'text' => 'Current Applications',
'text' => __('messages.menu.current_apps'),
'icon' => 'fas fa-fw fa-check-double',
'url' => '/applications/my-applications'
]
],
],
'My Profile',
__('messages.reusable.profile'),
[
'text' => 'Profile Settings',
'text' => __('messages.menu.profile_settings'),
'url' => '/profile/settings',
'icon' => 'fas fa-fw fa-cog'
],
[
'text' => 'My Account Settings',
'text' => __('messages.profile.account_settings_personal'),
'icon' => 'fas fa-user-circle',
'url' => '/profile/settings/account'
],
[
'header' => 'Application Management',
'header' => __('messages.application_m.title'),
'can' => ['applications.view.all', 'applications.vote']
],
[
'text' => 'All applications',
'text' => __('messages.application_m.all_apps'),
'url' => 'applications/staff/all',
'icon' => 'fas fa-list-ol',
'can' => 'applications.view.all'
],
[
'text' => 'Outstanding Applications',
'text' => __('messages.application_m.outstanding_apps'),
'url' => '/applications/staff/outstanding',
'icon' => 'far fa-folder-open',
'can' => 'applications.view.all'
],
[
'text' => 'Interview Queue',
'text' => __('messages.application_m.interview_q'),
'url' => '/applications/staff/pending-interview',
'icon' => 'fas fa-fw fa-microphone-alt',
'can' => 'applications.view.all'
],
[
'text' => 'Peer Approval Queue',
'text' => __('messages.user.peer_approval_q'),
'url' => '/applications/staff/peer-review',
'icon' => 'fas fa-fw fa-search',
'can' => 'applications.view.all'
],
[
'header' => 'Administration',
'header' => __('messages.adm'),
'can' => [ // may need to be modified
'admin.hiring.*',
'admin.userlist',
@ -286,38 +286,38 @@ return [
]
],
[
'text' => 'Staff Members',
'text' => __('messages.staff.members'),
'icon' => 'fas fa-fw fa-users',
'url' => '/hr/staff-members',
'can' => 'admin.stafflist'
],
[ // players who haven't been promoted yet
'text' => 'Registered Players',
'text' => __('messages.players.reg_players'),
'icon' => 'fas fa-fw fa-user-friends',
'url' => '/hr/players',
'can' => 'admin.userlist'
],
[
'text' => 'Hiring Management',
'text' => __('messages.menu.hiring_man'),
'icon' => 'far fa-calendar-plus',
'can' => 'admin.hiring.*',
'submenu' => [
[
'text' => 'Open Positions',
'text' => __('messages.open_positions'),
'icon' => 'fas fa-box-open',
'url' => '/admin/positions'
],
[
'text' => 'Forms',
'text' => __('messages.forms'),
'icon' => 'fab fa-wpforms',
'submenu' => [
[
'text' => 'All forms',
'text' => __('messages.menu.all_forms'),
'icon' => 'far fa-list-alt',
'url' => '/admin/forms'
],
[
'text' => 'Form Builder',
'text' => __('messages.form_builder.builder'),
'icon' => 'fas fa-fw fa-hammer',
'url' => '/admin/forms/builder'
]
@ -326,18 +326,18 @@ return [
]
],
[
'text' => 'App Settings',
'text' => __('messages.menu.app_settings'),
'icon' => 'fas fa-fw fa-cog',
'can' => 'admin.notificationsettings',
'submenu' => [
[
'text' => 'Global Application Settings',
'text' => __('messages.menu.global_app_settings'),
'icon' => 'fas fa-cogs',
'url' => '/admin/settings',
'can' => 'admin.settings.view'
],
[
'text' => 'Developer Tools',
'text' => __('messages.devtools'),
'icon' => 'fas fa-code',
'url' => '/admin/devtools',
'can' => 'admin.developertools.use'
@ -345,7 +345,7 @@ return [
]
],
[
'text' => 'System Logs',
'text' => __('messages.menu.system_logs'),
'url' => '/admin/maintenance/system-logs',
'icon' => 'fas fa-clipboard-list',
'can' => 'admin.maintenance.logs.view'

View File

@ -16,7 +16,24 @@
return [
// ============== REUSABLE STRINGS =======================
// ============== MENU TRANSLATIONS ======================
'menu' => [
'my_apps' => 'My Applications',
'current_apps' => 'Current Applications',
'profile_settings' => 'Profile Settings',
'hiring_man' => 'Hiring Management',
'all_forms' => 'All Forms',
'app_settings' => 'App Settings',
'global_app_settings' => 'Global App Settings',
'system_logs' => 'System Logs'
],
// ============== REUSABLE, GENERIC STRINGS ===============
'reusable' => [
'created_at' => 'Created at',
@ -243,7 +260,7 @@ EOT,
'players' => [
'reg_players' => 'Registered players',
'reg_players' => 'Registered Players',
'reg_players_staff' => 'See Registered Players (Applicant Pool)',
'total_banned' => 'Total Banned Players',
'search' => 'Search players',
@ -323,7 +340,7 @@ EOT,
'outstanding_sm' => 'Outstanding',
'outstanding_apps' => 'Outstanding applications',
'outstanding_apps' => 'Outstanding Applications',
'outstanding_subm' => 'Outstanding (Submitted)',
'interview_q' => 'Interview Queue',
@ -440,6 +457,7 @@ EOT,
'acc_management' => 'Account Management (Admin)',
'discord_tag' => 'User\'s Discord Tag: :discordTag',
'account_settings' => 'Account Settings',
'account_settings_personal' => 'My Account Settings',
'2fa_welcome' => 'We\'re glad you decided to increase your account\'s security!',
'supported_apps' => 'Supported apps you can install: ',
@ -516,6 +534,7 @@ EOT,
'submitted' => 'Submitted',
'peer_approval' => 'Peer Approval',
'peer_approval_q' => 'Peer Approval Queue',
'nothing_to_show' => 'Nothing to show',
'nothing_to_show_exp' => 'You currently have no applications to display. If you\'re eligible, you may apply once every month.',
@ -578,8 +597,8 @@ EOT,
'max_chars' => 'max characters', // Context: A number is added before max characters
'post' => 'Post', // Context: Post as in post comment
]
// ==================== END OF MAIN I18N FILE ======================
];