Skip to content

Commit 7ccd04e

Browse files
committed
Merge branch 'nav-design' into dev
2 parents 3531a95 + 946faa4 commit 7ccd04e

2 files changed

Lines changed: 18 additions & 15 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: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
<ul class="nav nav-pills">
2+
3+
<li role="presentation" class="{!! $n_notices == 0 ? 'disabled' : ($tools->fullUrlIs(route($setting->grab('main_route').'.notices')) ? 'active' : '') !!}" >
4+
<a href="{{ $n_notices == 0 ? '#' : route($setting->grab('main_route').'.notices') }}" title="{{ $n_notices == 0 ? trans('panichd::lang.ticket-notices-empty') : trans('panichd::lang.nav-notices-number-title', ['num' => $n_notices]) }}">{{ trans('panichd::lang.ticket-notices-title') }} <span class="badge">{{ $n_notices }}</span></a>
5+
</li>
6+
27
<?php
38
$title = trans('panichd::lang.filter-'.((session()->has('panichd_filter_currentLevel') or (isset($ticket) and session()->has('panichd_filters'))) ? 'on' : 'off').'-total');
49
$nav_hidden_sizes = $setting->grab('nav_icons_user_sizes');
@@ -54,14 +59,6 @@
5459
</a>
5560
</li>
5661
@endif
57-
<li role="presentation" class="{!! $tools->fullUrlIs(route($setting->grab('main_route').'.notices')) ? "active" : "" !!}" >
58-
@if($n_notices == 0)
59-
<a href="#" title="{{ trans('panichd::lang.ticket-notices-empty') }}" style="color: #ccc; cursor: help"><span class="glyphicon glyphicon-bell" aria-hidden="true"></span><span aria-label="{{ trans('panichd::lang.ticket-notices-title') }}"></span></a>
60-
@else
61-
<a href="{{ route($setting->grab('main_route').'.notices') }}" title="{{ trans('panichd::lang.nav-notices-number-title', ['num' => $n_notices]) }}"><span class="glyphicon glyphicon-bell" aria-hidden="true"></span><span aria-label="{{ trans('panichd::lang.ticket-notices-title') }}"></span> <span class="badge">{{ $n_notices }}</span></a>
62-
@endif
63-
</li>
64-
6562

6663
<li role="presentation" class="{!! $tools->fullUrlIs(action('\PanicHD\PanicHD\Controllers\TicketsController@index')) ? "active" : "" !!}">
6764
<a href="{{ action('\PanicHD\PanicHD\Controllers\TicketsController@index') }}" title="{{ trans('panichd::lang.nav-active-tickets-title') }}">
@@ -121,12 +118,6 @@
121118
$nav_icon = "hidden";
122119
}
123120
?>
124-
<li role="presentation" class="{!! $tools->fullUrlIs(action('\PanicHD\PanicHD\Controllers\DashboardController@index')) || Request::is($setting->grab('admin_route').'/indicator*') ? "active" : "" !!}">
125-
<a href="{{ action('\PanicHD\PanicHD\Controllers\DashboardController@index') }}" title="{{ trans('panichd::admin.nav-dashboard-title') }}">
126-
<span class="{{ $nav_text }}">{{ trans('panichd::admin.nav-dashboard') }}</span>
127-
<span class="{{ $nav_icon }} glyphicon glyphicon-stats"></span>
128-
</a>
129-
</li>
130121

131122
<li role="presentation" class="dropdown {!!
132123
$tools->fullUrlIs(action('\PanicHD\PanicHD\Controllers\StatusesController@index').'*') ||
@@ -139,11 +130,17 @@
139130
? "active" : "" !!}">
140131

141132
<a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false" title="{{ trans('panichd::admin.nav-settings') }}">
142-
<span class="{{ $nav_text }}">{{ trans('panichd::admin.nav-settings') }}</span>
133+
<span class="{{ $nav_text }}">{{ $setting->grab('admin_button_text') }}</span>
143134
<span class="{{ $nav_icon }} glyphicon glyphicon-cog"></span>
144135
<span class="caret"></span>
145136
</a>
146137
<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+
147144
<li role="presentation" class="{!! $tools->fullUrlIs(action('\PanicHD\PanicHD\Controllers\StatusesController@index').'*') ? "active" : "" !!}">
148145
<a href="{{ action('\PanicHD\PanicHD\Controllers\StatusesController@index') }}">{{ trans('panichd::admin.nav-statuses') }}</a>
149146
</li>

0 commit comments

Comments
 (0)