mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-16 02:18:22 -07:00
#1854 issue title at dashboard
This commit is contained in:
parent
d1e28ac013
commit
588a0db218
@ -10,6 +10,7 @@ import (
|
||||
"fmt"
|
||||
"path"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
"unicode"
|
||||
@ -136,6 +137,12 @@ func (a Action) GetIssueInfos() []string {
|
||||
return strings.SplitN(a.Content, "|", 2)
|
||||
}
|
||||
|
||||
func (a Action) GetIssueTitle() string {
|
||||
issueID, _ := strconv.Atoi(strings.SplitN(a.Content, "|", 2)[0])
|
||||
issue, _ := GetIssueByID(int64(issueID))
|
||||
return issue.Name
|
||||
}
|
||||
|
||||
func newRepoAction(e Engine, u *User, repo *Repository) (err error) {
|
||||
if err = notifyWatchers(e, &Action{
|
||||
ActUserID: u.Id,
|
||||
|
@ -24,7 +24,7 @@
|
||||
{{$.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}}
|
||||
{{$.i18n.Tr "action.comment_issue" .GetRepoLink $index .GetRepoPath | Str2html}} – {{.GetIssueTitle}}
|
||||
{{else if eq .GetOpType 11}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$.i18n.Tr "action.merge_pull_request" .GetRepoLink $index .GetRepoPath | Str2html}}
|
||||
@ -48,6 +48,7 @@
|
||||
{{else if eq .GetOpType 7}}
|
||||
<p class="news-content comment-news">{{index .GetIssueInfos 1}}</p>
|
||||
{{else if eq .GetOpType 10}}
|
||||
<p class="news-content comment-news">{{.GetIssueTitle}}</p>
|
||||
<p class="news-content comment-news">{{index .GetIssueInfos 1}}</p>
|
||||
{{else if eq .GetOpType 11}}
|
||||
<p class="news-content comment-news">{{index .GetIssueInfos 1}}</p>
|
||||
|
Loading…
Reference in New Issue
Block a user