[refs #90] change route
This commit is contained in:
parent
4040a486fe
commit
3e0ebdc929
|
@ -16,4 +16,14 @@
|
||||||
%li= link_to t("project_menu.readme"), "#" #pending
|
%li= link_to t("project_menu.readme"), "#" #pending
|
||||||
- if can? :update, @project
|
- if can? :update, @project
|
||||||
%li= link_to t("project_menu.settings"), edit_project_path(@project), :class => (act == :edit && contr == :projects ? 'active' : nil)
|
%li= link_to t("project_menu.settings"), edit_project_path(@project), :class => (act == :edit && contr == :projects ? 'active' : nil)
|
||||||
%li= link_to t("project_menu.pull_requests"), project_pull_requests_path(@project), :class => (contr == :pull_requests ? 'active' : nil)
|
%li=link_to t("project_menu.pull_requests"), '#', :class => (contr == :pull_requests ? 'active' : nil), :id => 'send_pull_request'
|
||||||
|
|
||||||
|
=form_for PullRequest.new, :url => new_project_pull_requests_path, :html => { :method => :post, :class => :form } do |f|
|
||||||
|
=hidden_field_tag :ref, @treeish
|
||||||
|
|
||||||
|
:javascript
|
||||||
|
$(function () {
|
||||||
|
$('#send_pull_request').click(function(){
|
||||||
|
$('#new_pull_request').submit();
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
%a{:name => h(commit_diff.a_path)}
|
%a{:name => h(commit_diff.a_path)}
|
||||||
.top
|
.top
|
||||||
.l= h(commit_diff.a_path)
|
.l= h(commit_diff.a_path)
|
||||||
-# if commit_diff.b_path.present?
|
- if commit_diff.b_path.present?
|
||||||
.r= link_to "view file @ #{short_hash_id(commit_id)}", blob_path(@project, commit_id, commit_diff.b_path)
|
.r= link_to "view file @ #{short_hash_id(commit_id)}", blob_path(@project, commit_id, commit_diff.b_path)
|
||||||
.clear
|
.clear
|
||||||
|
|
||||||
|
|
|
@ -163,7 +163,10 @@ Rosa::Application.routes.draw do
|
||||||
resources :collaborators do
|
resources :collaborators do
|
||||||
get :find, :on => :collection
|
get :find, :on => :collection
|
||||||
end
|
end
|
||||||
resources :pull_requests, :except => :destroy
|
resources :pull_requests, :except => [:destroy, :new] do
|
||||||
|
post '/new' => 'pull_requests#new', :on => :collection
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
scope ':project_name', :module => 'projects' do
|
scope ':project_name', :module => 'projects' do
|
||||||
# Resource
|
# Resource
|
||||||
|
|
Loading…
Reference in New Issue