소스 검색

Update Pages\PM\AbstractPM

Change navigation.
Visman 4 년 전
부모
커밋
621add82ca
1개의 변경된 파일28개의 추가작업 그리고 16개의 파일을 삭제
  1. 28 16
      app/Models/Pages/PM/AbstractPM.php

+ 28 - 16
app/Models/Pages/PM/AbstractPM.php

@@ -77,27 +77,39 @@ abstract class AbstractPM extends Page
             'pm-sp1' => [null, null],
         ];
 
-        $nav += [
-            'pm-storage' => [true, 'PM Storage'],
-            'pm-active' => [
-                false,
-                [
-                    'Active: %s',
-                    $this->user->g_pm_limit < 1 ? 0 : (int) (100 * $this->pms->totalCurrent / $this->user->g_pm_limit),
+        if ($this->user->g_pm_limit > 0) {
+            $nav += [
+                'pm-storage' => [true, 'PM Storage'],
+                'pm-active' => [
+                    false,
+                    [
+                        'Active: %s',
+                        $this->user->g_pm_limit < 1 ? 0 : (int) (100 * $this->pms->totalCurrent / $this->user->g_pm_limit),
+                    ],
                 ],
-            ],
-            'pm-archive' => [
-                false,
-                [
-                    'Archive: %s',
-                    $this->user->g_pm_limit < 1 ? 0 : (int) (100 * $this->pms->totalArchive / $this->user->g_pm_limit),
+                'pm-archive' => [
+                    false,
+                    [
+                        'Archive: %s',
+                        $this->user->g_pm_limit < 1 ? 0 : (int) (100 * $this->pms->totalArchive / $this->user->g_pm_limit),
+                    ],
                 ],
+                'pm-sp2' => [null, null],
+            ];
+        }
+
+        $nav += [
+            'pm-options' => [true, 'PM Options'],
+            Cnst::ACTION_CONFIG => [
+                $r->link('PMAction', ['action' => Cnst::ACTION_CONFIG]),
+                'PM Config',
+            ],
+            Cnst::ACTION_BLOCK => [
+                $r->link('PMAction', ['action' => Cnst::ACTION_BLOCK]),
+                'Blocked users',
             ],
-            'pm-sp2' => [null, null],
         ];
 
-
-
         return $nav;
     }