File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
@**
* Yobi, Project Hosting SW
*
* Copyright 2014 NAVER Corp.
* http://yobi.io
*
* @author Jihan Kim
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**@
@(project: Project, pullRequest:models.PullRequest, commits: List[playRepository.GitCommit], conflict: Boolean)
@import utils.JodaDateUtil
@import utils.TemplateHelper._
@import utils.AccessControl._
@import models.enumeration
@import playRepository.GitCommit
@import scala.collection.Map
@if(conflict != null) {
<div id="mergeResult" class="code-browser-wrap"
data-commits="@commits.size"
data-pullrequest-title="@pullRequest.title"
data-pullrequest-body="@pullRequest.body"
@if(!commits.isEmpty){
data-conflict="@conflict"
}
>
@if(commits.isEmpty) {
<div>
<h5>@Messages("pullRequest.diff.noChanges")</h5>
</div>
} else {
<div class="commit-wrap">
<table class="code-table commits">
<thead class="thead">
<tr>
<td class="commit-id"><strong>@{"@"}</strong></td>
<td class="messages"><strong>@Messages("code.commitMsg")</strong></td>
<td class="date"><strong>@Messages("code.commitDate")</strong></td>
<td class="author"><strong>@Messages("code.author")</strong></td>
</tr>
</thead>
<tbody class="tbody">
@for(commit <- commits){
<tr>
<td class="commit-id">
<a href="@routes.CodeHistoryApp.show(pullRequest.fromProject.owner, pullRequest.fromProject.name, commit.getId)">
@commit.getShortId
</a>
</td>
<td class="messages">
@defining(CommitComment.count(pullRequest.fromProject, commit.getId, null)){ numOfComment =>
@if(numOfComment > 0) {
<span class="number-of-comments"><i class="yobicon-comments"></i> @numOfComment</span>
}
}
@defining(commit.getMessage){ commitMsg =>
@common.commitMsg(commitMsg.split("\n")(0),
commitMsg,
routes.CodeHistoryApp.show(pullRequest.fromProject.owner, pullRequest.fromProject.name, commit.getId).toString())
}
</td>
<td class="date" title="@JodaDateUtil.getDateString(commit.getAuthorDate)">
@agoOrDateString(commit.getAuthorDate)
</td>
<td class="author @commit.getAuthorEmail">
@defining(User.find.where.eq("email", commit.getAuthorEmail).findUnique) { user =>
@if(user != null) {
<a href="@routes.UserApp.userInfo(user.loginId)" class="avatar-wrap">
<img src="@user.avatarUrl" alt="@user.name" width="32" height="32"/>
</a>
} else {
<div class="avatar-wrap">
<img src="@urlToPicture(commit.getAuthorEmail, 32)" width="32" height="32"/>
</div>
}
}
</td>
</tr>
}
</tbody>
</table>
</div>
}
</div>
}