mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-06 13:38:25 -04:00
Put organisations on the user model
As in other places, putting a model layer between the view and the API client makes the code cleaner and clearer.
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
</li>
|
||||
<div class="keyline-block"></div>
|
||||
{% endif %}
|
||||
{% for org in organisations %}
|
||||
{% 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>
|
||||
{% if org.services %}
|
||||
@@ -40,7 +40,7 @@
|
||||
{% endfor %}
|
||||
<div class="keyline-block"></div>
|
||||
{% endif %}
|
||||
{% if not organisations %}
|
||||
{% if not current_user.organisations %}
|
||||
{% if current_user.trial_mode_services %}
|
||||
</ul>
|
||||
<h2 class="heading-small">
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<h2 class="heading-medium">Services</h2>
|
||||
<nav class="browse-list">
|
||||
<ul>
|
||||
{% for service in services %}
|
||||
{% for service in user.all_services %}
|
||||
<li class="browse-list-item">
|
||||
<a class="browse-list-hint" href={{url_for('.service_dashboard', service_id=service.id)}}>{{ service.name }}</a>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user