aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/mail/auth/reset_passwd.tmpl33
-rw-r--r--templates/mail/auth/reset_password.html25
-rw-r--r--templates/release/new.tmpl66
-rw-r--r--templates/repo/setting.tmpl5
-rw-r--r--templates/repo/toolbar.tmpl2
-rw-r--r--templates/user/forgot_passwd.tmpl30
-rw-r--r--templates/user/reset_passwd.tmpl26
-rw-r--r--templates/user/setting.tmpl5
-rw-r--r--templates/user/signin.tmpl2
9 files changed, 163 insertions, 31 deletions
diff --git a/templates/mail/auth/reset_passwd.tmpl b/templates/mail/auth/reset_passwd.tmpl
new file mode 100644
index 00000000..11861f4e
--- /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 40a9efa8..00000000
--- 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/release/new.tmpl b/templates/release/new.tmpl
new file mode 100644
index 00000000..fe5aa179
--- /dev/null
+++ b/templates/release/new.tmpl
@@ -0,0 +1,66 @@
+{{template "base/head" .}}
+{{template "base/navbar" .}}
+{{template "repo/nav" .}}
+{{template "repo/toolbar" .}}
+<div id="body" class="container">
+ <div id="release">
+ <h4 id="release-head">New Release</h4>
+ <form id="release-new-form" action="" class="form form-inline">
+ <div class="form-group">
+ <input id="release-tag-name" type="text" class="form-control" placeholder="tag name"/>
+ <span class="target-at">@</span>
+ <div class="btn-group" id="release-new-target-select">
+ <button type="button" class="btn btn-default"><i class="fa fa-code-fork fa-lg fa-m"></i>
+ <span class="target-text">Target : </span>
+ <strong id="release-new-target-name"> master</strong>
+ </button>
+ <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
+ <span class="caret"></span>
+ </button>
+ <div class="dropdown-menu clone-group-btn" id="release-new-target-branch-list">
+ <ul class="list-group">
+ <li class="list-group-item">
+ <a href="#" rel="master"><i class="fa fa-code-fork"></i>master</a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <p class="help-block">Choose an existing tag without release notes</p>
+ </div>
+ <div class="form-group" style="display: block">
+ <input class="form-control input-lg" id="release-new-title" name="title" type="text" placeholder="release title"/>
+ </div>
+ <div class="form-group col-md-8" style="display: block" id="release-new-content-div">
+ <div class="md-help pull-right">
+ Content with <a href="https://help.github.com/articles/markdown-basics">Markdown</a>
+ </div>
+ <ul class="nav nav-tabs" data-init="tabs">
+ <li class="release-write active"><a href="#release-textarea" data-toggle="tab">Write</a></li>
+ <li class="release-preview"><a href="#release-preview" data-toggle="tab" data-ajax="/api/v1/markdown?repo=repo_id&amp;release=new" data-ajax-name="release-preview" data-ajax-method="post" data-preview="#release-preview">Preview</a></li>
+ </ul>
+ <div class="tab-content">
+ <div class="tab-pane active" id="release-textarea">
+ <div class="form-group">
+ <textarea class="form-control" name="content" id="release-new-content" rows="10" placeholder="Write some content" data-ajax-rel="release-preview" data-ajax-val="val" data-ajax-field="content"></textarea>
+ </div>
+ </div>
+ <div class="tab-pane release-preview-content" id="release-preview">loading...</div>
+ </div>
+ </div>
+ <div class="text-right form-group col-md-8" style="display: block">
+ <hr/>
+ <label for="release-new-pre-release">
+ <input id="release-new-pre-release" type="checkbox" name="is-pre-release" value="true"/>
+ <strong>This is a pre-release</strong>
+ </label>
+ <p class="help-block">We’ll point out that this release is identified as non-production ready.</p>
+ </div>
+ <div class="text-right form-group col-md-8" style="display: block">
+ <input type="hidden" value="id" name="repo-id">
+ <button class="btn-success btn">Publish release</button>
+ <input class="btn btn-default" type="submit" name="is-draft" value="Save Draft"/>
+ </div>
+ </form>
+ </div>
+</div>
+{{template "base/footer" .}} \ No newline at end of file
diff --git a/templates/repo/setting.tmpl b/templates/repo/setting.tmpl
index 6e2d3bec..85d08c59 100644
--- a/templates/repo/setting.tmpl
+++ b/templates/repo/setting.tmpl
@@ -23,9 +23,10 @@
{{.CsrfTokenHtml}}
<input type="hidden" name="action" value="update">
<div class="form-group">
- <label class="col-md-3 text-right">Name</label>
+ <label class="col-md-3 text-right" for="repo-setting-name">Name</label>
<div class="col-md-9">
- <input class="form-control" name="name" value="{{.Repository.Name}}" title="{{.Repository.Name}}" />
+ <input class="form-control" name="name" value="{{.Repository.Name}}" title="{{.Repository.Name}}" id="repo-setting-name"/>
+ <p class="help-block hidden"><span class="text-danger">Cautious : </span>your repository name is changing !</p>
</div>
</div>
diff --git a/templates/repo/toolbar.tmpl b/templates/repo/toolbar.tmpl
index 54842048..d8ab2621 100644
--- a/templates/repo/toolbar.tmpl
+++ b/templates/repo/toolbar.tmpl
@@ -15,7 +15,7 @@
{{end}}
<li class="{{if .IsRepoToolbarReleases}}active{{end}}"><a href="{{.RepoLink}}/releases">{{if .Repository.NumReleases}}<span class="badge">{{.Repository.NumReleases}}</span> {{end}}Releases</a></li>
{{if .IsRepoToolbarReleases}}
- <li class="tmp"><a href="{{.RepoLink}}/releases/new"><button class="btn btn-primary btn-sm">New Release</button></a></li>
+ <li class="tmp">{{if not .IsRepoReleaseNew}}<a href="{{.RepoLink}}/releases/new"><button class="btn btn-primary btn-sm">New Release</button></a>{{end}}</li>
{{end}}
<!-- <li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">More <b class="caret"></b></a>
diff --git a/templates/user/forgot_passwd.tmpl b/templates/user/forgot_passwd.tmpl
new file mode 100644
index 00000000..ff25406f
--- /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 00000000..9190c7c1
--- /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 b32689fe..d5828338 100644
--- a/templates/user/setting.tmpl
+++ b/templates/user/setting.tmpl
@@ -10,9 +10,10 @@
{{if .IsSuccess}}<p class="alert alert-success">Your profile has been successfully updated.</p>{{else if .HasError}}<p class="alert alert-danger form-error">{{.ErrorMsg}}</p>{{end}}
<p>Your Email will be public and used for Account related notifications and any web based operations made via the web.</p>
<div class="form-group">
- <label class="col-md-2 control-label">Username<strong class="text-danger">*</strong></label>
+ <label class="col-md-2 control-label" for="user-setting-username">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}}" title="{{.SignedUser.Name}}">
+ <input name="username" class="form-control" placeholder="Type your user name" required="required" value="{{.SignedUser.Name}}" title="{{.SignedUser.Name}}" id="user-setting-username">
+ <p class="help-block hidden"><span class="text-danger">Cautious : </span>your username is changing !</p>
</div>
</div>
diff --git a/templates/user/signin.tmpl b/templates/user/signin.tmpl
index b6c39af1..43f47e41 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>