summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/admin/nav.tmpl2
-rw-r--r--templates/base/navbar.tmpl21
-rw-r--r--templates/home.tmpl4
-rw-r--r--templates/install.tmpl31
-rw-r--r--templates/issue/create.tmpl4
-rw-r--r--templates/issue/view.tmpl4
-rw-r--r--templates/repo/hooks_add.tmpl89
-rw-r--r--templates/repo/hooks_edit.tmpl3
8 files changed, 78 insertions, 80 deletions
diff --git a/templates/admin/nav.tmpl b/templates/admin/nav.tmpl
index e22ae0b9f5..f27b8bb24b 100644
--- a/templates/admin/nav.tmpl
+++ b/templates/admin/nav.tmpl
@@ -4,6 +4,6 @@
<li class="list-group-item{{if .PageIsUsers}} active{{end}}"><a href="/admin/users"><i class="fa fa-users fa-lg"></i> Users</a></li>
<li class="list-group-item{{if .PageIsRepos}} active{{end}}"><a href="/admin/repos"><i class="fa fa-book fa-lg"></i> Repositories</a></li>
<li class="list-group-item{{if .PageIsConfig}} active{{end}}"><a href="/admin/config"><i class="fa fa-cogs fa-lg"></i> Configuration</a></li>
- <li class="list-group-item{{if .PageIsAuths}} active{{end}}"><a href="/admin/auths"><i class="fa fa-check-square-o fa-lg"></i> Authentication</a></li>
+ <li class="list-group-item{{if .PageIsAuths}} active{{end}}"><a href="/admin/auths"><i class="fa fa-certificate fa-lg"></i> Authentication</a></li>
</ul>
</div> \ No newline at end of file
diff --git a/templates/base/navbar.tmpl b/templates/base/navbar.tmpl
index 80085d974a..29a2b75cc1 100644
--- a/templates/base/navbar.tmpl
+++ b/templates/base/navbar.tmpl
@@ -3,20 +3,25 @@
<nav class="nav">
<a id="nav-logo" class="nav-item pull-left{{if .PageIsHome}} active{{end}}" href="/"><img src="/img/favicon.png" alt="Gogs Logo" id="logo"></a>
<a class="nav-item pull-left{{if .PageIsUserDashboard}} active{{end}}" href="/">Dashboard</a>
- <a class="nav-item pull-left{{if .PageIsHelp}} active{{end}}" target="_blank" href="http://gogs.io/docs">Help</a>{{if .IsSigned}}
- {{if .HasAccess}}<form class="nav-item pull-left{{if .PageIsNewRepo}} active{{end}}" id="nav-search-form">
+ <a class="nav-item pull-left{{if .PageIsHelp}} active{{end}}" target="_blank" href="http://gogs.io/docs">Help</a>
+ {{if .IsSigned}}
+ {{if .HasAccess}}
+ <form class="nav-item pull-left{{if .PageIsNewRepo}} active{{end}}" id="nav-search-form">
<div class="input-group">
<div class="input-group-btn">
<button type="button" class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown">{{if .Repository}}This Repository{{else}}All Repositories{{end}} <span class="caret"></span></button>
<ul class="dropdown-menu">
- {{if .Repository}}<li><a href="#">This Repository</a></li>
- <li class="divider"></li>{{end}}
+ {{if .Repository}}
+ <li><a href="#">This Repository</a></li>
+ <li class="divider"></li>
+ {{end}}
<li><a href="#">All Repositories</a></li>
</ul>
</div>
<input type="search" class="form-control input-sm" name="q" placeholder="search code, commits and issues"/>
</div>
- </form>{{end}}
+ </form>
+ {{end}}
<a id="nav-out" class="nav-item navbar-right navbar-btn btn btn-danger" href="/user/logout/"><i class="fa fa-power-off fa-lg"></i></a>
<a id="nav-avatar" class="nav-item navbar-right{{if .PageIsUserProfile}} active{{end}}" href="{{.SignedUser.HomeLink}}" data-toggle="tooltip" data-placement="bottom" title="{{.SignedUserName}}">
<img src="{{.SignedUser.AvatarLink}}?s=28" alt="user-avatar" title="username"/>
@@ -33,8 +38,10 @@
</ul>
</div>
</div>
- {{else}}<a id="nav-signin" class="nav-item navbar-right navbar-btn btn btn-danger" href="/user/login/" rel="nofollow">Sign In</a>
- <a id="nav-signup" class="nav-item navbar-right" href="/user/sign_up/" rel="nofollow">Sign Up</a>{{end}}
+ {{else}}
+ <a id="nav-signin" class="nav-item navbar-right navbar-btn btn btn-danger" href="/user/login/" rel="nofollow">Sign In</a>
+ <a id="nav-signup" class="nav-item navbar-right" href="/user/sign_up/" rel="nofollow">Sign Up</a>
+ {{end}}
</nav>
</div>
</div>
diff --git a/templates/home.tmpl b/templates/home.tmpl
index b08d1c2451..8288d21e15 100644
--- a/templates/home.tmpl
+++ b/templates/home.tmpl
@@ -10,7 +10,7 @@
<h5>Here are some recent updated repositories:</h5>
<div class="tab-pane active">
<ul class="list-unstyled repo-list">
- {{range .Repos}}
+ {{range .Repos}}
<li>
<div class="meta pull-right"><!-- <i class="fa fa-star"></i> {{.NumStars}} --> <i class="fa fa-code-fork"></i> {{.NumForks}}</div>
<h4>
@@ -19,7 +19,7 @@
<p class="desc">{{.Description}}</p>
<div class="info">Last updated {{.Updated|TimeSince}}</div>
</li>
- {{end}}
+ {{end}}
</ul>
</div>
{{end}}
diff --git a/templates/install.tmpl b/templates/install.tmpl
index eb6327d205..9ba610b62d 100644
--- a/templates/install.tmpl
+++ b/templates/install.tmpl
@@ -9,15 +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">
- {{if .CurDbValue}}<option value="{{.CurDbValue}}">{{.CurDbValue}}</option>{{end}}
+ {{if .CurDbOption}}<option value="{{.CurDbOption}}">{{.CurDbOption}}</option>{{end}}
{{range .DbOptions}}
- {{if not (eq $.CurDbValue .)}}<option value="{{.}}">{{.}}</option>{{end}}
+ {{if not (eq $.CurDbOption .)}}<option value="{{.}}" >{{.}}</option>{{end}}
{{end}}
</select>
</div>
</div>
- <div class="server-sql {{if eq .CurDbValue "SQLite3"}}hide{{end}}">
+ <div class="server-sql {{if eq .CurDbOption "SQLite3"}}hide{{end}}">
<div class="form-group">
<label class="col-md-3 control-label">Host: </label>
<div class="col-md-8">
@@ -27,7 +27,6 @@
<div class="form-group">
<label class="col-md-3 control-label">User: </label>
-
<div class="col-md-8">
<input name="user" class="form-control" placeholder="Type database username" value="{{.user}}">
</div>
@@ -35,7 +34,6 @@
<div class="form-group">
<label class="col-md-3 control-label">Password: </label>
-
<div class="col-md-8">
<input name="passwd" type="password" class="form-control" placeholder="Type database password" value="{{.passwd}}">
</div>
@@ -43,14 +41,13 @@
<div class="form-group">
<label class="col-md-3 control-label">Database Name: </label>
-
<div class="col-md-8">
<input name="database_name" type="text" class="form-control" placeholder="Type mysql database name" value="{{.database_name}}">
<p class="help-block">Recommend use INNODB engine with utf8_general_ci charset.</p>
</div>
</div>
- <div class="form-group pgsql-setting {{if not (eq .CurDbValue "PostgreSQL")}}hide{{end}}">
+ <div class="form-group pgsql-setting {{if not (eq .CurDbOption "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">
@@ -62,10 +59,9 @@
</div>
</div>
- <div class="sqlite-setting {{if not (eq .CurDbValue "SQLite3")}}hide{{end}}">
+ <div class="sqlite-setting {{if not (eq .CurDbOption "SQLite3")}}hide{{end}}">
<div class="form-group">
<label class="col-md-3 control-label">Path: </label>
-
<div class="col-md-8">
<input name="database_path" class="form-control" placeholder="Type sqlite3 file path" value="{{.database_path}}">
<p class="help-block">The file path of SQLite3 database.</p>
@@ -78,17 +74,14 @@
<p class="help-block text-center">General Settings of Gogs</p>
<div class="form-group">
<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="{{.repo_path}}" required="required">
-
<p class="help-block">The git copy of each repository is saved in this directory.</p>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Run User: </label>
-
<div class="col-md-8">
<input name="run_user" type="text" class="form-control" placeholder="Type system user name" value="{{.run_user}}" required="required">
<p class="help-block">The user has access to visit and run Gogs.</p>
@@ -97,7 +90,6 @@
<div class="form-group">
<label class="col-md-3 control-label">Domain: </label>
-
<div class="col-md-8">
<input name="domain" type="text" class="form-control" placeholder="Type your domain name" value="{{.domain}}" required="required">
<p class="help-block">This affects SSH clone URL.</p>
@@ -106,7 +98,6 @@
<div class="form-group">
<label class="col-md-3 control-label">App URL: </label>
-
<div class="col-md-8">
<input name="app_url" type="text" class="form-control" placeholder="Type app root URL" value="{{.app_url}}" required="required">
<p class="help-block">This affects HTTP/HTTPS clone URL and somewhere in e-mail.</p>
@@ -116,7 +107,7 @@
<hr/>
<p class="help-block text-center">Admin Account Settings</p>
- <div class="form-group">
+ <div class="form-group {{if .Err_AdminName}}has-error has-feedback{{end}}">
<label class="col-md-3 control-label">Username: </label>
<div class="col-md-8">
<input name="admin_name" type="text" class="form-control" placeholder="Type admin user name" value="{{.admin_name}}" required="required">
@@ -152,31 +143,30 @@
<div class="modal-header"><h4 class="modal-title">Advanced Options</h4></div>
<div class="modal-body">
<p class="help-block text-center">Email Service Settings</p>
-
<div class="form-group">
<label class="col-md-3 control-label">SMTP Host: </label>
-
<div class="col-md-8">
<input name="smtp_host" type="text" class="form-control" placeholder="Type SMTP host address and port" value="{{.smtp_host}}">
</div>
</div>
+
<div class="form-group">
<label class="col-md-3 control-label">Username: </label>
-
<div class="col-md-8">
<input name="mailer_user" type="text" class="form-control" placeholder="Type SMTP user e-mail address" value="{{.mailer_user}}">
</div>
</div>
+
<div class="form-group">
<label class="col-md-3 control-label">Password: </label>
-
<div class="col-md-8">
<input name="mailer_pwd" type="password" class="form-control" placeholder="Type SMTP user password" value="{{.mailer_pwd}}">
</div>
</div>
+
<hr/>
- <p class="text-center help-block">Notification Settings</p>
+ <p class="text-center help-block">Notification Settings</p>
<div class="form-group">
<div class="col-md-offset-3 col-md-7">
<div class="checkbox">
@@ -202,7 +192,6 @@
</div>
</div>
</div>
-
</form>
</div>
{{template "base/footer" .}}
diff --git a/templates/issue/create.tmpl b/templates/issue/create.tmpl
index a75ee83617..f6a65cc846 100644
--- a/templates/issue/create.tmpl
+++ b/templates/issue/create.tmpl
@@ -20,12 +20,12 @@
</div>
<ul class="nav nav-tabs" data-init="tabs">
<li class="active issue-write"><a href="#issue-textarea" data-toggle="tab">Write</a></li>
- <li class="issue-preview"><a href="#issue-preview" data-toggle="tab" data-ajax="/api/v1/markdown?repoLink={{.RepoLink}}" data-ajax-name="issue-preview" data-ajax-method="post" data-preview="#issue-preview">Preview</a></li>
+ <li class="issue-preview"><a href="#issue-preview" data-toggle="tab" data-ajax="/api/v1/markdown" data-ajax-name="issue-preview" data-ajax-context="{{.RepoLink}}" data-ajax-method="post" data-preview="#issue-preview">Preview</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane" id="issue-textarea">
<div class="form-group">
- <textarea class="form-control" name="content" id="issue-content" rows="10" placeholder="Write some content" data-ajax-rel="issue-preview" data-ajax-val="val" data-ajax-field="content">{{.content}}</textarea>
+ <textarea class="form-control" name="content" id="issue-content" rows="10" placeholder="Write some content" data-ajax-rel="issue-preview" data-ajax-val="val" data-ajax-field="text">{{.content}}</textarea>
</div>
</div>
<div class="tab-pane issue-preview-content" id="issue-preview">loading...</div>
diff --git a/templates/issue/view.tmpl b/templates/issue/view.tmpl
index 90c9361241..19dce4f2df 100644
--- a/templates/issue/view.tmpl
+++ b/templates/issue/view.tmpl
@@ -72,13 +72,13 @@
</div>
<ul class="nav nav-tabs" data-init="tabs">
<li class="active issue-write"><a href="#issue-textarea" data-toggle="tab">Write</a></li>
- <li class="issue-preview"><a href="#issue-preview" data-toggle="tab" data-ajax="/api/v1/markdown?repoLink={{.RepoLink}}" data-ajax-name="issue-preview" data-ajax-method="post" data-preview="#issue-preview">Preview</a></li>
+ <li class="issue-preview"><a href="#issue-preview" data-toggle="tab" data-ajax="/api/v1/markdown" data-ajax-name="issue-preview" data-ajax-context="{{.RepoLink}}" data-ajax-method="post" data-preview="#issue-preview">Preview</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane" id="issue-textarea">
<div class="form-group">
<input type="hidden" value="{{.Issue.Index}}" name="issueIndex"/>
- <textarea class="form-control" name="content" id="issue-reply-content" rows="10" placeholder="Write some content" data-ajax-rel="issue-preview" data-ajax-val="val" data-ajax-field="content">{{.content}}</textarea>
+ <textarea class="form-control" name="content" id="issue-reply-content" rows="10" placeholder="Write some content" data-ajax-rel="issue-preview" data-ajax-val="val" data-ajax-field="text">{{.content}}</textarea>
</div>
</div>
<div class="tab-pane issue-preview-content" id="issue-preview">Loading...</div>
diff --git a/templates/repo/hooks_add.tmpl b/templates/repo/hooks_add.tmpl
index fb1c37d8a8..3a377fda69 100644
--- a/templates/repo/hooks_add.tmpl
+++ b/templates/repo/hooks_add.tmpl
@@ -6,56 +6,55 @@
{{template "repo/setting_nav" .}}
<div id="repo-setting-container" class="col-md-10">
{{template "base/alert" .}}
- <div class="panel panel-default">
- <div class="panel-heading">
- Add Webhook
- </div>
- <div class="panel-body">
- <p>We’ll send a POST request to the URL below with details of any subscribed events.</p>
- <hr/>
- <form id="repo-hooks-add-form" action="/{{.Owner.Name}}/{{.Repository.Name}}/settings/hooks/add" method="post" class="col-md-7">
- <div class="form-group">
- <label for="payload-url">Payload URL</label>
- <input id="payload-url" class="form-control" type="url" required="required" name="url"/>
- </div>
- <div class="form-group">
- <label for="payload-version">Payload Version</label>
- <select name="version" id="payload-version" class="form-control">
- <option value="json">application/json</option>
- </select>
- </div>
- <div class="form-group">
- <label for="payload-secret">Secret</label>
- <input id="payload-secret" class="form-control" type="text" required="required" name="secret"/>
- </div>
- <hr/>
- <div class="form-group">
- <label>Which events would you like to trigger this webhook?</label>
- <div class="radio">
+ <form id="repo-hooks-add-form" action="/{{.Owner.Name}}/{{.Repository.Name}}/settings/hooks/add" method="post">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ Add Webhook
+ </div>
+
+ <div class="panel-body">
+ <div class="col-md-7">
+ <p>We’ll send a POST request to the URL below with details of any subscribed events.</p>
+ <hr/>
+ <div class="form-group">
+ <label for="payload-url">Payload URL</label>
+ <input id="payload-url" class="form-control" type="url" required="required" name="url"/>
+ </div>
+ <div class="form-group">
+ <label for="payload-version">Payload Version</label>
+ <select name="version" id="payload-version" class="form-control">
+ <option value="json">application/json</option>
+ </select>
+ </div>
+ <div class="form-group">
+ <label for="payload-secret">Secret</label>
+ <input id="payload-secret" class="form-control" type="text" required="required" name="secret"/>
+ </div>
+ <hr/>
+ <div class="form-group">
+ <label>Which events would you like to trigger this webhook?</label>
+ <div class="radio">
+ <label>
+ <input class="form-control" type="radio" value="push" checked name="trigger"/> Just the <i>push</i> event.
+ </label>
+ </div>
+ </div>
+ <hr/>
+ <div class="form-group">
<label>
- <input class="form-control" type="radio" value="push" name="trigger"/> Just the <i>push</i> event.
+ <input type="checkbox" name="active" value="Active" checked/>&nbsp;&nbsp;
+ Active
</label>
+ <p class="help-block">We will deliver event details when this hook is triggered.</p>
</div>
</div>
- <hr/>
- <div class="form-group">
- <label>
- <input type="checkbox" name="active" value="Active" checked/>&nbsp;&nbsp;
- Active
- </label>
- <p class="help-block">We will deliver event details when this hook is triggered.</p>
- </div>
- <hr/>
- <div class="form-group">
- <button class="btn btn-success">Add Webhook</button>
- </div>
- </form>
- </div>
- <div class="panel-footer">
- <a href="/{{.Owner.Name}}/{{.Repository.Name}}/settings/hooks"><button class="btn btn-primary">Webhooks List</button></a>
- </div>
- </div>
+ </div>
+ <div class="panel-footer">
+ <button class="btn btn-success">Add Webhook</button>
+ </div>
+ </div>
+ </form>
</div>
</div>
{{template "base/footer" .}} \ No newline at end of file
diff --git a/templates/repo/hooks_edit.tmpl b/templates/repo/hooks_edit.tmpl
index b017197c10..718336ec3a 100644
--- a/templates/repo/hooks_edit.tmpl
+++ b/templates/repo/hooks_edit.tmpl
@@ -11,6 +11,7 @@
<div class="panel-heading">
Manage Webhook
</div>
+
<div class="panel-body">
<div class="col-md-7">
<p>We’ll send a POST request to the URL below with details of any subscribed events.</p>
@@ -51,6 +52,7 @@
</div>
</div>
</div>
+
<div class="panel-footer">
<button class="btn btn-primary">Update Webhook</button>&nbsp;&nbsp;
<a href="/{{.Owner.Name}}/{{.Repository.Name}}/settings/hooks?remove="><button class="btn btn-danger">Delete Webhook</button></a>
@@ -61,6 +63,7 @@
<div class="panel-heading">
<h3 class="panel-title">Recent Deliveries</h3>
</div>
+
<div class="panel-body">
Coming soon
</div>