diff options
author | Unknown <joe2010xtmf@163.com> | 2014-03-30 16:34:23 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-03-30 16:34:23 -0400 |
commit | e938863ae6887f7c3c24145ed3b64dc1d27ee675 (patch) | |
tree | 05285396d03307908f73e6dfee4efe2872c83b0b | |
parent | 2a0066420a9395e5fa5afcd9be4d094a48eee3fa (diff) | |
download | gitea-e938863ae6887f7c3c24145ed3b64dc1d27ee675.tar.gz gitea-e938863ae6887f7c3c24145ed3b64dc1d27ee675.zip |
Mirror fix on UI
-rw-r--r-- | routers/install.go | 2 | ||||
-rw-r--r-- | routers/repo/issue.go | 2 | ||||
-rw-r--r-- | templates/issue/view.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/nav.tmpl | 14 |
4 files changed, 7 insertions, 13 deletions
diff --git a/routers/install.go b/routers/install.go index e30c3cfd23..28c2d87f71 100644 --- a/routers/install.go +++ b/routers/install.go @@ -156,7 +156,7 @@ func Install(ctx *middleware.Context, form auth.InstallForm) { base.Cfg.SetValue("server", "DOMAIN", form.Domain) base.Cfg.SetValue("server", "ROOT_URL", form.AppUrl) - if len(form.Host) > 0 { + if len(strings.TrimSpace(form.SmtpHost)) > 0 { base.Cfg.SetValue("mailer", "ENABLED", "true") base.Cfg.SetValue("mailer", "HOST", form.SmtpHost) base.Cfg.SetValue("mailer", "USER", form.SmtpEmail) diff --git a/routers/repo/issue.go b/routers/repo/issue.go index f2d8959a04..6cad2c25d2 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -164,7 +164,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"] = ctx.Repo.IsOwner || issue.PosterId == ctx.User.Id + ctx.Data["IsIssueOwner"] = ctx.Repo.IsOwner || (ctx.IsSigned && issue.PosterId == ctx.User.Id) ctx.Data["IsRepoToolbarIssues"] = true ctx.Data["IsRepoToolbarIssuesList"] = false ctx.HTML(200, "issue/view") diff --git a/templates/issue/view.tmpl b/templates/issue/view.tmpl index df8b660769..e619451cc1 100644 --- a/templates/issue/view.tmpl +++ b/templates/issue/view.tmpl @@ -14,7 +14,7 @@ <p class="info pull-left"> {{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>{{end}} + <a class="btn btn-primary pull-right issue-edit-save hidden" href="#" data-ajax="{{.RepoLink}}/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 diff --git a/templates/repo/nav.tmpl b/templates/repo/nav.tmpl index 02096c34c1..6156d5791e 100644 --- a/templates/repo/nav.tmpl +++ b/templates/repo/nav.tmpl @@ -7,12 +7,6 @@ </div> <div class="col-md-5 actions text-right clone-group-btn"> {{if not .IsBareRepo}} - <!--<div class="btn-group" id="repo-clone"> - <button type="button" class="btn btn-default"><i class="fa fa-download fa-lg fa-m"></i></button> - <button type="button" class="btn btn-default dropdown-toggle" data-container="body" data-toggle="popover" data-placement="bottom" data-content="<label>SSH:</label><div class='input-group'><input type='text' class='form-control' value='{{.CloneLink.SSH}}'></div>" data-html="1"> - <span class="caret"></span> - </button> - </div>--> <div class="btn-group" id="repo-clone"> <button type="button" class="btn btn-default"><i class="fa fa-download fa-lg fa-m"></i></button> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> @@ -30,10 +24,10 @@ </span> </div> <p class="help-block text-center">Need help cloning? Visit <a href="#">Help</a>!</p> - <hr/> + <!-- <hr/> <div class="clone-zip text-center"> <a class="btn btn-success btn-lg" href="#"><i class="fa fa-suitcase"></i>Download ZIP</a> - </div> + </div> --> </div> </div> <div class="btn-group {{if .IsRepositoryWatching}}watching{{else}}no-watching{{end}}" id="repo-watching" data-watch="/{{.Owner.Name}}/{{.Repository.Name}}/action/watch" data-unwatch="/{{.Owner.Name}}/{{.Repository.Name}}/action/unwatch"> @@ -61,9 +55,9 @@ <button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="top" title="Star"><i class="fa fa-star"></i> {{.Repository.NumStars}}</button> </div> --> {{end}} - <div class="btn-group"> + <!-- <div class="btn-group"> <a type="button" {{if not .IsRepositoryOwner}}href="/{{.Username}}/{{.Reponame}}/fork"{{end}} class="btn btn-default" data-toggle="tooltip" data-placement="top" title="Fork"><i class="fa fa-code-fork fa-lg"></i> {{.Repository.NumForks}}</a> - </div> + </div> --> </div> </div> </div> |