Parcourir la source

[GINR] remove staring

cgars il y a 8 ans
Parent
commit
0238b5467c
1 fichiers modifiés avec 8 ajouts et 22 suppressions
  1. 8 22
      templates/repo/header.tmpl

+ 8 - 22
templates/repo/header.tmpl

@@ -20,28 +20,14 @@
 
 
 					{{if not $.IsGuest}}
 					{{if not $.IsGuest}}
 						<div class="ui right">
 						<div class="ui right">
-							<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>
+							<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="icon fa-eye{{if not $.IsWatchingRepo}}-slash{{end}}"></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>
 							{{if .CanBeForked}}
 							{{if .CanBeForked}}
 								<div class="ui labeled button" tabindex="0">
 								<div class="ui labeled button" tabindex="0">
 									<a class="ui basic button {{if eq .OwnerID $.LoggedUserID}}poping up{{end}}" href="{{AppSubURL}}/repo/fork/{{.ID}}">
 									<a class="ui basic button {{if eq .OwnerID $.LoggedUserID}}poping up{{end}}" href="{{AppSubURL}}/repo/fork/{{.ID}}">