Skip to content

Commit

Permalink
Introduce last updated column
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Aug 22, 2017
1 parent ced3aa0 commit cc3a3d5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/galaxy/webapps/galaxy/controllers/forms.py
Expand Up @@ -7,7 +7,7 @@
from galaxy import model, util
from galaxy.web.base.controller import BaseUIController, web
from galaxy.web.form_builder import FileField, TextField, HiddenField, SelectField
from galaxy.web.framework.helpers import iff, grids
from galaxy.web.framework.helpers import grids, iff, time_ago

log = logging.getLogger(__name__)

Expand All @@ -32,12 +32,12 @@ class StatusColumn(grids.GridColumn):
def get_value(self, trans, grid, user):
if user.deleted:
return "deleted"
return ""
return "active"

# Grid definition
title = "Forms"
model_class = model.FormDefinitionCurrent
default_sort_key = "-create_time"
default_sort_key = "-update_time"
num_rows_per_page = 50
preserve_state = True
use_paging = True
Expand All @@ -54,6 +54,7 @@ def get_value(self, trans, grid, user):
model_class=model.FormDefinition,
filterable="advanced"),
TypeColumn("Type"),
grids.GridColumn("Last Updated", key="update_time", format=time_ago),
StatusColumn("Status"),
grids.DeletedColumn("Deleted",
key="deleted",
Expand Down

0 comments on commit cc3a3d5

Please sign in to comment.