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

2
materia/views.py

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

2
sapl/layout.py

@ -5,7 +5,7 @@ from django.utils.translation import ugettext as _
def to_column(name_span): def to_column(name_span):
fieldname, span = 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): def to_row(names_spans):

2
sessao/views.py

@ -2503,7 +2503,7 @@ class AcompanharMateriaForm(ModelForm):
row1 = sapl.layout.to_row([('email', 10)]) row1 = sapl.layout.to_row([('email', 10)])
row1.append( 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() self.helper = FormHelper()

22
templates/compilacao/publicacao_detail.html

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

16
templates/compilacao/textoarticulado_detail.html

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

8
templates/compilacao/tipotextoarticulado_detail.html

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

Loading…
Cancel
Save