diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/base/footer.tmpl | 5 | ||||
-rw-r--r-- | templates/install.tmpl | 13 | ||||
-rw-r--r-- | templates/repo/single_file.tmpl | 45 |
3 files changed, 34 insertions, 29 deletions
diff --git a/templates/base/footer.tmpl b/templates/base/footer.tmpl index 6c2da63e..30f06891 100644 --- a/templates/base/footer.tmpl +++ b/templates/base/footer.tmpl @@ -13,7 +13,10 @@ <div class="col-md-1" style="margin: -5px;"> <a target="_blank" href="https://github.com/gogits/gogs"><i class="fa fa-github fa-2x"></i></a> </div> - <p class="desc"></p> + + <div class="col-md-5"> + <p class="desc"></p> + </div> </div> </div> </footer> diff --git a/templates/install.tmpl b/templates/install.tmpl index 2ed7e569..8fe678e5 100644 --- a/templates/install.tmpl +++ b/templates/install.tmpl @@ -9,14 +9,15 @@ <label class="col-md-3 control-label">Database Type: </label> <div class="col-md-8"> <select name="database" id="install-database" class="form-control"> - <option value="mysql">MySQL</option> - <option value="pgsql">PostgreSQL</option> - <option value="sqlite">SQLite3</option> + {{if .CurDbValue}}<option value="{{.CurDbValue}}">{{.CurDbValue}}</option>{{end}} + {{range .DbOptions}} + {{if not (eq $.CurDbValue .)}}<option value="{{.}}">{{.}}</option>{{end}} + {{end}} </select> </div> </div> - <div class="server-sql"> + <div class="server-sql {{if eq .CurDbValue "SQLite3"}}hide{{end}}"> <div class="form-group"> <label class="col-md-3 control-label">Host: </label> <div class="col-md-8"> @@ -49,7 +50,7 @@ </div> </div> - <div class="form-group pgsql-setting hide"> + <div class="form-group pgsql-setting {{if not (eq .CurDbValue "PostgreSQL")}}hide{{end}}"> <label class="col-md-3 control-label">SSL Mode: </label> <div class="col-md-8"> <select name="ssl_mode" class="form-control"> @@ -61,7 +62,7 @@ </div> </div> - <div class="sqlite-setting hide"> + <div class="sqlite-setting {{if not (eq .CurDbValue "SQLite3")}}hide{{end}}"> <div class="form-group"> <label class="col-md-3 control-label">Path: </label> diff --git a/templates/repo/single_file.tmpl b/templates/repo/single_file.tmpl index 9199ca91..b8205024 100644 --- a/templates/repo/single_file.tmpl +++ b/templates/repo/single_file.tmpl @@ -21,30 +21,31 @@ </div> {{end}} </div> + {{if not .FileIsText}} - <div class="panel-footer text-center"> - {{if .IsImageFile}} - <img src="{{.FileLink}}"> - {{else}} - <a href="{{.FileLink}}" class="btn btn-default">View Raw</a> - {{end}} - </div> - {{else}} - {{if .ReadmeExist}} - <div class="panel-body file-body markdown"> - {{.FileContent|str2html}} - </div> + <div class="panel-body file-body file-code code-view"> + {{if .IsImageFile}} + <img src="{{.FileLink}}"> {{else}} - <div class="panel-body file-body file-code code-view"> - <table> - <tbody> - <tr> - <td class="lines-num"></td> - <td class="lines-code markdown"><pre class="prettyprint linenums{{if .FileExt}} lang-{{.FileExt}}{{end}}">{{.FileContent}}</pre></td> - </tr> - </tbody> - </table> - </div> + <a href="{{.FileLink}}" class="btn btn-default">View Raw</a> {{end}} + </div> + {{else}} + {{if .ReadmeExist}} + <div class="panel-body file-body markdown"> + {{.FileContent|str2html}} + </div> + {{else}} + <div class="panel-body file-body file-code code-view"> + <table> + <tbody> + <tr> + <td class="lines-num"></td> + <td class="lines-code markdown"><pre class="prettyprint linenums{{if .FileExt}} lang-{{.FileExt}}{{end}}">{{.FileContent}}</pre></td> + </tr> + </tbody> + </table> + </div> + {{end}} {{end}} </div> |