tag add description

This commit is contained in:
xiaomlove
2023-01-11 05:05:18 +08:00
parent d7d63c8fd2
commit 1ff92df6d2
6 changed files with 41 additions and 5 deletions

View File

@@ -51,6 +51,7 @@ class TagResource extends Resource
->label(__('label.search_box.taxonomy.mode'))
->helperText(__('label.search_box.taxonomy.mode_help'))
,
Forms\Components\Textarea::make('description')->label(__('label.description')),
]);
}

View File

@@ -9,7 +9,7 @@ class Tag extends NexusModel
protected $fillable = [
'id', 'name', 'color', 'priority', 'created_at', 'updated_at',
'font_size', 'font_color', 'padding', 'margin', 'border_radius',
'mode',
'mode', 'description'
];
const DEFAULTS = [

View File

@@ -75,8 +75,8 @@ class TagRepository extends BaseRepository
$tagId = $value->id;
if ($value) {
$item = sprintf(
"<span style=\"background-color:%s;color:%s;border-radius:%s;font-size:%s;margin:%s;padding:%s\">%s</span>",
$value->color, $value->font_color, $value->border_radius, $value->font_size, $value->margin, $value->padding, $value->name
"<span style=\"background-color:%s;color:%s;border-radius:%s;font-size:%s;margin:%s;padding:%s\" title=\"%s\">%s</span>",
$value->color, $value->font_color, $value->border_radius, $value->font_size, $value->margin, $value->padding, $value->description, $value->name
);
if ($withFilterLink) {
$html .= sprintf('<a href="?tag_id=%s">%s</a>', $tagId, $item);