code.gitea.io/gitea@v1.22.3/templates/repo/watch_unwatch.tmpl (about)

     1  <form hx-boost="true" hx-target="this" method="post" action="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}unwatch{{else}}watch{{end}}">
     2  	<div class="ui labeled button" {{if not $.IsSigned}}data-tooltip-content="{{ctx.Locale.Tr "repo.watch_guest_user"}}"{{end}}>
     3  		{{$buttonText := ctx.Locale.Tr "repo.watch"}}
     4  		{{if $.IsWatchingRepo}}{{$buttonText = ctx.Locale.Tr "repo.unwatch"}}{{end}}
     5  		<button type="submit" class="ui compact small basic button"{{if not $.IsSigned}} disabled{{end}} aria-label="{{$buttonText}}">
     6  			{{svg "octicon-eye"}}
     7  			<span aria-hidden="true">{{$buttonText}}</span>
     8  		</button>
     9  		<a hx-boost="false" class="ui basic label" href="{{.RepoLink}}/watchers">
    10  			{{CountFmt .Repository.NumWatches}}
    11  		</a>
    12  	</div>
    13  </form>