team detail pages no longer use sponsor sidebar
This commit is contained in:
		
							parent
							
								
									16630a6db3
								
							
						
					
					
						commit
						b3ed93cda6
					
				
					 1 changed files with 93 additions and 89 deletions
				
			
		|  | @ -4,94 +4,98 @@ | ||||||
| 
 | 
 | ||||||
| {% block head_title %}{{ team.name }}{% endblock %} | {% block head_title %}{{ team.name }}{% endblock %} | ||||||
| 
 | 
 | ||||||
| {% block body %} | {% block body_outer %} | ||||||
|     <div class="pull-right"> |     <div class="row"> | ||||||
|     {% if can_join %} |         <div class="span12"> | ||||||
|         <form method="post" action="{% url team_join team.slug %}"> |             <div class="pull-right"> | ||||||
|             {% csrf_token %} |             {% if can_join %} | ||||||
|             <input type="submit" class="btn btn-primary" value="join"> |                 <form method="post" action="{% url team_join team.slug %}"> | ||||||
|         </form> |                     {% csrf_token %} | ||||||
|     {% endif %} |                     <input type="submit" class="btn btn-primary" value="join"> | ||||||
|      |                 </form> | ||||||
|     {% if can_leave %} |             {% endif %} | ||||||
|         <form method="post" action="{% url team_leave team.slug %}"> |              | ||||||
|             {% csrf_token %} |             {% if can_leave %} | ||||||
|             <input type="submit" class="btn" value="leave"> |                 <form method="post" action="{% url team_leave team.slug %}"> | ||||||
|         </form> |                     {% csrf_token %} | ||||||
|     {% endif %} |                     <input type="submit" class="btn" value="leave"> | ||||||
|      |                 </form> | ||||||
|     {% if can_apply %} |             {% endif %} | ||||||
|         <form method="post" action="{% url team_apply team.slug %}">  |              | ||||||
|             {% csrf_token %} |             {% if can_apply %} | ||||||
|             <input type="submit" class="btn btn-primary" value="apply"> |                 <form method="post" action="{% url team_apply team.slug %}">  | ||||||
|         </form> |                     {% csrf_token %} | ||||||
|     {% endif %} |                     <input type="submit" class="btn btn-primary" value="apply"> | ||||||
|  |                 </form> | ||||||
|  |             {% endif %} | ||||||
|  |             </div> | ||||||
|  |              | ||||||
|  |             <h1>{{ team.name }}{% if state %} <span class="label">{{ state }}</span>{% endif %}</h1> | ||||||
|  |              | ||||||
|  |             {% if team.description %}<p>{{ team.description }}</p>{% endif %} | ||||||
|  |              | ||||||
|  |             {% if user.is_staff or state == "manager" %} | ||||||
|  |                 {% if team.managers %} | ||||||
|  |                     <h2>Managers</h2> | ||||||
|  |                     <table class="table table-striped"> | ||||||
|  |                         {% for membership in team.managers %} | ||||||
|  |                             <tr> | ||||||
|  |                                 <td>{{ membership.user.email }}{% if user == membership.user %} <span class="label label-info">you</span>{% endif %}</td> | ||||||
|  |                                 <td> | ||||||
|  |                                     <form style="margin: 0;" method="post" action="{% url team_demote membership.pk %}">{% csrf_token %}<button type="submit" class="btn btn-mini">demote</button></form> | ||||||
|  |                                 </td> | ||||||
|  |                             </tr> | ||||||
|  |                         {% endfor %} | ||||||
|  |                     </table> | ||||||
|  |                 {% endif %} | ||||||
|  |                 {% if team.members %} | ||||||
|  |                     <h2>Team Members</h2> | ||||||
|  |                     <table class="table table-striped"> | ||||||
|  |                         {% for membership in team.members %} | ||||||
|  |                             <tr> | ||||||
|  |                                 <td>{{ membership.user.email }}{% if user == membership.user %} <span class="label label-info">you</span>{% endif %}</td> | ||||||
|  |                                 <td> | ||||||
|  |                                     <form style="margin: 0;" method="post" action="{% url team_promote membership.pk %}">{% csrf_token %}<button type="submit" class="btn btn-mini">promote</button></form> | ||||||
|  |                                 </td> | ||||||
|  |                             </tr> | ||||||
|  |                         {% endfor %} | ||||||
|  |                     </table> | ||||||
|  |                 {% endif %} | ||||||
|  |                 {% if team.applicants and team.access == "application" %} | ||||||
|  |                     <h2>Applicants</h2> | ||||||
|  |                     <table class="table table-striped"> | ||||||
|  |                         {% for membership in team.applicants %} | ||||||
|  |                             <tr> | ||||||
|  |                                 <td>{{ membership.user.email }}</td> | ||||||
|  |                                 <td> | ||||||
|  |                                     <form style="margin: 0; float: left;" method="post" action="{% url team_accept membership.pk %}">{% csrf_token %}<button type="submit" class="btn btn-mini">accept</button></form> | ||||||
|  |                                     <form style="margin: 0; float: left;" method="post" action="{% url team_reject membership.pk %}">{% csrf_token %}<button type="submit" class="btn btn-mini">reject</button></form> | ||||||
|  |                                 </td> | ||||||
|  |                             </tr> | ||||||
|  |                         {% endfor %} | ||||||
|  |                     </table> | ||||||
|  |                 {% endif %} | ||||||
|  |                 {% if team.invitees %} | ||||||
|  |                     <h2>Invitees</h2> | ||||||
|  |                     <table class="table table-striped"> | ||||||
|  |                         {% for membership in team.invitees %} | ||||||
|  |                             <tr> | ||||||
|  |                                 <td>{{ membership.user.email }}</td> | ||||||
|  |                             </tr> | ||||||
|  |                         {% endfor %} | ||||||
|  |                     </table> | ||||||
|  |                 {% endif %} | ||||||
|  |                 {% if invite_form %} | ||||||
|  |                     <form method="POST" action="" class="form-horizontal"> | ||||||
|  |                         {% csrf_token %} | ||||||
|  |                         <legend>Invite User to Team</legend> | ||||||
|  |                         {{ invite_form|as_bootstrap }} | ||||||
|  |                         <div class="form-actions"> | ||||||
|  |                             <input class="btn btn-primary" type="submit" value="Invite" /> | ||||||
|  |                         </div> | ||||||
|  |                     </form> | ||||||
|  |                 {% endif %} | ||||||
|  |             {% endif %} | ||||||
|  |         </div> | ||||||
|     </div> |     </div> | ||||||
|      |  | ||||||
|     <h1>{{ team.name }}{% if state %} <span class="label">{{ state }}</span>{% endif %}</h1> |  | ||||||
|      |  | ||||||
|     {% if team.description %}<p>{{ team.description }}</p>{% endif %} |  | ||||||
|      |  | ||||||
|     {% if user.is_staff or state == "manager" %} |  | ||||||
|         {% if team.managers %} |  | ||||||
|             <h2>Managers</h2> |  | ||||||
|             <table class="table table-striped"> |  | ||||||
|                 {% for membership in team.managers %} |  | ||||||
|                     <tr> |  | ||||||
|                         <td>{{ membership.user.email }}{% if user == membership.user %} <span class="label label-info">you</span>{% endif %}</td> |  | ||||||
|                         <td> |  | ||||||
|                             <form style="margin: 0;" method="post" action="{% url team_demote membership.pk %}">{% csrf_token %}<button type="submit" class="btn btn-mini">demote</button></form> |  | ||||||
|                         </td> |  | ||||||
|                     </tr> |  | ||||||
|                 {% endfor %} |  | ||||||
|             </table> |  | ||||||
|         {% endif %} |  | ||||||
|         {% if team.members %} |  | ||||||
|             <h2>Team Members</h2> |  | ||||||
|             <table class="table table-striped"> |  | ||||||
|                 {% for membership in team.members %} |  | ||||||
|                     <tr> |  | ||||||
|                         <td>{{ membership.user.email }}{% if user == membership.user %} <span class="label label-info">you</span>{% endif %}</td> |  | ||||||
|                         <td> |  | ||||||
|                             <form style="margin: 0;" method="post" action="{% url team_promote membership.pk %}">{% csrf_token %}<button type="submit" class="btn btn-mini">promote</button></form> |  | ||||||
|                         </td> |  | ||||||
|                     </tr> |  | ||||||
|                 {% endfor %} |  | ||||||
|             </table> |  | ||||||
|         {% endif %} |  | ||||||
|         {% if team.applicants and team.access == "application" %} |  | ||||||
|             <h2>Applicants</h2> |  | ||||||
|             <table class="table table-striped"> |  | ||||||
|                 {% for membership in team.applicants %} |  | ||||||
|                     <tr> |  | ||||||
|                         <td>{{ membership.user.email }}</td> |  | ||||||
|                         <td> |  | ||||||
|                             <form style="margin: 0; float: left;" method="post" action="{% url team_accept membership.pk %}">{% csrf_token %}<button type="submit" class="btn btn-mini">accept</button></form> |  | ||||||
|                             <form style="margin: 0; float: left;" method="post" action="{% url team_reject membership.pk %}">{% csrf_token %}<button type="submit" class="btn btn-mini">reject</button></form> |  | ||||||
|                         </td> |  | ||||||
|                     </tr> |  | ||||||
|                 {% endfor %} |  | ||||||
|             </table> |  | ||||||
|         {% endif %} |  | ||||||
|         {% if team.invitees %} |  | ||||||
|             <h2>Invitees</h2> |  | ||||||
|             <table class="table table-striped"> |  | ||||||
|                 {% for membership in team.invitees %} |  | ||||||
|                     <tr> |  | ||||||
|                         <td>{{ membership.user.email }}</td> |  | ||||||
|                     </tr> |  | ||||||
|                 {% endfor %} |  | ||||||
|             </table> |  | ||||||
|         {% endif %} |  | ||||||
|         {% if invite_form %} |  | ||||||
|             <form method="POST" action="" class="form-horizontal"> |  | ||||||
|                 {% csrf_token %} |  | ||||||
|                 <legend>Invite User to Team</legend> |  | ||||||
|                 {{ invite_form|as_bootstrap }} |  | ||||||
|                 <div class="form-actions"> |  | ||||||
|                     <input class="btn btn-primary" type="submit" value="Invite" /> |  | ||||||
|                 </div> |  | ||||||
|             </form> |  | ||||||
|         {% endif %} |  | ||||||
|     {% endif %} |  | ||||||
| {% endblock %} | {% endblock %} | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 James Tauber
						James Tauber