forked from gitea/gitea
		
	 e5313248a8
			
		
	
	
		e5313248a8
		
			
		
	
	
	
	
		
			
			When JavaScript is not loaded, fall back to displaying reaction tooltips with the default browser `title` attribute. An element with a present but empty `data-tooltip-content` will use the `title` attribute for its tippy.js tooltip content, so when JavaScript is enabled, this functions the same as the current behavior.
		
			
				
	
	
		
			18 lines
		
	
	
		
			1005 B
		
	
	
	
		
			Handlebars
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			1005 B
		
	
	
	
		
			Handlebars
		
	
	
	
	
	
| <div class="ui attached segment reactions" data-action-url="{{$.ActionURL}}">
 | |
| {{range $key, $value := .Reactions}}
 | |
| 	{{$hasReacted := $value.HasUser $.ctxData.SignedUserID}}
 | |
| 	<a role="button" class="ui label basic{{if $hasReacted}} primary{{end}}{{if not $.ctxData.IsSigned}} disabled{{end}} comment-reaction-button"
 | |
| 		data-tooltip-content
 | |
| 		title="{{$value.GetFirstUsers}}{{if gt ($value.GetMoreUserCount) 0}} {{ctx.Locale.Tr "repo.reactions_more" $value.GetMoreUserCount}}{{end}}"
 | |
| 		aria-label="{{$value.GetFirstUsers}}{{if gt ($value.GetMoreUserCount) 0}} {{ctx.Locale.Tr "repo.reactions_more" $value.GetMoreUserCount}}{{end}}"
 | |
| 		data-tooltip-placement="bottom-start"
 | |
| 		data-reaction-content="{{$key}}" data-has-reacted="{{$hasReacted}}">
 | |
| 		<span class="reaction">{{ReactionToEmoji $key}}</span>
 | |
| 		<span class="reaction-count">{{len $value}}</span>
 | |
| 	</a>
 | |
| {{end}}
 | |
| {{if AllowedReactions}}
 | |
| 	{{template "repo/issue/view_content/add_reaction" dict "ctxData" $.ctxData "ActionURL" .ActionURL}}
 | |
| {{end}}
 | |
| </div>
 |