rosa-build/app/views/projects/pull_requests/new.html.haml

43 lines
2.3 KiB
Plaintext
Raw Normal View History

2012-07-16 17:27:41 +01:00
-ar = 'activerecord.attributes.pull_requests'
-set_meta_tags :title => [title_object(@project), t('.title')]
2012-05-04 11:56:11 +01:00
= render :partial => 'submenu'
%h3.bpadding10=pull_header @pull
#repo-wrapper
2012-07-16 17:27:41 +01:00
=render 'nav_tabs'
.tab-content.pull_diff_fix
#discussion.tab-pane.active
2012-08-08 18:57:03 +01:00
=hidden_field_tag :update_action, new_project_pull_request_path
=form_for @pull, :url => (@pull.already? ? new_project_pull_request_path : project_pull_requests_path), :html => {:class => 'well well-large', :method => (@pull.already? ? :get : :post)} do |f|
2012-09-28 18:46:02 +01:00
2012-10-03 12:36:04 +01:00
.leftlist=f.label :from_project, t("#{ar}.from_project"), :class => :label
2012-09-28 18:46:02 +01:00
%div
2012-10-03 12:36:04 +01:00
.l=text_field_tag :from_project, @pull.from_project.name_with_owner, :readonly => :readonly, :style => 'background-color: #DDD;'
=render 'ref_select', :kind => 'from', :project => @pull.from_project, :current => @pull.from_ref
.both
2012-10-03 12:36:04 +01:00
.leftlist=f.label :to_project, t("#{ar}.to_project"), :class => :label
2012-09-28 18:46:02 +01:00
%div
2012-10-03 12:36:04 +01:00
.l=f.autocomplete_field :to_project, autocomplete_to_project_project_pull_requests_path, :value => @pull.to_project.name_with_owner, :id_element => 'pull_request_to_project_id', :name => 'to_project'
=render 'ref_select', :kind => 'to', :project => @pull.to_project, :current => @pull.to_ref
2012-07-06 18:30:01 +01:00
.both
2012-09-28 18:46:02 +01:00
.leftlist.big-list
.rightlist=f.submit t('.update'), :class => 'btn btn-primary disabled', 'data-loading-text' => t('layout.processing'), :style => @pull.already? ? '' : 'display: none;', :id => 'update_pull'
.both
-unless @pull.already?
=f.fields_for :issue do |issue|
2012-10-01 17:42:16 +01:00
=render 'projects/issues/title_body', :f => issue, :id => 'new'
2012-09-28 18:46:02 +01:00
.leftlist.big-list=f.label :title, t('activerecord.attributes.issue.status'), :class => :label
.rightlist
.flash
%div{:class => @pull.ready? ? 'notice' : 'alert'}
=pull_status @pull
.both
2012-09-28 18:46:02 +01:00
.leftlist.big-list
.rightlist
=f.submit t('.submit'), :class => 'btn btn-primary disabled', 'data-loading-text' => t('layout.processing'), :id => 'create_pull' unless @pull.already?
.both
=render 'diff_commits_tabs' if !@pull.already? && @stats != nil
2012-07-06 18:30:01 +01:00
2012-10-01 17:42:16 +01:00
=hidden_field_tag :preview_url, project_md_preview_path(@project)
= render "projects/comments/markdown_help"