diff --git a/modules/base/conf.go b/modules/base/conf.go index d3122a533..90b354764 100644 --- a/modules/base/conf.go +++ b/modules/base/conf.go @@ -243,7 +243,7 @@ func newNotifyMailService() { } func NewConfigContext() { - var err error + //var err error workDir, err := exeDir() if err != nil { fmt.Printf("Fail to get work directory: %s\n", err) diff --git a/public/css/gogs.css b/public/css/gogs.css index 8b031d6ed..2254ef5a2 100755 --- a/public/css/gogs.css +++ b/public/css/gogs.css @@ -224,6 +224,15 @@ html, body { line-height: 30px; } +#gogs-install-card{ + width: 800px; +} + +#gogs-install-card .form-group { + margin-left: 0; + margin-right: 0; +} + .gogs-card .btn { cursor: pointer; margin-right: 1.2em; @@ -676,7 +685,7 @@ html, body { margin: 0 .5em 0 0; } -.file-content .file-head .file-size{ +.file-content .file-head .file-size { font-size: 13px; color: #888; margin-left: 1em; diff --git a/routers/install.go b/routers/install.go new file mode 100644 index 000000000..d7d5159ef --- /dev/null +++ b/routers/install.go @@ -0,0 +1,13 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package routers + +import "github.com/gogits/gogs/modules/middleware" + +func Install(ctx *middleware.Context){ + ctx.Data["PageIsInstall"] = true + ctx.Data["Title"] = "Install" + ctx.HTML(200,"install") +} diff --git a/routers/repo/issue.go b/routers/repo/issue.go index e03f115e2..d54582a2a 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -45,6 +45,7 @@ func CreateIssue(ctx *middleware.Context, params martini.Params, form auth.Creat } ctx.Data["Title"] = "Create issue" + ctx.Data["IsRepoToolbarIssues"] = true if ctx.Req.Method == "GET" { ctx.HTML(200, "issue/create") diff --git a/templates/install.tmpl b/templates/install.tmpl new file mode 100644 index 000000000..a13f21908 --- /dev/null +++ b/templates/install.tmpl @@ -0,0 +1,70 @@ +{{template "base/head" .}} +
+
+ {{.CsrfTokenHtml}} +

Install Steps

+
{{.ErrorMsg}}
+

GoGits need MySQL or PostgreSQL server

+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +

Recommend use INNODB engine with utf8_general_ci charset.

+
+
+ +
+
+ +
+
+ +
+ +

General settings for GoGits

+ +
+ +
+ +

The git copy of each repository is saved in this directory.

+
+
+
+ +
+ +

The user has access to visit and run GoGits.

+
+
+
+ +
+
+{{template "base/footer" .}} \ No newline at end of file diff --git a/templates/issue/create.tmpl b/templates/issue/create.tmpl new file mode 100644 index 000000000..e71843e6f --- /dev/null +++ b/templates/issue/create.tmpl @@ -0,0 +1,10 @@ +{{template "base/head" .}} +{{template "base/navbar" .}} +{{template "repo/nav" .}} +{{template "repo/toolbar" .}} +
+
+ new-issues +
+
+{{template "base/footer" .}} \ No newline at end of file diff --git a/templates/repo/issues.tmpl b/templates/repo/issues.tmpl index daacc089c..bf23ff83f 100644 --- a/templates/repo/issues.tmpl +++ b/templates/repo/issues.tmpl @@ -4,6 +4,7 @@ {{template "repo/toolbar" .}}
+ issues
{{template "base/footer" .}} \ No newline at end of file diff --git a/web.go b/web.go index 0747f224b..6538c61f1 100644 --- a/web.go +++ b/web.go @@ -90,6 +90,7 @@ func runWeb(*cli.Context) { // Routers. m.Get("/", ignSignIn, routers.Home) + m.Get("/install",routers.Install) m.Get("/issues", reqSignIn, user.Issues) m.Get("/pulls", reqSignIn, user.Pulls) m.Get("/stars", reqSignIn, user.Stars)