Fix main nav for PM
This commit is contained in:
parent
f0c3b55cf4
commit
f16a11cb08
2 changed files with 11 additions and 2 deletions
|
@ -212,12 +212,21 @@ abstract class Page extends Model
|
|||
];
|
||||
|
||||
if ($this->user->usePM) {
|
||||
$tmpPM = [];
|
||||
|
||||
if (1 !== $this->user->u_pm) {
|
||||
$tmpPM[] = 'pmoff';
|
||||
}
|
||||
if ($this->user->u_pm_num_new > 0) {
|
||||
$tmpPM[] = 'pmnew';
|
||||
}
|
||||
|
||||
$navUser[self::FI_PM] = [
|
||||
$r->link('PM'),
|
||||
$this->user->u_pm_num_new > 0 ? ['PM %s', $this->user->u_pm_num_new] : 'PM',
|
||||
'Private messages',
|
||||
null,
|
||||
$this->user->u_pm_num_new > 0 ? 'newpm' : null,
|
||||
$tmpPM ?: null,
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
@if ($p->fNavigationUser)
|
||||
<ul class="f-menu-user-items">
|
||||
@foreach ($p->fNavigationUser as $key => $val)
|
||||
<li id="fork-nav-{{ $key }}" class="f-menu-item @if ($val[4]) f-mi-{{ $val[4] }} @endif"><!-- inline -->
|
||||
<li id="fork-nav-{{ $key }}" class="f-menu-item @if ($val[4]) f-mi-{{ \implode(' f-mi-', $val[4]) }} @endif"><!-- inline -->
|
||||
<a class="f-menu-a @if ($key == $p->fIndex) active @endif" href="{{ $val[0] }}" @if ($val[2]) title="{{ __($val[2]) }}" @endif>
|
||||
<span class="f-menu-span">{!! __($val[1]) !!}</span>
|
||||
</a>
|
||||
|
|
Loading…
Add table
Reference in a new issue