Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

Commit

Permalink
Merge branch yobi-918 of laziel/yobi
Browse files Browse the repository at this point in the history
from pull request 611
  • Loading branch information
insanehong committed Feb 13, 2014
2 parents 3937957 + 8b6e5e4 commit 882d203
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 97 deletions.
117 changes: 60 additions & 57 deletions app/assets/stylesheets/less/_page.less
Original file line number Diff line number Diff line change
Expand Up @@ -2598,63 +2598,6 @@

}

/** pullRequest view **/
.commit-list {
list-style:none;
padding:0;
margin:0;

.commit-info {
padding:10px 5px;

.commit-id {
float:left;
color:#51aacc;
width: 70px;
text-align: center;
}

.commitMsg {
&.short {
margin:0;
vertical-align: middle;
padding:5px;
}
&.desc {
margin-left:80px;
}
}

&:nth-child(even) {
border-top:1px solid #BDC3C7;
border-bottom:1px solid #BDC3C7;
}

&:last-child {
border-bottom:0;
}

}

.outdated {
text-decoration:line-through;

a { text-decoration:line-through;}
}

.avatar-wrap {
margin-top:-2px;
float:right;
margin-right:5px;
}

.date {
float:right;
margin-right:15px;
margin-top:3px;
}
}

.comment-body {
font-size: 13px;
padding:0 15px;
Expand Down Expand Up @@ -2736,6 +2679,66 @@
font-size: 11px;
color: #aaa;
}

/** pullRequest view **/
.commit-list {
list-style:none;
padding:0;
margin:10px 0 0 102px;
border:1px solid #ddd;
background:#fdfdfd;
.border-radius(3px);

.commit-info {
padding:10px 5px;

.commit-id {
float:left;
color:#51aacc;
width: 70px;
text-align: center;
}

.commitMsg {
&.short {
margin:0;
vertical-align: middle;
padding:5px;
}
&.desc {
margin-left:80px;
}
}

&:nth-child(even) {
border-top:1px solid #eee;
border-bottom:1px solid #eee;
}

&:last-child {
border-bottom:0;
}

}

.outdated {
text-decoration:line-through;

a { text-decoration:line-through;}
}

.avatar-wrap {
margin-top:-2px;
float:right;
margin-right:5px;
}

.date {
float:right;
margin-right:15px;
margin-top:3px;
}
}
}
}

Expand Down
69 changes: 29 additions & 40 deletions app/views/git/partial_pull_request_event.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,49 +99,38 @@
}

