summaryrefslogtreecommitdiffstats
path: root/templates/user/profile.tmpl
blob: 44c2212383e6767e5b7c9895e523651ae05e7e00 (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
{{template "ng/base/head" .}}
{{template "ng/base/header" .}}
<div class="main-wrapper">
    <div id="user-profile-page" class="container clear">
        <div class="grid-1-5 left">
            <div>
                {{if .Owner.UseCustomAvatar}}
                <a href="{{AppSubUrl}}/user/settings" id="profile-avatar" original-title="{{.i18n.Tr "user.change_custom_avatar"}}">
                {{else}}
                <a href="http://gravatar.com/emails/" id="profile-avatar" original-title="{{.i18n.Tr "user.change_avatar"}}">
                {{end}}
                    <img class="profile-avatar" src="{{.Owner.AvatarLink}}?s=200"title="{{.Owner.Name}}"/>
                </a>
                <div class="text-center" id="profile-name">
                    {{if .Owner.FullName}}<span id="profile-fullname" class="center-block">{{.Owner.FullName}}</span><br>{{end}}
                    <span class="center-block" id="profile-username">{{.Owner.Name}}</span>
                </div>
            </div>
            <div class="profile-info">
                <hr> 
                <ul class="list-no-style">
                    {{if .Owner.Location}}
                    <li class="list-group-item"><i class="octicon octicon-location"></i>&nbsp;&nbsp;{{.Owner.Location}}</li>
                    {{end}}
                    {{if .Owner.Email}}
                    <li class="list-group-item"><i class="octicon octicon-mail"></i>&nbsp;&nbsp;<a href="mailto:{{.Owner.Email}}" rel="nofollow">{{.Owner.Email}}</a></li>
                    {{end}}
                    {{if .Owner.Website}}
                    <li class="list-group-item"><i class="octicon octicon-link"></i>&nbsp;&nbsp;<a target="_blank" href="{{.Owner.Website}}">{{.Owner.Website}}</a></li>
                    {{end}}
                    <li class="list-group-item"><i class="octicon octicon-clock"></i>&nbsp;&nbsp;{{.i18n.Tr "user.join_on"}} {{DateFormat .Owner.Created "M d, Y"}}</li>
                </ul>
                <hr>
                <ul class="list-no-style">
                    <li class="list-group-item profile-rel">
                        <a class="text-black" href="">
                            <strong>{{.Owner.NumFollowers}}</strong>
                            <p>{{.i18n.Tr "user.followers"}}</p>
                        </a>
                    </li>
                    <li class="list-group-item profile-rel">
                        <a class="text-black" href="">
                            <strong>{{.Owner.NumStars}}</strong>
                            <p>{{.i18n.Tr "user.starred"}}</p>
                        </a>
                    </li>
                    <li class="list-group-item profile-rel">
                        <a class="text-black" href="">
                            <strong>{{.Owner.NumFollowings}}</strong>
                            <p>{{.i18n.Tr "user.following"}}</p>
                        </a>
                    </li>
                </ul>
                <hr>
            </div>
        </div>
        <div class="grid-4-5 left">
            <div id="profile-body">
                <ul class="menu menu-line" id="profile-header">
                    <li>
                        <a {{if not .TabName}}class="current"{{end}} href="{{.Owner.HomeLink}}"><i class="octicon octicon-repo"></i> {{.i18n.Tr "user.repositories"}}</a>
                    </li>
                    <li>
                        <a {{if eq .TabName "activity"}}class="current"{{end}} href="{{.Owner.HomeLink}}?tab=activity"><i class="octicon octicon-repo"></i> {{.i18n.Tr "user.activity"}}</a>
                    </li>
                </ul>
                <div class="tab-content">
                    {{if eq .TabName "activity"}}
                    <div class="tab-pane active" id="dashboard-news">
                    <br>
                    {{template "user/dashboard/feeds" .}}
                    </div>
                    {{else}}
                    <div class="tab-pane active">
                        <div id="org-repo-list">
                            {{range .Repos}}
                                {{if or (not .IsPrivate) (.HasAccess $.SignedUserName)}}
                                <div class="org-repo-item">
                                    <ul class="org-repo-status right">
                                        <li><i class="octicon octicon-star"></i> {{.NumStars}}</li>
                                        <li><i class="octicon octicon-git-branch"></i> {{.NumForks}}</li>
                                    </ul>
                                    <h2>
                                        <a href="{{AppSubUrl}}/{{$.Owner.Name}}/{{.Name}}">{{.Name}}</a>
                                        {{if .IsPrivate}}
                                        <span class="text-gold"><i class="octicon octicon-lock"></i></span>
                                        {{end}}
                                    </h2>
                                    <p class="org-repo-description">{{.Description}}</p>
                                    <p class="org-repo-updated">{{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Updated $.i18n.Lang}}</p>
                                </div>
                                {{end}}
                            {{end}}
                        </div>
                    </div>
                    {{end}}
                </div>
            </div>
        </div>
    </div>
</div>
{{template "ng/base/footer" .}}