Skip to content

Commit

Permalink
Dev: Added green and red border to buttons also changed delete icon f…
Browse files Browse the repository at this point in the history
…rom red to black
  • Loading branch information
thedirtypanda committed Jul 14, 2021
1 parent 2272102 commit 60abb0f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
14 changes: 7 additions & 7 deletions application/models/LabelSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,16 @@ public function getLanguageArray()
*/
public function getbuttons()
{
// View labelset
$url = Yii::app()->createUrl("admin/labels/sa/view/lid/$this->lid");
$button = '<a class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="left" title="' . gT('View labels') . '" href="' . $url . '" role="button"><span class="fa fa-list-alt" ></span></a>';

// Edit labelset
if (Permission::model()->hasGlobalPermission('labelsets', 'update')) {
$url = Yii::app()->createUrl("admin/labels/sa/editlabelset/lid/$this->lid");
$button .= ' <a class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="left" title="' . gT('Edit label set') . '" 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="top" title="' . gT('Edit label set') . '" href="' . $url . '" role="button"><span class="fa fa-pencil" ></span></a>';
}

// View labelset
$url = Yii::app()->createUrl("admin/labels/sa/view/lid/$this->lid");
$button .= '<a class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="left" title="' . gT('View labels') . '" href="' . $url . '" role="button"><span class="fa fa-list-alt" ></span></a>';

// Export labelset
if (Permission::model()->hasGlobalPermission('labelsets', 'export')) {
$url = Yii::app()->createUrl("admin/export/sa/dumplabel/lid/$this->lid");
Expand All @@ -142,12 +142,12 @@ public function getbuttons()

// Delete labelset
if (Permission::model()->hasGlobalPermission('labelsets', 'delete')) {
$button .= '<a class="btn btn-default btn-sm" style="margin-left: 5px;" data-toggle="tooltip" title="' . gT("Delete label set") . '" href="#" role="button"'
$button .= '<a class="btn btn-default btn-sm red-border" style="margin-left: 5px;" data-toggle="tooltip" title="' . gT("Delete label set") . '" href="#" role="button"'
. " onclick='$.bsconfirm(\"" . CHtml::encode(gT("Are you sure you want to delete this label set?"))
. "\", {\"confirm_ok\": \"" . gT("Yes") . "\", \"confirm_cancel\": \"" . gT("No") . "\"}, function() {"
. convertGETtoPOST(Yii::app()->createUrl("admin/labels/sa/delete", ["lid" => $this->lid]))
. "});'>"
. ' <i class="text-danger fa fa-trash"></i>
. ' <i class="fa fa-trash"></i>
</a>';
}
return $button;
Expand Down
10 changes: 10 additions & 0 deletions themes/admin/Noto_All_Languages/css/lime-admin-colors.css
Original file line number Diff line number Diff line change
Expand Up @@ -2349,3 +2349,13 @@ ol.breadcrumb.title-bar-breadcrumb {
--LS-admintheme-lighthovercolor: #2cba35;
--LS-admintheme-dangercolor: #a0352f;
--LS-admintheme-infocolor: #40ab82; }

.green-border {
border-color: green;
border-style: solid;
}

.red-border {
border-color: red;
border-style: solid;
}

0 comments on commit 60abb0f

Please sign in to comment.