aboutsummaryrefslogtreecommitdiffstats
path: root/templates/user/dashboard/feeds.tmpl
blob: 47b55693f2bbc77a74f9e48b9e7432a322e038d9 (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
{{range .Feeds}}
<div class="news clear">
    <div class="avatar left">
        <img class="avatar-30" src="{{.ActAvatar}}" alt="">
    </div>
    <div class="content left {{if eq .GetOpType 5}}push-news{{end}} grid-4-5">
        <p class="text-bold">
            <a href="{{AppSubUrl}}/{{.GetActUserName}}">{{.GetActUserName}}</a>
            {{if eq .GetOpType 1}}
            {{$.i18n.Tr "action.create_repo" .GetRepoLink .GetRepoPath | Str2html}}
            {{else if eq .GetOpType 5}}
            {{$.i18n.Tr "action.commit_repo" .GetRepoLink .GetBranch .GetRepoPath | Str2html}}
            {{else if eq .GetOpType 6}}
            {{ $index := index .GetIssueInfos 0}}
            {{$.i18n.Tr "action.create_issue" .GetRepoLink $index .GetRepoPath | Str2html}}
            {{else if eq .GetOpType 8}}
            {{$.i18n.Tr "action.transfer_repo" .GetContent .GetRepoLink .GetRepoPath | Str2html}}
            {{else if eq .GetOpType 9}}
            {{$.i18n.Tr "action.push_tag" .GetRepoLink .GetBranch .GetRepoPath | Str2html}}
            {{else if eq .GetOpType 10}}
            {{ $index := index .GetIssueInfos 0}}
            {{$.i18n.Tr "action.comment_issue" .GetRepoLink $index .GetRepoPath | Str2html}}
            {{end}}
        </p>
        {{if eq .GetOpType 5}}
        <div class="news-content content">
            <ul class="list-no-style">
                {{ $push := ActionContent2Commits .}}
                {{ $repoLink := .GetRepoLink}}
                {{range $push.Commits}}
                <li><img class="avatar-16" src="{{AvatarLink .AuthorEmail}}?s=16"> <a href="{{$repoLink}}/commit/{{.Sha1}}">{{ShortSha .Sha1}}</a> <span class="text-truncate grid-4-5">{{.Message}}</span></li>
                {{end}}
                {{if $push.CompareUrl}}<li><a href="{{$.AppSubUrl}}/{{$push.CompareUrl}}">{{$.i18n.Tr "action.compare_2_commits"}} »</a></li>{{end}}
            </ul>
        </div>
        {{else if eq .GetOpType 6}}
        <p class="news-content comment-news">{{index .GetIssueInfos 1}}</p>
        {{else if eq .GetOpType 10}}
        <p class="news-content comment-news">{{index .GetIssueInfos 1}}</p>
        {{end}}
        <p class="news-time text-italic">{{TimeSince .GetCreate $.i18n.Lang}}</p>
    </div>
    <i class="mega-octicon octicon-{{ActionIcon .GetOpType}} right"></i>
</div>
{{end}}