{{if $.IsSigned}}
<div class="ui labeled button" id="pin-repo-dropdown">
	<div class="ui compact small basic button dropdown" data-tooltip-content="{{ctx.Locale.Tr "repo.pin.tooltip"}}">
		{{svg "octicon-pin" 16}}<span class="text not-mobile">{{ctx.Locale.Tr "repo.pin"}}</span>
		{{svg "octicon-triangle-down" 14 "dropdown icon"}}
		<div class="menu">
			{{/* Pin to user profile */}}
			{{if $.IsRepoPinnedToUser}}
			<a class="item" href="{{$.RepoLink}}/action/unpin?type=user&redirect_to={{$.Link}}">
				{{svg "octicon-pin-slash" 16}} {{ctx.Locale.Tr "repo.pin.unpin_from_profile"}}
			</a>
			{{else}}
			<a class="item" href="{{$.RepoLink}}/action/pin?type=user&redirect_to={{$.Link}}">
				{{svg "octicon-person" 16}} {{ctx.Locale.Tr "repo.pin.pin_to_profile"}}
			</a>
			{{end}}

			{{/* Pin to organization (if applicable) */}}
			{{if and .Repository.Owner.IsOrganization $.IsOrganizationMember}}
				{{if $.IsRepoPinnedToOrg}}
				<a class="item" href="{{$.RepoLink}}/action/unpin?type=org&redirect_to={{$.Link}}">
					{{svg "octicon-pin-slash" 16}} {{ctx.Locale.Tr "repo.pin.unpin_from_org"}}
				</a>
				{{else}}
				<a class="item" href="{{$.RepoLink}}/action/pin?type=org&redirect_to={{$.Link}}">
					{{svg "octicon-organization" 16}} {{ctx.Locale.Tr "repo.pin.pin_to_org"}}
				</a>
				{{end}}
			{{end}}
		</div>
	</div>
</div>
{{end}}
