diff options
author | mrsdizzie <info@mrsdizzie.com> | 2020-05-16 12:38:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-16 19:38:40 +0300 |
commit | b2b86ea8701cab901cd9e6a02c918aa5c61748d6 (patch) | |
tree | 14b590e7681a107ba6f5cf2cabcea8a4a4b4aaa4 /templates/repo/commits_list.tmpl | |
parent | 6603045476e42d24606c82d5a6d740f8c06aa059 (diff) | |
download | gitea-b2b86ea8701cab901cd9e6a02c918aa5c61748d6.tar.gz gitea-b2b86ea8701cab901cd9e6a02c918aa5c61748d6.zip |
Support view individual commit for wiki pages (#11415)
Currently you can see a list of commit history for wiki pages but aren't able to view the commit diff itself. This adds the feature to view an individual commit to a wiki repo.
Closes #8999
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'templates/repo/commits_list.tmpl')
-rw-r--r-- | templates/repo/commits_list.tmpl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/templates/repo/commits_list.tmpl b/templates/repo/commits_list.tmpl index 92da6c1b29..ad2369c042 100644 --- a/templates/repo/commits_list.tmpl +++ b/templates/repo/commits_list.tmpl @@ -39,7 +39,9 @@ {{$class = (printf "%s%s" $class " isWarning")}} {{end}} {{end}} - {{if $.Reponame}} + {{if $.PageIsWiki}} + <a href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/wiki/commit/{{.ID}}" rel="nofollow" class="{{$class}}"> + {{else if $.Reponame}} <a href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{.ID}}" rel="nofollow" class="{{$class}}"> {{else}} <span class="{{$class}}"> |