Browse Source

Convert remaining grid classes to bootstrap

pull/202/head
Marcio Mazza 9 years ago
parent
commit
b02ef11ead
  1. 12
      compilacao/forms.py
  2. 2
      materia/views.py
  3. 2
      sapl/layout.py
  4. 2
      sessao/views.py
  5. 22
      templates/compilacao/publicacao_detail.html
  6. 16
      templates/compilacao/textoarticulado_detail.html
  7. 8
      templates/compilacao/tipotextoarticulado_detail.html

12
compilacao/forms.py

@ -65,7 +65,7 @@ class TipoTaForm(ModelForm):
self.helper = FormHelper()
self.helper.layout = SaplFormLayout(
Fieldset(_('Identificação Básica'),
row1, css_class="large-12"))
row1, css_class="col-md-12"))
super(TipoTaForm, self).__init__(*args, **kwargs)
@ -131,13 +131,13 @@ class TaForm(ModelForm):
self.helper = FormHelper()
self.helper.layout = SaplFormLayout(
Fieldset(_('Identificação Básica'), row1, css_class="large-12"),
Fieldset(_('Identificação Básica'), row1, css_class="col-md-12"),
Fieldset(
TextoArticulado._meta.get_field('ementa').verbose_name,
Column('ementa'), css_class="large-12"),
Column('ementa'), css_class="col-md-12"),
Fieldset(
TextoArticulado._meta.get_field('observacao').verbose_name,
Column('observacao'), css_class="large-12"),
Column('observacao'), css_class="col-md-12"),
)
@ -222,7 +222,7 @@ class NotaForm(ModelForm):
'titulo',
placeholder=_('Título da Nota (opcional)')
),
css_class='columns large-8'))
css_class='col-md-8'))
row3 = to_row([
('publicidade', 3),
@ -431,7 +431,7 @@ class PublicacaoForm(ModelForm):
self.helper = FormHelper()
self.helper.layout = SaplFormLayout(
Fieldset(Publicacao._meta.verbose_name,
row1, row2, row3, css_class="large-12"))
row1, row2, row3, css_class="col-md-12"))
super(PublicacaoForm, self).__init__(*args, **kwargs)
pass

2
materia/views.py

