Skip to content

Commit c0951fe

Browse files
committed
Move note bubble inside the commit bubble
1 parent cb71e3f commit c0951fe

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

templates/repo/diff/page.tmpl

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,30 @@
1313
{{if IsMultilineCommitMessage .Commit.Message}}
1414
<pre class="commit-body">{{RenderCommitBody .Commit.Message $.RepoLink $.Repository.ComposeMetas}}</pre>
1515
{{end}}
16+
{{if .Note}}
17+
<div class="ui top attached info clearing segment">
18+
<h3>{{.i18n.Tr "repo.diff.git-notes"}}</h3>
19+
<pre class="commit-body">{{RenderNote .Note $.RepoLink $.Repository.ComposeMetas}}</pre>
20+
</div>
21+
<div class="ui bottom attached info segment">
22+
<div class="ui stackable grid">
23+
<div class="nine wide column">
24+
{{if .NoteAuthor}}
25+
<img class="ui avatar image" src="{{.NoteAuthor.RelAvatarLink}}" />
26+
{{if .NoteAuthor.FullName}}
27+
<a href="{{.NoteAuthor.HomeLink}}"><strong>{{.NoteAuthor.FullName}}</strong></a>
28+
{{else}}
29+
<a href="{{.NoteAuthor.HomeLink}}"><strong>{{.NoteCommit.Author.Name}}</strong></a>
30+
{{end}}
31+
{{else}}
32+
<img class="ui avatar image" src="{{AvatarLink .NoteCommit.Author.Email}}" />
33+
<strong>{{.NoteCommit.Author.Name}}</strong>
34+
{{end}}
35+
<span class="text grey" id="note-authored-time">{{TimeSince .NoteCommit.Author.When $.Lang}}</span>
36+
</div>
37+
</div><!-- end grid -->
38+
</div>
39+
{{end}}
1640
<span class="text grey"><i class="octicon octicon-git-branch"></i>{{.BranchName}}</span>
1741
</div>
1842
<div class="ui attached info segment {{if .Commit.Signature}} isSigned {{if .Verification.Verified }} isVerified {{end}}{{end}}">
@@ -65,30 +89,6 @@
6589
</div>
6690
{{end}}
6791
{{end}}
68-
{{if .Note}}
69-
<div class="ui top attached info clearing segment">
70-
<h3>{{.i18n.Tr "repo.diff.git-notes"}}</h3>
71-
<pre class="commit-body">{{RenderNote .Note $.RepoLink $.Repository.ComposeMetas}}</pre>
72-
</div>
73-
<div class="ui bottom attached info segment">
74-
<div class="ui stackable grid">
75-
<div class="nine wide column">
76-
{{if .NoteAuthor}}
77-
<img class="ui avatar image" src="{{.NoteAuthor.RelAvatarLink}}" />
78-
{{if .NoteAuthor.FullName}}
79-
<a href="{{.NoteAuthor.HomeLink}}"><strong>{{.NoteAuthor.FullName}}</strong></a>
80-
{{else}}
81-
<a href="{{.NoteAuthor.HomeLink}}"><strong>{{.NoteCommit.Author.Name}}</strong></a>
82-
{{end}}
83-
{{else}}
84-
<img class="ui avatar image" src="{{AvatarLink .NoteCommit.Author.Email}}" />
85-
<strong>{{.NoteCommit.Author.Name}}</strong>
86-
{{end}}
87-
<span class="text grey" id="note-authored-time">{{TimeSince .NoteCommit.Author.When $.Lang}}</span>
88-
</div>
89-
</div><!-- end grid -->
90-
</div>
91-
{{end}}
9292
{{end}}
9393

9494
{{template "repo/diff/box" .}}

0 commit comments

Comments
 (0)