| @@ 120-132 (lines=13) @@ | ||
| 117 | protected function fieldTags() |
|
| 118 | { |
|
| 119 | // Populate tag fields with the submitted tags |
|
| 120 | if ($this->isEditing()) { |
|
| 121 | $selectTags = $this->getModel()->tags()->with('parent')->get()->filter(function (Model\Tag $tag) { |
|
| 122 | return !($tag->name == Model\Tag::STATUS_OPEN || $tag->name == Model\Tag::STATUS_CLOSED); |
|
| 123 | })->map(function (Model\Tag $tag) { |
|
| 124 | return [ |
|
| 125 | 'value' => $tag->id, |
|
| 126 | 'label' => ($tag->fullname), |
|
| 127 | 'bgcolor' => $tag->bgcolor, |
|
| 128 | ]; |
|
| 129 | })->toJson(); |
|
| 130 | } else { |
|
| 131 | $selectTags = ''; |
|
| 132 | } |
|
| 133 | ||
| 134 | return [ |
|
| 135 | 'tag' => [ |
|
| @@ 95-107 (lines=13) @@ | ||
| 92 | ]; |
|
| 93 | ||
| 94 | $statusTags = (new TagModel())->getStatusTags()->tags()->get()->implode('fullname', ', '); |
|
| 95 | if ($this->isEditing()) { |
|
| 96 | $selectTags = $this->getModel()->kanbanTags()->get()->filter(function (TagModel $tag) { |
|
| 97 | return !($tag->name == TagModel::STATUS_OPEN || $tag->name == TagModel::STATUS_CLOSED); |
|
| 98 | })->map(function (TagModel $tag) { |
|
| 99 | return [ |
|
| 100 | 'value' => $tag->id, |
|
| 101 | 'label' => ($tag->fullname), |
|
| 102 | 'bgcolor' => $tag->bgcolor, |
|
| 103 | ]; |
|
| 104 | })->toJson(); |
|
| 105 | } else { |
|
| 106 | $selectTags = (new TagModel())->tagsToJson(\Request::input('tags')); |
|
| 107 | } |
|
| 108 | $fields['columns'] = [ |
|
| 109 | 'type' => 'text', |
|
| 110 | 'label' => 'columns', |
|