Skip to content

Commit

Permalink
Fixed user permission check in inline model, where only people who ha…
Browse files Browse the repository at this point in the history
…ve 'add_permission' perm, should have '+' icon to add new elements. It's fix for #142 from main django-xadmin project.
  • Loading branch information
Michał Szpadzik committed Apr 7, 2014
1 parent 631f129 commit a49214b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions xadmin/templates/xadmin/edit_inline/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@

{% block box_title %}
{% if not formset.formset.detail_page %}
{% if has_add_permission %}
<a class="add-row" id="{{ prefix }}-add-row" href="javascript:void(0)"><i class="icon fa fa-plus"></i></a>
{% endif %}
{% endif %}
{{ formset.opts.verbose_name_plural|title }}
{% endblock box_title %}

Expand Down

0 comments on commit a49214b

Please sign in to comment.