forked from GithubBackups/healthchecks
Fix invite suggestions.
This commit is contained in:
parent
532b752e3c
commit
3bf1ad9746
@ -172,3 +172,12 @@ class ProjectTestCase(BaseTestCase):
|
||||
|
||||
self.project.refresh_from_db()
|
||||
self.assertEqual(self.project.name, "Alpha Team")
|
||||
|
||||
def test_it_shows_invite_suggestions(self):
|
||||
p2 = Project.objects.create(owner=self.alice)
|
||||
|
||||
self.client.login(username="alice@example.org", password="password")
|
||||
|
||||
r = self.client.get("/projects/%s/settings/" % p2.code)
|
||||
self.assertContains(r, "Add Users from Other Teams")
|
||||
self.assertContains(r, "bob@example.org")
|
||||
|
@ -135,6 +135,7 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% with invite_suggestions=project.invite_suggestions %}
|
||||
<div class="panel panel-{{ team_status|default:'default' }}">
|
||||
<div class="panel-body settings-block">
|
||||
<h2>Team Access</h2>
|
||||
@ -165,9 +166,7 @@
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
{% if is_owner %}
|
||||
{% with invite_suggestions=project.invite_suggestions %}
|
||||
{% if invite_suggestions %}
|
||||
{% if is_owner and invite_suggestions %}
|
||||
<tr id="suggestions-row">
|
||||
<td colspan="3">
|
||||
Add Users from Other Teams
|
||||
@ -187,8 +186,6 @@
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
</table>
|
||||
{% else %}
|
||||
<p>
|
||||
@ -216,6 +213,7 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endwith %}
|
||||
|
||||
{% if team_member_invited %}
|
||||
<div class="panel-footer">
|
||||
|
Loading…
x
Reference in New Issue
Block a user