[refs #90] comments for pull requests (slow version)
This commit is contained in:
parent
8478ca405f
commit
91bf65d65d
|
@ -55,6 +55,10 @@ class Projects::IssuesController < Projects::BaseController
|
|||
end
|
||||
end
|
||||
|
||||
def show
|
||||
redirect_to project_pull_request_path(@project, @issue.pull_request) if @issue.pull_request
|
||||
end
|
||||
|
||||
def update
|
||||
if params[:issue] && status = params[:issue][:status]
|
||||
action = 'status'
|
||||
|
|
|
@ -3,7 +3,8 @@ class PullRequest < ActiveRecord::Base
|
|||
belongs_to :issue, :autosave => true, :dependent => :destroy, :touch => true, :validate => true
|
||||
belongs_to :base_project, :class_name => 'Project', :foreign_key => 'base_project_id'
|
||||
belongs_to :head_project, :class_name => 'Project', :foreign_key => 'head_project_id'
|
||||
delegate :user, :title, :body, :serial_id, :assignee, :status, :to_param, :created_at, :updated_at, :to => :issue, :allow_nil => true
|
||||
delegate :user, :title, :body, :serial_id, :assignee, :status, :to_param,
|
||||
:created_at, :updated_at, :comments, :to => :issue, :allow_nil => true
|
||||
|
||||
validate :uniq_merge
|
||||
validates_each :head_ref, :base_ref do |record, attr, value|
|
||||
|
|
|
@ -41,9 +41,13 @@
|
|||
.both
|
||||
=f.submit t('layout.update'), :id => 'update_pull_content'
|
||||
=link_to t('layout.issues.cancel_button'), '#', :id => 'cancel_edit_pull_content', :class => 'button'
|
||||
= render "projects/comments/list", :list => @issue.comments, :project => @project, :commentable => @issue
|
||||
%br
|
||||
= render "projects/comments/add", :project => @project, :commentable => @issue if current_user
|
||||
- if can? :merge, @pull
|
||||
%br
|
||||
=form_for PullRequest.new, :url => merge_project_pull_request_path(@project, @pull), :html => { :method => :put, :class => :form } do |f|
|
||||
=f.submit t 'projects.pull_requests.merge'
|
||||
|
||||
=render 'diff_commits_tabs' if @pull.status != 'already'
|
||||
|
||||
|
|
Loading…
Reference in New Issue