Skip to content

Commit

Permalink
Add filter labels by user stories
Browse files Browse the repository at this point in the history
  • Loading branch information
amaelftah committed Oct 1, 2017
1 parent aafe5bc commit 3317217
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions app/Http/Controllers/Web/LabelController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public function index($model, $slug_label)

return view('labels.index')
->with('label', $label)
->with('listPartial',kebab_case($model))
->with('list', $label->$model()->paginate(env('APP_PAGINATE')));
}

Expand Down
2 changes: 1 addition & 1 deletion resources/views/labels/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<div class="table-responsive">
<table class="table table-hover issue-tracker">
<tbody>
@each('partials.lists.issues', $list, 'list', 'partials.lists.no-items')
@each('partials.lists.'.$listPartial, $list, 'list', 'partials.lists.no-items')
</tbody>
</table>
</div>
Expand Down
4 changes: 3 additions & 1 deletion resources/views/partials/boxes/label.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
@include('partials.forms.label', ['type' => $type, 'id' => $id])

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

<div class="clearfix"></div>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/partials/lists/labels.blade.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<li><a href="{{route('labels.index', ['model' => 'issues', 'slug_label' => $list->slug])}}"
<li><a href="{{route('labels.index', ['model' => $model, 'slug_label' => $list->slug])}}"
class="label" style="background:#{{$list->color}};color:#fff;">
{{$list->title}}</a></li>

0 comments on commit 3317217

Please sign in to comment.