Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {% extends 'students/students_base.html' %}
- {% block body %}
- <div class="container-fluid" style="overflow: hidden;">
- <div class="row">
- <div class="col-md-2">
- {% include 'base/sidebar.html'%}
- </div>
- {% set gallery = gallery or None %}
- {% set erros = erros or None %}
- <div class="col-md-10" style="margin-top: 30px;">
- <div class="container">
- <div class="row">
- <div class="col-md-10">
- <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" data-whatever="@mdo">Inserir Aluno</button>
- <hr>
- <div align="center">
- <h3>Lista de students</h3>
- <hr>
- <form action="{{ pesquisa_path }}">
- <select name="selected_course" class="btn-default">
- {% for cat in courses %}
- <option value="{{ cat.key.id() }}" {{ 'selected="selected"' | safe if cat == selected_course }}>{{ cat.name }}</option>
- {% endfor %}
- </select>
- <button type="submit" class="btn btn-success">Pesquisar</button>
- </form>
- <table class="table table-striped table-hover" style="margin-top: 30px;">
- <thead>
- <tr>
- <th>{% trans %}Nome{% endtrans %}</th>
- <th>{% trans %}Data de Nascimento{% endtrans %}</th>
- <th>{% trans %}Telefone{% endtrans %}</th>
- </tr>
- </thead>
- <tbody>
- {% for cat in students %}
- <tr>
- <td><a class="btn btn-success" href="{{ cat.edit_path }}"><i class="glyphicon glyphicon-pencil"></i></a></td>
- <td>{{ cat.name }}</td>
- <td>{{ cat.birthday }}</td>
- <td>{{ cat.phone_number }}</td>
- <td>
- <form action="/students/home/deletar/{{ cat.key.id() }}" method="post">
- {{ csrf_input() }}
- <button class="btn btn-danger"><i class="glyphicon glyphicon-trash"></i></button>
- </form>
- </td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
- <h4 class="modal-title" id="exampleModalLabel">Formulário</h4>
- </div>
- <div class="modal-body">
- <form action="{{ salvar_path }}" method="post">
- <select name="course">
- {% for cat in courses %}
- <option value="{{ cat.key.id() }}">{{ cat.name }}</option>
- {% endfor %}
- </select>
- {{ csrf_input() }}
- {{ form_input('name','name','','') }}
- {{ form_input('Data de Nascimento','birthday','','') }}
- {{ form_input('Telefone','phone_number','','') }}
- <div class="modal-footer">
- <button class="btn btn-primary" type="submit">Salvar</button>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
- {% endblock %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement