jcadima
8/22/2017 - 5:37 AM

/views/task/list.blade.php

/views/task/list.blade.php


@extends('layout')

@section('content')

<h1>All tasks for project:  "{{ $p_name->project_name }}" </h1>

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

@if ( !$task_list->isEmpty() ) 
    <tbody>
    @foreach ( $task_list 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>There are no tasks assigned yet</em></p>
@endif


</table>



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




@stop