Add id references on all events to allow linking to it (#8608)

This commit is contained in:
David Svantesson 2019-10-21 15:36:09 +02:00 committed by Lunny Xiao
parent bfdcedfe89
commit 969a540ce2

View File

@ -73,7 +73,7 @@
</div> </div>
</div> </div>
{{else if eq .Type 1}} {{else if eq .Type 1}}
<div class="event"> <div class="event" id="{{.HashTag}}">
<span class="octicon octicon-primitive-dot"></span> <span class="octicon octicon-primitive-dot"></span>
<a class="ui avatar image" href="{{.Poster.HomeLink}}"> <a class="ui avatar image" href="{{.Poster.HomeLink}}">
<img src="{{.Poster.RelAvatarLink}}"> <img src="{{.Poster.RelAvatarLink}}">
@ -81,7 +81,7 @@
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a> {{$.i18n.Tr "repo.issues.reopened_at" .EventTag $createdStr | Safe}}</span> <span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a> {{$.i18n.Tr "repo.issues.reopened_at" .EventTag $createdStr | Safe}}</span>
</div> </div>
{{else if eq .Type 2}} {{else if eq .Type 2}}
<div class="event"> <div class="event" id="{{.HashTag}}">
<span class="octicon octicon-circle-slash issue-symbol"></span> <span class="octicon octicon-circle-slash issue-symbol"></span>
<a class="ui avatar image" href="{{.Poster.HomeLink}}"> <a class="ui avatar image" href="{{.Poster.HomeLink}}">
<img src="{{.Poster.RelAvatarLink}}"> <img src="{{.Poster.RelAvatarLink}}">
@ -89,7 +89,7 @@
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a> {{$.i18n.Tr "repo.issues.closed_at" .EventTag $createdStr | Safe}}</span> <span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a> {{$.i18n.Tr "repo.issues.closed_at" .EventTag $createdStr | Safe}}</span>
</div> </div>
{{else if or (eq .Type 3) (eq .Type 5) (eq .Type 6)}} {{else if or (eq .Type 3) (eq .Type 5) (eq .Type 6)}}
<div class="event"> <div class="event" id="{{.HashTag}}">
<span class="octicon octicon-bookmark"></span> <span class="octicon octicon-bookmark"></span>
<a class="ui avatar image" href="{{.Poster.HomeLink}}"> <a class="ui avatar image" href="{{.Poster.HomeLink}}">
<img src="{{.Poster.RelAvatarLink}}"> <img src="{{.Poster.RelAvatarLink}}">
@ -117,7 +117,7 @@
</div> </div>
</div> </div>
{{else if eq .Type 4}} {{else if eq .Type 4}}
<div class="event"> <div class="event" id="{{.HashTag}}">
<span class="octicon octicon-bookmark"></span> <span class="octicon octicon-bookmark"></span>
<a class="ui avatar image" href="{{.Poster.HomeLink}}"> <a class="ui avatar image" href="{{.Poster.HomeLink}}">
<img src="{{.Poster.RelAvatarLink}}"> <img src="{{.Poster.RelAvatarLink}}">
@ -131,7 +131,7 @@
</div> </div>
{{else if eq .Type 7}} {{else if eq .Type 7}}
{{if .Label}} {{if .Label}}
<div class="event"> <div class="event" id="{{.HashTag}}">
<span class="octicon octicon-primitive-dot"></span> <span class="octicon octicon-primitive-dot"></span>
<a class="ui avatar image" href="{{.Poster.HomeLink}}"> <a class="ui avatar image" href="{{.Poster.HomeLink}}">
<img src="{{.Poster.RelAvatarLink}}"> <img src="{{.Poster.RelAvatarLink}}">
@ -141,7 +141,7 @@
</div> </div>
{{end}} {{end}}
{{else if eq .Type 8}} {{else if eq .Type 8}}
<div class="event"> <div class="event" id="{{.HashTag}}">
<span class="octicon octicon-primitive-dot"></span> <span class="octicon octicon-primitive-dot"></span>
<a class="ui avatar image" href="{{.Poster.HomeLink}}"> <a class="ui avatar image" href="{{.Poster.HomeLink}}">
<img src="{{.Poster.RelAvatarLink}}"> <img src="{{.Poster.RelAvatarLink}}">
@ -150,7 +150,7 @@
{{if gt .OldMilestoneID 0}}{{if gt .MilestoneID 0}}{{$.i18n.Tr "repo.issues.change_milestone_at" (.OldMilestone.Name|Escape) (.Milestone.Name|Escape) $createdStr | Safe}}{{else}}{{$.i18n.Tr "repo.issues.remove_milestone_at" (.OldMilestone.Name|Escape) $createdStr | Safe}}{{end}}{{else if gt .MilestoneID 0}}{{$.i18n.Tr "repo.issues.add_milestone_at" (.Milestone.Name|Escape) $createdStr | Safe}}{{end}}</span> {{if gt .OldMilestoneID 0}}{{if gt .MilestoneID 0}}{{$.i18n.Tr "repo.issues.change_milestone_at" (.OldMilestone.Name|Escape) (.Milestone.Name|Escape) $createdStr | Safe}}{{else}}{{$.i18n.Tr "repo.issues.remove_milestone_at" (.OldMilestone.Name|Escape) $createdStr | Safe}}{{end}}{{else if gt .MilestoneID 0}}{{$.i18n.Tr "repo.issues.add_milestone_at" (.Milestone.Name|Escape) $createdStr | Safe}}{{end}}</span>
</div> </div>
{{else if eq .Type 9}} {{else if eq .Type 9}}
<div class="event"> <div class="event" id="{{.HashTag}}">
<span class="octicon octicon-primitive-dot"></span> <span class="octicon octicon-primitive-dot"></span>
{{if gt .AssigneeID 0}} {{if gt .AssigneeID 0}}
{{if .RemovedAssignee}} {{if .RemovedAssignee}}
@ -181,7 +181,7 @@
{{end}} {{end}}
</div> </div>
{{else if eq .Type 10}} {{else if eq .Type 10}}
<div class="event"> <div class="event" id="{{.HashTag}}">
<span class="octicon octicon-primitive-dot"></span> <span class="octicon octicon-primitive-dot"></span>
<a class="ui avatar image" href="{{.Poster.HomeLink}}"> <a class="ui avatar image" href="{{.Poster.HomeLink}}">
<img src="{{.Poster.RelAvatarLink}}"> <img src="{{.Poster.RelAvatarLink}}">
@ -191,7 +191,7 @@
</span> </span>
</div> </div>
{{else if eq .Type 11}} {{else if eq .Type 11}}
<div class="event"> <div class="event" id="{{.HashTag}}">
<span class="octicon octicon-primitive-dot"></span> <span class="octicon octicon-primitive-dot"></span>
<a class="ui avatar image" href="{{.Poster.HomeLink}}"> <a class="ui avatar image" href="{{.Poster.HomeLink}}">
<img src="{{.Poster.RelAvatarLink}}"> <img src="{{.Poster.RelAvatarLink}}">
@ -201,7 +201,7 @@
</span> </span>
</div> </div>
{{else if eq .Type 12}} {{else if eq .Type 12}}
<div class="event"> <div class="event" id="{{.HashTag}}">
<span class="octicon octicon-primitive-dot"></span> <span class="octicon octicon-primitive-dot"></span>
<a class="ui avatar image" href="{{.Poster.HomeLink}}"> <a class="ui avatar image" href="{{.Poster.HomeLink}}">
<img src="{{.Poster.RelAvatarLink}}"> <img src="{{.Poster.RelAvatarLink}}">
@ -209,7 +209,7 @@
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a> {{$.i18n.Tr "repo.issues.start_tracking_history" $createdStr | Safe}}</span> <span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a> {{$.i18n.Tr "repo.issues.start_tracking_history" $createdStr | Safe}}</span>
</div> </div>
{{else if eq .Type 13}} {{else if eq .Type 13}}
<div class="event"> <div class="event" id="{{.HashTag}}">
<span class="octicon octicon-primitive-dot"></span> <span class="octicon octicon-primitive-dot"></span>
<a class="ui avatar image" href="{{.Poster.HomeLink}}"> <a class="ui avatar image" href="{{.Poster.HomeLink}}">
<img src="{{.Poster.RelAvatarLink}}"> <img src="{{.Poster.RelAvatarLink}}">
@ -222,7 +222,7 @@
</div> </div>
</div> </div>
{{else if eq .Type 14}} {{else if eq .Type 14}}
<div class="event"> <div class="event" id="{{.HashTag}}">
<span class="octicon octicon-primitive-dot"></span> <span class="octicon octicon-primitive-dot"></span>
<a class="ui avatar image" href="{{.Poster.HomeLink}}"> <a class="ui avatar image" href="{{.Poster.HomeLink}}">
<img src="{{.Poster.RelAvatarLink}}"> <img src="{{.Poster.RelAvatarLink}}">
@ -234,7 +234,7 @@
</div> </div>
</div> </div>
{{else if eq .Type 15}} {{else if eq .Type 15}}
<div class="event"> <div class="event" id="{{.HashTag}}">
<span class="octicon octicon-primitive-dot"></span> <span class="octicon octicon-primitive-dot"></span>
<a class="ui avatar image" href="{{.Poster.HomeLink}}"> <a class="ui avatar image" href="{{.Poster.HomeLink}}">
<img src="{{.Poster.RelAvatarLink}}"> <img src="{{.Poster.RelAvatarLink}}">
@ -242,7 +242,7 @@
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a> {{$.i18n.Tr "repo.issues.cancel_tracking_history" $createdStr | Safe}}</span> <span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a> {{$.i18n.Tr "repo.issues.cancel_tracking_history" $createdStr | Safe}}</span>
</div> </div>
{{else if eq .Type 16}} {{else if eq .Type 16}}
<div class="event"> <div class="event" id="{{.HashTag}}">
<span class="octicon octicon-primitive-dot"></span> <span class="octicon octicon-primitive-dot"></span>
<a class="ui avatar image" href="{{.Poster.HomeLink}}"> <a class="ui avatar image" href="{{.Poster.HomeLink}}">
<img src="{{.Poster.RelAvatarLink}}"> <img src="{{.Poster.RelAvatarLink}}">
@ -252,7 +252,7 @@
</span> </span>
</div> </div>
{{else if eq .Type 17}} {{else if eq .Type 17}}
<div class="event"> <div class="event" id="{{.HashTag}}">
<span class="octicon octicon-primitive-dot"></span> <span class="octicon octicon-primitive-dot"></span>
<a class="ui avatar image" href="{{.Poster.HomeLink}}"> <a class="ui avatar image" href="{{.Poster.HomeLink}}">
<img src="{{.Poster.RelAvatarLink}}"> <img src="{{.Poster.RelAvatarLink}}">
@ -262,7 +262,7 @@
</span> </span>
</div> </div>
{{else if eq .Type 18}} {{else if eq .Type 18}}
<div class="event"> <div class="event" id="{{.HashTag}}">
<span class="octicon octicon-primitive-dot"></span> <span class="octicon octicon-primitive-dot"></span>
<a class="ui avatar image" href="{{.Poster.HomeLink}}"> <a class="ui avatar image" href="{{.Poster.HomeLink}}">
<img src="{{.Poster.RelAvatarLink}}"> <img src="{{.Poster.RelAvatarLink}}">
@ -272,7 +272,7 @@
</span> </span>
</div> </div>
{{else if eq .Type 19}} {{else if eq .Type 19}}
<div class="event"> <div class="event" id="{{.HashTag}}">
<span class="octicon octicon-primitive-dot"></span> <span class="octicon octicon-primitive-dot"></span>
<a class="ui avatar image" href="{{.Poster.HomeLink}}"> <a class="ui avatar image" href="{{.Poster.HomeLink}}">
<img src="{{.Poster.RelAvatarLink}}"> <img src="{{.Poster.RelAvatarLink}}">
@ -286,7 +286,7 @@
</div> </div>
</div> </div>
{{else if eq .Type 20}} {{else if eq .Type 20}}
<div class="event"> <div class="event" id="{{.HashTag}}">
<span class="octicon octicon-primitive-dot"></span> <span class="octicon octicon-primitive-dot"></span>
<a class="ui avatar image" href="{{.Poster.HomeLink}}"> <a class="ui avatar image" href="{{.Poster.HomeLink}}">
<img src="{{.Poster.RelAvatarLink}}"> <img src="{{.Poster.RelAvatarLink}}">
@ -388,7 +388,7 @@
{{end}} {{end}}
</div> </div>
{{else if eq .Type 23}} {{else if eq .Type 23}}
<div class="event"> <div class="event" id="{{.HashTag}}">
<span class="octicon octicon-lock issue-symbol"></span> <span class="octicon octicon-lock issue-symbol"></span>
<a class="ui avatar image" href="{{.Poster.HomeLink}}"> <a class="ui avatar image" href="{{.Poster.HomeLink}}">
<img src="{{.Poster.RelAvatarLink}}"> <img src="{{.Poster.RelAvatarLink}}">
@ -405,7 +405,7 @@
{{ end }} {{ end }}
</div> </div>
{{else if eq .Type 24}} {{else if eq .Type 24}}
<div class="event"> <div class="event" id="{{.HashTag}}">
<span class="octicon octicon-key issue-symbol"></span> <span class="octicon octicon-key issue-symbol"></span>
<a class="ui avatar image" href="{{.Poster.HomeLink}}"> <a class="ui avatar image" href="{{.Poster.HomeLink}}">
<img src="{{.Poster.RelAvatarLink}}"> <img src="{{.Poster.RelAvatarLink}}">