mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 07:46:23 -04:00
Add count of live services to organisations
This makes it clear that these are something different to the trial mode services, in that they are a container of multiple things.
This commit is contained in:
@@ -270,7 +270,10 @@ class User(JSONModel, UserMixin):
|
||||
|
||||
@property
|
||||
def organisations(self):
|
||||
return self.orgs_and_services['organisations']
|
||||
return [
|
||||
Organisation.from_id(organisation['id'])
|
||||
for organisation in self.orgs_and_services['organisations']
|
||||
]
|
||||
|
||||
@property
|
||||
def organisation_ids(self):
|
||||
|
||||
@@ -20,6 +20,10 @@
|
||||
{% for org in current_user.organisations %}
|
||||
<li class="browse-list-item">
|
||||
<a href="{{ url_for('.organisation_dashboard', org_id=org.id) }}" class="browse-list-link">{{ org.name }}</a>
|
||||
<p class="browse-list-hint">
|
||||
{{ org.live_services|length }}
|
||||
live service{% if org.live_services|length != 1 %}s{% endif %}
|
||||
</p>
|
||||
</li>
|
||||
<div class="keyline-block"></div>
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user