Browse Source

HOT-FIX: refetora composicao_list

pull/2579/head
Leandro Roberto 6 years ago
parent
commit
f2900a5c27
  1. 67
      sapl/templates/comissoes/composicao_list.html
  2. 9
      sapl/templates/crud/list.html
  3. 2
      setup.py

67
sapl/templates/comissoes/composicao_list.html

@ -1,46 +1,45 @@
{% extends "crud/list.html" %}
{% load i18n common_tags crispy_forms_tags%}
{% block base_content %}
{% block actions %}
{% if user.is_authenticated and perms.comissoes.add_composicao %}
<div class="context-actions clearfix">
{% block actions %}
<div class="actions btn-group float-right btn-group-lg" role="group">
{% if view.create_url %}
<a href="{{ view.create_url }}" class="btn btn-outline-primary">
{% blocktrans with verbose_name=view.verbose_name %} Adicionar {{ verbose_name }} {% endblocktrans %}
</a>
{% endif %}
{% block more_buttons %}{% endblock more_buttons %}
</div>
{% endblock actions %}
</div>
<div class="actions btn-group float-right btn-group-lg" role="group">
{% if view.create_url %}
<a href="{{ view.create_url }}" class="btn btn-outline-primary">
{% blocktrans with verbose_name=view.verbose_name %} Adicionar {{ verbose_name }} {% endblocktrans %}
</a>
{% endif %}
{% block more_buttons %}{% endblock more_buttons %}
</div>
{% endif %}
{% endblock actions %}
<fieldset class="form-group">
<legend>Selecione o Período</legend>
<form method="GET">
<select name="pk" class="form-control" onChange="form.submit();">
{% for c in composicao_list %}
<option value="{{c.id}}" {% if composicao_pk == c.id %} selected {% endif %}>
{{c}}
</option>
{% endfor %}
</select>
</form>
</fieldset>
{% block extra_content %}
<form method="GET">
<fieldset class="form-group">
<legend>Selecione o Período</legend>
<select name="pk" class="form-control" onChange="form.submit();">
{% for c in composicao_list %}
<option value="{{c.id}}" {% if composicao_pk == c.id %} selected {% endif %}>
{{c}}
</option>
{% endfor %}
</select>
</fieldset>
</form>
<br/>
{% endblock %}
{% block container_table_list %}
{% if user.is_authenticated and perms.comissoes.add_participacao %}
<div class="actions btn-group mb-2" role="group">
<a href="{% url 'sapl.comissoes:participacao_create' composicao_pk %}" class="btn btn-outline-primary">
Adicionar Participação em Comissão
</a>
<div class="context-actions clearfix">
<div class="actions btn-group mb-2" role="group">
<a href="{% url 'sapl.comissoes:participacao_create' composicao_pk %}" class="btn btn-outline-primary">
Adicionar Participação em Comissão
</a>
</div>
</div>
{% endif %}
<div class="clearfix"></div>
<div class="container-table">
<table class="table table-striped table-hover table-link-ordering">
<thead>
@ -71,4 +70,4 @@
</tbody>
</table>
</div>
{% endblock base_content %}
{% endblock %}

9
sapl/templates/crud/list.html

@ -5,17 +5,18 @@
<div class="context-actions clearfix">
<div class="actions search float-left">
<div class="actions search">
{% if form %}
{% crispy form %}
{% endif %}
</div>
{% block actions %}
<div class="actions btn-group float-right btn-group-lg" role="group">
{% if view.create_url %}
<a href="{{ view.create_url }}" class="btn btn-outline-primary">
{% blocktrans with verbose_name=view.verbose_name %} Adicionar {{ verbose_name }} {% endblocktrans %}
</a>
<a href="{{ view.create_url }}" class="btn btn-outline-primary">
{% blocktrans with verbose_name=view.verbose_name %} Adicionar {{ verbose_name }} {% endblocktrans %}
</a>
{% endif %}
{% block more_buttons %}{% endblock more_buttons %}
</div>

2
setup.py

@ -20,7 +20,7 @@ install_requires = [
'django-extra-views==0.12.0',
'django-model-utils==3.1.2',
'django-reversion==3.0.2',
'django-reversion-compare==0.8.6'
'django-reversion-compare==0.8.6',
'django-speedinfo==1.4.0',
'django-extensions==2.1.4',
'django-image-cropping==1.2.0',

Loading…
Cancel
Save