mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-11-24 18:56:11 +01:00
#1854 improves
This commit is contained in:
parent
588a0db218
commit
1bfebdcdf6
|
@ -10,12 +10,12 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"path"
|
"path"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
"unicode"
|
"unicode"
|
||||||
|
|
||||||
"github.com/go-xorm/xorm"
|
"github.com/go-xorm/xorm"
|
||||||
|
"github.com/Unknwon/com"
|
||||||
|
|
||||||
api "github.com/gogits/go-gogs-client"
|
api "github.com/gogits/go-gogs-client"
|
||||||
|
|
||||||
|
@ -138,8 +138,8 @@ func (a Action) GetIssueInfos() []string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a Action) GetIssueTitle() string {
|
func (a Action) GetIssueTitle() string {
|
||||||
issueID, _ := strconv.Atoi(strings.SplitN(a.Content, "|", 2)[0])
|
issueID := com.StrTo(a.GetIssueInfos()[0]).MustInt64()
|
||||||
issue, _ := GetIssueByID(int64(issueID))
|
issue, _ := GetIssueByID(issueID)
|
||||||
return issue.Name
|
return issue.Name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,6 @@
|
||||||
{{else if eq .GetOpType 7}}
|
{{else if eq .GetOpType 7}}
|
||||||
<p class="news-content comment-news">{{index .GetIssueInfos 1}}</p>
|
<p class="news-content comment-news">{{index .GetIssueInfos 1}}</p>
|
||||||
{{else if eq .GetOpType 10}}
|
{{else if eq .GetOpType 10}}
|
||||||
<p class="news-content comment-news">{{.GetIssueTitle}}</p>
|
|
||||||
<p class="news-content comment-news">{{index .GetIssueInfos 1}}</p>
|
<p class="news-content comment-news">{{index .GetIssueInfos 1}}</p>
|
||||||
{{else if eq .GetOpType 11}}
|
{{else if eq .GetOpType 11}}
|
||||||
<p class="news-content comment-news">{{index .GetIssueInfos 1}}</p>
|
<p class="news-content comment-news">{{index .GetIssueInfos 1}}</p>
|
||||||
|
|
Loading…
Reference in a new issue