56 lines
2.4 KiB
HTML
56 lines
2.4 KiB
HTML
|
|
{% extends 'base.html' %}
|
||
|
|
|
||
|
|
{% block title %}Listar Células{% endblock %}
|
||
|
|
|
||
|
|
{% block content %}
|
||
|
|
<div class="container">
|
||
|
|
<div class="row">
|
||
|
|
<div class="col-md-12">
|
||
|
|
<h1 class="mb-4">Lista de Células</h1>
|
||
|
|
|
||
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
||
|
|
{% if messages %}
|
||
|
|
{% for category, message in messages %}
|
||
|
|
<div class="alert alert-{{ category }}">{{ message }}</div>
|
||
|
|
{% endfor %}
|
||
|
|
{% endif %}
|
||
|
|
{% endwith %}
|
||
|
|
|
||
|
|
<div class="d-flex justify-content-between mb-4">
|
||
|
|
<a href="{{ url_for('nova_celula') }}" class="btn btn-success">Nova Célula</a>
|
||
|
|
<a href="{{ url_for('home') }}" class="btn btn-outline-primary">Início</a>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="table-responsive">
|
||
|
|
<table class="table table-striped table-hover">
|
||
|
|
<thead>
|
||
|
|
<tr>
|
||
|
|
<th>ID</th>
|
||
|
|
<th>Nome</th>
|
||
|
|
<th>Responsável</th>
|
||
|
|
<th>Responsável Finanças</th>
|
||
|
|
<th>Setor</th>
|
||
|
|
<th>Ações</th>
|
||
|
|
</tr>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
{% for celula in celulas %}
|
||
|
|
<tr>
|
||
|
|
<td>{{ celula.id }}</td>
|
||
|
|
<td>{{ celula.nome }}</td>
|
||
|
|
<td>{{ celula.responsavel_rel.nome if celula.responsavel_rel else '-' }}</td>
|
||
|
|
<td>{{ celula.responsavel_financas_rel.nome if celula.responsavel_financas_rel else '-' }}</td>
|
||
|
|
<td>{{ celula.setor.nome }}</td>
|
||
|
|
<td>
|
||
|
|
<a href="{{ url_for('editar_celula', id=celula.id) }}" class="btn btn-primary btn-sm">Editar</a>
|
||
|
|
<a href="{{ url_for('deletar_celula', id=celula.id) }}" class="btn btn-danger btn-sm" onclick="return confirm('Tem certeza que deseja excluir esta célula?')">Excluir</a>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
{% endfor %}
|
||
|
|
</tbody>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
{% endblock %}
|