New bootstrap based frontend UI. Merged from #121 with many fixes. Closes issues #121, #59 and #100

This commit is contained in:
Roberto Rosario
2015-03-31 03:26:57 -04:00
parent 5a7885ddcb
commit 80c04b1fb7
240 changed files with 15551 additions and 17932 deletions

View File

@@ -61,18 +61,18 @@ class DetailSelectMultiple(forms.widgets.SelectMultiple):
return mark_safe(output + '</ul>\n')
def exists_with_famfam(path):
def exists_widget(path):
try:
return two_state_template(os.path.exists(path))
except Exception as exception:
return exception
def two_state_template(state, famfam_ok_icon='tick', famfam_fail_icon='cross'):
def two_state_template(state, ok_icon='fa fa-check', fail_icon='fa fa-cross'):
if state:
return mark_safe('<span class="famfam active famfam-%s"></span>' % famfam_ok_icon)
return mark_safe('<i class="text-success {}"></i>'.format(ok_icon))
else:
return mark_safe('<span class="famfam active famfam-%s"></span>' % famfam_fail_icon)
return mark_safe('<i class="text-danger {}"></i>'.format(fail_icon))
class TextAreaDiv(forms.widgets.Widget):