summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhukl <contact@smyck.org>2009-03-08 22:47:45 +0100
committerhukl <contact@smyck.org>2009-03-08 22:47:45 +0100
commit1236567886d4f81cb6d3d4d8017a543c27a66e12 (patch)
tree63dde8094551226707a3775d0db14ef4006166dc
parent00fe407be045a5b6cf8269965c0fd35a44094741 (diff)
enhanced the link_to_path helper and fixed the menu links
-rw-r--r--app/helpers/link_helper.rb13
-rw-r--r--app/views/layouts/application.html.erb6
2 files changed, 11 insertions, 8 deletions
diff --git a/app/helpers/link_helper.rb b/app/helpers/link_helper.rb
index 68586c1..33d8a06 100644
--- a/app/helpers/link_helper.rb
+++ b/app/helpers/link_helper.rb
@@ -1,11 +1,14 @@
1module LinkHelper 1module LinkHelper
2 2
3 def link_to_path path 3 def link_to_path title, path
4 url_for( 4 params[:locale] ||= I18n.locale
5
6 link_to(
7 title,
5 :controller => :content, 8 :controller => :content,
6 :action => :render_page, 9 :action => :render_page,
7 :language => I18n.locale, 10 :locale => params[:locale],
8 :page_path => path 11 :page_path => path
9 ) 12 )
10 end 13 end
11 14
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index be7e044..1446e14 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -25,19 +25,19 @@
25 <div id="topnav"> 25 <div id="topnav">
26 <ul id="navlist"> 26 <ul id="navlist">
27 <li> 27 <li>
28 <a href="<%= params[:locale] %>/club">Kennenlernen</a> 28 <%= link_to_path "Kennenlernen", "club" %>
29 </li> 29 </li>
30 <li> 30 <li>
31 &bull; 31 &bull;
32 </li> 32 </li>
33 <li> 33 <li>
34 <a href="<%= params[:locale] %>/support">Unterstützen</a> 34 <%= link_to_path "Unterstützen", "support" %>
35 </li> 35 </li>
36 <li> 36 <li>
37 &bull; 37 &bull;
38 </li> 38 </li>
39 <li> 39 <li>
40 <a href="<%= params[:locale] %>/contact">Erreichen</a> 40 <%= link_to_path "Erreichen", "contact" %>
41 </li> 41 </li>
42 <% if current_user %> 42 <% if current_user %>
43 <li> 43 <li>