Permalink
Browse files

Merge pull request #112 from nvandijk/showversion

Show version of Django Fiber in the sidebar
  • Loading branch information...
2 parents 1e2a2f2 + cf70cf5 commit fe0985d97ffa15114fc1fabd34a64493e14fde26 @dbunskoek dbunskoek committed Aug 27, 2012
Showing with 29 additions and 1 deletion.
  1. +20 −0 fiber/static/fiber/css/admin.css
  2. +2 −1 fiber/templates/fiber/admin.html
  3. +7 −0 fiber/templatetags/fiber_tags.py
@@ -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: ".";
@@ -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>
@@ -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

0 comments on commit fe0985d

Please sign in to comment.