doortts doortts 2017-09-25
pull-request: Show target branch at list
See: Yona Github issue #295
@423de764de77e952f696e4dc50d97179a693e881
app/assets/stylesheets/less/_page.less
--- app/assets/stylesheets/less/_page.less
+++ app/assets/stylesheets/less/_page.less
@@ -7025,8 +7025,20 @@
     color: #e95e01;
     margin-right: 5px;
 }
+
 .subtask-number {
     color: darkgrey;
     font-size: 12px;
     margin-right: 5px;
 }
+
+.to-branch {
+    border: 1px solid;
+    padding: 0 5px;
+}
+
+.to-default-branch {
+    border: 1px solid #03a9f4;
+    padding: 0 5px;
+    color: #03a9f4;
+}
app/views/git/partial_list.scala.html
--- app/views/git/partial_list.scala.html
+++ app/views/git/partial_list.scala.html
@@ -44,7 +44,7 @@
                     @if(!req.commentThreads.isEmpty){
                         @defining(req.countCommentThreadsByState(CommentThread.ThreadState.CLOSED)){ countClosed =>
 
-                        <div class="infos-item" style="margin-right:20px;">
+                        <div class="infos-item" style="margin-right:10px;">
                             <i class="infos-icon yobicon-post2 vmiddle"></i>
                             <div class="upload-progress">
                                 <div class="bar orange" style="width: @getPercent(countClosed.toDouble, req.commentThreads.size.toDouble)%;"></div>
@@ -67,6 +67,11 @@
                             </a>
                         </div>
                     }
+                    @if(branchItemName(project.defaultBranch()) == branchItemName(req.toBranch)) {
+                        <span class="to-default-branch">@branchItemName(req.toBranch)</span>
+                    } else {
+                        <span class="to-branch">@branchItemName(req.toBranch)</span>
+                    }
                 </div>
             </div>
             <div class="span2 hide-in-mobile">
Add a comment
List