summaryrefslogtreecommitdiffstats
path: root/templates/admin
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2014-05-03 10:48:14 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2014-05-03 10:48:14 +0800
commit79ea34e70ebe989f1a5f8fbd71cfe3109c6f8a58 (patch)
tree066027c6a42b971030e0d8b41ff979bfaa1e25ae /templates/admin
parent8bab21d795a6af7c424e9f8f72d613863cf34a70 (diff)
downloadgitea-79ea34e70ebe989f1a5f8fbd71cfe3109c6f8a58.tar.gz
gitea-79ea34e70ebe989f1a5f8fbd71cfe3109c6f8a58.zip
ldap support
Diffstat (limited to 'templates/admin')
-rw-r--r--templates/admin/auths.tmpl43
-rw-r--r--templates/admin/auths/new.tmpl93
-rw-r--r--templates/admin/nav.tmpl1
3 files changed, 137 insertions, 0 deletions
diff --git a/templates/admin/auths.tmpl b/templates/admin/auths.tmpl
new file mode 100644
index 0000000000..813e24ad0c
--- /dev/null
+++ b/templates/admin/auths.tmpl
@@ -0,0 +1,43 @@
+{{template "base/head" .}}
+{{template "base/navbar" .}}
+<div id="body" class="container" data-page="admin">
+ {{template "admin/nav" .}}
+ <div id="admin-container" class="col-md-10">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ Authentication Management
+ </div>
+
+ <div class="panel-body">
+ <a href="/admin/auths/new" class="btn btn-primary">New Auth Source</a>
+ <table class="table table-striped">
+ <thead>
+ <tr>
+ <th>Id</th>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Actived</th>
+ <th>Updated</th>
+ <th>Created</th>
+ <th>Operation</th>
+ </tr>
+ </thead>
+ <tbody>
+ {{range .Sources}}
+ <tr>
+ <td>{{.Id}}</td>
+ <td><a href="/admin/auths/{{.Id}}">{{.Name}}</a></td>
+ <td>{{.Type}}</td>
+ <td>{{.Actived}}</td>
+ <td>{{DateFormat .Updated "M d, Y"}}</td>
+ <td>{{DateFormat .Created "M d, Y"}}</td>
+ <td><a href="/admin/users/{{.Id}}"><i class="fa fa-pencil-square-o"></i></a></td>
+ </tr>
+ {{end}}
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+</div>
+{{template "base/footer" .}} \ No newline at end of file
diff --git a/templates/admin/auths/new.tmpl b/templates/admin/auths/new.tmpl
new file mode 100644
index 0000000000..346555ea9c
--- /dev/null
+++ b/templates/admin/auths/new.tmpl
@@ -0,0 +1,93 @@
+{{template "base/head" .}}
+{{template "base/navbar" .}}
+<div id="body" class="container" data-page="admin">
+ {{template "admin/nav" .}}
+ <div id="admin-container" class="col-md-9">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ New Authentication
+ </div>
+
+ <div class="panel-body">
+ <br/>
+ <form action="/admin/auths/new" method="post" class="form-horizontal">
+ {{.CsrfTokenHtml}}
+ {{template "base/alert" .}}
+ <div class="form-group">
+ <label class="col-md-3 control-label">Auth Type: </label>
+ <div class="col-md-7">
+ <select class="form-control">
+ <option value=2>LDAP</option>
+ <option value=3>SMTP</option>
+</select>
+ </div>
+ </div>
+ <div class="form-group {{if .Err_UserName}}has-error has-feedback{{end}}">
+ <label class="col-md-3 control-label">Name: </label>
+ <div class="col-md-7">
+ <input name="name" class="form-control" placeholder="Type account's username" value="{{.username}}" required="required">
+ </div>
+ </div>
+
+ <div class="form-group {{if .Err_Email}}has-error has-feedback{{end}}">
+ <label class="col-md-3 control-label">Domain: </label>
+ <div class="col-md-7">
+ <input name="domain" class="form-control" placeholder="Type account's e-mail address" value="{{.email}}" required="required" title="Email is not valid">
+ </div>
+ </div>
+
+ <div class="form-group {{if .Err_Email}}has-error has-feedback{{end}}">
+ <label class="col-md-3 control-label">Host: </label>
+ <div class="col-md-7">
+ <input name="domain" class="form-control" placeholder="Type account's e-mail address" value="{{.email}}" required="required" title="Email is not valid">
+ </div>
+ </div>
+
+ <div class="form-group {{if .Err_Email}}has-error has-feedback{{end}}">
+ <label class="col-md-3 control-label">Port: </label>
+ <div class="col-md-7">
+ <input name="domain" class="form-control" placeholder="Type account's e-mail address" value="{{.email}}" required="required" title="Email is not valid">
+ </div>
+ </div>
+
+ <div class="form-group {{if .Err_Email}}has-error has-feedback{{end}}">
+ <label class="col-md-3 control-label">Base DN: </label>
+ <div class="col-md-7">
+ <input name="domain" class="form-control" placeholder="Type account's e-mail address" value="{{.email}}" required="required" title="Email is not valid">
+ </div>
+ </div>
+
+<div class="form-group {{if .Err_Email}}has-error has-feedback{{end}}">
+ <label class="col-md-3 control-label">Search Attributes: </label>
+ <div class="col-md-7">
+ <input name="domain" class="form-control" placeholder="Type account's e-mail address" value="{{.email}}" required="required" title="Email is not valid">
+ </div>
+ </div>
+
+ <div class="form-group {{if .Err_Email}}has-error has-feedback{{end}}">
+ <label class="col-md-3 control-label">Search Filter: </label>
+ <div class="col-md-7">
+ <input name="domain" class="form-control" placeholder="Type account's e-mail address" value="{{.email}}" required="required" title="Email is not valid">
+ </div>
+ </div>
+
+ <div class="form-group {{if .Err_Email}}has-error has-feedback{{end}}">
+ <label class="col-md-3 control-label">Ms Ad SA: </label>
+ <div class="col-md-7">
+ <input name="domain" class="form-control" placeholder="Type account's e-mail address" value="{{.email}}" required="required" title="Email is not valid">
+ </div>
+ </div>
+
+ <hr/>
+ <div class="form-group">
+ <div class="col-md-offset-3 col-md-7">
+ <button type="submit" class="btn btn-lg btn-primary">Create new authentication</button>
+ </div>
+ </div>
+ </form>
+ </div>
+ </div>
+
+ </div>
+</div>
+{{template "base/footer" .}} \ No newline at end of file
diff --git a/templates/admin/nav.tmpl b/templates/admin/nav.tmpl
index 33ecfae5e3..b9542228bc 100644
--- a/templates/admin/nav.tmpl
+++ b/templates/admin/nav.tmpl
@@ -4,5 +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-cogs fa-lg"></i> Authentication</a></li>
</ul>
</div> \ No newline at end of file