case EventType.PULL_REQUEST_COMMIT_CHANGED => {
<li class="comment @isAuthorComment(event.senderLoginId)" id="comment-@event.id">
<div class="comment-avatar">
<a href="@routes.UserApp.userInfo(event.senderLoginId)" class="avatar-wrap" data-toggle="tooltip" data-placement="top" title="@User.findByLoginId(event.senderLoginId).name">
<img src="@User.findByLoginId(event.senderLoginId).avatarUrl" width="32" height="32" alt="@User.findByLoginId(event.senderLoginId).name">
</a>
</div>
<div class="media-body">
<div class="meta-info">
<span class="comment_author pull-left">
<a href="@routes.UserApp.userInfo(event.senderLoginId)" data-toggle="tooltip" data-placement="top" title="@User.findByLoginId(event.senderLoginId).name">
<strong>@event.senderLoginId @Messages("pullRequest.event.commit")</strong>
</a>
</span>
<span class="ago">@momentFromNow(event.created, lang.language)</span>
@if(event.oldValue != null) {
<span>
<a class="ybtn ybtn-mini" href="@urlToCompare(pull.toProject, event.oldValue)">@Messages("pullRequest.additional.changes")</a>
</span>
}
</div>
<ul class="commit-list">
@for(commit <- event.getPullRequestCommits) {
<li class="comment-body commit-info @if(commit.state == PullRequestCommit.State.PRIOR){ outdated }">
@defining(User.findByEmail(commit.authorEmail)) { author =>
<a href="@routes.PullRequestApp.commitView(pull.toProject.owner, pull.toProject.name, pull.number, commit.commitId)" class="commit-id">
@commit.commitShortId
</a>
@if(!author.isAnonymous()) {
<a href="@routes.UserApp.userInfo(author.loginId)" class="avatar-wrap small" data-toggle="tooltip" data-placement="top" title="@User.findByLoginId(author.loginId).name">
<img src="@author.avatarUrl" alt="@author.name"> @commit.authorEmail
</a>
<div class="date">@utils.TemplateHelper.agoString(ago(commit.authorDate))</div>
} else {
<img src="@urlToPicture(commit.getAuthorEmail, 32)" class="avatar-wrap small">
}
<li class="event" id="comment-@event.id">
<span class="state changed">@Messages("pullRequest.event.commit")</span>
@Html(Messages("pullRequest.event.message.commit", linkToUser(user.loginId, user.name)))
<span class="date">
<a href="#event-@event.id">@momentFromNow(event.getDate(), lang.language)</a>
</span>
@if(event.oldValue != null) {
<a href="@urlToCompare(pull.toProject, event.oldValue)" class="ybtn ybtn-mini">@Messages("pullRequest.additional.changes")</a>
}

@common.commitMsg(commit.commitMessage.split("\n")(0), commit.commitMessage,
routes.PullRequestApp.commitView(pull.toProject.owner, pull.toProject.name, pull.number, commit.commitId).toString)
<ul class="commit-list">
@for(commit <- event.getPullRequestCommits) {
<li class="comment-body commit-info @if(commit.state == PullRequestCommit.State.PRIOR){ outdated }">
@defining(User.findByEmail(commit.authorEmail)) { author =>
<a href="@routes.PullRequestApp.commitView(pull.toProject.owner, pull.toProject.name, pull.number, commit.commitId)" class="commit-id">
@commit.commitShortId
</a>
@if(!author.isAnonymous()) {
<a href="@routes.UserApp.userInfo(author.loginId)" class="avatar-wrap small" data-toggle="tooltip" data-placement="top" title="@User.findByLoginId(author.loginId).name">
<img src="@author.avatarUrl" alt="@author.name"> @commit.authorEmail
</a>
<div class="date">@utils.TemplateHelper.agoString(ago(commit.authorDate))</div>
} else {
<img src="@urlToPicture(commit.getAuthorEmail, 32)" class="avatar-wrap small">
}
</li>

@common.commitMsg(commit.commitMessage.split("\n")(0), commit.commitMessage,
routes.PullRequestApp.commitView(pull.toProject.owner, pull.toProject.name, pull.number, commit.commitId).toString)
}
</ul>
</div>
</li>
}
</ul>
</li>
}
case _ => {
Expand Down
1 change: 1 addition & 0 deletions conf/messages
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ pullRequest.event.message.merged = {0} merged commit ({1})
pullRequest.event.message.open = {0} opened a pull request.
pullRequest.event.message.rejected = {0} postponed a pull request.
pullRequest.event.message.resolved = Conflict has been resolved.
pullRequest.event.message.commit = {0} has commited.
pullRequest.event.open = Open
pullRequest.event.rejected = Postponed
pullRequest.event.resolved = Resolved
Expand Down
1 change: 1 addition & 0 deletions conf/messages.ko
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ pullRequest.event.message.merged = {0} 님이 이 코드를 병합했습니다.
pullRequest.event.message.open = {0} 님이 이 요청을 열었습니다.
pullRequest.event.message.rejected = {0} 님이 이 코드를 보류했습니다.
pullRequest.event.message.resolved = 보낸 코드의 충돌이 해결되었습니다.
pullRequest.event.message.commit = {0} 님이 코드를 커밋했습니다.
pullRequest.event.open = 열림
pullRequest.event.rejected = 보류
pullRequest.event.resolved = 충돌 해결
Expand Down

0 comments on commit 882d203

Please sign in to comment.