diff options
author | Filipp Lepalaan <filipp@mac.com> | 2015-08-04 10:11:24 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2015-08-04 10:11:24 +0300 |
commit | 63b0fc6269b38edf7234b9f151b80d81f614c0a3 (patch) | |
tree | 555de3068f33f8dddb4619349bbea7d9b7c822fd /servo/templates/snippets | |
download | Servo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.tar.gz Servo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.tar.bz2 Servo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.zip |
Initial commit
First public commit
Diffstat (limited to 'servo/templates/snippets')
-rw-r--r-- | servo/templates/snippets/alert.html | 1 | ||||
-rwxr-xr-x | servo/templates/snippets/control_group.html | 3 | ||||
-rwxr-xr-x | servo/templates/snippets/dropdown.html | 11 | ||||
-rwxr-xr-x | servo/templates/snippets/dropdown_menu.html | 5 | ||||
-rwxr-xr-x | servo/templates/snippets/error_modal.html | 10 | ||||
-rwxr-xr-x | servo/templates/snippets/filtering_form.html | 15 | ||||
-rwxr-xr-x | servo/templates/snippets/form_field.html | 12 | ||||
-rwxr-xr-x | servo/templates/snippets/form_field_label.html | 1 | ||||
-rwxr-xr-x | servo/templates/snippets/form_input.html | 22 | ||||
-rwxr-xr-x | servo/templates/snippets/modal.html | 14 |
10 files changed, 94 insertions, 0 deletions
diff --git a/servo/templates/snippets/alert.html b/servo/templates/snippets/alert.html new file mode 100644 index 0000000..9cc4f50 --- /dev/null +++ b/servo/templates/snippets/alert.html @@ -0,0 +1 @@ +<div class="alert alert-{{ kind }}" role="alert">{{ message }}</div> diff --git a/servo/templates/snippets/control_group.html b/servo/templates/snippets/control_group.html new file mode 100755 index 0000000..7e61d6a --- /dev/null +++ b/servo/templates/snippets/control_group.html @@ -0,0 +1,3 @@ +<div class="control-group{% for e in field.errors %} error{% endfor %}"> + {{ field }} +</div> diff --git a/servo/templates/snippets/dropdown.html b/servo/templates/snippets/dropdown.html new file mode 100755 index 0000000..70ee226 --- /dev/null +++ b/servo/templates/snippets/dropdown.html @@ -0,0 +1,11 @@ +<div class="btn-group"> + <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> + <span class="caret"></span> + {{ menu.title }} + </a> + <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu"> + {% for i in menu.items %} + <li><a tabindex="-1" href="{{ i.href }}">{{ i.title }}</a></li> + {% endfor %} + </ul> +</div> diff --git a/servo/templates/snippets/dropdown_menu.html b/servo/templates/snippets/dropdown_menu.html new file mode 100755 index 0000000..c57b563 --- /dev/null +++ b/servo/templates/snippets/dropdown_menu.html @@ -0,0 +1,5 @@ +<ul class="dropdown-menu"> +{% for i in items %} + <li><a href="{{ i.url }}">{{ i.title }}</a></li> +{% endfor %} +</ul> diff --git a/servo/templates/snippets/error_modal.html b/servo/templates/snippets/error_modal.html new file mode 100755 index 0000000..c63010a --- /dev/null +++ b/servo/templates/snippets/error_modal.html @@ -0,0 +1,10 @@ +{% extends "modal.html" %} +{% load i18n %} + +{% block header %} + {% trans "An error occured..." %} +{% endblock header %} + +{% block body %} + {{ error }} +{% endblock body %} diff --git a/servo/templates/snippets/filtering_form.html b/servo/templates/snippets/filtering_form.html new file mode 100755 index 0000000..b2ce391 --- /dev/null +++ b/servo/templates/snippets/filtering_form.html @@ -0,0 +1,15 @@ +{% load i18n %} +<div id="collapsable" class="collapse out"> + <form method="post" action="" class="form-inline">{% csrf_token %} + {% for field in form %} + <div class="control-group pull-left"> + <label class="control-label">{{ field.label|default:" " }}</label> + <div class="controls">{{ field }}</div> + </div> + {% endfor %} + <p class="clearfix"><hr/></p> + <div class="pull-right"> + <button type="submit" class="btn btn-primary"><i class="icon-search icon-white"></i> {% trans "Search" %}</button> + </div> + </form> +</div> diff --git a/servo/templates/snippets/form_field.html b/servo/templates/snippets/form_field.html new file mode 100755 index 0000000..59578f4 --- /dev/null +++ b/servo/templates/snippets/form_field.html @@ -0,0 +1,12 @@ +<div class="control-group{% for e in field.errors %} error{% endfor %}"> + <label class="control-label">{{ field.label }}</label> + <div class="controls"> + {{ field }} + {% if field.help_text %} + <span class="help-block">{{ field.help_text }}</span> + {% endif %} + {% for e in field.errors %} + <span class="help-inline">{{ e }}</span> + {% endfor %} + </div> +</div> diff --git a/servo/templates/snippets/form_field_label.html b/servo/templates/snippets/form_field_label.html new file mode 100755 index 0000000..0a8d4b1 --- /dev/null +++ b/servo/templates/snippets/form_field_label.html @@ -0,0 +1 @@ +<label class="control-label {{ field.css_classes }}">{% trans field.label %}</label> diff --git a/servo/templates/snippets/form_input.html b/servo/templates/snippets/form_input.html new file mode 100755 index 0000000..1d686d0 --- /dev/null +++ b/servo/templates/snippets/form_input.html @@ -0,0 +1,22 @@ +{% load i18n %} +{% load servo_tags %} + +<div class="control-group{% for e in field.errors %} error{% endfor %}"> + {% if field|widget_is:"CheckboxInput" %} + <div class="controls"> + <label class="checkbox"> + {{ field }} {% trans field.label %} + </label> + </div> + {% else %} + <div class="controls"> + {{ field }} + {% if field.help_text %} + <span class="help-block">{% trans field.help_text %}</span> + {% endif %} + {% for e in field.errors %} + <span class="help-inline">{{ e }}</span> + {% endfor %} + </div> + {% endif %} +</div> diff --git a/servo/templates/snippets/modal.html b/servo/templates/snippets/modal.html new file mode 100755 index 0000000..dfa552a --- /dev/null +++ b/servo/templates/snippets/modal.html @@ -0,0 +1,14 @@ +{% load i18n %} +<div class="modal-header"> + <button type="button" class="close" data-dismiss="modal">×</button> + <h3>{% block header %}{% endblock header %}</h3> +</div> +<div class="modal-body"> + {% block body %}{% endblock body %} +</div> +<div class="modal-footer"> +{% block footer %} + <button class="btn" data-dismiss="modal">{% trans "Close" %}</button> + <button type="submit" class="btn btn-primary submit">{% trans "Done" %}</button> +{% endblock footer %} +</div> |