Skip to content

Commit fa23520

Browse files
author
Renato Marinho
authored
Merge pull request #275 from Te7a-Houdini/search-labels-on-user-stories
Add filter user stories by label
2 parents c1e1da2 + 3317217 commit fa23520

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

app/Http/Controllers/Web/LabelController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public function index($model, $slug_label)
2020

2121
return view('labels.index')
2222
->with('label', $label)
23+
->with('listPartial',kebab_case($model))
2324
->with('list', $label->$model()->paginate(env('APP_PAGINATE')));
2425
}
2526

resources/views/labels/index.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<div class="table-responsive">
3131
<table class="table table-hover issue-tracker">
3232
<tbody>
33-
@each('partials.lists.issues', $list, 'list', 'partials.lists.no-items')
33+
@each('partials.lists.'.$listPartial, $list, 'list', 'partials.lists.no-items')
3434
</tbody>
3535
</table>
3636
</div>

resources/views/partials/boxes/label.blade.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
@include('partials.forms.label', ['type' => $type, 'id' => $id])
44

55
<ul class="tag-list list-inline" style="padding: 0">
6-
@each('partials.lists.labels', $list, 'list')
6+
@foreach($list as $listItem)
7+
@include('partials.lists.labels', ['list' => $listItem , 'model' => camel_case($type) ])
8+
@endforeach
79
</ul>
810

911
<div class="clearfix"></div>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
<li><a href="{{route('labels.index', ['model' => 'issues', 'slug_label' => $list->slug])}}"
1+
<li><a href="{{route('labels.index', ['model' => $model, 'slug_label' => $list->slug])}}"
22
class="label" style="background:#{{$list->color}};color:#fff;">
33
{{$list->title}}</a></li>

0 commit comments

Comments
 (0)