Browse Source

Fixes #1158

pull/1167/head
Edward Ribeiro 8 years ago
parent
commit
386bf5364c
  1. 10
      sapl/parlamentares/views.py
  2. BIN
      sapl/static/img/avatar.png
  3. 2
      sapl/static/styles/app.scss

10
sapl/parlamentares/views.py

@ -4,6 +4,7 @@ from django.core.urlresolvers import reverse, reverse_lazy
from django.db.models import F, Q
from django.http import JsonResponse
from django.http.response import HttpResponseRedirect
from django.templatetags.static import static
from django.utils.datastructures import MultiValueDictKeyError
from django.utils.translation import ugettext_lazy as _
from django.views.generic import FormView
@ -345,6 +346,15 @@ class ParlamentarCrud(Crud):
# Tira Link do avatar_html e coloca no nome
for row in context['rows']:
# preenche coluna foto, se vazia
if not row[0][0]:
# img = '  '
img = "<center><img width='50px' \
height='50px' src='%s'/></center>" \
% static('img/avatar.png')
row[0] = (img, row[0][1])
# Coloca a filiação atual ao invés da última
if row[0][1]:
# Pega o Parlamentar por meio da pk

BIN
sapl/static/img/avatar.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

2
sapl/static/styles/app.scss

@ -235,6 +235,8 @@ fieldset {
.avatar-parlamentar {
height: 84px;
width: 84px;
margin: 0 auto;
display: table;
}
/* INDEX */

Loading…
Cancel
Save