Commit 6b941cf9 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

merge request list

parent 6d460aa2
No related merge requests found
...@@ -328,12 +328,16 @@ body.project-page table .commit { ...@@ -328,12 +328,16 @@ body.project-page table .commit {
border:none; border:none;
text-shadow:none; text-shadow:none;
&.high { &.inline {
display:inline;
}
&.high, &.closed {
background: #D12F19; background: #D12F19;
color:white; color:white;
} }
&.today { &.today, &.open {
background: #44aa22; background: #44aa22;
color:white; color:white;
} }
...@@ -399,6 +403,19 @@ body.project-page .merge-request-commits a.commit span.update-author{color: #999 ...@@ -399,6 +403,19 @@ body.project-page .merge-request-commits a.commit span.update-author{color: #999
body.project-page .merge-request-commits a.commit span.update-author strong{font-weight: bold; font-style: normal;} body.project-page .merge-request-commits a.commit span.update-author strong{font-weight: bold; font-style: normal;}
/** Update entry **/
.update-data { padding: 0 }
.update-data { width:100%; }
.update-data.ui-box .data { padding:0; }
a.update-item {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;}
a.update-item:last-child{border-bottom: 0}
a.update-item img{float: left; margin-right: 10px;}
a.update-item span.update-title, .dashboard-page .news-feed .project-updates li a span.update-author{display: block;}
a.update-item span.update-title{margin-bottom: 10px}
a.update-item span.update-author{color: #999; font-weight: normal; font-style: italic;}
a.update-item span.update-author strong{font-weight: bold; font-style: normal;}
body.project-page .team_member_new .span-6, .team_member_edit .span-6{ padding:10px 0; } body.project-page .team_member_new .span-6, .team_member_edit .span-6{ padding:10px 0; }
body.projects-page input.text.git-url.project_list_url { width:165px; } body.projects-page input.text.git-url.project_list_url { width:165px; }
......
...@@ -10,7 +10,7 @@ class MergeRequestsController < ApplicationController ...@@ -10,7 +10,7 @@ class MergeRequestsController < ApplicationController
before_filter :authorize_write_project!, :only => [:new, :create, :edit, :update] before_filter :authorize_write_project!, :only => [:new, :create, :edit, :update]
def index def index
@merge_requests = @project.merge_requests.all @merge_requests = @project.merge_requests
end end
def show def show
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
= "Issue ##{@issue.id}" = "Issue ##{@issue.id}"
.right .right
- if @issue.closed - if @issue.closed
%span.tag.high Resolved %span.tag.closed Closed
- else - else
%span.tag.today Open %span.tag.open Open
.data .data
%p= @issue.title %p= @issue.title
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
- if @issue.closed - if @issue.closed
= link_to 'Reopen', project_issue_path(@project, @issue, :issue => {:closed => false }, :status_only => true), :method => :put, :class => "grey-button" = link_to 'Reopen', project_issue_path(@project, @issue, :issue => {:closed => false }, :status_only => true), :method => :put, :class => "grey-button"
- else - else
= link_to 'Resolve', project_issue_path(@project, @issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "grey-button" = link_to 'Close', project_issue_path(@project, @issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "grey-button"
.right .right
= link_to 'Edit', edit_project_issue_path(@project, @issue), :class => "grey-button positive" = link_to 'Edit', edit_project_issue_path(@project, @issue), :class => "grey-button positive"
......
%a.update-item{:href => project_merge_request_path(@project, merge_request)}
= image_tag gravatar_icon(merge_request.author_email), :class => "left", :width => 40
%span.update-title
= merge_request.title
%span.update-author
%strong= merge_request.author_name
authored
= time_ago_in_words(merge_request.created_at)
ago
.right
%span.tag.commit= merge_request.source_branch
&rarr;
%span.tag.commit= merge_request.target_branch
%table - if @merge_requests.opened.count > 0
%thead %div{ :class => "update-data ui-box ui-box-small ui-box-big" }
%th Target branch %h3
%th Source branch %span.tag.open Open
%th Author .data
%th Assignee = render @merge_requests.opened
%th Title
%th
%th
%th
- @merge_requests.each do |merge_request| .clear
%tr %br
%td= merge_request.target_branch
%td= merge_request.source_branch
%td= merge_request.author_id
%td= merge_request.assignee_id
%td= merge_request.title
%td= link_to 'Show', [@project, merge_request]
%td= link_to 'Edit', edit_project_merge_request_path(@project, merge_request)
%td= link_to 'Destroy', [@project, merge_request], :confirm => 'Are you sure?', :method => :delete
%br - if @merge_requests.closed.count > 0
%div{ :class => "update-data ui-box ui-box-small ui-box-big" }
%h3
%span.tag.closed Closed
.data
= render @merge_requests.closed
.clear
%br
= link_to 'New Merge request', new_project_merge_request_path(@project) = link_to 'New Merge request', new_project_merge_request_path(@project), :class => "grey-button"
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
%h3 %h3
= "Merge Request ##{@merge_request.id}:" = "Merge Request ##{@merge_request.id}:"
&nbsp; &nbsp;
= "'#{@merge_request.source_branch}'" .tag.commit.inline= @merge_request.source_branch
&rarr; &rarr;
= "'#{@merge_request.target_branch}'" .tag.commit.inline= @merge_request.target_branch
.right .right
- if @merge_request.closed - if @merge_request.closed
%span.tag.high Resolved %span.tag.high Closed
- else - else
%span.tag.today Open %span.tag.today Open
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
- if @merge_request.closed - if @merge_request.closed
= link_to 'Reopen', project_merge_request_path(@project, @merge_request, :merge_request => {:closed => false }, :status_only => true), :method => :put, :class => "grey-button" = link_to 'Reopen', project_merge_request_path(@project, @merge_request, :merge_request => {:closed => false }, :status_only => true), :method => :put, :class => "grey-button"
- else - else
= link_to 'Resolve', project_merge_request_path(@project, @merge_request, :merge_request => {:closed => true }, :status_only => true), :method => :put, :class => "grey-button" = link_to 'Close', project_merge_request_path(@project, @merge_request, :merge_request => {:closed => true }, :status_only => true), :method => :put, :class => "grey-button"
.right .right
= link_to 'Edit', edit_project_merge_request_path(@project, @merge_request), :class => "grey-button positive" = link_to 'Edit', edit_project_merge_request_path(@project, @merge_request), :class => "grey-button positive"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment