Skip to content

Commit

Permalink
showing PDF, Expediente buttons. #3
Browse files Browse the repository at this point in the history
  • Loading branch information
aniversarioperu committed Dec 6, 2014
1 parent ec69ce8 commit af882e5
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
1 change: 1 addition & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ History
* v1.4.X (2014-XX-XX) Only accept as search keywords strings with len > 2. Sort
simple search result by codigo desc. Fix bug on pagination links. Keywords
were shown with brackets. Search box of simple search show user's query.
Added links to PDF and Expediente in Seguimientos page.
* v1.4.1 (2014-11-11) Improved general search engine, also events in
`seguimientos` are queried. Autofocus on search box when page loads. Better
highlighting of keywords. Check errors in datefield widget (advanced search).
Expand Down
50 changes: 50 additions & 0 deletions proyectos_de_ley/seguimientos/templates/seguimientos/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,32 @@ <h1 id="proyectos_de_ley">Proyecto de Ley {{ item.codigo }}</h1>
</div>
</div>
</div><!-- col -->

<div class="col-lg-5 col-md-4 hidden-sm hidden-xs">
<div class="panel panel-default">
<div class="panel-heading"><b>Enlaces externos</b></div>
<div class="panel-body">
{% if item.pdf_url != ''%}
<a class='btn btn-lg btn-primary'
href="{{ item.pdf_url }}" role='button'>PDF</a>
{% else %}
<a class='btn btn-lg btn-primary disabled'
href="#" role='button'>Sin PDF</a>
{% endif %}

{% if item.expediente != ''%}
<a class='btn btn-lg btn-primary'
href="{{ item.expediente }}" role='button'>EXPEDIENTE</a>
{% else %}
<a class='btn btn-lg btn-primary disabled'
href="#" role='button'>Sin EXPEDIENTE</a>
{% endif %}
</div>
</div>
</div><!-- col -->
</div><!-- row -->


<div class="row">
<div class="col-lg-7 col-md-8 col-sm-11">
<div id="my-timeline"></div>
Expand Down Expand Up @@ -114,6 +138,32 @@ <h1 id="proyectos_de_ley">Proyecto de Ley {{ item.codigo }}</h1>
</div><!-- row -->
{% endif %}

<div class="row">
<div class="col-xs-11 visible-sm visible-xs">
<div class="panel panel-default">
<div class="panel-heading"><b>Enlaces externos</b></div>
<div class="panel-body">
{% if item.pdf_url != ''%}
<a class='btn btn-lg btn-primary'
href="{{ item.pdf_url }}" role='button'>PDF</a>
{% else %}
<a class='btn btn-lg btn-primary disabled'
href="#" role='button'>Sin PDF</a>
{% endif %}

{% if item.expediente != ''%}
<a class='btn btn-lg btn-primary'
href="{{ item.expediente }}" role='button'>EXPEDIENTE</a>
{% else %}
<a class='btn btn-lg btn-primary disabled'
href="#" role='button'>Sin EXPEDIENTE</a>
{% endif %}
</div>
</div>
</div><!-- col -->
</div><!-- row -->


</div><!-- container -->


Expand Down
1 change: 1 addition & 0 deletions proyectos_de_ley/seguimientos/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def get_proyecto_from_short_url(short_url):
item.congresistas_with_links = hiperlink_congre(item.congresistas)
item.fecha_presentacion = convert_string_to_time(item.fecha_presentacion)
item.numero_congresistas = len(item.congresistas.split(","))
print(item.pdf_url)
return item


Expand Down

0 comments on commit af882e5

Please sign in to comment.