summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorFuXiaoHei <fuxiaohei@hexiaz.com>2014-04-06 14:54:39 +0800
committerFuXiaoHei <fuxiaohei@hexiaz.com>2014-04-06 14:54:39 +0800
commit98f918ed28d5a8b1c131cda587a06714a768f951 (patch)
tree04b202dfc2f639eba39304c8051bde8270b5349c /templates
parent3ede496383bc0e5ad2cb9c5f034890bb6d626b3c (diff)
parentb7c3b0cc73ad8721e2eec59d018a91850ba7f750 (diff)
downloadgitea-98f918ed28d5a8b1c131cda587a06714a768f951.tar.gz
gitea-98f918ed28d5a8b1c131cda587a06714a768f951.zip
Merge branch 'dev' of https://github.com/gogits/gogs into dev
Diffstat (limited to 'templates')
-rw-r--r--templates/admin/config.tmpl2
-rw-r--r--templates/admin/dashboard.tmpl2
-rw-r--r--templates/admin/nav.tmpl2
-rw-r--r--templates/admin/repos.tmpl2
-rw-r--r--templates/admin/users.tmpl2
-rw-r--r--templates/mail/auth/reset_passwd.tmpl33
-rw-r--r--templates/mail/auth/reset_password.html25
-rw-r--r--templates/repo/setting.tmpl54
-rw-r--r--templates/status/401.tmpl6
-rw-r--r--templates/user/forgot_passwd.tmpl30
-rw-r--r--templates/user/reset_passwd.tmpl26
-rw-r--r--templates/user/setting.tmpl2
-rw-r--r--templates/user/signin.tmpl2
13 files changed, 154 insertions, 34 deletions
diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl
index 96c52fb5a0..31cfb77bad 100644
--- a/templates/admin/config.tmpl
+++ b/templates/admin/config.tmpl
@@ -2,7 +2,7 @@
{{template "base/navbar" .}}
<div id="body" class="container" data-page="admin">
{{template "admin/nav" .}}
- <div id="admin-container" class="col-md-9">
+ <div id="admin-container" class="col-md-10">
<div class="panel panel-default">
<div class="panel-heading">
Server Configuration
diff --git a/templates/admin/dashboard.tmpl b/templates/admin/dashboard.tmpl
index 31970f7ac4..2334c676d9 100644
--- a/templates/admin/dashboard.tmpl
+++ b/templates/admin/dashboard.tmpl
@@ -2,7 +2,7 @@
{{template "base/navbar" .}}
<div id="body" class="container" data-page="admin">
{{template "admin/nav" .}}
- <div id="admin-container" class="col-md-9">
+ <div id="admin-container" class="col-md-10">
<div class="panel panel-default">
<div class="panel-heading">
Statistic
diff --git a/templates/admin/nav.tmpl b/templates/admin/nav.tmpl
index 2ac6462571..33ecfae5e3 100644
--- a/templates/admin/nav.tmpl
+++ b/templates/admin/nav.tmpl
@@ -1,4 +1,4 @@
-<div id="user-setting-nav" class="col-md-3 admin-nav">
+<div id="user-setting-nav" class="col-md-2 admin-nav">
<ul class="list-group">
<li class="list-group-item{{if .PageIsDashboard}} active{{end}}"><a href="/admin"><i class="fa fa-tachometer fa-lg"></i> Dashboard</a></li>
<li class="list-group-item{{if .PageIsUsers}} active{{end}}"><a href="/admin/users"><i class="fa fa-users fa-lg"></i> Users</a></li>
diff --git a/templates/admin/repos.tmpl b/templates/admin/repos.tmpl
index 8cc424db68..3c0f5e09f7 100644
--- a/templates/admin/repos.tmpl
+++ b/templates/admin/repos.tmpl
@@ -2,7 +2,7 @@
{{template "base/navbar" .}}
<div id="body" class="container" data-page="admin">
{{template "admin/nav" .}}
- <div id="admin-container" class="col-md-9">
+ <div id="admin-container" class="col-md-10">
<div class="panel panel-default">
<div class="panel-heading">
Repository Management
diff --git a/templates/admin/users.tmpl b/templates/admin/users.tmpl
index 63da451743..14fddf33c4 100644
--- a/templates/admin/users.tmpl
+++ b/templates/admin/users.tmpl
@@ -2,7 +2,7 @@
{{template "base/navbar" .}}
<div id="body" class="container" data-page="admin">
{{template "admin/nav" .}}
- <div id="admin-container" class="col-md-9">
+ <div id="admin-container" class="col-md-10">
<div class="panel panel-default">
<div class="panel-heading">
User Management
diff --git a/templates/mail/auth/reset_passwd.tmpl b/templates/mail/auth/reset_passwd.tmpl
new file mode 100644
index 0000000000..11861f4e20
--- /dev/null
+++ b/templates/mail/auth/reset_passwd.tmpl
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>{{.User.Name}}, please reset your password</title>
+</head>
+<body style="background:#eee;">
+<div style="color:#333; font:12px/1.5 Tahoma,Arial,sans-serif;; text-shadow:1px 1px #fff; padding:0; margin:0;">
+ <div style="width:600px;margin:0 auto; padding:40px 0 20px;">
+ <div style="border:1px solid #d9d9d9;border-radius:3px; background:#fff; box-shadow: 0px 2px 5px rgba(0, 0, 0,.05); -webkit-box-shadow: 0px 2px 5px rgba(0, 0, 0,.05);">
+ <div style="padding: 20px 15px;">
+ <h1 style="font-size:20px; padding:10px 0 20px; margin:0; border-bottom:1px solid #ddd;"><img src="{{.AppUrl}}/{{.AppLogo}}" style="height: 32px; margin-bottom: -10px;"> <a style="color:#333;text-decoration:none;" target="_blank" href="{{.AppUrl}}">{{.AppName}}</a></h1>
+ <div style="padding:40px 15px;">
+ <div style="font-size:16px; padding-bottom:30px; font-weight:bold;">
+ Hi <span style="color: #00BFFF;">{{.User.Name}}</span>,
+ </div>
+ <div style="font-size:14px; padding:0 15px;">
+ <p style="margin:0;padding:0 0 9px 0;">Please click following link to reset your password within <b>{{.ActiveCodeLives}} hours</b>.</p>
+ <p style="margin:0;padding:0 0 9px 0;">
+ <a href="{{.AppUrl}}user/reset_password?code={{.Code}}">{{.AppUrl}}user/reset_password?code={{.Code}}</a>
+ </p>
+ <p style="margin:0;padding:0 0 9px 0;">Copy and paste it to your browser if the link is not working.</p>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div style="color:#aaa;padding:10px;text-align:center;">
+ © 2014 <a style="color:#888;text-decoration:none;" target="_blank" href="http://gogits.org">Gogs: Go Git Service</a>
+ </div>
+ </div>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/templates/mail/auth/reset_password.html b/templates/mail/auth/reset_password.html
deleted file mode 100644
index 40a9efa855..0000000000
--- a/templates/mail/auth/reset_password.html
+++ /dev/null
@@ -1,25 +0,0 @@
-{{template "mail/base.html" .}}
-{{define "title"}}
- {{if eq .Lang "zh-CN"}}
- {{.User.NickName}},重置账户密码
- {{end}}
- {{if eq .Lang "en-US"}}
- {{.User.NickName}}, reset your password
- {{end}}
-{{end}}
-{{define "body"}}
- {{if eq .Lang "zh-CN"}}
- <p style="margin:0;padding:0 0 9px 0;">点击链接重置密码,{{.ResetPwdCodeLives}} 分钟内有效</p>
- <p style="margin:0;padding:0 0 9px 0;">
- <a href="{{.AppUrl}}reset/{{.Code}}">{{.AppUrl}}reset/{{.Code}}</a>
- </p>
- <p style="margin:0;padding:0 0 9px 0;">如果链接点击无反应,请复制到浏览器打开。</p>
- {{end}}
- {{if eq .Lang "en-US"}}
- <p style="margin:0;padding:0 0 9px 0;">Please click following link to reset your password in {{.ResetPwdCodeLives}} hours</p>
- <p style="margin:0;padding:0 0 9px 0;">
- <a href="{{.AppUrl}}reset/{{.Code}}">{{.AppUrl}}reset/{{.Code}}</a>
- </p>
- <p style="margin:0;padding:0 0 9px 0;">Copy and paste it to your browser if it's not working.</p>
- {{end}}
-{{end}} \ No newline at end of file
diff --git a/templates/repo/setting.tmpl b/templates/repo/setting.tmpl
index a177aba6ad..6e2d3bec8b 100644
--- a/templates/repo/setting.tmpl
+++ b/templates/repo/setting.tmpl
@@ -25,7 +25,7 @@
<div class="form-group">
<label class="col-md-3 text-right">Name</label>
<div class="col-md-9">
- <input class="form-control" name="name" value="{{.Repository.Name}}" />
+ <input class="form-control" name="name" value="{{.Repository.Name}}" title="{{.Repository.Name}}" />
</div>
</div>
@@ -65,11 +65,61 @@
</div>
<div class="panel-body">
+ <button type="button" class="btn btn-default pull-right" href="#transfer-repository-modal" data-toggle="modal">
+ Transfer ownership
+ </button>
+ <dd>
+ <dt>Transfer ownership</dt>
+ <dl>Transfer this repo to another user or to an organization where you have admin rights.</dl>
+ </dd>
+
+ <div class="modal fade" id="transfer-repository-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
+ <div class="modal-dialog">
+ <form action="/{{.Owner.Name}}/{{.Repository.Name}}/settings" method="post" class="modal-content">
+ {{.CsrfTokenHtml}}
+ <input type="hidden" name="action" value="transfer">
+
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+ <h4 class="modal-title" id="myModalLabel">Do you really want to transfer this repo?</h4>
+ </div>
+
+ <div class="modal-body">
+ <div class="alert alert-warning">This is important, pay attention.</div>
+ <ul>
+ <!-- <li>Transferring may be delayed until the new owner approves the transfer.</li> -->
+ <!-- <li>If you are transferring into an org, teams <strong>will not be set</strong>. An owner on the org will need to set teams for the repo.</li> -->
+ <li>Admin rights will be transferred to the new owner, you <strong>will lose admin rights</strong>.</li>
+ <!-- <li>Admin rights will be transferred to the new owner, you <strong>may lose admin rights</strong> if you are transferring into an organization account.</li> -->
+ <li>Redirect entries <strong>will NOT be</strong> set up from the previous location.</li>
+ <li>Git access <strong>will NOT continue</strong> to work from the previous location.</li>
+ </ul>
+ <div class="form-group">
+ <label>Please type the name of the repository to confirm "<strong class="text-danger">{{.Repository.Name}}</strong>"</label>
+ <input name="repository" class="form-control" type="text" placeholder="Type your repository name" required="required">
+ </div>
+
+ <div class="form-group">
+ <label>Please type the name of the new owner:</label>
+ <input name="owner" class="form-control" type="text" placeholder="Type new owner's name" required="required">
+ </div>
+ </div>
+
+ <div class="modal-footer">
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ <button class="btn btn-danger btn-lg">I understand the consequences, transfer this repository</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ <hr>
+ <div class="panel-body">
<button type="button" class="btn btn-default pull-right" href="#delete-repository-modal" data-toggle="modal">
Delete this repository
</button>
<dd>
- <dt>Delete this repository.</dt>
+ <dt>Delete this repository</dt>
<dl>Once you delete a repository, there is no going back. Please be certain.</dl>
</dd>
diff --git a/templates/status/401.tmpl b/templates/status/401.tmpl
new file mode 100644
index 0000000000..98995381af
--- /dev/null
+++ b/templates/status/401.tmpl
@@ -0,0 +1,6 @@
+{{template "base/head" .}}
+{{template "base/navbar" .}}
+<div class="container">
+ 401 Unauthorized
+</div>
+{{template "base/footer" .}} \ No newline at end of file
diff --git a/templates/user/forgot_passwd.tmpl b/templates/user/forgot_passwd.tmpl
new file mode 100644
index 0000000000..ff25406fd0
--- /dev/null
+++ b/templates/user/forgot_passwd.tmpl
@@ -0,0 +1,30 @@
+{{template "base/head" .}}
+{{template "base/navbar" .}}
+<div id="body" class="container">
+ <form action="/user/forget_password" method="post" class="form-horizontal card" id="login-card">
+ {{.CsrfTokenHtml}}
+ <h3>Reset Your Password</h3>
+ <div class="alert alert-danger form-error{{if .HasError}}{{else}} hidden{{end}}">{{.ErrorMsg}}</div>
+ {{if .IsResetSent}}
+ <p>A confirmation e-mail has been sent to <b>{{.Email}}</b>, please check your inbox within {{.Hours}} hours.</p>
+ <hr/>
+ <a href="http://{{Mail2Domain .Email}}" class="btn btn-lg btn-success">Sign in to your e-mail</a>
+ {{else if .IsResetRequest}}
+ <div class="form-group {{if .Err_Email}}has-error has-feedback{{end}}">
+ <label class="col-md-3 control-label">Email: </label>
+ <div class="col-md-7">
+ <input name="email" class="form-control" placeholder="Type your e-mail address" required="required">
+ </div>
+ </div>
+ <hr/>
+ <div class="form-group">
+ <div class="col-md-offset-4 col-md-6">
+ <button type="submit" class="btn btn-lg btn-primary">Click here to send reset confirmation e-mail</button>
+ </div>
+ </div>
+ {{else if .IsResetDisable}}
+ <p>Sorry, mail service is not enabled.</p>
+ {{end}}
+ </form>
+</div>
+{{template "base/footer" .}} \ No newline at end of file
diff --git a/templates/user/reset_passwd.tmpl b/templates/user/reset_passwd.tmpl
new file mode 100644
index 0000000000..9190c7c13c
--- /dev/null
+++ b/templates/user/reset_passwd.tmpl
@@ -0,0 +1,26 @@
+{{template "base/head" .}}
+{{template "base/navbar" .}}
+<div id="body" class="container">
+ <form action="/user/reset_password?code={{.Code}}" method="post" class="form-horizontal card" id="login-card">
+ {{.CsrfTokenHtml}}
+ <h3>Reset Your Pasword</h3>
+ <div class="alert alert-danger form-error{{if .HasError}}{{else}} hidden{{end}}">{{.ErrorMsg}}</div>
+ {{if .IsResetForm}}
+ <div class="form-group">
+ <label class="col-md-4 control-label">Password: </label>
+ <div class="col-md-6">
+ <input name="passwd" type="password" class="form-control" placeholder="Type your password" required="required">
+ </div>
+ </div>
+ <hr/>
+ <div class="form-group">
+ <div class="col-md-offset-4 col-md-6">
+ <button type="submit" class="btn btn-lg btn-primary">Click here to reset your password</button>
+ </div>
+ </div>
+ {{else}}
+ <p>Sorry, your confirmation code has been exipired or not valid.</p>
+ {{end}}
+ </form>
+</div>
+{{template "base/footer" .}} \ No newline at end of file
diff --git a/templates/user/setting.tmpl b/templates/user/setting.tmpl
index f44218cdec..b32689fe12 100644
--- a/templates/user/setting.tmpl
+++ b/templates/user/setting.tmpl
@@ -12,7 +12,7 @@
<div class="form-group">
<label class="col-md-2 control-label">Username<strong class="text-danger">*</strong></label>
<div class="col-md-8">
- <input name="username" class="form-control" placeholder="Type your user name" required="required" value="{{.SignedUser.Name}}">
+ <input name="username" class="form-control" placeholder="Type your user name" required="required" value="{{.SignedUser.Name}}" title="{{.SignedUser.Name}}">
</div>
</div>
diff --git a/templates/user/signin.tmpl b/templates/user/signin.tmpl
index b6c39af1b8..43f47e4121 100644
--- a/templates/user/signin.tmpl
+++ b/templates/user/signin.tmpl
@@ -33,7 +33,7 @@
<div class="form-group">
<div class="col-md-offset-4 col-md-6">
<button type="submit" class="btn btn-lg btn-primary">Log In</button>
- <a href="/forget-password/">Forgot your password?</a>
+ <a href="/user/forget_password/">Forgot your password?</a>
</div>
</div>