Source

django-bootstrap-theme / bootstrap_theme / templatetags / bootstrap.py

Diff from to

bootstrap_theme/templatetags/bootstrap.py

 
 @register.simple_tag
 def buttonlink(url, icn):
-    return '<a class="btn" href="%s"><i class="icon-%s"></i></a>' % (url, icn)
+    return '<a class="btn btn-default" href="%s"><i class="glyphicon glyphicon-%s"></i></a>' % (url, icn)
 
 @register.filter
 def emphasis(value, arg=""):
 @register.filter
 def yesnoicon(value):
     icon = "ok" if value else "remove"
-    return mark_safe('<i class="icon-%s"></i>' % icon)
+    return mark_safe('<i class="glyphicon glyphicon-%s"></i>' % icon)
 
 @register.filter
 def ratingicon(value):
-    return mark_safe('<i class="icon-star"></i>' * value)
+    return mark_safe('<i class="glyphicon glyphicon-star"></i>' * value)
 
 class NavbarNode(template.Node):
     def __init__(self, nodelist, site_title):
 
 @register.filter
 def link(value, icon=None):
-    icon_html = '<i class="icon-%s"></i>' % icon if icon else ''
+    icon_html = '<i class="glyphicon glyphicon-%s"></i>' % icon if icon else ''
     try:
         return mark_safe('<a href="%s">%s%s</a>' % (value.get_absolute_url(), icon_html, value))
     except:
 
 @register.simple_tag
 def icon(slug):
-    return mark_safe('<i class="icon-%s"></i>' % slug)
+    return mark_safe('<i class="glyphicon glyphicon-%s"></i>' % slug)
 
 @register.simple_tag
 def modal_button(title, modal=None, icon=None):
-    icon = '<i class="icon-%s"></i>' % icon if icon else ''
+    icon = '<i class="glyphicon glyphicon-%s"></i>' % icon if icon else ''
     if not modal:
         modal = 'myModal'
     return mark_safe('<a class="btn" role="button" href="#%s" data-toggle="modal">%s%s</a>' % (modal, icon, title))