#1854 show issue content
This commit is contained in:
parent
0f438ef0b3
commit
6a664e88c7
6 changed files with 28 additions and 7 deletions
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
Normal file
1
public/js/min/gogs-min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -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">
|
||||
|
|
|
@ -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}}
|
||||
|
|
Reference in a new issue