OSDN Git Service

管理画面運用ログ表示ウィジェット更新。
authornaoki hirata <naoki@magic3.org>
Mon, 20 Aug 2018 05:34:55 +0000 (14:34 +0900)
committernaoki hirata <naoki@magic3.org>
Mon, 20 Aug 2018 05:34:55 +0000 (14:34 +0900)
widgets/admin/opelog/include/container/admin_opelogWidgetContainer.php
widgets/admin/opelog/include/template/index.tmpl.html

index a386811..95e9e3c 100644 (file)
@@ -33,6 +33,7 @@ class admin_opelogWidgetContainer extends BaseAdminWidgetContainer
        const GUIDE_ICON_FILE = '/images/system/guide16.png';           // ガイダンスアイコン
        const ICON_SIZE = 16;           // アイコンのサイズ
        const MAX_MSG_LENGTH = 120;                                     // メッセージの長さ最大値
+       const TASK_OPELOG       = 'opelog';                     // 運用ログ一覧
        
        /**
         * コンストラクタ
@@ -134,6 +135,10 @@ class admin_opelogWidgetContainer extends BaseAdminWidgetContainer
                if (count($this->serialArray) == 0) $this->tmpl->setAttribute('loglist', 'visibility', 'hidden');               // ログがないときは非表示
                
                $this->tmpl->addVar('_widget', 'view_count', $viewCount);                       // 一度に表示可能なリスト項目数
+               
+               // ##### 表示制御 #####
+               // システム運用者の場合はアクセス許可がなければ詳細ボタンを表示しない
+               if ($this->gEnv->isSystemManager() && !in_array(self::TASK_OPELOG, $this->gSystem->getSystemManagerEnableTask())) $this->tmpl->setAttribute('show_detail_button', 'visibility', 'hidden');
        }
        /**
         * 運用ログ一覧取得したデータをテンプレートに設定する
index 7ca8763..aced45a 100644 (file)
@@ -23,7 +23,7 @@ $(function(){
 //]]>\r
 </script>\r
 <!-- m3:ErrorMessage -->\r
-<h3 class="m3config_h">運用ログ</h3> <a href="?task=opelog" class="btn btn-sm btn-warning m3config_h_side_small_button" role="button" rel="m3help" data-container="body" title="詳細"><i class="glyphicon glyphicon-hand-right"></i></a>\r
+<h3 class="m3config_h">運用ログ</h3><patTemplate:tmpl name="show_detail_button"> <a href="?task=opelog" class="btn btn-sm btn-warning m3config_h_side_small_button" role="button" rel="m3help" data-container="body" title="詳細"><i class="glyphicon glyphicon-hand-right"></i></a></patTemplate:tmpl>\r
 <table id="loglist" style="width:100%;">\r
     <thead>\r
     <tr>\r