Skip to content

Commit

Permalink
Removed Expand menu item from IP Actions Menu (#28)
Browse files Browse the repository at this point in the history
* Removed `Expand` menu item from IP Actions Menu

* refactored
  • Loading branch information
tafid authored and SilverFire committed May 20, 2019
1 parent 32989a4 commit 942cb31
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions src/menus/IpActionsMenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
namespace hipanel\modules\hosting\menus;

use hipanel\widgets\AjaxModal;
use hiqdev\yii2\menus\Menu;
use Yii;
use yii\helpers\Html;
use yii\web\JsExpression;

class IpActionsMenu extends \hiqdev\yii2\menus\Menu
class IpActionsMenu extends Menu
{
public $model;

Expand All @@ -38,6 +39,7 @@ public function items()
'label' => Yii::t('hipanel:hosting', 'Expand'),
'icon' => 'fa-th',
'url' => ['@ip/expand', 'id' => $this->model->id],
'visible' => Yii::$app->user->can('test.alpha'),
'linkOptions' => [
'class' => 'btn-expand-ip',
'data-id' => $this->model->id,
Expand All @@ -50,18 +52,6 @@ public function items()
'url' => ['@ip/update', 'id' => $this->model->id],
'visible' => Yii::$app->user->can('admin'),
],
// 'delete' => [
// 'label' => Yii::t('hipanel', 'Delete'),
// 'icon' => 'fa-trash',
// 'url' => ['@ip/delete', 'id' => $this->model->id],
// 'linkOptions' => [
// 'data' => [
// 'confirm' => Yii::t('hipanel', 'Are you sure you want to delete this item?'),
// 'method' => 'POST',
// 'pjax' => '0',
// ],
// ],
// ],
];
}

Expand Down

0 comments on commit 942cb31

Please sign in to comment.