Author: croberts
Date: 2011-07-25 15:44:13 +0000 (Mon, 25 Jul 2011)
New Revision: 4891
Modified:
trunk/cumin/python/cumin/usergrid/widgets.py
Log:
Truncating the submission name for the GridUser view of submissions per BZ 699732.
Modified: trunk/cumin/python/cumin/usergrid/widgets.py
===================================================================
--- trunk/cumin/python/cumin/usergrid/widgets.py 2011-07-22 20:40:31 UTC (rev 4890)
+++ trunk/cumin/python/cumin/usergrid/widgets.py 2011-07-25 15:44:13 UTC (rev 4891)
@@ -112,7 +112,7 @@
self.add_filter(self.user, self.cls.Owner, cls.name)
frame = "main.submissions.submission"
- col = ObjectLinkColumn(app, "name", self.cls.Name, self.cls._id,
frame)
+ col = self.UserSubmissionObjectLinkColumn(app, "name", self.cls.Name,
self.cls._id, frame)
self.insert_column(0, col)
self.add_search_filter(col)
@@ -126,6 +126,13 @@
self.links.add_child(link)
self.enable_csv_export(user)
+
+ class UserSubmissionObjectLinkColumn(ObjectLinkColumn):
+ def render_cell_content(self, session, record):
+ retval = len(record) > 0 and record[self.field.index] or ""
+ if(len(record[self.field.index]) > 50):
+ retval = record[self.field.index][:50] + "..." #indicate that
we truncated the name
+ return retval
class UserJobStatSet(NewStatSet):
def __init__(self, app, name, user):
Show replies by date