Browse Source

#1854 improves

tags/v1.2.0-rc1
Alexey Makhov 10 years ago
parent
commit
270a20ea2f
2 changed files with 3 additions and 4 deletions
  1. +3
    -3
      models/action.go
  2. +0
    -1
      templates/user/dashboard/feeds.tmpl

+ 3
- 3
models/action.go View File

@@ -10,12 +10,12 @@ import (
"fmt"
"path"
"regexp"
"strconv"
"strings"
"time"
"unicode"

"github.com/go-xorm/xorm"
"github.com/Unknwon/com"

api "github.com/gogits/go-gogs-client"

@@ -138,8 +138,8 @@ func (a Action) GetIssueInfos() []string {
}

func (a Action) GetIssueTitle() string {
issueID, _ := strconv.Atoi(strings.SplitN(a.Content, "|", 2)[0])
issue, _ := GetIssueByID(int64(issueID))
issueID := com.StrTo(a.GetIssueInfos()[0]).MustInt64()
issue, _ := GetIssueByID(issueID)
return issue.Name
}



+ 0
- 1
templates/user/dashboard/feeds.tmpl View File

@@ -48,7 +48,6 @@
{{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…
Cancel
Save