@extends('layouts.app')
@section('title', 'Dashboard')
@section('content')
<div class="container-fluid" id="content">
@include('layouts.navigation')
<div id="main">
<div class="container-fluid">
<div class="row-fluid">
<div class="span12">
<div class="box box-bordered">
<div class="box-title">
<h3>
<i class="icon-reorder"></i>
{{$title}}
</h3>
<span class="tabs">
<a href="{{route('usuarios.create')}}" class="btn btn-primary">
<i class="icon-reorder"></i> Novo</a>
</span>
</div>
<div class="box-content nopadding">
<table class="table table-hover table-nomargin table-colored-header">
<thead>
<tr>
<th>
<form action="" method="GET" class="span12" style="margin: 0;padding:0;">
<input type="hidden" name="filtro" id="filtro" value="pesquisa">
<div class="span12">
<div class="control-group">
<div class="controls controls-row">
<input id="name" placeholder="nome" type="text" name="name" value="{{$name}}" class="input-block-level">
</div>
</div>
</div>
</th>
<th>
<div class="span12">
<div class="control-group">
<div class="controls controls-row">
<input id="email" placeholder="email" type="text" name="email" value="{{$email}}" class="input-block-level">
</div>
</div>
</div>
</th>
<th>
<div class="span12">
<div class="control-group">
<div class="controls controls-row">
<select name="level" id="level" class='input-block-level'>
<option value="">Level</option>
@foreach($levels as $key => $level)
<option value="{{$key}}" {{$level == $key ? 'selected':''}}>{{$level}}</option>
@endforeach
</select>
</div>
</div>
</div>
</th>
<th>
<div class="span12">
<div class="control-group">
<div class="controls controls-row">
<span class="input-group-append">
<button type="submit" class="btn btn-sm" style="margin-top:-10px;">Pesquisar</button>
</span>
</div>
</div>
</div>
</form>
</th>
</tr>
<tr>
<th>Nome</th>
<th>E-mail</th>
<th class='hidden-350'>Level</th>
<th>Ações</th>
</tr>
</thead>
<tbody>
@foreach ($users as $value)
<tr>
<td>{{$value->name}}</td>
<td>{{$value->email}}</td>
<td class='hidden-350'>{{$levels[$value->level]}}</td>
<td class='hidden-1024'>
{{ Form::open(['route' => ['usuarios.destroy', $value->id], 'method' => 'POST', 'style' => 'margin: 0;padding:0;']) }}
@csrf
@method('delete')
<a href="{{route('usuarios.edit', $value->id)}}" class="btn" rel="tooltip" title="" data-original-title="Editar">
<i class="icon-edit"></i>
</a>
<button type="submit" class="btn" rel="tooltip" title="" data-original-title="Excluir">
<i class="icon-trash"></i>
</button>
{{ Form::close() }}
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
|