mirror of https://github.com/gogits/gogs.git
skyblue
11 years ago
22 changed files with 330 additions and 79 deletions
@ -1,19 +1,27 @@
|
||||
Copyright (c) 2011 Dmitriy Zaporozhets |
||||
Copyright (c) 2014 |
||||
All rights reserved. |
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
of this software and associated documentation files (the "Software"), to deal |
||||
in the Software without restriction, including without limitation the rights |
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
copies of the Software, and to permit persons to whom the Software is |
||||
furnished to do so, subject to the following conditions: |
||||
Redistribution and use in source and binary forms, with or without |
||||
modification, are permitted provided that the following conditions are met: |
||||
|
||||
The above copyright notice and this permission notice shall be included in |
||||
all copies or substantial portions of the Software. |
||||
* Redistributions of source code must retain the above copyright notice, this |
||||
list of conditions and the following disclaimer. |
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
||||
THE SOFTWARE. |
||||
* Redistributions in binary form must reproduce the above copyright notice, |
||||
this list of conditions and the following disclaimer in the documentation |
||||
and/or other materials provided with the distribution. |
||||
|
||||
* Neither the name of the {organization} nor the names of its |
||||
contributors may be used to endorse or promote products derived from |
||||
this software without specific prior written permission. |
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
@ -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") |
||||
} |
@ -0,0 +1,70 @@
|
||||
{{template "base/head" .}} |
||||
<div id="gogs-body" class="container"> |
||||
<form action="/install" method="post" class="form-horizontal gogs-card" id="gogs-install-card"> |
||||
{{.CsrfTokenHtml}} |
||||
<h3>Install Steps</h3> |
||||
<div class="alert alert-danger form-error{{if .HasError}}{{else}} hidden{{end}}">{{.ErrorMsg}}</div> |
||||
<p class="help-block text-center">GoGits need MySQL or PostgreSQL server</p> |
||||
<div class="form-group {{if .Err_User}}has-error has-feedback{{end}}"> |
||||
<label class="col-md-3 control-label"><strong>MySQL </strong>Host: </label> |
||||
<div class="col-md-8"> |
||||
<input name="host" class="form-control" placeholder="Type mysql server ip or domain" value="localhost" required="required"> |
||||
</div> |
||||
</div> |
||||
<div class="form-group {{if .Err_User}}has-error has-feedback{{end}}"> |
||||
<label class="col-md-3 control-label">Port: </label> |
||||
<div class="col-md-8"> |
||||
<input name="port" class="form-control" placeholder="Type mysql server port" value="3306" required="required"> |
||||
</div> |
||||
</div> |
||||
<div class="form-group {{if .Err_User}}has-error has-feedback{{end}}"> |
||||
<label class="col-md-3 control-label">User: </label> |
||||
<div class="col-md-8"> |
||||
<input name="user" class="form-control" placeholder="Type mysql username" required="required"> |
||||
</div> |
||||
</div> |
||||
<div class="form-group {{if .Err_Password}}has-error has-feedback{{end}}"> |
||||
<label class="col-md-3 control-label">Password: </label> |
||||
<div class="col-md-8"> |
||||
<input name="passwd" type="password" class="form-control" placeholder="Type mysql password" required="required"> |
||||
</div> |
||||
</div> |
||||
<div class="form-group {{if .Err_Password}}has-error has-feedback{{end}}"> |
||||
<label class="col-md-3 control-label">Database: </label> |
||||
<div class="col-md-8"> |
||||
<input name="database" type="text" class="form-control" placeholder="Type mysql database name" value="gogs" required="required"> |
||||
<p class="help-block">Recommend use INNODB engine with utf8_general_ci charset.</p> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="form-group"> |
||||
<div class="col-md-8 col-md-offset-3"> |
||||
<button class="btn btn-sm btn-info">Test Connection</button> |
||||
</div> |
||||
</div> |
||||
|
||||
<hr/> |
||||
|
||||
<p class="help-block text-center">General settings for GoGits</p> |
||||
|
||||
<div class="form-group {{if .Err_Password}}has-error has-feedback{{end}}"> |
||||
<label class="col-md-3 control-label">Repository Path: </label> |
||||
<div class="col-md-8"> |
||||
<input name="repo-path" type="text" class="form-control" placeholder="Type your repository directory" value="/var/gogs/repostiory" required="required"> |
||||
<p class="help-block">The git copy of each repository is saved in this directory.</p> |
||||
</div> |
||||
</div> |
||||
<div class="form-group {{if .Err_Password}}has-error has-feedback{{end}}"> |
||||
<label class="col-md-3 control-label">System User: </label> |
||||
<div class="col-md-8"> |
||||
<input name="system-user" type="text" class="form-control" placeholder="Type mysql password" value="root" required="required"> |
||||
<p class="help-block">The user has access to visit and run GoGits.</p> |
||||
</div> |
||||
</div> |
||||
<hr/> |
||||
<div class="form-group text-center"> |
||||
<a class="btn btn-danger btn-lg">Install GoGits</a> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
{{template "base/footer" .}} |
@ -0,0 +1,10 @@
|
||||
{{template "base/head" .}} |
||||
{{template "base/navbar" .}} |
||||
{{template "repo/nav" .}} |
||||
{{template "repo/toolbar" .}} |
||||
<div id="gogs-body" class="container"> |
||||
<div id="gogs-source"> |
||||
new-issues |
||||
</div> |
||||
</div> |
||||
{{template "base/footer" .}} |
Loading…
Reference in new issue