Browse Source

change icon for tags

pull/99/head
KodeStar 7 years ago
parent
commit
0b62f8a1c8
  1. 9
      app/Item.php
  2. 2
      resources/views/item.blade.php

9
app/Item.php

@ -153,6 +153,15 @@ class Item extends Model
}
}
public function getLinkIconAttribute()
{
if((int)$this->type === 1) {
return 'fa-tag';
} else {
return 'fa-arrow-alt-to-right';
}
}
public function scopeOfType($query, $type)
{
switch($type) {

2
resources/views/item.blade.php

@ -11,7 +11,7 @@
<div data-id="{{ $app->id }}" data-dataonly="{{ $app->config->dataonly or '0' }}" class="livestats-container"></div>
@endif
</div>
<a class="link"{{ $app->target }} href="{{ $app->link }}"><i class="fas fa-arrow-alt-to-right"></i></a>
<a class="link"{{ $app->target }} href="{{ $app->link }}"><i class="fas {{ $app->link_icon }}"></i></a>
</div>
<a class="item-edit" href="{{ route('items.edit', $app->id) }}"><i class="fas fa-pencil"></i></a>

Loading…
Cancel
Save