diff options
author | mrsdizzie <info@mrsdizzie.com> | 2019-12-03 13:15:41 -0500 |
---|---|---|
committer | techknowlogick <techknowlogick@gitea.io> | 2019-12-03 13:15:41 -0500 |
commit | bdbdd6608f38819786c8447f6aa6fd45694ce37a (patch) | |
tree | 57292fd6a46e9201bdb477e62d9afff259f2211f | |
parent | 18236973e9be8d8dd64a594fbf6db0901ba2ea9a (diff) | |
download | gitea-bdbdd6608f38819786c8447f6aa6fd45694ce37a.tar.gz gitea-bdbdd6608f38819786c8447f6aa6fd45694ce37a.zip |
Don't link wiki revision to commit (#9244)
In #7907 a change was made to use the same template for repo and wiki
commit lists. However, there is no code or logic for showing the diff of
a wiki commit so it just produces broken links like:
http://localhost:3000/mrsdizzie/%!s(%3Cnil%3E)/commit/5e72eeb00896d3853ab22a01950a50119b249567
This just removes the link for now until that feature is implemented
-rw-r--r-- | templates/repo/commits_list.tmpl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/templates/repo/commits_list.tmpl b/templates/repo/commits_list.tmpl index dee9dab2b5..010c3b227a 100644 --- a/templates/repo/commits_list.tmpl +++ b/templates/repo/commits_list.tmpl @@ -65,8 +65,12 @@ </td> <td class="message"> <span class="message-wrapper"> + {{if $.PageIsWiki}} + <span class="commit-summary has-emoji{{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{.Summary}}</span> + {{else }} {{ $commitLink:= printf "%s/%s/%s/commit/%s" AppSubUrl $.Username $.Reponame .ID }} <span class="commit-summary has-emoji{{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{RenderCommitMessageLinkSubject .Message $.RepoLink $commitLink $.Repository.ComposeMetas}}</span> + {{end}} </span> {{if IsMultilineCommitMessage .Message}} <button class="basic compact mini ui icon button commit-button"><i class="ellipsis horizontal icon"></i></button> |