mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-12 00:15:50 +01:00
Improve comparing view
This commit is contained in:
@@ -4,7 +4,37 @@
|
|||||||
@import context._
|
@import context._
|
||||||
@import gitbucket.core.view.helpers._
|
@import gitbucket.core.view.helpers._
|
||||||
@import gitbucket.core.model._
|
@import gitbucket.core.model._
|
||||||
<div class="box">
|
<div class="box" style="margin-bottom: 20px;">
|
||||||
|
@commits.map { day =>
|
||||||
|
<div style="margin-top: 8px; margin-bottom: 8px;" class="muted">
|
||||||
|
Commits on @date(day.head.commitTime)
|
||||||
|
</div>
|
||||||
|
<table style="width: 98%; margin-left: 4px; margin-right: 4px;" align="center">
|
||||||
|
@day.map { commit =>
|
||||||
|
<tr>
|
||||||
|
<td style="width: 20%;">
|
||||||
|
<i class="octicon octicon-git-commit"></i>
|
||||||
|
@avatar(commit, 20)
|
||||||
|
@user(commit.authorName, commit.authorEmailAddress, "username strong")
|
||||||
|
</td>
|
||||||
|
<td><span class="monospace">@commit.shortMessage</span></td>
|
||||||
|
@*
|
||||||
|
<span class="badge" style="display: inline">@if(comments.isDefined){
|
||||||
|
@comments.get.flatMap @{
|
||||||
|
case comment: CommitComment => Some(comment)
|
||||||
|
case other => None
|
||||||
|
}.count(t => t.commitId == commit.id && !t.pullRequest)
|
||||||
|
}</span>
|
||||||
|
*@
|
||||||
|
<td style="width: 10%; text-align: right;">
|
||||||
|
<a href="@url(repository)/commit/@commit.id" class="monospace">@commit.id.substring(0, 7)</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
</table>
|
||||||
|
}
|
||||||
|
|
||||||
|
@*
|
||||||
<table class="table table-file-list" style="border: 1px solid silver;">
|
<table class="table table-file-list" style="border: 1px solid silver;">
|
||||||
@commits.map { day =>
|
@commits.map { day =>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -32,4 +62,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</table>
|
</table>
|
||||||
|
*@
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -90,6 +90,34 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
} else {
|
} else {
|
||||||
|
<div style="margin-bottom: 10px;" class="box-content">
|
||||||
|
<table class="fill-width">
|
||||||
|
<tr>
|
||||||
|
<td style="width: 25%; text-align: center;">
|
||||||
|
<i class="octicon octicon-commit"></i>
|
||||||
|
@defining(commits.flatten){ commits =>
|
||||||
|
<strong>@commits.size</strong> @plural(commits.size, "commit")
|
||||||
|
}
|
||||||
|
</td>
|
||||||
|
<td style="width: 25%; text-align: center;">
|
||||||
|
<i class="octicon octicon-diff"></i>
|
||||||
|
<strong>@diffs.size</strong> @plural(diffs.size, "file") changed
|
||||||
|
</td>
|
||||||
|
<td style="width: 25%; text-align: center;">
|
||||||
|
<i class="octicon octicon-comment"></i>
|
||||||
|
@defining(comments.collect { case c: gitbucket.core.model.CommitComment => c }){ comments =>
|
||||||
|
<strong>@comments.size</strong> commit @plural(comments.size, "comment")
|
||||||
|
}
|
||||||
|
</td>
|
||||||
|
<td style="width: 25%; text-align: center;">
|
||||||
|
<i class="octicon octicon-organization"></i>
|
||||||
|
@defining(commits.flatMap(_.map(_.authorEmailAddress)).distinct){ contributors =>
|
||||||
|
<strong>@contributors.size</strong> @plural(contributors.size, "contributor")
|
||||||
|
}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
@pulls.html.commits(commits, Some(comments), repository)
|
@pulls.html.commits(commits, Some(comments), repository)
|
||||||
@helper.html.diff(diffs, repository, Some(commitId), Some(sourceId), true, None, hasWritePermission, false)
|
@helper.html.diff(diffs, repository, Some(commitId), Some(sourceId), true, None, hasWritePermission, false)
|
||||||
<p>Showing you all comments on commits in this comparison.</p>
|
<p>Showing you all comments on commits in this comparison.</p>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
@html.menu("code", repository){
|
@html.menu("code", repository){
|
||||||
<table class="table table-bordered">
|
<table class="table table-bordered">
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th class="box-header">
|
||||||
<div class="pull-right align-right">
|
<div class="pull-right align-right">
|
||||||
<a href="@url(repository)/tree/@commit.id" class="btn btn-small">Browse code</a>
|
<a href="@url(repository)/tree/@commit.id" class="btn btn-small">Browse code</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user