@ -1768,7 +1768,7 @@ class ProposicaoForm(ModelForm):
[('texto_original', 10)])
row4.append(
Column(form_actions(), css_class='columns large-2'))
Column(form_actions(), css_class='col-md-2'))
self.helper = FormHelper()
self.helper.layout = Layout(

2
sapl/layout.py

@ -5,7 +5,7 @@ from django.utils.translation import ugettext as _
def to_column(name_span):
fieldname, span = name_span
return Div(fieldname, css_class='col-sm-%d' % span)
return Div(fieldname, css_class='col-md-%d' % span)
def to_row(names_spans):

2
sessao/views.py

@ -2503,7 +2503,7 @@ class AcompanharMateriaForm(ModelForm):
row1 = sapl.layout.to_row([('email', 10)])
row1.append(
Column(form_actions(save_label='Cadastrar'), css_class='columns-large-2')
Column(form_actions(save_label='Cadastrar'), css_class='col-md-2')
)
self.helper = FormHelper()

22
templates/compilacao/publicacao_detail.html

@ -20,19 +20,19 @@
<legend>{%trans 'Identificação Básica'%}</legend>
<div class="row">
<div class="columns large-4">
<div class="col-md-4">
<div id="div_id_tipo" class="holder">
<label>{% field_verbose_name object 'tipo_publicacao' %}</label>
<p>{{ object.tipo_publicacao}}</p>
</div>
</div>
<div class="columns large-6">
<div class="col-md-6">
<div id="div_id_tipo" class="holder">
<label>{% field_verbose_name object 'veiculo_publicacao' %}</label>
<p>{{ object.veiculo_publicacao}}</p>
</div>
</div>
<div class="columns large-2">
<div class="col-md-2">
<div id="div_id_tipo" class="holder">
<label>{% field_verbose_name object 'ano' %}</label>
<p>{{ object.ano}}</p>
@ -40,25 +40,25 @@
</div>
</div>
<div class="row">
<div class="columns large-4">
<div class="col-md-4">
<div id="div_id_tipo" class="holder">
<label>{% field_verbose_name object 'data' %}</label>
<p>{{ object.data}}</p>
</div>
</div>
<div class="columns large-4">
<div class="col-md-4">
<div id="div_id_tipo" class="holder">
<label>{% field_verbose_name object 'hora' %}</label>
<p>{{ object.hora|time:"H:i:s"}}</p>
</div>
</div>
<div class="columns large-2">
<div class="col-md-2">
<div id="div_id_tipo" class="holder">
<label>{% field_verbose_name object 'numero' %}</label>
<p>{{ object.numero|default:''}}</p>
</div>
</div>
<div class="columns large-2">
<div class="col-md-2">
<div id="div_id_tipo" class="holder">
<label>{% field_verbose_name object 'edicao' %}</label>
<p>{{ object.edicao|default:''}}</p>
@ -66,25 +66,25 @@
</div>
</div>
<div class="row">
<div class="columns large-2">
<div class="col-md-2">
<div id="div_id_tipo" class="holder">
<label>{% field_verbose_name object 'pagina_inicio' %}</label>
<p>{{ object.pagina_inicio|default:''}}</p>
</div>
</div>
<div class="columns large-2">
<div class="col-md-2">
<div id="div_id_tipo" class="holder">
<label>{% field_verbose_name object 'pagina_fim' %}</label>
<p>{{ object.pagina_fim|default:''}}</p>
</div>
</div>
<div class="columns large-8">
<div class="col-md-8">
<div id="div_id_tipo" class="holder">
<label>{% field_verbose_name object 'url_externa' %}</label>
<p>{{ object.url_externa|default:''}}</p>
</div>
</div>
</div>
</fieldset>
{% endblock detail_content %}

16
templates/compilacao/textoarticulado_detail.html

@ -11,7 +11,7 @@
{%else%}
<dd><a href="{% url 'ta_detail' object.pk %}">{% trans 'Início' %}</a></dd>
{%endif%}
<dd><a href="{% url 'ta_pub_list' object.pk %}">{% model_verbose_name_plural 'compilacao.models.Publicacao' %}</a></dd>
<dd><a href="{% url 'ta_text' object.pk %}">{% trans 'Texto' %}</a></dd>
@ -24,7 +24,7 @@
<div class="clearfix">
{% block actions %}
<ul class="button-group right">
{%if object %}
<li><a href="{% url 'ta_edit' object.pk %}" class="button tiny">{% trans 'Edição dos Metadados do Texto Articulado' %}</a></li>
<li><a href="{% url 'ta_delete' object.pk %}" class="button alert tiny">{% trans 'Excluir' %}</a></li>
@ -50,7 +50,7 @@
<div class="row">
<div class="columns large-3">
<div class="col-md-3">
<div id="div_id_tipo" class="holder">
<label>{% field_verbose_name object 'tipo_ta' %}</label>
<p>{{ object.tipo_ta}}</p>
@ -58,7 +58,7 @@
</div>
{% if object.content_object and object.content_object.tipo%}
<div class="columns large-3">
<div class="col-md-3">
<div id="div_id_tipo" class="holder">
<label>{% field_verbose_name object.content_object 'tipo' %}</label>
<p>{{ object.content_object.tipo}}</p>
@ -66,21 +66,21 @@
</div>
{%endif%}
<div class="columns large-2">
<div class="col-md-2">
<div id="div_id_numero" class="holder">
<label>{% field_verbose_name object 'numero' %}</label>
<p>{{ object.numero}}</p>
</div>
</div>
<div class="columns large-2">
<div class="col-md-2">
<div id="div_id_ano" class="holder">
<label>{% field_verbose_name object 'ano' %}</label>
<p>{{ object.ano}}</p>
</div>
</div>
<div class="columns large-2">
<div class="col-md-2">
<div id="div_id_data" class="holder">
<label>{% field_verbose_name object 'data' %}</label>
<p>{{ object.data}}</p>
@ -89,7 +89,7 @@
</div>
<br>
<div class="row">
<div class="columns large-12">
<div class="col-md-12">
<div id="div_id_ementa" class="holder">
<label>{% field_verbose_name object 'ementa' %}</label>
<p>{{ object.ementa|safe}}</p>

8
templates/compilacao/tipotextoarticulado_detail.html

@ -21,27 +21,27 @@
<div class="row">
<div class="columns large-2">
<div class="col-md-2">
<div id="div_id_tipo" class="holder">
<label>{% field_verbose_name object 'sigla' %}</label>
<p>{{ object.sigla}}</p>
</div>
</div>
<div class="columns large-4">
<div class="col-md-4">
<div id="div_id_numero" class="holder">
<label>{% field_verbose_name object 'descricao' %}</label>
<p>{{ object.descricao}}</p>
</div>
</div>
<div class="columns large-3">
<div class="col-md-3">
<div id="div_id_ano" class="holder">
<label>{% field_verbose_name object 'content_type' %}</label>
<p>{{ object.content_type|default:""}}</p>
</div>
</div>
<div class="columns large-3">
<div class="col-md-3">
<div id="div_id_ano" class="holder">
<label>{% field_verbose_name object 'participacao_social' %}</label>
<p>{{ object.get_participacao_social_display}}</p>

Loading…
Cancel
Save