Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

watch_unwatch.tmpl 829B

12345678910111213
  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. {{if $.IsWatchingRepo}}{{svg "octicon-eye-closed"}}{{else}}{{svg "octicon-eye"}}{{end}}
  7. <span class="not-mobile" 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>