summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/ng/base/head.tmpl1
-rw-r--r--templates/org/create.tmpl31
-rw-r--r--templates/repo/create.tmpl14
-rw-r--r--templates/user/dashboard/dashboard.tmpl31
-rw-r--r--templates/user/dashboard/nav.tmpl2
-rw-r--r--templates/user/dashboard/pulls.tmpl5
-rw-r--r--templates/user/pulls.tmpl17
-rw-r--r--templates/user/signin.tmpl2
-rw-r--r--templates/user/signup.tmpl2
9 files changed, 74 insertions, 31 deletions
diff --git a/templates/ng/base/head.tmpl b/templates/ng/base/head.tmpl
index bab914bfe7..817c18807a 100644
--- a/templates/ng/base/head.tmpl
+++ b/templates/ng/base/head.tmpl
@@ -6,6 +6,7 @@
<meta name="author" content="Gogs - Go Git Service" />
<meta name="description" content="Gogs(Go Git Service) a painless self-hosted Git Service written in Go" />
<meta name="keywords" content="go, git, self-hosted, gogs">
+ <meta name="_csrf" content="{{.CsrfToken}}" />
<link rel="shortcut icon" href="/img/favicon.png" />
diff --git a/templates/org/create.tmpl b/templates/org/create.tmpl
new file mode 100644
index 0000000000..4fcb07c4d6
--- /dev/null
+++ b/templates/org/create.tmpl
@@ -0,0 +1,31 @@
+{{template "ng/base/head" .}}
+{{template "ng/base/header" .}}
+<div id="sign-wrapper">
+ <form class="form-align form panel sign-panel sign-form container panel-radius" id="sign-up-form" action="/org/create" method="post">
+ {{.CsrfTokenHtml}}
+ <div class="panel-header">
+ <h2>{{.i18n.Tr "new_org"}}</h2>
+ </div>
+ <div class="panel-content">
+ {{template "ng/base/alert" .}}
+ <p class="field">
+ <label class="req" for="org_name">{{.i18n.Tr "org.org_name_holder"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_OrgName}}ipt-error{{end}}" id="org_name" name="org_name" type="text" value="{{.org_name}}" required/>
+ <label></label>
+ <span class="help">{{.i18n.Tr "org.org_name_helper"}}</span>
+ </p>
+ <p class="field">
+ <label class="req" for="email">{{.i18n.Tr "email"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_Email}}ipt-error{{end}}" id="email" name="email" type="email" value="{{.email}}" required/>
+ <label></label>
+ <span class="help">{{.i18n.Tr "org.org_email_helper"}}</span>
+ </p>
+ <p class="field">
+ <span class="form-label"></span>
+ <button class="btn btn-large btn-blue btn-radius">{{.i18n.Tr "org.create_org"}}</button>
+ <a class="btn btn-small btn-gray btn-radius" id="repo-create-cancel" href="/"><strong>{{.i18n.Tr "cancel"}}</strong></a>
+ </p>
+ </div>
+ </form>
+</div>
+{{template "ng/base/footer" .}} \ No newline at end of file
diff --git a/templates/repo/create.tmpl b/templates/repo/create.tmpl
index 6ec713f664..13656becc2 100644
--- a/templates/repo/create.tmpl
+++ b/templates/repo/create.tmpl
@@ -8,23 +8,23 @@
{{template "ng/base/alert" .}}
<div class="field">
<label for="owner" class="req">{{.i18n.Tr "repo.owner"}}</label>
- <input id="owner" type="hidden" name="uid" value="{{.ContextUser.Id}}" />
+ <input id="repo-owner-id" type="hidden" name="uid" value="{{.ContextUser.Id}}" />
<div class="inline-block drop">
<a href="#" class="drop-bottom">
- <img class="avatar" src="{{.ContextUser.AvatarLink}}" alt="user-avatar">
- <strong>{{.ContextUser.Name}}</strong>
+ <img class="avatar" src="{{.ContextUser.AvatarLink}}" id="repo-owner-avatar" alt="user-avatar">
+ <strong id="repo-owner-name">{{.ContextUser.Name}}</strong>
</a>
<ul class="drop-down menu menu-vertical menu-radius switching-list" id="repo-create-owner-list">
- <li {{if eq $.ContextUser.Id .SignedUser.Id}}class="checked"{{end}}>
- <a href="#">
+ <li {{if eq $.ContextUser.Id .SignedUser.Id}}class="checked"{{end}} data-uid="{{.SignedUser.Id}}">
+ <a>
<i class="octicon octicon-check"></i>
<img class="avatar" src="{{.SignedUser.AvatarLink}}" alt="user-avatar">
<strong>{{.SignedUser.Name}}</strong>
</a>
</li>
{{range .Orgs}}
- <li {{if eq $.ContextUser.Id .Id}}class="checked"{{end}}>
- <a href="#">
+ <li {{if eq $.ContextUser.Id .Id}}class="checked"{{end}} data-uid="{{.Id}}">
+ <a>
<i class="octicon octicon-check"></i>
<img class="avatar" src="{{.AvatarLink}}" alt="user-avatar">
<strong>{{.Name}}</strong>
diff --git a/templates/user/dashboard/dashboard.tmpl b/templates/user/dashboard/dashboard.tmpl
index b472953136..0b5cb4f4d9 100644
--- a/templates/user/dashboard/dashboard.tmpl
+++ b/templates/user/dashboard/dashboard.tmpl
@@ -73,7 +73,7 @@
<ul class="list-no-style">
{{range .Repos}}
<li {{if .IsPrivate}}class="private"{{end}}>
- <a href="{{$.ContextUser.Name}}/{{.Name}}">
+ <a href="/{{$.ContextUser.Name}}/{{.Name}}">
<i class="octicon octicon-{{if .IsPrivate}}lock{{else if .IsFork}}repo-forked{{else if .IsMirror}}repo-clone{{else}}repo{{end}}"></i>
<span class="repo-name">
<strong class="repo">{{.Name}}</strong>
@@ -88,7 +88,9 @@
</div>
{{if not .ContextUser.IsOrganization}}
<div class="panel-header repo-contrib-header">
- <h4 class="text-bold">{{.i18n.Tr "home.collaborative_repos"}}</h4>
+ <h4 class="text-bold">{{.i18n.Tr "home.collaborative_repos"}}
+ <span class="repo-count label label-gray label-radius">{{.CollaborateCount}}</span>
+ </h4>
</div>
<div class="panel-body">
<ul class="list-no-style">
@@ -113,7 +115,9 @@
{{if not .ContextUser.IsOrganization}}
<div class="panel" id="dashboard-my-org">
<div class="panel-header">
- <h4 class="text-bold">{{.i18n.Tr "home.my_orgs"}}</h4>
+ <h4 class="text-bold">{{.i18n.Tr "home.my_orgs"}}
+ <span class="repo-count label label-gray label-radius">{{.ContextUser.GetOrganizationCount}}</span>
+ </h4>
</div>
<div class="panel-body">
<ul class="list-no-style">
@@ -136,7 +140,26 @@
{{end}}
<div class="panel" id="dashboard-my-mirror">
<div class="panel-header">
- <h4 class="text-bold">{{.i18n.Tr "home.my_mirrors"}}</h4>
+ <h4 class="text-bold">{{.i18n.Tr "home.my_mirrors"}}
+ <span class="repo-count label label-gray label-radius">{{.MirrorCount}}</span>
+ </h4>
+ </div>
+ <div class="panel-body">
+ <ul class="list-no-style">
+ {{range .Mirrors}}
+ <li {{if .IsPrivate}}class="private"{{end}}>
+ <a href="/{{$.ContextUser.Name}}/{{.Name}}">
+ <i class="octicon octicon-repo-clone"></i>
+ <span class="repo-name">
+ <strong class="repo">{{.Name}}</strong>
+ </span>
+ <span class="right repo-star">
+ <i class="octicon octicon-star"></i>{{.NumStars}}
+ </span>
+ </a>
+ </li>
+ {{end}}
+ </ul>
</div>
</div>
</div>
diff --git a/templates/user/dashboard/nav.tmpl b/templates/user/dashboard/nav.tmpl
index a2d990fa7d..6064f35692 100644
--- a/templates/user/dashboard/nav.tmpl
+++ b/templates/user/dashboard/nav.tmpl
@@ -15,7 +15,7 @@
{{.SignedUser.Name}}
</a>
</li>
- {{range .ContextUser.Orgs}}
+ {{range .Orgs}}
<li class="org {{if eq $.ContextUser.Id .Id}}checked{{end}}">
<a href="{{.DashboardLink}}">
<i class="octicon octicon-check"></i>
diff --git a/templates/user/dashboard/pulls.tmpl b/templates/user/dashboard/pulls.tmpl
new file mode 100644
index 0000000000..9a03684250
--- /dev/null
+++ b/templates/user/dashboard/pulls.tmpl
@@ -0,0 +1,5 @@
+{{template "ng/base/head" .}}
+{{template "ng/base/header" .}}
+{{template "user/dashboard/nav" .}}
+
+{{template "ng/base/footer" .}} \ No newline at end of file
diff --git a/templates/user/pulls.tmpl b/templates/user/pulls.tmpl
deleted file mode 100644
index 47462a9be6..0000000000
--- a/templates/user/pulls.tmpl
+++ /dev/null
@@ -1,17 +0,0 @@
-{{template "base/head" .}}
-{{template "base/navbar" .}}
-<div id="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="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/signin.tmpl b/templates/user/signin.tmpl
index 91f56bd075..a66dd285b2 100644
--- a/templates/user/signin.tmpl
+++ b/templates/user/signin.tmpl
@@ -7,7 +7,7 @@
<h2>{{.i18n.Tr "sign_in"}}</h2>
</div>
<div class="panel-content">
- {{template "base/alert" .}}
+ {{template "ng/base/alert" .}}
<p class="field">
<label class="req" for="username">{{.i18n.Tr "home.uname_holder"}}</label>
<input class="ipt ipt-large ipt-radius {{if .Err_UserName}}ipt-error{{end}}" id="username" name="uname" type="text" value="{{.uname}}" required/>
diff --git a/templates/user/signup.tmpl b/templates/user/signup.tmpl
index 60490ceb89..5b52850c0f 100644
--- a/templates/user/signup.tmpl
+++ b/templates/user/signup.tmpl
@@ -7,7 +7,7 @@
<h2>{{.i18n.Tr "sign_up"}}</h2>
</div>
<div class="panel-content">
- {{template "base/alert" .}}
+ {{template "ng/base/alert" .}}
{{if .DisableRegistration}}
<p>{{.i18n.Tr "auth.disable_register_prompt"}}</p>
{{else}}