aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Bernloehr <Heiko.Bernloehr@FreeIT.de>2014-02-11 02:44:40 +0100
committerHeiko Bernloehr <Heiko.Bernloehr@FreeIT.de>2014-05-07 02:59:12 +0200
commit1b85be29cb56d6353c504a1bd2888be026c76114 (patch)
tree66b279852a79abd20f3360d109bd9d504c540cb7
parent592d37d72f85037ce41ea58f9f930e608ec338f8 (diff)
downloadecs2-1b85be29cb56d6353c504a1bd2888be026c76114.tar.gz
ecs2-1b85be29cb56d6353c504a1bd2888be026c76114.zip
nginx has trouble with some links
Changed *_url routes to *_path routes. Fixes #2
-rw-r--r--app/controllers/admin/communities_controller.rb4
-rw-r--r--app/controllers/admin/participants_controller.rb2
-rw-r--r--app/views/admin/communities/index_nonparticipants.html.erb6
-rw-r--r--app/views/admin/communities/index_participants.html.erb6
-rw-r--r--app/views/admin/communities/show.html.haml8
-rw-r--r--app/views/admin/participants/edit.html.erb8
-rw-r--r--app/views/admin/participants/index_communities.html.erb6
-rw-r--r--app/views/admin/participants/index_noncommunities.html.erb6
-rw-r--r--app/views/admin/participants/list.html.haml12
-rw-r--r--app/views/admin/ressources/edit.html.erb4
-rw-r--r--app/views/admin/ressources/list.html.haml8
-rw-r--r--app/views/shared/admin/_communities.html.erb6
-rw-r--r--app/views/shared/admin/_participants.html.erb6
13 files changed, 41 insertions, 41 deletions
diff --git a/app/controllers/admin/communities_controller.rb b/app/controllers/admin/communities_controller.rb
index 3d15e0c..7c02725 100644
--- a/app/controllers/admin/communities_controller.rb
+++ b/app/controllers/admin/communities_controller.rb
@@ -23,7 +23,7 @@ class Admin::CommunitiesController < ApplicationController
# GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
verify :method => [ :post, :put, :delete ], :only => [ :destroy, :create, :update, :destroy_participant ],
:add_flash => { :notice => "Failed to execute last action" },
- :redirect_to => :index_admin_communities_url
+ :redirect_to => :index_admin_communities_path
def index
list
@@ -92,7 +92,7 @@ class Admin::CommunitiesController < ApplicationController
# community invites a participant
def create_participant
create_membership(params[:id], params[:p_id])
- redirect_to index_admin_community_nonparticipants_url(:id=>params[:id])
+ redirect_to index_admin_community_nonparticipants_path(:id=>params[:id])
end
end
diff --git a/app/controllers/admin/participants_controller.rb b/app/controllers/admin/participants_controller.rb
index c330a71..1e32b6b 100644
--- a/app/controllers/admin/participants_controller.rb
+++ b/app/controllers/admin/participants_controller.rb
@@ -88,7 +88,7 @@ class Admin::ParticipantsController < ApplicationController
if @participant.update_attributes(params[:participant])
generate_destroyed_events_by_leaving_a_community(@participant,lmsgs) unless lmsgs.blank?
flash[:notice] = 'Participant was successfully updated.'
- redirect_to admin_participant_url(:id => @participant)
+ redirect_to admin_participant_path(:id => @participant)
else
render :action => 'edit'
end
diff --git a/app/views/admin/communities/index_nonparticipants.html.erb b/app/views/admin/communities/index_nonparticipants.html.erb
index f0299b2..3c8fc9d 100644
--- a/app/views/admin/communities/index_nonparticipants.html.erb
+++ b/app/views/admin/communities/index_nonparticipants.html.erb
@@ -20,7 +20,7 @@ License along with ECS. If not, see <http://www.gnu.org/licenses/>.
<h1>Listing Participants to join Community "<%= @community.name+" ("+@community.description+")" %>" </h1>
-<%= link_to 'Back', index_admin_communities_url %><BR><BR>
+<%= link_to 'Back', index_admin_communities_path %><BR><BR>
<%= render(:partial => 'shared/admin/participants',
:locals =>
@@ -29,11 +29,11 @@ License along with ECS. If not, see <http://www.gnu.org/licenses/>.
[
{
:text=>"join Community",
- :map_name_function=>'create_admin_community_participant_url(:id => @community.id, :p_id => participant.id), :method=>:post'
+ :map_name_function=>'create_admin_community_participant_path(:id => @community.id, :p_id => participant.id), :method=>:post'
}
]
}
)
%>
-<BR><%= link_to 'Back', index_admin_communities_url %><BR>
+<BR><%= link_to 'Back', index_admin_communities_path %><BR>
diff --git a/app/views/admin/communities/index_participants.html.erb b/app/views/admin/communities/index_participants.html.erb
index 7366360..0275343 100644
--- a/app/views/admin/communities/index_participants.html.erb
+++ b/app/views/admin/communities/index_participants.html.erb
@@ -20,7 +20,7 @@ License along with ECS. If not, see <http://www.gnu.org/licenses/>.
<h1>Listing Participants of Community "<%= @community.name+" ("+@community.description+")" %>" </h1>
-<%= link_to 'Back', index_admin_communities_url %><BR><BR>
+<%= link_to 'Back', index_admin_communities_path %><BR><BR>
<%= render(:partial => 'shared/admin/participants',
:locals =>
@@ -29,11 +29,11 @@ License along with ECS. If not, see <http://www.gnu.org/licenses/>.
[
{
:text=>"release Participant",
- :map_name_function=>'destroy_admin_community_participant_url(:id => @community.id, :p_id => participant.id), :method=>:delete, :confirm => \'Are you sure?\''
+ :map_name_function=>'destroy_admin_community_participant_path(:id => @community.id, :p_id => participant.id), :method=>:delete, :confirm => \'Are you sure?\''
}
]
}
)
%>
-<BR><%= link_to 'Back', index_admin_communities_url %><BR>
+<BR><%= link_to 'Back', index_admin_communities_path %><BR>
diff --git a/app/views/admin/communities/show.html.haml b/app/views/admin/communities/show.html.haml
index 490da43..b5df2db 100644
--- a/app/views/admin/communities/show.html.haml
+++ b/app/views/admin/communities/show.html.haml
@@ -20,9 +20,9 @@
%h1.box1 Show Community
%p
- = link_to 'Edit', edit_admin_community_url(:id => @community)
+ = link_to 'Edit', edit_admin_community_path(:id => @community)
|
- = link_to 'Back', admin_communities_url
+ = link_to 'Back', admin_communities_path
.normal-skip
%span.box5
@@ -56,7 +56,7 @@
%td(align="right")= participant.mid(@community)
%p
- = link_to 'Edit', edit_admin_community_url(:id => @community)
+ = link_to 'Edit', edit_admin_community_path(:id => @community)
|
- = link_to 'Back', admin_communities_url
+ = link_to 'Back', admin_communities_path
diff --git a/app/views/admin/participants/edit.html.erb b/app/views/admin/participants/edit.html.erb
index b454db5..0f3b322 100644
--- a/app/views/admin/participants/edit.html.erb
+++ b/app/views/admin/participants/edit.html.erb
@@ -21,8 +21,8 @@ License along with ECS. If not, see <http://www.gnu.org/licenses/>.
<h1 class="box1">Edit Participant</h1>
<P>
-<%= link_to 'Show', admin_participant_url(:id => @participant) %> |
-<%= link_to 'Back', admin_participants_url %>
+<%= link_to 'Show', admin_participant_path(:id => @participant) %> |
+<%= link_to 'Back', admin_participants_path %>
</P>
<P>
<% form_for [:admin, setup_participant(@participant)], :method=>:put do |f| %>
@@ -33,6 +33,6 @@ License along with ECS. If not, see <http://www.gnu.org/licenses/>.
</P>
<P>
-<%= link_to 'Show', admin_participant_url(:id => @participant) %> |
-<%= link_to 'Back', admin_participants_url %>
+<%= link_to 'Show', admin_participant_path(:id => @participant) %> |
+<%= link_to 'Back', admin_participants_path %>
</P>
diff --git a/app/views/admin/participants/index_communities.html.erb b/app/views/admin/participants/index_communities.html.erb
index ece68b2..1434700 100644
--- a/app/views/admin/participants/index_communities.html.erb
+++ b/app/views/admin/participants/index_communities.html.erb
@@ -20,7 +20,7 @@ License along with ECS. If not, see <http://www.gnu.org/licenses/>.
<h1>Listing Communities of Participant "<%= @participant.name %>" </h1>
-<%= link_to 'Back', index_admin_participants_url %><BR><BR>
+<%= link_to 'Back', index_admin_participants_path %><BR><BR>
<%= render(:partial => 'shared/admin/communities',
:locals =>
@@ -29,12 +29,12 @@ License along with ECS. If not, see <http://www.gnu.org/licenses/>.
[
{
:text=>"leave Community",
- :map_name_function=>'destroy_admin_participant_community_url(:id => @participant.id, :c_id => community.id), :method=>:delete, :confirm => \'Are you sure?\''
+ :map_name_function=>'destroy_admin_participant_community_path(:id => @participant.id, :c_id => community.id), :method=>:delete, :confirm => \'Are you sure?\''
}
]
}
)
%>
-<BR><%= link_to 'Back', index_admin_participants_url %><BR>
+<BR><%= link_to 'Back', index_admin_participants_path %><BR>
diff --git a/app/views/admin/participants/index_noncommunities.html.erb b/app/views/admin/participants/index_noncommunities.html.erb
index ca61140..cea40e8 100644
--- a/app/views/admin/participants/index_noncommunities.html.erb
+++ b/app/views/admin/participants/index_noncommunities.html.erb
@@ -20,7 +20,7 @@ License along with ECS. If not, see <http://www.gnu.org/licenses/>.
<h1>Listing Communities to join for Participant "<%= @participant.name %>" </h1>
-<%= link_to 'Back', index_admin_participants_url %><BR><BR>
+<%= link_to 'Back', index_admin_participants_path %><BR><BR>
<%= render(:partial => 'shared/admin/communities',
:locals =>
@@ -29,12 +29,12 @@ License along with ECS. If not, see <http://www.gnu.org/licenses/>.
[
{
:text=>"join Community",
- :map_name_function=>'create_admin_participant_community_url(:id => @participant.id, :c_id => community.id), :method=>:post'
+ :map_name_function=>'create_admin_participant_community_path(:id => @participant.id, :c_id => community.id), :method=>:post'
}
]
}
)
%>
-<BR><%= link_to 'Back', index_admin_participants_url %><BR>
+<BR><%= link_to 'Back', index_admin_participants_path %><BR>
diff --git a/app/views/admin/participants/list.html.haml b/app/views/admin/participants/list.html.haml
index ea294e1..0d426ce 100644
--- a/app/views/admin/participants/list.html.haml
+++ b/app/views/admin/participants/list.html.haml
@@ -19,11 +19,11 @@
%h1.box1 Listing Participants (#{@list_participants_count.to_s})
-.text-link= link_to 'New participant', new_admin_participant_url
+.text-link= link_to 'New participant', new_admin_participant_path
- if @list_anonymous
- .text-link= link_to "Hide anonymous (#{@list_participants_anonymous_count})", admin_participants_url(:anonymous => "false")
+ .text-link= link_to "Hide anonymous (#{@list_participants_anonymous_count})", admin_participants_path(:anonymous => "false")
- else
- .text-link= link_to "Show anonymous (#{@list_participants_anonymous_count})", admin_participants_url(:anonymous => "true")
+ .text-link= link_to "Show anonymous (#{@list_participants_anonymous_count})", admin_participants_path(:anonymous => "true")
%p
%table.list
@@ -51,7 +51,7 @@
%td.center= check_box_tag "participant[community_selfrouting]",1,participant.community_selfrouting, :disabled => true
%td.center= check_box_tag "participant[events_]",1,participant.events_, :disabled => true
%td
- = link_to 'Show', admin_participant_url(:id => participant)
- = link_to 'Edit', edit_admin_participant_url(:id => participant)
- = link_to 'Destroy', admin_participant_url(:id => participant),:confirm => 'Are you sure?', :method => :delete
+ = link_to 'Show', admin_participant_path(:id => participant)
+ = link_to 'Edit', edit_admin_participant_path(:id => participant)
+ = link_to 'Destroy', admin_participant_path(:id => participant),:confirm => 'Are you sure?', :method => :delete
- org_printed= true
diff --git a/app/views/admin/ressources/edit.html.erb b/app/views/admin/ressources/edit.html.erb
index 789a3d3..d225c58 100644
--- a/app/views/admin/ressources/edit.html.erb
+++ b/app/views/admin/ressources/edit.html.erb
@@ -22,7 +22,7 @@ License along with ECS. If not, see <http://www.gnu.org/licenses/>.
<P>
<%= link_to 'Show', admin_ressource_path(@ressource) %> |
-<%= link_to 'Back', admin_ressources_url %>
+<%= link_to 'Back', admin_ressources_path %>
</P>
<P>
@@ -35,5 +35,5 @@ License along with ECS. If not, see <http://www.gnu.org/licenses/>.
<P>
<%= link_to 'Show', admin_ressource_path(@ressource) %> |
-<%= link_to 'Back', admin_ressources_url %>
+<%= link_to 'Back', admin_ressources_path %>
</P>
diff --git a/app/views/admin/ressources/list.html.haml b/app/views/admin/ressources/list.html.haml
index ca18e28..77cf336 100644
--- a/app/views/admin/ressources/list.html.haml
+++ b/app/views/admin/ressources/list.html.haml
@@ -19,7 +19,7 @@
%h1.box1 Listing Ressources (#{@list_ressources_count.to_s})
-.text-link= link_to 'New resource', new_admin_ressource_url
+.text-link= link_to 'New resource', new_admin_ressource_path
%p
%table.list
@@ -45,7 +45,7 @@
%td.center= check_box_tag "ressource[postroute]",1,ressource.postroute, :disabled => true
%td.center= check_box_tag "ressource[events]",1,ressource.events, :disabled => true
%td
- = link_to 'Show', admin_ressource_url(:id => ressource)
- = link_to 'Edit', edit_admin_ressource_url(:id => ressource)
- = link_to 'Destroy', admin_ressource_url(:id => ressource), :confirm => 'Are you sure?', :method => :delete
+ = link_to 'Show', admin_ressource_path(:id => ressource)
+ = link_to 'Edit', edit_admin_ressource_path(:id => ressource)
+ = link_to 'Destroy', admin_ressource_path(:id => ressource), :confirm => 'Are you sure?', :method => :delete
- ns_printed= true
diff --git a/app/views/shared/admin/_communities.html.erb b/app/views/shared/admin/_communities.html.erb
index d98b941..5204d9a 100644
--- a/app/views/shared/admin/_communities.html.erb
+++ b/app/views/shared/admin/_communities.html.erb
@@ -34,9 +34,9 @@ License along with ECS. If not, see <http://www.gnu.org/licenses/>.
<TD>
- <%= link_to 'Show', show_admin_community_url(:id => community) %>
- <%= link_to 'Edit', edit_admin_community_url(:id => community) %>
- <%= link_to 'Destroy', destroy_admin_community_url(:id => community), :confirm => 'Are you sure?', :method => :delete %><BR>
+ <%= link_to 'Show', show_admin_community_path(:id => community) %>
+ <%= link_to 'Edit', edit_admin_community_path(:id => community) %>
+ <%= link_to 'Destroy', destroy_admin_community_path(:id => community), :confirm => 'Are you sure?', :method => :delete %><BR>
<% if defined? links then -%>
<% links.each do |link| %>
<%= eval "link_to \"#{link[:text]}\", #{link[:map_name_function]}" %>
diff --git a/app/views/shared/admin/_participants.html.erb b/app/views/shared/admin/_participants.html.erb
index baf7478..76a9896 100644
--- a/app/views/shared/admin/_participants.html.erb
+++ b/app/views/shared/admin/_participants.html.erb
@@ -35,9 +35,9 @@ License along with ECS. If not, see <http://www.gnu.org/licenses/>.
<TD>
- <%= link_to 'Show', show_admin_participant_url(:id => participant) %>
- <%= link_to 'Edit', edit_admin_participant_url(:id => participant) %>
- <%= link_to 'Destroy', destroy_admin_participant_url(:id => participant), :confirm => 'Are you sure?', :method => :post %><BR>
+ <%= link_to 'Show', show_admin_participant_path(:id => participant) %>
+ <%= link_to 'Edit', edit_admin_participant_path(:id => participant) %>
+ <%= link_to 'Destroy', destroy_admin_participant_path(:id => participant), :confirm => 'Are you sure?', :method => :post %><BR>
<% if defined? links then -%>
<% links.each do |link| %>
<%= eval "link_to \"#{link[:text]}\", #{link[:map_name_function]}" %>