summaryrefslogtreecommitdiffstats
path: root/templates/org
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-06-29 16:30:41 -0400
committerUnknown <joe2010xtmf@163.com>2014-06-29 16:30:41 -0400
commite4ea5cf5984652e3966825bc2b68dd1abc3eef1c (patch)
tree7647c242061c1ab022db880733f0219f0af5bd2c /templates/org
parent99713e1180ad149faf6442bba311fec6e501aa00 (diff)
downloadgitea-e4ea5cf5984652e3966825bc2b68dd1abc3eef1c.tar.gz
gitea-e4ea5cf5984652e3966825bc2b68dd1abc3eef1c.zip
Finish Teams page
Diffstat (limited to 'templates/org')
-rw-r--r--templates/org/teams.tmpl54
1 files changed, 20 insertions, 34 deletions
diff --git a/templates/org/teams.tmpl b/templates/org/teams.tmpl
index 90aab94401..6f00db51c4 100644
--- a/templates/org/teams.tmpl
+++ b/templates/org/teams.tmpl
@@ -4,16 +4,16 @@
<div class="container clearfix">
<div id="org-nav-wrapper">
<ul class="nav nav-pills pull-right">
- <li><a href="#"><i class="fa fa-users"></i>Members
- <span class="label label-default">5</span></a>
+ <li><a href="/org/{{.Org.Name}}/members"><i class="fa fa-users"></i>Members
+ <span class="label label-default">{{.Org.NumMembers}}</span></a>
</li>
- <li class="active"><a href="#"><i class="fa fa-tags"></i>Teams
- <span class="label label-default">2</span></a>
+ <li class="active"><a href="/org/{{.Org.Name}}/teams"><i class="fa fa-tags"></i>Teams
+ <span class="label label-default">{{.Org.NumTeams}}</span></a>
</li>
</ul>
- <img class="pull-left org-small-logo" src="https://avatars3.githubusercontent.com/u/6656686?s=140" alt="" width="60"/>
+ <img class="pull-left org-small-logo" src="{{.Org.AvatarLink}}?s=140" alt="" width="60"/>
<div id="org-nav-info">
- <h2 class="org-name">Organization Name</h2>
+ <h2 class="org-name">{{.Org.FullName}}</h2>
</div>
</div>
</div>
@@ -23,48 +23,34 @@
<div id="org-teams">
<div id="org-teams-action">
<div class="col-md-12">
- <a href="#"><button class="btn btn-success"><i class="fa fa-plus-square"></i>New Team</button></a>
+ <a href="/org/{{.Org.Name}}/teams/new"><button class="btn btn-success"><i class="fa fa-plus-square"></i>New Team</button></a>
<hr/>
</div>
</div>
+ {{range .Teams}}
<div class="org-team col-md-6">
<div class="panel panel-default">
- <h2 class="panel-heading org-team-name"><a href="#"><strong>Team Name</strong></a></h2>
+ <h2 class="panel-heading org-team-name"><a href="/org/{{$.Org.Name}}/teams/{{.LowerName}}"><strong>{{.Name}}</strong></a></h2>
<div class="panel-body">
- <p class="org-team-meta">4 members · 10 repositories</p>
+ <p class="org-team-meta">{{.NumMembers}} members · {{.NumRepos}} repositories</p>
<p class="org-team-members">
- <a href="#">
- <img class="img-thumbnail" src="https://avatars2.githubusercontent.com/u/2946214?s=60" alt=""/>
- </a>
- <a href="#">
- <img class="img-thumbnail" src="https://avatars2.githubusercontent.com/u/2946214?s=60" alt=""/>
- </a>
- </p>
- </div>
- <div class="panel-footer">
- <button class="pull-right btn btn-default">Join</button>
- </div>
- </div>
- </div>
- <div class="org-team col-md-6">
- <div class="panel panel-default">
- <h2 class="panel-heading org-team-name"><a href="#"><strong>Team Name</strong></a></h2>
- <div class="panel-body">
- <p class="org-team-meta">4 members · 10 repositories</p>
- <p class="org-team-members">
- <a href="#">
- <img class="img-thumbnail" src="https://avatars2.githubusercontent.com/u/2946214?s=60" alt=""/>
- </a>
- <a href="#">
- <img class="img-thumbnail" src="https://avatars2.githubusercontent.com/u/2946214?s=60" alt=""/>
+ {{range .Members}}
+ <a href="/user/{{.LowerName}}">
+ <img class="img-thumbnail" src="{{.AvatarLink}}?s=60" alt=""/>
</a>
+ {{end}}
</p>
</div>
<div class="panel-footer">
- <button class="pull-right btn btn-danger">Leave</button>
+ {{if .IsMember $.SignedUserId}}
+ <a class="pull-right btn btn-danger" href="/org/{{$.Org.Name}}/teams/{{.LowerName}}?action=leave">Leave</a>
+ {{else}}
+ <a class="pull-right btn btn-default" href="/org/{{$.Org.Name}}/teams/{{.LowerName}}?action=join">Join</a>
+ {{end}}
</div>
</div>
</div>
+ {{end}}
</div>
</div>
</div>