diff --git a/sapl/parlamentares/views.py b/sapl/parlamentares/views.py index f9dc33f60..0ac04b7af 100644 --- a/sapl/parlamentares/views.py +++ b/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 = "
" \ + % 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 diff --git a/sapl/static/img/avatar.png b/sapl/static/img/avatar.png new file mode 100644 index 000000000..959c168a5 Binary files /dev/null and b/sapl/static/img/avatar.png differ diff --git a/sapl/static/styles/app.scss b/sapl/static/styles/app.scss index b7d83a3df..f1a1ff684 100644 --- a/sapl/static/styles/app.scss +++ b/sapl/static/styles/app.scss @@ -235,6 +235,8 @@ fieldset { .avatar-parlamentar { height: 84px; width: 84px; + margin: 0 auto; + display: table; } /* INDEX */