summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-03-16 03:41:22 -0400
committerUnknown <joe2010xtmf@163.com>2014-03-16 03:41:22 -0400
commit8de9517862acd77c27da015654fc236a6722d188 (patch)
tree5f228f7f9948945dfd4629f05c9d69eb28332e9d
parentc3e0554fd77f976b58a8da10d4878353bb895a78 (diff)
downloadgitea-8de9517862acd77c27da015654fc236a6722d188.tar.gz
gitea-8de9517862acd77c27da015654fc236a6722d188.zip
Mirror fix
-rw-r--r--routers/dashboard.go4
-rw-r--r--routers/repo/single.go12
-rw-r--r--routers/user/user.go12
-rw-r--r--templates/base/navbar.tmpl3
-rw-r--r--templates/repo/setting.tmpl2
-rw-r--r--templates/repo/single.tmpl6
-rw-r--r--web.go8
7 files changed, 41 insertions, 6 deletions
diff --git a/routers/dashboard.go b/routers/dashboard.go
index cab1662fc3..ddaef0cb56 100644
--- a/routers/dashboard.go
+++ b/routers/dashboard.go
@@ -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"
+}
diff --git a/routers/repo/single.go b/routers/repo/single.go
index a7f07898f0..a0f444716c 100644
--- a/routers/repo/single.go
+++ b/routers/repo/single.go
@@ -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"
+}
diff --git a/routers/user/user.go b/routers/user/user.go
index 8d8691a39f..e13f6909dd 100644
--- a/routers/user/user.go
+++ b/routers/user/user.go
@@ -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"
+}
diff --git a/templates/base/navbar.tmpl b/templates/base/navbar.tmpl
index 3fe0c1147a..181beb5a44 100644
--- a/templates/base/navbar.tmpl
+++ b/templates/base/navbar.tmpl
@@ -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"/>
diff --git a/templates/repo/setting.tmpl b/templates/repo/setting.tmpl
index 5e0a9f6cb9..225e229429 100644
--- a/templates/repo/setting.tmpl
+++ b/templates/repo/setting.tmpl
@@ -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>
diff --git a/templates/repo/single.tmpl b/templates/repo/single.tmpl
index 5774c0051d..8ea7e2bbf9 100644
--- a/templates/repo/single.tmpl
+++ b/templates/repo/single.tmpl
@@ -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>
diff --git a/web.go b/web.go
index b7138120a3..16f39bdb0e 100644
--- a/web.go
+++ b/web.go
@@ -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",