Skip to content

Commit

Permalink
Dev: Changed btn class in table (User Groups page)
Browse files Browse the repository at this point in the history
  • Loading branch information
thedirtypanda committed Jul 15, 2021
1 parent 583525c commit a591224
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions application/models/UserGroup.php
Expand Up @@ -310,7 +310,7 @@ public function getColumns()
'name' => 'actions',
'type' => 'raw',
'value' => '',
'htmlOptions' => array('class' => 'col-md-2 col-xs-1 text-right'),
'htmlOptions' => array('class' => 'col-md-2 col-xs-1'),
),

);
Expand All @@ -325,21 +325,21 @@ public function getButtons()
// Edit user group
if (Permission::model()->hasGlobalPermission('usergroups', 'update')) {
$url = Yii::app()->createUrl("userGroup/edit/ugid/$this->ugid");
$button = ' <a class="btn btn-default list-btn green-border" style="margin-right: 5px;" data-toggle="tooltip" data-placement="left" title="' . gT('Edit user group') . '" href="' . $url . '" role="button"><span class="fa fa-pencil" ></span></a>';
$button = ' <a class="btn btn-default btn-sm green-border" style="margin-right: 5px;" data-toggle="tooltip" data-placement="left" title="' . gT('Edit user group') . '" href="' . $url . '" role="button"><span class="fa fa-pencil" ></span></a>';
}

// View users
$url = Yii::app()->createUrl("userGroup/viewGroup/ugid/$this->ugid");
$button .= '<a class="btn btn-default list-btn" data-toggle="tooltip" data-placement="left" title="' . gT('View users') . '" href="' . $url . '" role="button"><span class="fa fa-list-alt" ></span></a>';
$button .= '<a class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="left" title="' . gT('View users') . '" href="' . $url . '" role="button"><span class="fa fa-list-alt" ></span></a>';

// Mail to user group
// Which permission should be checked for this button to be available?
$url = Yii::app()->createUrl("userGroup/mailToAllUsersInGroup/ugid/$this->ugid");
$button .= ' <a class="btn btn-default list-btn" data-toggle="tooltip" data-placement="left" title="' . gT('Email user group') . '" href="' . $url . '" role="button"><span class="icon-invite" ></span></a>';
$button .= ' <a class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="left" title="' . gT('Email user group') . '" href="' . $url . '" role="button"><span class="icon-invite" ></span></a>';

// Delete user group
if (Permission::model()->hasGlobalPermission('usergroups', 'delete')) {
$button .= ' <span data-toggle="tooltip" title="' . gT('Delete user group') . '"><button class="btn btn-default list-btn red-border action__delete-group" data-placement="left" href="#delete-modal" data-toggle="modal" data-ugid="' . $this->ugid . '" role="button"><i class="fa fa-trash"></i></button></span>';
$button .= ' <span data-toggle="tooltip" title="' . gT('Delete user group') . '"><button class="btn btn-default btn-sm red-border action__delete-group" data-placement="left" href="#delete-modal" data-toggle="modal" data-ugid="' . $this->ugid . '" role="button"><i class="fa fa-trash"></i></button></span>';
}

return $button;
Expand Down

0 comments on commit a591224

Please sign in to comment.