summaryrefslogtreecommitdiffstats
path: root/templates/org/teams.tmpl
blob: 6f00db51c4404dbfa34355306c4040bf1378e48d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{{template "base/head" .}}
{{template "base/navbar" .}}
<div id="body-nav" class="org-nav org-nav-auto">
    <div class="container clearfix">
        <div id="org-nav-wrapper">
            <ul class="nav nav-pills pull-right">
                <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="/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="{{.Org.AvatarLink}}?s=140" alt="" width="60"/>
            <div id="org-nav-info">
                <h2 class="org-name">{{.Org.FullName}}</h2>
            </div>
        </div>
    </div>
</div>
<div id="body" class="container">
    <div id="org">
        <div id="org-teams">
            <div id="org-teams-action">
                <div class="col-md-12">
                    <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="/org/{{$.Org.Name}}/teams/{{.LowerName}}"><strong>{{.Name}}</strong></a></h2>
                    <div class="panel-body">
                        <p class="org-team-meta">{{.NumMembers}} members · {{.NumRepos}} repositories</p>
                        <p class="org-team-members">
                            {{range .Members}}
                            <a href="/user/{{.LowerName}}">
                                <img class="img-thumbnail" src="{{.AvatarLink}}?s=60" alt=""/>
                            </a>
                            {{end}}
                        </p>
                    </div>
                    <div class="panel-footer">
                        {{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>
{{template "base/footer" .}}