]> source.dussan.org Git - gitea.git/commitdiff
Add id references on all events to allow linking to it (#8608)
authorDavid Svantesson <davidsvantesson@gmail.com>
Mon, 21 Oct 2019 13:36:09 +0000 (15:36 +0200)
committerLunny Xiao <xiaolunwen@gmail.com>
Mon, 21 Oct 2019 13:36:09 +0000 (21:36 +0800)
templates/repo/issue/view_content/comments.tmpl

index e3ea9ba822bc627ebe8482c37ad62433033853fc..5a3d4026c6db57289e381caf5e387b34c35db39c 100644 (file)
@@ -73,7 +73,7 @@
                        </div>
                </div>
        {{else if eq .Type 1}}
-               <div class="event">
+               <div class="event" id="{{.HashTag}}">
                        <span class="octicon octicon-primitive-dot"></span>
                        <a class="ui avatar image" href="{{.Poster.HomeLink}}">
                                <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>
                </div>
        {{else if eq .Type 2}}
-               <div class="event">
+               <div class="event" id="{{.HashTag}}">
                        <span class="octicon octicon-circle-slash issue-symbol"></span>
                        <a class="ui avatar image" href="{{.Poster.HomeLink}}">
                                <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>
                </div>
        {{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>
                        <a class="ui avatar image" href="{{.Poster.HomeLink}}">
                                <img src="{{.Poster.RelAvatarLink}}">
                        </div>
                </div>
        {{else if eq .Type 4}}
-               <div class="event">
+               <div class="event" id="{{.HashTag}}">
                        <span class="octicon octicon-bookmark"></span>
                        <a class="ui avatar image" href="{{.Poster.HomeLink}}">
                                <img src="{{.Poster.RelAvatarLink}}">
                </div>
        {{else if eq .Type 7}}
                {{if .Label}}
-                       <div class="event">
+                       <div class="event" id="{{.HashTag}}">
                                <span class="octicon octicon-primitive-dot"></span>
                                <a class="ui avatar image" href="{{.Poster.HomeLink}}">
                                        <img src="{{.Poster.RelAvatarLink}}">
                        </div>
                {{end}}
        {{else if eq .Type 8}}
-               <div class="event">
+               <div class="event" id="{{.HashTag}}">
                        <span class="octicon octicon-primitive-dot"></span>
                        <a class="ui avatar image" href="{{.Poster.HomeLink}}">
                                <img src="{{.Poster.RelAvatarLink}}">
                        {{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>
        {{else if eq .Type 9}}
-               <div class="event">
+               <div class="event" id="{{.HashTag}}">
                        <span class="octicon octicon-primitive-dot"></span>
                        {{if gt .AssigneeID 0}}
                                {{if .RemovedAssignee}}
                        {{end}}
                </div>
        {{else if eq .Type 10}}
-               <div class="event">
+               <div class="event" id="{{.HashTag}}">
                        <span class="octicon octicon-primitive-dot"></span>
                        <a class="ui avatar image" href="{{.Poster.HomeLink}}">
                                <img src="{{.Poster.RelAvatarLink}}">
                        </span>
                </div>
        {{else if eq .Type 11}}
-               <div class="event">
+               <div class="event" id="{{.HashTag}}">
                        <span class="octicon octicon-primitive-dot"></span>
                        <a class="ui avatar image" href="{{.Poster.HomeLink}}">
                                <img src="{{.Poster.RelAvatarLink}}">
                        </span>
                </div>
        {{else if eq .Type 12}}
-               <div class="event">
+               <div class="event" id="{{.HashTag}}">
                        <span class="octicon octicon-primitive-dot"></span>
                        <a class="ui avatar image" href="{{.Poster.HomeLink}}">
                                <img src="{{.Poster.RelAvatarLink}}">
                        <span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a> {{$.i18n.Tr "repo.issues.start_tracking_history"  $createdStr | Safe}}</span>
                </div>
        {{else if eq .Type 13}}
-               <div class="event">
+               <div class="event" id="{{.HashTag}}">
                        <span class="octicon octicon-primitive-dot"></span>
                        <a class="ui avatar image" href="{{.Poster.HomeLink}}">
                                <img src="{{.Poster.RelAvatarLink}}">
                        </div>
                </div>
        {{else if eq .Type 14}}
-               <div class="event">
+               <div class="event" id="{{.HashTag}}">
                        <span class="octicon octicon-primitive-dot"></span>
                        <a class="ui avatar image" href="{{.Poster.HomeLink}}">
                                <img src="{{.Poster.RelAvatarLink}}">
                        </div>
                </div>
        {{else if eq .Type 15}}
-               <div class="event">
+               <div class="event" id="{{.HashTag}}">
                        <span class="octicon octicon-primitive-dot"></span>
                        <a class="ui avatar image" href="{{.Poster.HomeLink}}">
                                <img src="{{.Poster.RelAvatarLink}}">
                        <span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a> {{$.i18n.Tr "repo.issues.cancel_tracking_history"  $createdStr | Safe}}</span>
                </div>
        {{else if eq .Type 16}}
-               <div class="event">
+               <div class="event" id="{{.HashTag}}">
                        <span class="octicon octicon-primitive-dot"></span>
                        <a class="ui avatar image" href="{{.Poster.HomeLink}}">
                                <img src="{{.Poster.RelAvatarLink}}">
                        </span>
                </div>
        {{else if eq .Type 17}}
-               <div class="event">
+               <div class="event" id="{{.HashTag}}">
                        <span class="octicon octicon-primitive-dot"></span>
                        <a class="ui avatar image" href="{{.Poster.HomeLink}}">
                                <img src="{{.Poster.RelAvatarLink}}">
                        </span>
                </div>
        {{else if eq .Type 18}}
-               <div class="event">
+               <div class="event" id="{{.HashTag}}">
                        <span class="octicon octicon-primitive-dot"></span>
                        <a class="ui avatar image" href="{{.Poster.HomeLink}}">
                                <img src="{{.Poster.RelAvatarLink}}">
                        </span>
                </div>
        {{else if eq .Type 19}}
-               <div class="event">
+               <div class="event" id="{{.HashTag}}">
                        <span class="octicon octicon-primitive-dot"></span>
                        <a class="ui avatar image" href="{{.Poster.HomeLink}}">
                                <img src="{{.Poster.RelAvatarLink}}">
                        </div>
                </div>
        {{else if eq .Type 20}}
-               <div class="event">
+               <div class="event" id="{{.HashTag}}">
                        <span class="octicon octicon-primitive-dot"></span>
                        <a class="ui avatar image" href="{{.Poster.HomeLink}}">
                                <img src="{{.Poster.RelAvatarLink}}">
                        {{end}}
                </div>
        {{else if eq .Type 23}}
-               <div class="event">
+               <div class="event" id="{{.HashTag}}">
                        <span class="octicon octicon-lock issue-symbol"></span>
                        <a class="ui avatar image" href="{{.Poster.HomeLink}}">
                                <img src="{{.Poster.RelAvatarLink}}">
                        {{ end }}
                </div>
        {{else if eq .Type 24}}
-               <div class="event">
+               <div class="event" id="{{.HashTag}}">
                        <span class="octicon octicon-key issue-symbol"></span>
                        <a class="ui avatar image" href="{{.Poster.HomeLink}}">
                                <img src="{{.Poster.RelAvatarLink}}">