changeset 222:0c0708eb16a6

Make IDs clickable in objects listing.
author Daniele Nicolodi <daniele@grinta.net>
date Mon, 21 Nov 2011 16:36:25 +0100
parents 2de8715f0d59
children 951bc04dfb19
files src/ltpdarepo/static/style.css src/ltpdarepo/templates/objs.html
diffstat 2 files changed, 11 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/ltpdarepo/static/style.css	Mon Nov 21 16:15:28 2011 +0100
+++ b/src/ltpdarepo/static/style.css	Mon Nov 21 16:36:25 2011 +0100
@@ -594,12 +594,17 @@
     border-bottom: 1px solid #DC143C;
 }
 
-.listing td.id {
-    color: #DC143C;
+.listing td.id, td.name {
+    font-family: andale mono, monospace;
 }
 
-.listing td.id, td.name {
-    font-family: andale mono, monospace;
+.listing td.id {
+    text-align: right;
+}
+
+.listing td.id a {
+    color: #DC143C;
+    text-decoration: none;
 }
 
 .listing td.name, td.title, td.description {
--- a/src/ltpdarepo/templates/objs.html	Mon Nov 21 16:15:28 2011 +0100
+++ b/src/ltpdarepo/templates/objs.html	Mon Nov 21 16:36:25 2011 +0100
@@ -26,8 +26,8 @@
   <tbody>
     {% for obj in objs %}
     <tr class="data {{ loop.cycle('odd', 'even') }}" id="{{ loop.index }}">
-      {% for field in fields %}
-      {% if field == 'name' %}
+      {% for field in fields %}      
+      {% if field in ('id', 'name') %}
       <td class="{{ field }}"><a href="{{ url_for('browse.obj', database=database.id, objid=obj.id) }}">{{ obj[field] }}</a></td>
       {% else %}
       <td class="{{ field }}">{{ obj[field]|string|truncate(60, False, '…') }}</td>