aboutsummaryrefslogtreecommitdiff
path: root/templates/repo/commits_table.tmpl
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2017-03-10 16:58:41 -0500
committerUnknwon <u@gogs.io>2017-03-10 16:58:41 -0500
commit8fa6d0d302f487552800ca0d8d60da19b8f99387 (patch)
tree69abff9584dd42d2970a89e4abdb19b9a009107c /templates/repo/commits_table.tmpl
parenta534f9f9b66c63aa08ba61587c3d19a9e952a491 (diff)
repo/pull: handle head repository of merged pull requests deleted
Diffstat (limited to 'templates/repo/commits_table.tmpl')
-rw-r--r--templates/repo/commits_table.tmpl7
1 files changed, 6 insertions, 1 deletions
diff --git a/templates/repo/commits_table.tmpl b/templates/repo/commits_table.tmpl
index 1b26572b..a95cb824 100644
--- a/templates/repo/commits_table.tmpl
+++ b/templates/repo/commits_table.tmpl
@@ -41,7 +41,12 @@
</td>
<td class="message collapsing has-emoji">
- <a rel="nofollow" class="ui sha label" href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{.ID}}">{{ShortSha .ID.String}}</a>
+ {{/* Username or Reponame doesn't present we assume the source repository no longer exists */}}
+ {{if not (and $.Username $.Reponame)}}
+ <span class="ui sha label">{{ShortSha .ID.String}}</span>
+ {{else}}
+ <a rel="nofollow" class="ui sha label" href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{.ID}}">{{ShortSha .ID.String}}</a>
+ {{end}}
<span {{if gt .ParentCount 1}}class="grey text"{{end}}>{{RenderCommitMessage false .Summary $.RepoLink $.Repository.ComposeMetas}}</span>
</td>
<td class="grey text right aligned">{{TimeSince .Author.When $.Lang}}</td>