Skip to content

Instantly share code, notes, and snippets.

@seccomiro
Created October 22, 2019 13:52
Show Gist options
  • Save seccomiro/c046c8576cb5cb39b4d0a5f7a7869ce7 to your computer and use it in GitHub Desktop.
Save seccomiro/c046c8576cb5cb39b4d0a5f7a7869ce7 to your computer and use it in GitHub Desktop.
index.edge
@layout('layout.master')
@section('conteudo')
<div class="text-center">
<h2>Minhas Tarefas</h2>
<a href="{{ route('tarefas.create') }}" class="btn btn-primary btn-lg mb-4">Nova Tarefa</a>
<div class="row justify-content-center">
<div class="col-lg-6 card text-left">
<ul class="list-group list-group-flush">
@each(tarefa in tarefas)
<li class="list-group-item d-flex justify-content-between align-items-center" style="font-size: 150%">
<div>
<a class="text-dark" href="{{ route('tarefas.concluida', { id: tarefa.id }) }}"><i class="far fa{{ tarefa.concluida ? '-check' : '' }}-square"></i></a>
<a class="text-{{ tarefa.concluida ? 'danger' : 'dark' }}" href="{{ route('tarefas.show', { id: tarefa.id }) }}">
@if(tarefa.concluida)
<del>{{ tarefa.titulo }}</del>
@else
{{ tarefa.titulo }}
@endif
</a>
</div>
@if(tarefa.observacoes_count > 0)
<span class="badge badge-warning">{{ tarefa.observacoes_count }}</span>
@endif
</li>
@endeach
</ul>
</div>
</div>
</div>
@endsection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment