Browse Source

#1854 show issue content

pull/1950/head
Unknwon 9 years ago
parent
commit
6a664e88c7
  1. 12
      models/action.go
  2. 13
      public/config.codekit
  3. 4
      public/js/gogs.js
  4. 1
      public/js/min/gogs-min.js
  5. 2
      templates/repo/issue/new_form.tmpl
  6. 3
      templates/user/dashboard/feeds.tmpl

12
models/action.go

@ -142,11 +142,21 @@ func (a Action) GetIssueTitle() string {
issue, err := GetIssueByIndex(a.RepoID, index)
if err != nil {
log.Error(4, "GetIssueByIndex: %v", err)
return "500 when get title"
return "500 when get issue"
}
return issue.Name
}
func (a Action) GetIssueContent() string {
index := com.StrTo(a.GetIssueInfos()[0]).MustInt64()
issue, err := GetIssueByIndex(a.RepoID, index)
if err != nil {
log.Error(4, "GetIssueByIndex: %v", err)
return "500 when get issue"
}
return issue.Content
}
func newRepoAction(e Engine, u *User, repo *Repository) (err error) {
if err = notifyWatchers(e, &Action{
ActUserID: u.Id,

13
public/config.codekit

@ -191,7 +191,7 @@
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0,
"outputStyle": 1,
"syntaxCheckerStyle": 0
"syntaxCheckerStyle": 1
},
"\/js\/jquery-1.11.3.min.js": {
"fileType": 64,
@ -281,6 +281,17 @@
"outputPathIsSetByUser": 0,
"processed": 0
},
"\/js\/min\/gogs-min.js": {
"fileType": 64,
"ignore": 1,
"ignoreWasSetByUser": 0,
"inputAbbreviatedPath": "\/js\/min\/gogs-min.js",
"outputAbbreviatedPath": "\/js\/min\/min\/gogs-min-min.js",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0,
"outputStyle": 1,
"syntaxCheckerStyle": 1
},
"\/js\/semantic-2.1.5.min.js": {
"fileType": 64,
"ignore": 0,

4
public/js/gogs.js

@ -630,9 +630,7 @@ $(document).ready(function () {
emojify.setConfig({
img_dir: suburl + '/img/emoji'
});
$('.emojify').each(function () {
emojify.run($(this)[0]);
});
emojify.run();
// Clipboard JS
var clipboard = new Clipboard('.clipboard');

1
public/js/min/gogs-min.js vendored

File diff suppressed because one or more lines are too long

2
templates/repo/issue/new_form.tmpl

@ -13,7 +13,7 @@
</a>
<div class="ui segment content">
<div class="field">
<input name="title" placeholder="{{.i18n.Tr "repo.milestones.title"}}" value="{{.title}}" autofocus required>
<input name="title" placeholder="{{.i18n.Tr "repo.milestones.title"}}" value="{{.title}}" tabindex="3" autofocus required>
</div>
{{template "repo/issue/comment_tab" .}}
<div class="text right">

3
templates/user/dashboard/feeds.tmpl

@ -46,7 +46,8 @@
</ul>
</div>
{{else if eq .GetOpType 6}}
<p class="text light grey">{{index .GetIssueInfos 1}}</p>
<span class="text truncate issue title">{{index .GetIssueInfos 1}}</span>
<p class="text light grey">{{.GetIssueContent}}</p>
{{else if eq .GetOpType 7}}
<p class="text light grey">{{index .GetIssueInfos 1}}</p>
{{else if eq .GetOpType 10}}

Loading…
Cancel
Save