Commit 62091294 authored by Giorgos Korfiatis's avatar Giorgos Korfiatis
Browse files

Use admin version of state display

parent dd2ff794
......@@ -103,7 +103,7 @@ def project_fields(project):
('application id', app.id),
('name', project.name),
('owner', app.owner),
('status', project.state_display()),
('status', project.admin_state_display()),
('creation date', format_date(project.creation_date)),
])
deact_date = project.deactivation_date
......
......@@ -1717,6 +1717,17 @@ class Project(models.Model):
def state_display(self):
return self.STATE_DISPLAY.get(self.state, _('Unknown'))
def admin_state_display(self):
s = self.state_display()
if self.sync_pending():
s += ' (sync pending)'
return s
def sync_pending(self):
if self.state != self.APPROVED:
return self.is_active
return not self.is_active or self.is_modified
def expiration_info(self):
return (str(self.id), self.name, self.state_display(),
str(self.application.end_date))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment