aboutsummaryrefslogtreecommitdiffstats
path: root/servo/templates/generic
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2015-08-04 10:11:24 +0300
committerFilipp Lepalaan <filipp@mac.com>2015-08-04 10:11:24 +0300
commit63b0fc6269b38edf7234b9f151b80d81f614c0a3 (patch)
tree555de3068f33f8dddb4619349bbea7d9b7c822fd /servo/templates/generic
downloadServo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.tar.gz
Servo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.tar.bz2
Servo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.zip
Initial commit
First public commit
Diffstat (limited to 'servo/templates/generic')
-rw-r--r--servo/templates/generic/admin_list.html18
-rwxr-xr-xservo/templates/generic/button_dropdown.html12
-rwxr-xr-xservo/templates/generic/delete.html17
-rwxr-xr-xservo/templates/generic/index.html23
4 files changed, 70 insertions, 0 deletions
diff --git a/servo/templates/generic/admin_list.html b/servo/templates/generic/admin_list.html
new file mode 100644
index 0000000..25a29c6
--- /dev/null
+++ b/servo/templates/generic/admin_list.html
@@ -0,0 +1,18 @@
+{% extends "admin/index.html" %}
+{% load servo_tags %}
+{% load i18n %}
+
+{% block second_column %}
+<div class="span3">
+ <ul class="nav nav-list">
+ <li class="nav-header">{{ title }}</li>
+ {% for o in object_list %}
+ <li class="{% active_url request o.get_admin_url %}"><a href="{{ o.get_admin_url }}">{{ o.title|truncatechars:25 }}</a></li>
+ {% endfor %}
+ </ul>
+</div>
+<div class="span9">
+ {% block third_column %}
+ {% endblock third_column %}
+</div>
+{% endblock second_column %}
diff --git a/servo/templates/generic/button_dropdown.html b/servo/templates/generic/button_dropdown.html
new file mode 100755
index 0000000..39aba25
--- /dev/null
+++ b/servo/templates/generic/button_dropdown.html
@@ -0,0 +1,12 @@
+{% if items.count %}
+<div class="btn-group">
+ <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
+ <i class="icon-file"></i> <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu">
+ {% for i in items %}
+ <li><a href="{{ i.get_absolute_url }}">{{ i }}</a></li>
+ {% endfor %}
+ </ul>
+</div>
+{% endif %}
diff --git a/servo/templates/generic/delete.html b/servo/templates/generic/delete.html
new file mode 100755
index 0000000..0503ce5
--- /dev/null
+++ b/servo/templates/generic/delete.html
@@ -0,0 +1,17 @@
+{% extends "snippets/modal.html" %}
+{% load i18n %}
+
+{% block header %}
+ {{ title }}
+{% endblock header %}
+
+{% block body %}
+ {{ explanation }}
+{% endblock body %}
+
+{% block footer %}
+ <form method="post" action="{{ action }}">
+ {% csrf_token %}
+ <button type="submit" class="btn btn-danger">{% trans "Delete" %}</button>
+ </form>
+{% endblock footer %}
diff --git a/servo/templates/generic/index.html b/servo/templates/generic/index.html
new file mode 100755
index 0000000..379db1c
--- /dev/null
+++ b/servo/templates/generic/index.html
@@ -0,0 +1,23 @@
+{% extends "admin/index.html" %}
+{% load i18n %}
+
+{% block second_column %}
+<ul class="nav nav-tabs">
+ <li class="active"><a href="#">{% trans "Browse" %}</a></li>
+</ul>
+
+<table class="table">
+{% for item in object_list %}
+ <tr>
+ <td><a href="{{ item.id }}/edit/">{{ item.title }}</a></td>
+ <td style="text-align:right">
+ <div class="btn-group">
+ <a href="{{ item.pk }}/edit/" class="btn btn-warning" title="{% trans "Edit" %}"><i class="icon-pencil icon-white"></i></a>
+ <a href="{{ item.pk }}/delete/" class="btn btn-danger" data-modal="#modal" title="{% trans "Delete" %}"><i class="icon-trash icon-white"></i></a>
+ </div>
+ </td>
+ </tr>
+{% endfor %}
+</table>
+<a class="btn" href="new/"><i class="icon-plus"></i> {% trans "Create New" %}</a>
+{% endblock second_column %}