mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-25 23:05:39 +03:00
Merge branch 'master' of github.com:gogits/gogs
This commit is contained in:
commit
1043ab506e
5 changed files with 7 additions and 5 deletions
|
@ -24,7 +24,6 @@ func RepoAssignment(redirect bool) martini.Handler {
|
||||||
|
|
||||||
// get repository owner
|
// get repository owner
|
||||||
ctx.Repo.IsOwner = ctx.IsSigned && ctx.User.LowerName == params["username"]
|
ctx.Repo.IsOwner = ctx.IsSigned && ctx.User.LowerName == params["username"]
|
||||||
ctx.Data["IsRepositoryOwner"] = ctx.Repo.IsOwner
|
|
||||||
|
|
||||||
if !ctx.Repo.IsOwner {
|
if !ctx.Repo.IsOwner {
|
||||||
user, err = models.GetUserByName(params["username"])
|
user, err = models.GetUserByName(params["username"])
|
||||||
|
@ -70,5 +69,6 @@ func RepoAssignment(redirect bool) martini.Handler {
|
||||||
ctx.Data["Owner"] = user
|
ctx.Data["Owner"] = user
|
||||||
ctx.Data["Title"] = user.Name + "/" + repo.Name
|
ctx.Data["Title"] = user.Name + "/" + repo.Name
|
||||||
ctx.Data["RepositoryLink"] = ctx.Data["Title"]
|
ctx.Data["RepositoryLink"] = ctx.Data["Title"]
|
||||||
|
ctx.Data["IsRepositoryOwner"] = ctx.Repo.IsOwner
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ body {
|
||||||
|
|
||||||
html, body {
|
html, body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
font-family: Helvetica, Arial, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* override bs3 */
|
/* override bs3 */
|
||||||
|
|
|
@ -73,7 +73,6 @@ func Single(ctx *middleware.Context, params martini.Params) {
|
||||||
ctx.Data["Paths"] = Paths
|
ctx.Data["Paths"] = Paths
|
||||||
ctx.Data["Treenames"] = treenames
|
ctx.Data["Treenames"] = treenames
|
||||||
ctx.Data["IsRepoToolbarSource"] = true
|
ctx.Data["IsRepoToolbarSource"] = true
|
||||||
ctx.Data["IsRepositoryOwner"] = strings.ToLower(params["username"]) == ctx.User.LowerName
|
|
||||||
ctx.Data["Files"] = files
|
ctx.Data["Files"] = files
|
||||||
ctx.Render.HTML(200, "repo/single", ctx.Data)
|
ctx.Render.HTML(200, "repo/single", ctx.Data)
|
||||||
}
|
}
|
||||||
|
@ -90,7 +89,6 @@ func Setting(ctx *middleware.Context, params martini.Params) {
|
||||||
|
|
||||||
ctx.Data["Title"] = title + " - settings"
|
ctx.Data["Title"] = title + " - settings"
|
||||||
ctx.Data["IsRepoToolbarSetting"] = true
|
ctx.Data["IsRepoToolbarSetting"] = true
|
||||||
ctx.Data["IsRepositoryOwner"] = strings.ToLower(params["username"]) == ctx.User.LowerName
|
|
||||||
ctx.Render.HTML(200, "repo/setting", ctx.Data)
|
ctx.Render.HTML(200, "repo/setting", ctx.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<link rel="shortcut icon" href="/img/favicon.png" />
|
<link rel="shortcut icon" href="/img/favicon.png" />
|
||||||
|
<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="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="description" content="Gogs(Go Git Service) is a GitHub-like clone in the Go Programming Language" />
|
||||||
<meta name="keywords" content="go, git">
|
<meta name="keywords" content="go, git">
|
||||||
|
|
|
@ -5,8 +5,9 @@
|
||||||
<ul class="nav navbar-nav">
|
<ul class="nav navbar-nav">
|
||||||
<li class="{{if .IsRepoToolbarSource}}active{{end}}"><a href="/{{.RepositoryLink}}">Source</a></li>
|
<li class="{{if .IsRepoToolbarSource}}active{{end}}"><a href="/{{.RepositoryLink}}">Source</a></li>
|
||||||
<li><a href="/{{.RepositoryLink}}/commits">Commits</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}}/pulls">Pull Requests</a></li>
|
||||||
|
<li><a href="/{{.RepositoryLink}}/issues">Issues <!--<span class="badge">42</span>--></a></li>
|
||||||
<li class="dropdown">
|
<li class="dropdown">
|
||||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">More <b class="caret"></b></a>
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">More <b class="caret"></b></a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
|
|
Loading…
Reference in a new issue