aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/.VERSION2
-rw-r--r--templates/base/head.tmpl10
-rw-r--r--templates/repo/header.tmpl38
-rw-r--r--templates/user/profile.tmpl32
4 files changed, 51 insertions, 31 deletions
diff --git a/templates/.VERSION b/templates/.VERSION
index 31eb16e2..a87c12f6 100644
--- a/templates/.VERSION
+++ b/templates/.VERSION
@@ -1 +1 @@
-0.11.76.1204
+0.11.77.1206
diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl
index 96f77722..27b2f4c7 100644
--- a/templates/base/head.tmpl
+++ b/templates/base/head.tmpl
@@ -160,9 +160,13 @@
{{end}}
<div class="divider"></div>
- <a class="item" href="{{AppSubURL}}/user/logout">
- <i class="octicon octicon-sign-out"></i> {{.i18n.Tr "sign_out"}}
- </a>
+
+ <form id="logout-form" class="item" action="{{AppSubURL}}/user/logout" method="POST">
+ {{.CSRFTokenHTML}}
+ <div class="submit-button" data-form="#logout-form">
+ <i class="octicon octicon-sign-out"></i> {{.i18n.Tr "sign_out"}}
+ </div>
+ </form>
</div><!-- end content avatar menu -->
</div><!-- end dropdown avatar menu -->
</div><!-- end signed user right menu -->
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl
index d15b5dde..cacda1ed 100644
--- a/templates/repo/header.tmpl
+++ b/templates/repo/header.tmpl
@@ -20,22 +20,28 @@
{{if not $.IsGuest}}
<div class="ui right">
- <div class="ui labeled button" tabindex="0">
- <a class="ui basic button" href="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}">
- <i class="eye{{if not $.IsWatchingRepo}} slash outline{{end}} icon"></i>{{if $.IsWatchingRepo}}{{$.i18n.Tr "repo.unwatch"}}{{else}}{{$.i18n.Tr "repo.watch"}}{{end}}
- </a>
- <a class="ui basic label" href="{{.Link}}/watchers">
- {{.NumWatches}}
- </a>
- </div>
- <div class="ui labeled button" tabindex="0">
- <a class="ui basic button" href="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star?redirect_to={{$.Link}}">
- <i class="star{{if not $.IsStaringRepo}} outline{{end}} icon"></i>{{if $.IsStaringRepo}}{{$.i18n.Tr "repo.unstar"}}{{else}}{{$.i18n.Tr "repo.star"}}{{end}}
- </a>
- <a class="ui basic label" href="{{.Link}}/stars">
- {{.NumStars}}
- </a>
- </div>
+ <form class="display inline" action="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}" method="POST">
+ {{$.CSRFTokenHTML}}
+ <div class="ui labeled button" tabindex="0">
+ <button class="ui basic button">
+ <i class="eye{{if not $.IsWatchingRepo}} slash outline{{end}} icon"></i>{{if $.IsWatchingRepo}}{{$.i18n.Tr "repo.unwatch"}}{{else}}{{$.i18n.Tr "repo.watch"}}{{end}}
+ </button>
+ <a class="ui basic label" href="{{.Link}}/watchers">
+ {{.NumWatches}}
+ </a>
+ </div>
+ </form>
+ <form class="display inline" action="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star?redirect_to={{$.Link}}" method="POST">
+ {{$.CSRFTokenHTML}}
+ <div class="ui labeled button" tabindex="0">
+ <button class="ui basic button">
+ <i class="star{{if not $.IsStaringRepo}} outline{{end}} icon"></i>{{if $.IsStaringRepo}}{{$.i18n.Tr "repo.unstar"}}{{else}}{{$.i18n.Tr "repo.star"}}{{end}}
+ </button>
+ <a class="ui basic label" href="{{.Link}}/stars">
+ {{.NumStars}}
+ </a>
+ </div>
+ </form>
{{if .CanBeForked}}
<div class="ui labeled button" tabindex="0">
<a class="ui basic button {{if eq .OwnerID $.LoggedUserID}}poping up{{end}}" href="{{AppSubURL}}/repo/fork/{{.ID}}">
diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl
index d60fce56..285aa12c 100644
--- a/templates/user/profile.tmpl
+++ b/templates/user/profile.tmpl
@@ -5,12 +5,12 @@
<div class="ui five wide column">
<div class="ui card">
{{if eq .LoggedUserName .Owner.Name}}
- <a class="image poping up" href="{{AppSubURL}}/user/settings/avatar" id="profile-avatar" data-content="{{.i18n.Tr "user.change_avatar"}}" data-variation="inverted tiny" data-position="bottom center">
- <img src="{{AppendAvatarSize .Owner.RelAvatarLink 290}}" title="{{.Owner.Name}}"/>
+ <a class="profile-avatar image poping up" href="{{AppSubURL}}/user/settings/avatar" id="profile-avatar" data-content="{{.i18n.Tr "user.change_avatar"}}" data-variation="inverted tiny" data-position="bottom center">
+ <img src="{{AppendAvatarSize .Owner.RelAvatarLink 287}}" title="{{.Owner.Name}}"/>
</a>
{{else}}
- <span class="image">
- <img src="{{AppendAvatarSize .Owner.RelAvatarLink 290}}" title="{{.Owner.Name}}"/>
+ <span class="profile-avatar image">
+ <img src="{{AppendAvatarSize .Owner.RelAvatarLink 287}}" title="{{.Owner.Name}}"/>
</span>
{{end}}
<div class="content">
@@ -61,13 +61,23 @@
</li>
{{end}}
{{if and .IsLogged (ne .LoggedUserName .Owner.Name)}}
- <li class="follow">
- {{if .LoggedUser.IsFollowing .Owner.ID}}
- <a class="ui basic red button" href="{{.Link}}/action/unfollow?redirect_to={{$.Link}}"><i class="octicon octicon-person"></i> {{.i18n.Tr "user.unfollow"}}</a>
- {{else}}
- <a class="ui basic green button" href="{{.Link}}/action/follow?redirect_to={{$.Link}}"><i class="octicon octicon-person"></i> {{.i18n.Tr "user.follow"}}</a>
- {{end}}
- </li>
+ <li class="follow">
+ {{if .LoggedUser.IsFollowing .Owner.ID}}
+ <form action="{{.Link}}/action/unfollow?redirect_to={{$.Link}}" method="POST">
+ {{.CSRFTokenHTML}}
+ <button class="ui basic red button">
+ <i class="octicon octicon-person"></i> {{.i18n.Tr "user.unfollow"}}
+ </button>
+ </form>
+ {{else}}
+ <form action="{{.Link}}/action/follow?redirect_to={{$.Link}}" method="POST">
+ {{.CSRFTokenHTML}}
+ <button class="ui basic green button">
+ <i class="octicon octicon-person"></i> {{.i18n.Tr "user.follow"}}
+ </button>
+ </form>
+ {{end}}
+ </li>
{{end}}
</ul>
</div>