Skip to content

Commit 946faa4

Browse files
committed
Dashboard link inside settings dropdown
1 parent b78ff85 commit 946faa4

2 files changed

Lines changed: 13 additions & 7 deletions

File tree

src/Seeds/SettingsTableSeeder.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ public function getDefaults()
9696
* Default: panichd::master
9797
*/
9898
'master_template' => 'panichd::master',
99+
100+
/*
101+
* Admin navbar button text is configurable
102+
*/
103+
'admin_button_text' => 'PanicHD',
104+
99105
/*
100106
* Tickets email account: The email address for all package notifications.
101107
* Overrides Laravel email and name but uses it's connection parameters

src/Views/shared/nav.blade.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,6 @@
118118
$nav_icon = "hidden";
119119
}
120120
?>
121-
<li role="presentation" class="{!! $tools->fullUrlIs(action('\PanicHD\PanicHD\Controllers\DashboardController@index')) || Request::is($setting->grab('admin_route').'/indicator*') ? "active" : "" !!}">
122-
<a href="{{ action('\PanicHD\PanicHD\Controllers\DashboardController@index') }}" title="{{ trans('panichd::admin.nav-dashboard-title') }}">
123-
<span class="{{ $nav_text }}">{{ trans('panichd::admin.nav-dashboard') }}</span>
124-
<span class="{{ $nav_icon }} glyphicon glyphicon-stats"></span>
125-
</a>
126-
</li>
127121

128122
<li role="presentation" class="dropdown {!!
129123
$tools->fullUrlIs(action('\PanicHD\PanicHD\Controllers\StatusesController@index').'*') ||
@@ -136,11 +130,17 @@
136130
? "active" : "" !!}">
137131

138132
<a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false" title="{{ trans('panichd::admin.nav-settings') }}">
139-
<span class="{{ $nav_text }}">{{ trans('panichd::admin.nav-settings') }}</span>
133+
<span class="{{ $nav_text }}">{{ $setting->grab('admin_button_text') }}</span>
140134
<span class="{{ $nav_icon }} glyphicon glyphicon-cog"></span>
141135
<span class="caret"></span>
142136
</a>
143137
<ul class="dropdown-menu">
138+
<li role="presentation" class="{!! $tools->fullUrlIs(action('\PanicHD\PanicHD\Controllers\DashboardController@index')) || Request::is($setting->grab('admin_route').'/indicator*') ? 'active' : '' !!}">
139+
<a href="{{ action('\PanicHD\PanicHD\Controllers\DashboardController@index') }}" title="{{ trans('panichd::admin.nav-dashboard-title') }}">
140+
{{ trans('panichd::admin.nav-dashboard') }}
141+
</a>
142+
</li>
143+
144144
<li role="presentation" class="{!! $tools->fullUrlIs(action('\PanicHD\PanicHD\Controllers\StatusesController@index').'*') ? "active" : "" !!}">
145145
<a href="{{ action('\PanicHD\PanicHD\Controllers\StatusesController@index') }}">{{ trans('panichd::admin.nav-statuses') }}</a>
146146
</li>

0 commit comments

Comments
 (0)