mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-18 07:12:20 +00:00
ui update, repo-assignment panic bug fix
This commit is contained in:
parent
cc3cbf8cbe
commit
c101471bdf
5 changed files with 7 additions and 5 deletions
|
@ -24,7 +24,6 @@ func RepoAssignment(redirect bool) martini.Handler {
|
|||
|
||||
// get repository owner
|
||||
ctx.Repo.IsOwner = ctx.IsSigned && ctx.User.LowerName == params["username"]
|
||||
ctx.Data["IsRepositoryOwner"] = ctx.Repo.IsOwner
|
||||
|
||||
if !ctx.Repo.IsOwner {
|
||||
user, err = models.GetUserByName(params["username"])
|
||||
|
@ -70,5 +69,6 @@ func RepoAssignment(redirect bool) martini.Handler {
|
|||
ctx.Data["Owner"] = user
|
||||
ctx.Data["Title"] = user.Name + "/" + repo.Name
|
||||
ctx.Data["RepositoryLink"] = ctx.Data["Title"]
|
||||
ctx.Data["IsRepositoryOwner"] = ctx.Repo.IsOwner
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ body {
|
|||
|
||||
html, body {
|
||||
height: 100%;
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
/* override bs3 */
|
||||
|
|
|
@ -46,7 +46,6 @@ func Single(ctx *middleware.Context, params martini.Params) {
|
|||
ctx.Data["Paths"] = Paths
|
||||
ctx.Data["Treenames"] = treenames
|
||||
ctx.Data["IsRepoToolbarSource"] = true
|
||||
ctx.Data["IsRepositoryOwner"] = strings.ToLower(params["username"]) == ctx.User.LowerName
|
||||
ctx.Data["Files"] = files
|
||||
ctx.Render.HTML(200, "repo/single", ctx.Data)
|
||||
}
|
||||
|
@ -63,7 +62,6 @@ func Setting(ctx *middleware.Context, params martini.Params) {
|
|||
|
||||
ctx.Data["Title"] = title + " - settings"
|
||||
ctx.Data["IsRepoToolbarSetting"] = true
|
||||
ctx.Data["IsRepositoryOwner"] = strings.ToLower(params["username"]) == ctx.User.LowerName
|
||||
ctx.Render.HTML(200, "repo/setting", ctx.Data)
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<link rel="shortcut icon" href="/img/favicon.png" />
|
||||
<meta name="author" content="Gogs - Go Git Service" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
|
||||
<meta name="author" content="Gogs - Go Git Service" />
|
||||
<meta name="description" content="Gogs(Go Git Service) is a GitHub-like clone in the Go Programming Language" />
|
||||
<meta name="keywords" content="go, git">
|
||||
|
||||
|
|
|
@ -5,8 +5,9 @@
|
|||
<ul class="nav navbar-nav">
|
||||
<li class="{{if .IsRepoToolbarSource}}active{{end}}"><a href="/{{.RepositoryLink}}">Source</a></li>
|
||||
<li><a href="/{{.RepositoryLink}}/commits">Commits</a></li>
|
||||
<li><a href="/{{.RepositoryLink}}/issues">Issues <!--<span class="badge">42</span>--></a></li>
|
||||
<li><a href="/{{.RepositoryLink}}/branches">Branches</a></li>
|
||||
<li><a href="/{{.RepositoryLink}}/pulls">Pull Requests</a></li>
|
||||
<li><a href="/{{.RepositoryLink}}/issues">Issues <!--<span class="badge">42</span>--></a></li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">More <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
|
|
Loading…
Reference in a new issue