diff options
author | Ethan Koenig <ethantkoenig@gmail.com> | 2017-11-12 17:35:55 -0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-11-13 09:35:55 +0800 |
commit | 5481be0ac5e137a1127ca37975a6d319bf0ad940 (patch) | |
tree | 44e39f02682181b7cf4d593f3b5d18e2b4d857a8 /templates | |
parent | 47f40ccd5ee1b54019cec6b5d3bce6b8075a1384 (diff) | |
download | gitea-5481be0ac5e137a1127ca37975a6d319bf0ad940.tar.gz gitea-5481be0ac5e137a1127ca37975a6d319bf0ad940.zip |
Fix issue link rendering in commit messages (#2897)
* Fix issue link rendering in commit messages
* Update page.tmpl
* No links for parens
* remove comment
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/commits_table.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/diff/page.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/graph.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/view_list.tmpl | 6 |
4 files changed, 5 insertions, 7 deletions
diff --git a/templates/repo/commits_table.tmpl b/templates/repo/commits_table.tmpl index 2ca861c623..5550ad7493 100644 --- a/templates/repo/commits_table.tmpl +++ b/templates/repo/commits_table.tmpl @@ -60,7 +60,7 @@ </a> </td> <td class="message collapsing"> - <span class="has-emoji{{if gt .ParentCount 1}} grey text{{end}}">{{RenderCommitMessage false .Summary $.RepoLink $.Repository.ComposeMetas}}</span> + <span class="has-emoji{{if gt .ParentCount 1}} grey text{{end}}">{{RenderCommitMessage .Summary $.RepoLink $.Repository.ComposeMetas}}</span> {{template "repo/commit_status" .Status}} </td> <td class="grey text right aligned">{{TimeSince .Author.When $.Lang}}</td> diff --git a/templates/repo/diff/page.tmpl b/templates/repo/diff/page.tmpl index 2736daa7f9..cb67b36f73 100644 --- a/templates/repo/diff/page.tmpl +++ b/templates/repo/diff/page.tmpl @@ -9,7 +9,7 @@ <a class="ui floated right blue tiny button" href="{{EscapePound .SourcePath}}"> {{.i18n.Tr "repo.diff.browse_source"}} </a> - <h3>{{RenderCommitMessage false .Commit.Message $.RepoLink $.Repository.ComposeMetas}}{{template "repo/commit_status" .CommitStatus}}</h3> + <h3>{{RenderCommitMessage .Commit.Message $.RepoLink $.Repository.ComposeMetas}}{{template "repo/commit_status" .CommitStatus}}</h3> </div> <div class="ui attached info segment {{if .Commit.Signature}} isSigned {{if .Verification.Verified }} isVerified {{end}}{{end}}"> {{if .Author}} diff --git a/templates/repo/graph.tmpl b/templates/repo/graph.tmpl index 02ce3df280..e8da069a9d 100644 --- a/templates/repo/graph.tmpl +++ b/templates/repo/graph.tmpl @@ -26,7 +26,7 @@ <a href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{.Rev}}">{{ .ShortRev}}</a> </code> <strong> {{.Branch}}</strong> - <em>{{RenderCommitMessage false .Subject $.RepoLink $.Repository.ComposeMetas}}</em> by + <em>{{RenderCommitMessage .Subject $.RepoLink $.Repository.ComposeMetas}}</em> by <span class="author"> {{.Author}} </span> diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl index 7be2183fa8..a2bb72c227 100644 --- a/templates/repo/view_list.tmpl +++ b/templates/repo/view_list.tmpl @@ -27,7 +27,7 @@ </div> {{end}} </a> - <span class="grey has-emoji">{{RenderCommitMessage false .LatestCommit.Summary .RepoLink $.Repository.ComposeMetas}} + <span class="grey has-emoji">{{RenderCommitMessage .LatestCommit.Summary .RepoLink $.Repository.ComposeMetas}} {{template "repo/commit_status" .LatestCommitStatus}}</span> </th> <th class="nine wide"> @@ -75,9 +75,7 @@ </td> {{end}} <td class="message collapsing has-emoji"> - <a rel="nofollow" href="{{$.RepoLink}}/commit/{{$commit.ID}}"> - {{RenderCommitMessage false $commit.Summary $.RepoLink $.Repository.ComposeMetas}} - </a> + {{RenderCommitMessageLink $commit.Summary $.RepoLink (print $.RepoLink "/commit/" $commit.ID) $.Repository.ComposeMetas}} </td> <td class="text grey right age">{{TimeSince $commit.Committer.When $.Lang}}</td> </tr> |