Skip to content

Commit

Permalink
Quick button widget get icon from model icon.
Browse files Browse the repository at this point in the history
  • Loading branch information
sshwsfc committed May 14, 2013
1 parent f63c442 commit 53f5527
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion xadmin/templates/xadmin/widgets/qbutton.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="row-fluid">
{% for btn in btns %}
<a href="{{ btn.url }}" class="btn btn-primary btn-quick span3">
<i class="icon-leaf"></i>
<i class="icon-{% if btn.icon %}{{btn.icon}}{%else%}leaf{% endif %}"></i>
<p>{{ btn.title }}</p>
</a>
{% endfor %}
Expand Down
1 change: 1 addition & 0 deletions xadmin/views/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ def context(self, context):
btn['url'] = reverse("%s:%s_%s_%s" % (self.admin_site.app_name, model._meta.app_label,
model._meta.module_name, b.get('view', 'changelist')))
btn['title'] = model._meta.verbose_name
btn['icon'] = self.dashboard.get_model_icon(model)
else:
btn['url'] = b['url']

Expand Down

0 comments on commit 53f5527

Please sign in to comment.