jcadima
8/22/2017 - 5:39 AM

/views/task/search.blade.php

/views/task/search.blade.php


@extends('layout')

@section('content')


<h1>Displaying Results for:  "{{ $value }}" </h1>

<table class="table table-striped">
    <thead>
      <tr>
        <th>Task Description</th>
        <th>Priority</th>
        <th>Status</th>
        <th>Actions</th>
      </tr>
    </thead>

@if ( !$tasks->isEmpty() ) 
    <tbody>
    @foreach ( $tasks as $task)
      <tr>
        <td>{{ $task->task }} </td>
        <td>
            @if ( $task->priority == 0 )
                <span class="label label-info">Priority: Normal</span>
            @else
                <span class="label label-danger">Priority: High</span>
            @endif
        </td>
        <td>
            @if ( !$task->completed )
                <a href="{{ route('task.completed', ['id' => $task->id]) }}" class="btn btn-warning"> Mark as completed</a>
            @else
                <span class="label label-success">Completed</span>
            @endif
        </td>
        <td>
            <a href="{{ route('task.edit', ['id' => $task->id]) }}" class="btn btn-primary"> edit </a>
            <a href="{{ route('task.delete', ['id' => $task->id]) }}" class="btn btn-danger">delete</a>

        </td>
      </tr>

    @endforeach
    </tbody>
@else 
    <p><em>No match found</em></p>
@endif


</table>



    <div class="btn-group">
        <a class="btn btn-default" href="{{ redirect()->getUrlGenerator()->previous() }}">Go Back</a>
    </div>



@stop