Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Merge pull request #3958 from gratipay/team-owner-for-admins
Browse files Browse the repository at this point in the history
Added owned by on team page for admins. Fixes #3945.
  • Loading branch information
mattbk committed Mar 10, 2016
2 parents fbc830e + e4944c2 commit cf07aa3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions www/%team/index.html.spt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ from gratipay.utils import excerpt_intro, get_team, markdown
team = get_team(state)
banner = name = team.name
suppress_sidebar = not(team.is_approved or user.ADMIN)
is_team_owner = not user.ANON and team.owner == user.participant.username

[-----------------------------------------------------------------------------]
{% extends "templates/base.html" %}
Expand Down Expand Up @@ -109,12 +110,14 @@ suppress_sidebar = not(team.is_approved or user.ADMIN)
| <a href="{{ team.todo_url }}">{{ _("To-do") }}</a>
{% endif %}

{% if user.ADMIN or (not user.ANON and team.owner == user.participant.username) %}
{% if user.ADMIN or is_team_owner %}
|{{ _( "{a} Edit team {_a}"
, a='<a href="./edit">'|safe
, _a='</a>'|safe
) }}
{% else %}
{% endif %}

{% if user.ADMIN or not is_team_owner %}
| {{ _( "owned by {a}~{owner}{_a}"
, a=('<a href="/~{}/">'.format(team.owner))|safe
, owner=team.owner
Expand Down

0 comments on commit cf07aa3

Please sign in to comment.