diff options
author | Unknwon <u@gogs.io> | 2015-12-02 20:56:26 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-12-02 20:56:26 -0500 |
commit | ec2423ad7c64bbef67ccee4324f2df3efe6792aa (patch) | |
tree | e9019b371f66cc1e98ee83f5506b5d052c2dd484 | |
parent | c4bab163cb1d28385cd18ba0d58c9a3e3b237361 (diff) | |
download | gitea-ec2423ad7c64bbef67ccee4324f2df3efe6792aa.tar.gz gitea-ec2423ad7c64bbef67ccee4324f2df3efe6792aa.zip |
more UI minor fixes
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | cmd/web.go | 19 | ||||
-rw-r--r-- | gogs.go | 2 | ||||
-rwxr-xr-x | public/css/gogs.css | 11 | ||||
-rw-r--r-- | public/less/_repository.less | 14 | ||||
-rw-r--r-- | routers/repo/issue.go | 4 | ||||
-rw-r--r-- | templates/.VERSION | 2 | ||||
-rw-r--r-- | templates/repo/commits_table.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/header.tmpl | 10 | ||||
-rw-r--r-- | templates/repo/issue/navbar.tmpl | 4 |
10 files changed, 37 insertions, 35 deletions
@@ -5,7 +5,7 @@ Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?bra ![](public/img/gogs-large-resize.png) -##### Current version: 0.7.26 Beta +##### Current version: 0.7.27 Beta <table> <tr> diff --git a/cmd/web.go b/cmd/web.go index 3fc39628bf..33fe8fa75d 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -478,7 +478,7 @@ func runWeb(ctx *cli.Context) { m.Get("/action/:action", repo.Action) m.Group("/issues", func() { - m.Combo("/new").Get(repo.NewIssue). + m.Combo("/new").Get(middleware.RepoRef(), repo.NewIssue). Post(bindIgnErr(auth.CreateIssueForm{}), repo.NewIssuePost) m.Combo("/:index/comments").Post(bindIgnErr(auth.CreateCommentForm{}), repo.NewComment) @@ -498,15 +498,15 @@ func runWeb(ctx *cli.Context) { m.Post("/new", bindIgnErr(auth.CreateLabelForm{}), repo.NewLabel) m.Post("/edit", bindIgnErr(auth.CreateLabelForm{}), repo.UpdateLabel) m.Post("/delete", repo.DeleteLabel) - }, reqRepoAdmin) + }, reqRepoAdmin, middleware.RepoRef()) m.Group("/milestones", func() { - m.Get("/new", repo.NewMilestone) - m.Post("/new", bindIgnErr(auth.CreateMilestoneForm{}), repo.NewMilestonePost) + m.Combo("/new").Get(repo.NewMilestone). + Post(bindIgnErr(auth.CreateMilestoneForm{}), repo.NewMilestonePost) m.Get("/:id/edit", repo.EditMilestone) m.Post("/:id/edit", bindIgnErr(auth.CreateMilestoneForm{}), repo.EditMilestonePost) m.Get("/:id/:action", repo.ChangeMilestonStatus) m.Post("/delete", repo.DeleteMilestone) - }, reqRepoAdmin) + }, reqRepoAdmin, middleware.RepoRef()) m.Group("/releases", func() { m.Get("/new", repo.NewRelease) @@ -514,11 +514,11 @@ func runWeb(ctx *cli.Context) { m.Get("/edit/:tagname", repo.EditRelease) m.Post("/edit/:tagname", bindIgnErr(auth.EditReleaseForm{}), repo.EditReleasePost) m.Post("/delete", repo.DeleteRelease) - }, reqRepoAdmin) + }, reqRepoAdmin, middleware.RepoRef()) m.Combo("/compare/*").Get(repo.CompareAndPullRequest). Post(bindIgnErr(auth.CreateIssueForm{}), repo.CompareAndPullRequestPost) - }, reqSignIn, middleware.RepoAssignment(), middleware.RepoRef()) + }, reqSignIn, middleware.RepoAssignment()) m.Group("/:username/:reponame", func() { m.Group("", func() { @@ -526,10 +526,7 @@ func runWeb(ctx *cli.Context) { m.Get("/^:type(issues|pulls)$", repo.RetrieveLabels, repo.Issues) m.Get("/labels/", repo.RetrieveLabels, repo.Labels) m.Get("/milestones", repo.Milestones) - }, middleware.RepoRef(), - func(ctx *middleware.Context) { - ctx.Data["PageIsList"] = true - }) + }, middleware.RepoRef()) m.Get("/^:type(issues|pulls)$/:index", repo.ViewIssue) // m.Get("/branches", repo.Branches) @@ -17,7 +17,7 @@ import ( "github.com/gogits/gogs/modules/setting" ) -const APP_VER = "0.7.26.1202 Beta" +const APP_VER = "0.7.27.1202 Beta" func init() { runtime.GOMAXPROCS(runtime.NumCPU()) diff --git a/public/css/gogs.css b/public/css/gogs.css index ae1b888040..5adb5245e1 100755 --- a/public/css/gogs.css +++ b/public/css/gogs.css @@ -2236,8 +2236,12 @@ footer .container .links > *:first-child { font-weight: normal; padding: 5px 10px; } -.repository #commits-table { - width: 100%; +.repository #commits-table thead th:first-of-type { + padding-left: 15px; +} +.repository #commits-table thead .sha { + font-size: 13px; + padding: 6px 40px 4px 35px; } .repository .diff-detail-box { margin: 15px 0; @@ -2350,9 +2354,6 @@ footer .container .links > *:first-child { overflow-x: auto; overflow-y: hidden; } -.repository.quickstart .ui.grid { - margin-top: 0; -} .repository.quickstart .guide .item { padding: 1em; } diff --git a/public/less/_repository.less b/public/less/_repository.less index 61d153dcde..e9432d8070 100644 --- a/public/less/_repository.less +++ b/public/less/_repository.less @@ -593,7 +593,15 @@ } } #commits-table { - width: 100%; + thead { + th:first-of-type { + padding-left: 15px; + } + .sha { + font-size: 13px; + padding: 6px 40px 4px 35px; + } + } } .diff-detail-box { @@ -740,10 +748,6 @@ } &.quickstart { - .ui.grid { - margin-top: 0; - } - .guide { .item { padding: 1em; diff --git a/routers/repo/issue.go b/routers/repo/issue.go index cf6687fe9c..975fa239a0 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -899,6 +899,7 @@ func UpdateCommentContent(ctx *middleware.Context) { func Labels(ctx *middleware.Context) { ctx.Data["Title"] = ctx.Tr("repo.labels") + ctx.Data["PageIsIssueList"] = true ctx.Data["PageIsLabels"] = true ctx.Data["RequireMinicolors"] = true ctx.HTML(200, LABELS) @@ -963,6 +964,7 @@ func DeleteLabel(ctx *middleware.Context) { func Milestones(ctx *middleware.Context) { ctx.Data["Title"] = ctx.Tr("repo.milestones") + ctx.Data["PageIsIssueList"] = true ctx.Data["PageIsMilestones"] = true isShowClosed := ctx.Query("state") == "closed" @@ -1006,6 +1008,7 @@ func Milestones(ctx *middleware.Context) { func NewMilestone(ctx *middleware.Context) { ctx.Data["Title"] = ctx.Tr("repo.milestones.new") + ctx.Data["PageIsIssueList"] = true ctx.Data["PageIsMilestones"] = true ctx.Data["RequireDatetimepicker"] = true ctx.Data["DateLang"] = setting.DateLang(ctx.Locale.Language()) @@ -1014,6 +1017,7 @@ func NewMilestone(ctx *middleware.Context) { func NewMilestonePost(ctx *middleware.Context, form auth.CreateMilestoneForm) { ctx.Data["Title"] = ctx.Tr("repo.milestones.new") + ctx.Data["PageIsIssueList"] = true ctx.Data["PageIsMilestones"] = true ctx.Data["RequireDatetimepicker"] = true ctx.Data["DateLang"] = setting.DateLang(ctx.Locale.Language()) diff --git a/templates/.VERSION b/templates/.VERSION index 9463ba3767..70244eae42 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.7.26.1202 Beta
\ No newline at end of file +0.7.27.1202 Beta
\ No newline at end of file diff --git a/templates/repo/commits_table.tmpl b/templates/repo/commits_table.tmpl index 64e2a3d2e0..35c7a48cc7 100644 --- a/templates/repo/commits_table.tmpl +++ b/templates/repo/commits_table.tmpl @@ -16,11 +16,11 @@ {{if .Commits}} <div class="ui attached table segment"> - <table class="ui very basic striped fixed single line" id="commits-table"> + <table class="ui very basic striped fixed table single line" id="commits-table"> <thead> <tr> <th class="four wide">{{.i18n.Tr "repo.commits.author"}}</th> - <th class="nine wide message"><span class="ui sha label"> SHA1 </span> {{.i18n.Tr "repo.commits.message"}}</th> + <th class="nine wide message"><span class="sha">SHA1</span> {{.i18n.Tr "repo.commits.message"}}</th> <th class="three wide right aligned">{{.i18n.Tr "repo.commits.date"}}</th> </tr> </thead> diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index d345c566b9..efe1bdab73 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -45,23 +45,23 @@ </div><!-- end grid --> </div><!-- end container --> {{end}} -{{if not .IsBareRepo}} +{{if not (or .IsBareRepo .IsDiffCompare)}} <div class="ui tabs container"> <div class="ui tabular menu navbar"> <a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}"> <i class="icon octicon octicon-code"></i> {{.i18n.Tr "repo.code"}} </a> <a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoLink}}/issues"> - <i class="icon octicon octicon-issue-opened"></i> {{.i18n.Tr "repo.issues"}} <span class="ui {{if eq 0 .Repository.NumOpenIssues}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenIssues}}</span> + <i class="icon octicon octicon-issue-opened"></i> {{.i18n.Tr "repo.issues"}} <span class="ui {{if not .Repository.NumOpenIssues}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenIssues}}</span> </a> <a class="{{if .PageIsPullList}}active{{end}} item" href="{{.RepoLink}}/pulls"> - <i class="icon octicon octicon-git-pull-request"></i> {{.i18n.Tr "repo.pulls"}} <span class="ui {{if eq 0 .Repository.NumOpenPulls}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenPulls}}</span> + <i class="icon octicon octicon-git-pull-request"></i> {{.i18n.Tr "repo.pulls"}} <span class="ui {{if not .Repository.NumOpenPulls}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenPulls}}</span> </a> <a class="{{if .PageIsCommits}}active{{end}} item" href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}"> - <i class="icon octicon octicon-history"></i> {{.i18n.Tr "repo.commits"}} <span class="ui {{if eq 0 .CommitsCount}}gray{{else}}blue{{end}} small label">{{.CommitsCount}}</span> + <i class="icon octicon octicon-history"></i> {{.i18n.Tr "repo.commits"}} <span class="ui {{if not .CommitsCount}}gray{{else}}blue{{end}} small label">{{.CommitsCount}}</span> </a> <a class="{{if .PageIsReleaseList}}active{{end}} item" href="{{.RepoLink}}/releases"> - <i class="icon octicon octicon-tag"></i> {{.i18n.Tr "repo.releases"}} <span class="ui {{if eq 0 .Repository.NumTags}}gray{{else}}blue{{end}} small label">{{.Repository.NumTags}}</span> + <i class="icon octicon octicon-tag"></i> {{.i18n.Tr "repo.releases"}} <span class="ui {{if not .Repository.NumTags}}gray{{else}}blue{{end}} small label">{{.Repository.NumTags}}</span> </a> <a class="{{if .PageIsWiki}}active{{end}} item" href="{{.RepoLink}}/wiki"> <i class="icon octicon octicon-book"></i> {{.i18n.Tr "repo.wiki"}} diff --git a/templates/repo/issue/navbar.tmpl b/templates/repo/issue/navbar.tmpl index d6d1074c6d..3f76947c16 100644 --- a/templates/repo/issue/navbar.tmpl +++ b/templates/repo/issue/navbar.tmpl @@ -1,8 +1,4 @@ <div class="ui compact small menu"> - {{if not .PageIsList}} - <a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoLink}}/issues">{{.i18n.Tr "repo.issues"}}</a> - <a class="{{if .PageIsPullList}}active{{end}} item" href="{{.RepoLink}}/pulls">{{.i18n.Tr "repo.pulls"}}</a> - {{end}} <a class="{{if .PageIsLabels}}active{{end}} item" href="{{.RepoLink}}/labels">{{.i18n.Tr "repo.labels"}}</a> <a class="{{if .PageIsMilestones}}active{{end}} item" href="{{.RepoLink}}/milestones">{{.i18n.Tr "repo.milestones"}}</a> </div>
\ No newline at end of file |