From 87b9fda383b6c36a18c792f0b338bc8197937183 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Thu, 13 Aug 2009 12:19:00 -0400 Subject: [PATCH] Restoring history/grid.mako --- templates/history/grid.mako | 196 ++++++++++++++++++++++++++++++++++++ 1 file changed, 196 insertions(+) create mode 100644 templates/history/grid.mako diff --git a/templates/history/grid.mako b/templates/history/grid.mako new file mode 100644 index 00000000000..2ddbf135c40 --- /dev/null +++ b/templates/history/grid.mako @@ -0,0 +1,196 @@ +<%inherit file="/base.mako"/> +<%def name="title()">${grid.title} + +%if message: +

+

${message}
+
+

+%endif + +<%def name="javascripts()"> + ${parent.javascripts()} + + + +<%def name="stylesheets()"> + + + + +%if grid.standard_filters: +
+

${grid.title}

+ Filter: + %for i, filter in enumerate( grid.standard_filters ): + %if i > 0: + | + %endif + ${filter.label} + %endfor +
+%endif + +
+ + + + + %for column in grid.columns: + %if column.visible: + <% + href = "" + extra = "" + if column.sortable: + if sort_key == column.key: + if sort_order == "asc": + href = url( sort=( "-" + column.key ) ) + extra = "↓" + else: + href = url( sort=( column.key ) ) + extra = "↑" + else: + href = url( sort=column.key ) + %> + 1: + colspan="${column.ncells}" + %endif + > + %if href: + ${column.label} + %else: + ${column.label} + %endif + ${extra} + + %endif + %endfor + + + + + %for i, item in enumerate( query ): + + ## Item selection column + + ## Data columns + %for column in grid.columns: + %if column.visible: + <% + # Link + link = column.get_link( trans, grid, item ) + if link: + href = url( **link ) + else: + href = None + # Value (coerced to list so we can loop) + value = column.get_value( trans, grid, item ) + if column.ncells == 1: + value = [ value ] + %> + %for cellnum, v in enumerate( value ): + <% + # Attach popup menu? + if column.attach_popup and cellnum == 0: + extra = '' % i + else: + extra = "" + %> + %if href: + + %else: + + %endif + + %endfor + %endif + %endfor + ## Actions column + + + %endfor + + + + + + + +
+ + ${v} ${extra}${v}${extra} +
+ %for operation in grid.operations: + %if operation.allowed( item ): + ${operation.label} + %endif + %endfor +
+
+ For selected histories: + %for operation in grid.operations: + %if operation.allow_multiple: + + %endif + %endfor +
+