mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
#4348 Heavy Machinery Project- Photograph Module
This commit is contained in:
parent
cf6029e453
commit
5544ad5c85
@ -6,6 +6,7 @@ use Anomaly\Streams\Platform\Model\Advs\AdvsCustomFieldsEntryModel;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Str;
|
||||
use Visiosoft\AdvsModule\Adv\Contract\AdvInterface;
|
||||
use Anomaly\Streams\Platform\Model\Advs\AdvsAdvsEntryModel;
|
||||
use Visiosoft\AdvsModule\OptionConfiguration\OptionConfigurationModel;
|
||||
@ -510,4 +511,16 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
|
||||
{
|
||||
return $this->created_by_id == \auth()->id() || \auth()->user()->isAdmin();
|
||||
}
|
||||
|
||||
public function getCatsIDs()
|
||||
{
|
||||
$attr = $this->getAttributes();
|
||||
return array_filter(
|
||||
$attr,
|
||||
function ($key) use ($attr) {
|
||||
return Str::startsWith($key, 'cat') && $attr[$key];
|
||||
},
|
||||
ARRAY_FILTER_USE_KEY
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -93,4 +93,6 @@ interface AdvInterface extends EntryInterface
|
||||
public function changeStatus($status);
|
||||
|
||||
public function canEdit();
|
||||
|
||||
public function getCatsIDs();
|
||||
}
|
||||
|
||||
@ -240,7 +240,7 @@
|
||||
a {
|
||||
background-color: unset;
|
||||
border: 0;
|
||||
color: #DC3545;
|
||||
color: #DC3545 !important;
|
||||
font-family: 'Poppins', sans-serif;
|
||||
font-weight: 500;
|
||||
display: inline-flex;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user