Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replacing labels views with Label UI helper
- Loading branch information
1 parent
0d33186
commit 8136d6f
Showing
17 changed files
with
811 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
<?php | ||
|
||
use Arcanesoft\Core\Helpers\UI\Label; | ||
|
||
/* ----------------------------------------------------------------- | ||
| Labels | ||
| ----------------------------------------------------------------- | ||
*/ | ||
|
||
if ( ! function_exists('label_active_icon')) { | ||
/** | ||
* Generate active icon label. | ||
* | ||
* @param bool $active | ||
* @param array $options | ||
* @param bool $withTooltip | ||
* | ||
* @return \Illuminate\Support\HtmlString | ||
*/ | ||
function label_active_icon($active, array $options = [], $withTooltip = true) { | ||
return Label::activeIcon($active, $options, $withTooltip); | ||
} | ||
} | ||
|
||
if ( ! function_exists('label_active_status')) { | ||
/** | ||
* Generate active status label. | ||
* | ||
* @param bool $active | ||
* @param array $options | ||
* | ||
* @return \Illuminate\Support\HtmlString | ||
*/ | ||
function label_active_status($active, array $options = []) { | ||
return Label::activeStatus($active, $options); | ||
} | ||
} | ||
|
||
if ( ! function_exists('label_count')) { | ||
/** | ||
* Generate count label. | ||
* | ||
* @param int|float $count | ||
* @param array $options | ||
* | ||
* @return Illuminate\Support\HtmlString | ||
*/ | ||
function label_count($count, array $options = []) { | ||
return Label::count($count, $options); | ||
} | ||
} | ||
|
||
if ( ! function_exists('label_locked_icon')) { | ||
/** | ||
* Generate locked icon label. | ||
* | ||
* @param bool $locked | ||
* @param array $options | ||
* @param bool $withTooltip | ||
* | ||
* @return \Illuminate\Support\HtmlString | ||
*/ | ||
function label_locked_icon($locked, array $options = [], $withTooltip = true) { | ||
return Label::lockedIcon($locked, $options, $withTooltip); | ||
} | ||
} | ||
|
||
if ( ! function_exists('label_locked_status')) { | ||
/** | ||
* Generate locked status label. | ||
* | ||
* @param bool $locked | ||
* @param array $options | ||
* @param bool $withIcon | ||
* | ||
* @return \Illuminate\Support\HtmlString | ||
*/ | ||
function label_locked_status($locked, array $options = [], $withIcon = true) { | ||
return Label::lockedStatus($locked, $options, $withIcon); | ||
} | ||
} | ||
|
||
if ( ! function_exists('label_trashed_status')) { | ||
/** | ||
* Generate trashed status label. | ||
* | ||
* @param array $options | ||
* @param bool $withIcon | ||
* | ||
* @return \Illuminate\Support\HtmlString | ||
*/ | ||
function label_trashed_status(array $options = [], $withIcon = true) { | ||
return Label::trashedStatus($options, $withIcon); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,5 +13,6 @@ | |
'enable' => 'enable', | ||
'restore' => 'restore', | ||
'show' => 'show', | ||
'sync' => 'sync', | ||
'update' => 'update', | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
resources/views/admin/_includes/actions/icon-links/detach.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
$url = isset($url) ? $url : '#'; | ||
$linkClass = isset($linkClass) ? $linkClass : 'btn btn-xs btn-danger'; | ||
$iconClass = isset($iconClass) ? $iconClass : 'fa fa-fw fa-chain-broken'; | ||
$linkTitle = isset($linkTitle) ? $linkClass : trans('core::actions.detach'); | ||
$disabled = isset($disabled) ? $disabled : false; | ||
?> | ||
@include('core::admin._includes.actions.icon-links._base', compact('url', 'linkClass', 'linkTitle', 'iconClass', 'disabled')) |
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
resources/views/admin/_includes/labels/active-status.blade.php
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
resources/views/admin/_includes/labels/locked-status.blade.php
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
resources/views/admin/_includes/labels/trashed-status.blade.php
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.