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

Mirror fix

This commit is contained in:
Unknown 2014-03-16 03:41:22 -04:00
parent c3e0554fd7
commit 8de9517862
7 changed files with 41 additions and 6 deletions

View File

@ -17,3 +17,7 @@ func Home(ctx *middleware.Context) {
ctx.Data["PageIsHome"] = true
ctx.Render.HTML(200, "home", ctx.Data)
}
func Help(ctx *middleware.Context) string {
return "This is help page"
}

View File

@ -60,3 +60,15 @@ func Setting(ctx *middleware.Context) {
ctx.Data["IsRepoToolbarSetting"] = true
ctx.Render.HTML(200, "repo/setting", ctx.Data)
}
func Commits(ctx *middleware.Context) string {
return "This is commits page"
}
func Issues(ctx *middleware.Context) string {
return "This is issues page"
}
func Pulls(ctx *middleware.Context) string {
return "This is pulls page"
}

View File

@ -189,3 +189,15 @@ func Feeds(ctx *middleware.Context, form auth.FeedsForm) {
}
ctx.Render.JSON(200, &feeds)
}
func Issues(ctx *middleware.Context) string {
return "This is issues page"
}
func Pulls(ctx *middleware.Context) string {
return "This is pulls page"
}
func Stars(ctx *middleware.Context) string {
return "This is stars page"
}

View File

@ -3,8 +3,7 @@
<nav class="gogs-nav">
<a id="gogs-nav-logo" class="gogs-nav-item{{if .PageIsHome}} active{{end}}" href="/"><img src="/img/favicon.png" alt="Gogs Logo" id="gogs-logo"></a>
<a class="gogs-nav-item{{if .PageIsUserDashboard}} active{{end}}" href="/">Dashboard</a>
<a class="gogs-nav-item" href="#">Explore</a>
<a class="gogs-nav-item" href="#">Help</a>{{if .IsSigned}}
<a class="gogs-nav-item" href="/help">Help</a>{{if .IsSigned}}
<a id="gogs-nav-out" class="gogs-nav-item navbar-right navbar-btn btn btn-danger" href="/user/logout/"><i class="fa fa-power-off fa-lg"></i></a>
<a id="gogs-nav-avatar" class="gogs-nav-item navbar-right" href="{{.SignedUser.HomeLink}}" data-toggle="tooltip" data-placement="bottom" title="{{.SignedUserName}}">
<img src="{{.SignedUser.AvatarLink}}?s=28" alt="user-avatar" title="username"/>

View File

@ -14,7 +14,7 @@
</div>
<div id="gogs-repo-setting-container" class="col-md-9 tab-content">
<div id="options" class="tab-pane">
repo-options
<h4>Repository Options</h4>
</div>
<div id="delete" class="tab-pane">
<h4>Delete Repository</h4>

View File

@ -10,8 +10,8 @@
<a href="#" class="btn btn-success dropdown-toggle" data-toggle="dropdown"><i class="fa fa-chain"></i>master&nbsp;&nbsp;
<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a class="current" href="/{{.RepositoryLink}}/branch/master">master</a></li>
<li><a href="//{{.RepositoryLink}}/branch/develop">develop</a></li>
<li><a class="current" href="/{{.RepositoryLink}}/tree/master">master</a></li>
<li><a href="/{{.RepositoryLink}}/tree/develop">develop</a></li>
</ul>
</div>
{{$paths := .Paths}}
@ -47,7 +47,7 @@
{{if .IsDir}}
<a href="/{{$username}}/{{$reponame}}/tree/{{$branchname}}/{{.Path}}">{{.Name}}</a>
{{else}}
<a href="#">{{.Name}} - {{FileSize .Size}}</a>
<a href="/{{$username}}/{{$reponame}}/blob/{{$branchname}}/{{.Name}}">{{.Name}} - {{FileSize .Size}}</a>
{{end}}</td>
<td class="date"><time datetime="{{.Created}}" data-title="true" title="{{.Created}}">{{TimeSince .Created}}</time></td>
<td class="text">{{.Message}}</td>

8
web.go
View File

@ -50,6 +50,9 @@ func runWeb(*cli.Context) {
// Routers.
m.Get("/", middleware.SignInRequire(false), routers.Home)
m.Get("/issues", middleware.SignInRequire(true), user.Issues)
m.Get("/pulls", middleware.SignInRequire(true), user.Pulls)
m.Get("/stars", middleware.SignInRequire(true), user.Stars)
m.Any("/user/login", middleware.SignOutRequire(), binding.BindIgnErr(auth.LogInForm{}), user.SignIn)
m.Any("/user/logout", middleware.SignInRequire(true), user.SignOut)
m.Any("/user/sign_up", middleware.SignOutRequire(), binding.BindIgnErr(auth.RegisterForm{}), user.SignUp)
@ -67,7 +70,12 @@ func runWeb(*cli.Context) {
m.Any("/repo/create", middleware.SignInRequire(true), binding.BindIgnErr(auth.CreateRepoForm{}), repo.Create)
m.Any("/repo/delete", middleware.SignInRequire(true), binding.Bind(auth.DeleteRepoForm{}), repo.Delete)
m.Get("/help", routers.Help)
m.Get("/:username/:reponame/settings", middleware.SignInRequire(false), middleware.RepoAssignment(true), repo.Setting)
m.Get("/:username/:reponame/commits", middleware.SignInRequire(false), middleware.RepoAssignment(true), repo.Commits)
m.Get("/:username/:reponame/issues", middleware.SignInRequire(false), middleware.RepoAssignment(true), repo.Issues)
m.Get("/:username/:reponame/pulls", middleware.SignInRequire(false), middleware.RepoAssignment(true), repo.Pulls)
m.Get("/:username/:reponame/tree/:branchname/**",
middleware.SignInRequire(false), middleware.RepoAssignment(true), repo.Single)
m.Get("/:username/:reponame/tree/:branchname",