aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorFuXiaoHei <fuxiaohei@hexiaz.com>2014-03-19 20:34:11 +0800
committerFuXiaoHei <fuxiaohei@hexiaz.com>2014-03-19 20:34:11 +0800
commit78097a2c5a79ec93340db975c23014de2a329572 (patch)
tree1d9bc1f5422d03eca18269fc1c6b90ebe8910d20 /templates
parent9533b23272097c538e25692ec91c37f4ea6c0b81 (diff)
parentde087c7b4a31cb0643d5432ec9d6b26e208baff2 (diff)
downloadgitea-78097a2c5a79ec93340db975c23014de2a329572.tar.gz
gitea-78097a2c5a79ec93340db975c23014de2a329572.zip
Merge branch 'master' of https://github.com/gogits/gogs
Diffstat (limited to 'templates')
-rw-r--r--templates/base/navbar.tmpl2
-rw-r--r--templates/help.tmpl11
-rw-r--r--templates/home.tmpl2
-rw-r--r--templates/repo/commits.tmpl5
-rw-r--r--templates/repo/issues.tmpl9
-rw-r--r--templates/repo/pulls.tmpl9
-rw-r--r--templates/user/issues.tmpl17
-rw-r--r--templates/user/notification.tmpl12
-rw-r--r--templates/user/password.tmpl26
-rw-r--r--templates/user/publickey.tmpl13
-rw-r--r--templates/user/pulls.tmpl17
-rw-r--r--templates/user/security.tmpl12
-rw-r--r--templates/user/setting.tmpl12
-rw-r--r--templates/user/setting_nav.tmpl11
-rw-r--r--templates/user/stars.tmpl17
15 files changed, 108 insertions, 67 deletions
diff --git a/templates/base/navbar.tmpl b/templates/base/navbar.tmpl
index 181beb5a44..4902ce2593 100644
--- a/templates/base/navbar.tmpl
+++ b/templates/base/navbar.tmpl
@@ -3,7 +3,7 @@
<nav class="gogs-nav">
<a id="gogs-nav-logo" class="gogs-nav-item{{if .PageIsHome}} active{{end}}" href="/"><img src="/img/favicon.png" alt="Gogs Logo" id="gogs-logo"></a>
<a class="gogs-nav-item{{if .PageIsUserDashboard}} active{{end}}" href="/">Dashboard</a>
- <a class="gogs-nav-item" href="/help">Help</a>{{if .IsSigned}}
+ <a class="gogs-nav-item{{if .PageIsHelp}} active{{end}}" href="/help">Help</a>{{if .IsSigned}}
<a id="gogs-nav-out" class="gogs-nav-item navbar-right navbar-btn btn btn-danger" href="/user/logout/"><i class="fa fa-power-off fa-lg"></i></a>
<a id="gogs-nav-avatar" class="gogs-nav-item navbar-right" href="{{.SignedUser.HomeLink}}" data-toggle="tooltip" data-placement="bottom" title="{{.SignedUserName}}">
<img src="{{.SignedUser.AvatarLink}}?s=28" alt="user-avatar" title="username"/>
diff --git a/templates/help.tmpl b/templates/help.tmpl
new file mode 100644
index 0000000000..b4d5d2a97e
--- /dev/null
+++ b/templates/help.tmpl
@@ -0,0 +1,11 @@
+{{template "base/head" .}}
+{{template "base/navbar" .}}
+<div id="gogs-body-nav">
+ <div class="container">
+ <h3>Help</h3>
+ </div>
+</div>
+<div id="gogs-body" class="container" data-page="user">
+ {{if .HasInfo}}<div class="alert alert-info">{{.InfoMsg}}</div>{{end}}
+</div>
+{{template "base/footer" .}} \ No newline at end of file
diff --git a/templates/home.tmpl b/templates/home.tmpl
index 8cbb29ebb4..e077624323 100644
--- a/templates/home.tmpl
+++ b/templates/home.tmpl
@@ -1,6 +1,6 @@
{{template "base/head" .}}
{{template "base/navbar" .}}
<div id="gogs-body" class="container">
- Website is still in the progress of building...please come back later!
+ Welcome to the land of Gogs! There will be some indroduction!
</div>
{{template "base/footer" .}} \ No newline at end of file
diff --git a/templates/repo/commits.tmpl b/templates/repo/commits.tmpl
index 9190a030a3..4bffb9daf7 100644
--- a/templates/repo/commits.tmpl
+++ b/templates/repo/commits.tmpl
@@ -5,8 +5,9 @@
<div id="gogs-body" class="container">
<div id="gogs-commits">
<ul>
- {{range .Commits}}
- <li>{{.Committer.Name}} - {{.Id}} - {{.Message}} - {{.Committer.When}}</li>
+ {{$r := List .Commits}}
+ {{range $r}}
+ <li>{{.Committer.Name}} - {{.Id}} - {{.Message}} - {{.Committer.When}}</li>
{{end}}
</ul>
</div>
diff --git a/templates/repo/issues.tmpl b/templates/repo/issues.tmpl
new file mode 100644
index 0000000000..daacc089c3
--- /dev/null
+++ b/templates/repo/issues.tmpl
@@ -0,0 +1,9 @@
+{{template "base/head" .}}
+{{template "base/navbar" .}}
+{{template "repo/nav" .}}
+{{template "repo/toolbar" .}}
+<div id="gogs-body" class="container">
+ <div id="gogs-source">
+ </div>
+</div>
+{{template "base/footer" .}} \ No newline at end of file
diff --git a/templates/repo/pulls.tmpl b/templates/repo/pulls.tmpl
new file mode 100644
index 0000000000..daacc089c3
--- /dev/null
+++ b/templates/repo/pulls.tmpl
@@ -0,0 +1,9 @@
+{{template "base/head" .}}
+{{template "base/navbar" .}}
+{{template "repo/nav" .}}
+{{template "repo/toolbar" .}}
+<div id="gogs-body" class="container">
+ <div id="gogs-source">
+ </div>
+</div>
+{{template "base/footer" .}} \ No newline at end of file
diff --git a/templates/user/issues.tmpl b/templates/user/issues.tmpl
new file mode 100644
index 0000000000..94f6689456
--- /dev/null
+++ b/templates/user/issues.tmpl
@@ -0,0 +1,17 @@
+{{template "base/head" .}}
+{{template "base/navbar" .}}
+<div id="gogs-body-nav">
+ <div class="container">
+ <ul class="nav nav-pills pull-right">
+ <li><a href="/">Feed</a></li>
+ <li class="active"><a href="/issues">Issues</a></li>
+ <li><a href="/pulls">Pull Requests</a></li>
+ <li><a href="/stars">Stars</a></li>
+ </ul>
+ <h3>Issues</h3>
+ </div>
+</div>
+<div id="gogs-body" class="container" data-page="user">
+ {{if .HasInfo}}<div class="alert alert-info">{{.InfoMsg}}</div>{{end}}
+</div>
+{{template "base/footer" .}} \ No newline at end of file
diff --git a/templates/user/notification.tmpl b/templates/user/notification.tmpl
index ecb3fa856c..7911c0fd5f 100644
--- a/templates/user/notification.tmpl
+++ b/templates/user/notification.tmpl
@@ -1,17 +1,7 @@
{{template "base/head" .}}
{{template "base/navbar" .}}
<div id="gogs-body" class="container" data-page="user">
- <div id="gogs-user-setting-nav" class="col-md-3">
- <h4>Account Setting</h4>
- <ul class="list-group">
- <li class="list-group-item"><a href="/user/setting">Account Profile</a></li>
- <li class="list-group-item"><a href="/user/setting/password">Password</a></li>
- <li class="list-group-item list-group-item-success"><a href="/user/setting/notification">Notifications</a></li>
- <li class="list-group-item"><a href="/user/setting/ssh/">SSH Keys</a></li>
- <li class="list-group-item"><a href="/user/setting/security">Security</a></li>
- <li class="list-group-item"><a href="/user/delete">Delete Account</a></li>
- </ul>
- </div>
+ {{template "user/setting_nav" .}}
<div id="gogs-user-setting-container" class="col-md-9">
<h4>Notification</h4>
</div>
diff --git a/templates/user/password.tmpl b/templates/user/password.tmpl
index 532a57cb0f..2ee178a3fc 100644
--- a/templates/user/password.tmpl
+++ b/templates/user/password.tmpl
@@ -1,45 +1,35 @@
{{template "base/head" .}}
{{template "base/navbar" .}}
<div id="gogs-body" class="container" data-page="user">
- <div id="gogs-user-setting-nav" class="col-md-3">
- <h4>Account Setting</h4>
- <ul class="list-group">
- <li class="list-group-item"><a href="/user/setting">Account Profile</a></li>
- <li class="list-group-item list-group-item-success"><a href="/user/setting/password">Password</a></li>
- <li class="list-group-item"><a href="/user/setting/notification">Notifications</a></li>
- <li class="list-group-item"><a href="/user/setting/ssh/">SSH Keys</a></li>
- <li class="list-group-item"><a href="/user/setting/security">Security</a></li>
- <li class="list-group-item"><a href="/user/delete">Delete Account</a></li>
- </ul>
- </div>
+ {{template "user/setting_nav" .}}
<div id="gogs-user-setting-container" class="col-md-9">
<div id="gogs-setting-pwd">
<h4>Password</h4>
<form class="form-horizontal" id="gogs-password-form" method="post" action="/user/setting/password">{{if .IsSuccess}}
<p class="alert alert-success">Password is changed successfully. You can now sign in via new password.</p>{{else if .HasError}}<p class="alert alert-danger form-error">{{.ErrorMsg}}</p>{{end}}
<div class="form-group">
- <label class="col-md-2 control-label">Old Password<strong class="text-danger">*</strong></label>
- <div class="col-md-8">
+ <label class="col-md-3 control-label">Old Password<strong class="text-danger">*</strong></label>
+ <div class="col-md-7">
<input type="password" name="oldpasswd" class="form-control" placeholder="Type your current password" required="required">
</div>
</div>
<div class="form-group">
- <label class="col-md-2 control-label">New Password<strong class="text-danger">*</strong></label>
- <div class="col-md-8">
+ <label class="col-md-3 control-label">New Password<strong class="text-danger">*</strong></label>
+ <div class="col-md-7">
<input type="password" name="newpasswd" class="form-control" placeholder="Type your new password" required="required">
</div>
</div>
<div class="form-group">
- <label class="col-md-2 control-label">Re-Type<strong class="text-danger">*</strong></label>
- <div class="col-md-8">
+ <label class="col-md-3 control-label">Re-Type<strong class="text-danger">*</strong></label>
+ <div class="col-md-7">
<input type="password" name="retypepasswd" class="form-control" placeholder="Re-type your new password" required="required">
</div>
</div>
<div class="form-group">
- <div class="col-md-offset-2 col-md-8">
+ <div class="col-md-offset-3 col-md-7">
<button type="submit" class="btn btn-primary">Change Password</button>&nbsp;&nbsp;
<a href="/forget-password/">Forgot your password?</a>
</div>
diff --git a/templates/user/publickey.tmpl b/templates/user/publickey.tmpl
index ef5879b54d..72467659be 100644
--- a/templates/user/publickey.tmpl
+++ b/templates/user/publickey.tmpl
@@ -1,18 +1,7 @@
{{template "base/head" .}}
{{template "base/navbar" .}}
<div id="gogs-body" class="container" data-page="user">
- <div id="gogs-user-setting-nav" class="col-md-3">
- <h4>Account Setting</h4>
- <ul class="list-group">
- <li class="list-group-item"><a href="/user/setting">Account Profile</a></li>
- <li class="list-group-item"><a href="/user/setting/password">Password</a></li>
- <li class="list-group-item"><a href="/user/setting/notification">Notifications</a></li>
- <li class="list-group-item list-group-item-success"><a href="/user/setting/ssh/">SSH Keys</a></li>
- <li class="list-group-item"><a href="/user/setting/security">Security</a></li>
- <li class="list-group-item"><a href="/user/delete">Delete Account</a></li>
- </ul>
- </div>
-
+ {{template "user/setting_nav" .}}
<div id="gogs-user-setting-container" class="col-md-9">
<div id="gogs-ssh-keys">
<h4>SSH Keys</h4>{{if .AddSSHKeySuccess}}
diff --git a/templates/user/pulls.tmpl b/templates/user/pulls.tmpl
new file mode 100644
index 0000000000..0891f5e850
--- /dev/null
+++ b/templates/user/pulls.tmpl
@@ -0,0 +1,17 @@
+{{template "base/head" .}}
+{{template "base/navbar" .}}
+<div id="gogs-body-nav">
+ <div class="container">
+ <ul class="nav nav-pills pull-right">
+ <li><a href="/">Feed</a></li>
+ <li><a href="/issues">Issues</a></li>
+ <li class="active"><a href="/pulls">Pull Requests</a></li>
+ <li><a href="/stars">Stars</a></li>
+ </ul>
+ <h3>Pull Requests</h3>
+ </div>
+</div>
+<div id="gogs-body" class="container" data-page="user">
+ {{if .HasInfo}}<div class="alert alert-info">{{.InfoMsg}}</div>{{end}}
+</div>
+{{template "base/footer" .}} \ No newline at end of file
diff --git a/templates/user/security.tmpl b/templates/user/security.tmpl
index cf51127d2c..a7506b5086 100644
--- a/templates/user/security.tmpl
+++ b/templates/user/security.tmpl
@@ -1,17 +1,7 @@
{{template "base/head" .}}
{{template "base/navbar" .}}
<div id="gogs-body" class="container" data-page="user">
- <div id="gogs-user-setting-nav" class="col-md-3">
- <h4>Account Setting</h4>
- <ul class="list-group">
- <li class="list-group-item"><a href="/user/setting">Account Profile</a></li>
- <li class="list-group-item"><a href="/user/setting/password">Password</a></li>
- <li class="list-group-item"><a href="/user/setting/notification">Notifications</a></li>
- <li class="list-group-item"><a href="/user/setting/ssh/">SSH Keys</a></li>
- <li class="list-group-item list-group-item-success"><a href="/user/setting/security">Security</a></li>
- <li class="list-group-item"><a href="/user/delete">Delete Account</a></li>
- </ul>
- </div>
+ {{template "user/setting_nav" .}}
<div id="gogs-user-setting-container" class="col-md-9">
<h4>Security</h4>
</div>
diff --git a/templates/user/setting.tmpl b/templates/user/setting.tmpl
index d6a6094f3f..c38054f39b 100644
--- a/templates/user/setting.tmpl
+++ b/templates/user/setting.tmpl
@@ -1,17 +1,7 @@
{{template "base/head" .}}
{{template "base/navbar" .}}
<div id="gogs-body" class="container" data-page="user">
- <div id="gogs-user-setting-nav" class="col-md-3">
- <h4>Account Setting</h4>
- <ul class="list-group">
- <li class="list-group-item list-group-item-success"><a href="/user/setting">Account Profile</a></li>
- <li class="list-group-item"><a href="/user/setting/password">Password</a></li>
- <li class="list-group-item"><a href="/user/setting/notification">Notifications</a></li>
- <li class="list-group-item"><a href="/user/setting/ssh/">SSH Keys</a></li>
- <li class="list-group-item"><a href="/user/setting/security">Security</a></li>
- <li class="list-group-item"><a href="/user/delete">Delete Account</a></li>
- </ul>
- </div>
+ {{template "user/setting_nav" .}}
<div id="gogs-user-setting-container" class="col-md-9">
<div id="gogs-setting-pwd">
<h4>Account Profile</h4>
diff --git a/templates/user/setting_nav.tmpl b/templates/user/setting_nav.tmpl
new file mode 100644
index 0000000000..3a500fdafe
--- /dev/null
+++ b/templates/user/setting_nav.tmpl
@@ -0,0 +1,11 @@
+<div id="gogs-user-setting-nav" class="col-md-3">
+ <h4>Account Setting</h4>
+ <ul class="list-group">
+ <li class="list-group-item{{if .IsUserPageSetting}} list-group-item-success{{end}}"><a href="/user/setting">Account Profile</a></li>
+ <li class="list-group-item{{if .IsUserPageSettingPasswd}} list-group-item-success{{end}}"><a href="/user/setting/password">Password</a></li>
+ <li class="list-group-item{{if .IsUserPageSettingNotify}} list-group-item-success{{end}}"><a href="/user/setting/notification">Notifications</a></li>
+ <li class="list-group-item{{if .IsUserPageSettingSSH}} list-group-item-success{{end}}"><a href="/user/setting/ssh/">SSH Keys</a></li>
+ <li class="list-group-item{{if .IsUserPageSettingSecurity}} list-group-item-success{{end}}"><a href="/user/setting/security">Security</a></li>
+ <li class="list-group-item{{if .IsUserPageSettingDelete}} list-group-item-success{{end}}"><a href="/user/delete">Delete Account</a></li>
+ </ul>
+</div> \ No newline at end of file
diff --git a/templates/user/stars.tmpl b/templates/user/stars.tmpl
new file mode 100644
index 0000000000..4e6f0c92fc
--- /dev/null
+++ b/templates/user/stars.tmpl
@@ -0,0 +1,17 @@
+{{template "base/head" .}}
+{{template "base/navbar" .}}
+<div id="gogs-body-nav">
+ <div class="container">
+ <ul class="nav nav-pills pull-right">
+ <li><a href="/">Feed</a></li>
+ <li><a href="/issues">Issues</a></li>
+ <li><a href="/pulls">Pull Requests</a></li>
+ <li class="active"><a href="/stars">Stars</a></li>
+ </ul>
+ <h3>Stars</h3>
+ </div>
+</div>
+<div id="gogs-body" class="container" data-page="user">
+ {{if .HasInfo}}<div class="alert alert-info">{{.InfoMsg}}</div>{{end}}
+</div>
+{{template "base/footer" .}} \ No newline at end of file