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.project.refresh_from_db()
|
||||||
self.assertEqual(self.project.name, "Alpha Team")
|
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 %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{% with invite_suggestions=project.invite_suggestions %}
|
||||||
<div class="panel panel-{{ team_status|default:'default' }}">
|
<div class="panel panel-{{ team_status|default:'default' }}">
|
||||||
<div class="panel-body settings-block">
|
<div class="panel-body settings-block">
|
||||||
<h2>Team Access</h2>
|
<h2>Team Access</h2>
|
||||||
@ -165,9 +166,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% if is_owner %}
|
{% if is_owner and invite_suggestions %}
|
||||||
{% with invite_suggestions=project.invite_suggestions %}
|
|
||||||
{% if invite_suggestions %}
|
|
||||||
<tr id="suggestions-row">
|
<tr id="suggestions-row">
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
Add Users from Other Teams
|
Add Users from Other Teams
|
||||||
@ -187,8 +186,6 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endwith %}
|
|
||||||
{% endif %}
|
|
||||||
</table>
|
</table>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>
|
<p>
|
||||||
@ -216,6 +213,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
{% endwith %}
|
||||||
|
|
||||||
{% if team_member_invited %}
|
{% if team_member_invited %}
|
||||||
<div class="panel-footer">
|
<div class="panel-footer">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user