1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-04 08:17:24 -05:00

more UI minor fixes

This commit is contained in:
Unknwon 2015-12-02 20:56:26 -05:00
parent c4bab163cb
commit ec2423ad7c
10 changed files with 37 additions and 35 deletions

View File

@ -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>

View File

@ -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)

View File

@ -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())

View File

@ -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;
}

View File

@ -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;

View File

@ -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())

View File

@ -1 +1 @@
0.7.26.1202 Beta
0.7.27.1202 Beta

View File

@ -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">&nbsp;&nbsp;&nbsp;SHA1&nbsp;&nbsp;&nbsp;</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>

View File

@ -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"}}

View File

@ -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>