0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-26 06:52:47 +01:00
This commit is contained in:
Unknown 2014-03-29 11:56:00 -04:00
parent be45057c3a
commit cad2ced394
4 changed files with 10 additions and 10 deletions

View file

@ -175,6 +175,7 @@ func ViewIssue(ctx *middleware.Context, params martini.Params) {
ctx.Data["Title"] = issue.Name
ctx.Data["Issue"] = issue
ctx.Data["Comments"] = comments
ctx.Data["IsIssueOwner"] = issue.PosterId == ctx.User.Id
ctx.Data["IsRepoToolbarIssues"] = true
ctx.Data["IsRepoToolbarIssuesList"] = false
ctx.HTML(200, "issue/view")
@ -217,10 +218,9 @@ func UpdateIssue(ctx *middleware.Context, params martini.Params, form auth.Creat
}
ctx.JSON(200, map[string]interface{}{
"ok": true,
"title": issue.Name,
"content": string(base.RenderMarkdown([]byte(issue.Content), "")),
"raw_content": issue.Content,
"ok": true,
"title": issue.Name,
"content": string(base.RenderMarkdown([]byte(issue.Content), "")),
})
}

View file

@ -133,7 +133,7 @@
<hr/>
<div class="form-group text-center">
<button class="btn btn-primary btn-lg">Test Configuration</button>
<!-- <button class="btn btn-primary btn-lg">Test Configuration</button> -->
<button class="btn btn-danger btn-lg">Install Gogs</button>
<button class="btn btn-default btn-sm" type="button" data-toggle="modal" data-target="#advance-options-modal">
Advanced Options

View file

@ -12,9 +12,9 @@
<input id="issue-edit-title" class="form-control input-lg pull-left hidden" type="text" value="{{.Issue.Name}}" data-ajax-rel="issue-edit-save" data-ajax-val="val" data-ajax-field="title"/>
<input type="hidden" value="{{.Issue.Id}}" data-ajax-rel="issue-edit-save" data-ajax-val="val" data-ajax-field="issue_id"/>
<p class="info pull-left">
<a class="btn btn-default pull-right issue-edit" href="#" id="issue-edit-btn">Edit</a>
{{if .IsIssueOwner}}<a class="btn btn-default pull-right issue-edit" href="#" id="issue-edit-btn">Edit</a>
<a class="btn btn-danger pull-right issue-edit-cancel hidden" href="#">Cancel</a>
<a class="btn btn-primary pull-right issue-edit-save hidden" href="#" data-ajax="/{{.RepositoryLink}}/issues/{{.Issue.Index}}" data-ajax-name="issue-edit-save" data-ajax-method="post">Save</a>
<a class="btn btn-primary pull-right issue-edit-save hidden" href="#" data-ajax="/{{.RepositoryLink}}/issues/{{.Issue.Index}}" data-ajax-name="issue-edit-save" data-ajax-method="post">Save</a>{{end}}
<span class="status label label-{{if .Issue.IsClosed}}danger{{else}}success{{end}}">{{if .Issue.IsClosed}}Closed{{else}}Open{{end}}</span>
<a href="/user/{{.Issue.Poster.Name}}" class="author"><strong>{{.Issue.Poster.Name}}</strong></a> opened this issue
<span class="time">{{TimeSince .Issue.Created}}</span> · {{.Issue.NumComments}} comments
@ -62,7 +62,7 @@
</div>
</div> -->
<hr class="issue-line"/>
<div class="issue-child issue-reply">
{{if .SignedUser}}<div class="issue-child issue-reply">
<a class="user pull-left" href="/user/{{.SignedUser.Name}}"><img class="avatar" src="{{.SignedUser.AvatarLink}}" alt=""/></a>
<form class="panel panel-default issue-content" action="/{{.RepositoryLink}}/comment/new" method="post">
{{.CsrfTokenHtml}}
@ -95,7 +95,7 @@
</div>
</div>
</form>
</div>
</div>{{else}}<div class="alert alert-warning"><a class="btn btn-success btn-lg" href="/user/sign_up">Sign up for free</a> to join this conversation. Already have an account? <a href="/user/login">Sign in to comment</a></div>{{end}}
</div><!--
<div class="col-md-3">
label assignment milestone dashboard

2
web.go
View file

@ -92,7 +92,7 @@ func runWeb(*cli.Context) {
// Routers.
m.Get("/", ignSignIn, routers.Home)
m.Any("/install", routers.Install)
m.Any("/install", binding.BindIgnErr(auth.InstallForm{}), routers.Install)
m.Get("/issues", reqSignIn, user.Issues)
m.Get("/pulls", reqSignIn, user.Pulls)
m.Get("/stars", reqSignIn, user.Stars)