Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Show django fiber version #112

Merged
merged 2 commits into from

2 participants

@nvandijk

Show the version of Django Fiber in the admin sidebar.

Niels van Dijk added some commits
@dbunskoek dbunskoek merged commit fe0985d into ridethepony:dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 27, 2012
  1. show fiber version in df sidebar

    Niels van Dijk authored
  2. styling fiber version in sidebar

    Niels van Dijk authored
This page is out of date. Refresh to see the latest.
View
20 fiber/static/fiber/css/admin.css
@@ -138,6 +138,26 @@ div.ui-dialog form label,
background: transparent url("Aristo-jQuery-UI-Theme/css/Aristo/images/ui-icons_222222_256x240.png") -2px -62px no-repeat;
}
+#df-sidebar #df-sidebar-content-section {
+ padding-bottom: 22px;
+}
+
+#df-sidebar #df-sidebar-version {
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ border-top: 1px solid #ddd;
+ background-color: #c2c2c2;
+ width: 100%;
+}
+
+#df-sidebar #df-sidebar-version p {
+ margin: 0;
+ padding: 0 0 0 21px;
+ font-size: 10px;
+ color: #999;
+}
+
/* prevent margin collapsing in admin */
.content[data-fiber-data]:after {
content: ".";
View
3  fiber/templates/fiber/admin.html
@@ -21,10 +21,11 @@
<h2>{% trans "Content" %}</h2>
<div id="df-sidebar-content-tree" class="sidebar-tree"></div>
</div>
+ <div id="df-sidebar-version"><p>Django Fiber: {% fiber_version %}</p></div>
</div>
<div id="df-btn-toggle-sidebar"></div>
</div>
<div id="df-wpr-busy">
<div id="df-busy"></div>
-</div>
+</div>
View
7 fiber/templatetags/fiber_tags.py
@@ -3,6 +3,8 @@
from django import template
from django.utils import simplejson
+from fiber import __version__ as fiber_version
+
from fiber.models import Page, ContentItem
from fiber.utils.urls import get_admin_change_url
@@ -252,3 +254,8 @@ def escape_json_for_html(value):
@register.filter
def can_edit(obj, user):
return PERMISSIONS.can_edit(user, obj)
+
+
+@register.simple_tag(name='fiber_version')
+def show_fiber_version():
+ return fiber_version
Something went wrong with that request. Please try again.