Skip to content

Commit

Permalink
Moving language selection dropdown to a partial for use elsewhere
Browse files Browse the repository at this point in the history
  • Loading branch information
Kieran Pilkington committed May 29, 2009
1 parent f3a5f91 commit de005f8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
11 changes: 11 additions & 0 deletions app/views/account/_language_selection.html.erb
@@ -0,0 +1,11 @@
<div id="footer_language_selection" class="footer_div">
<% if User.language_choices.keys.size > 1 %>
<% form_tag do %>
<div class="form-element">
<noscript><label><%=t 'layouts.application.language' %></label></noscript>
<%= locale_dropdown(nil, { :default => I18n.locale, :pre_text => t('layouts.application.choose_language') }) -%>
<noscript><%= submit_tag t('layouts.application.change_language') %></noscript>
</div>
<% end %>
<% end %>
</div>
12 changes: 1 addition & 11 deletions app/views/layouts/application.rhtml
Expand Up @@ -419,17 +419,7 @@
<div style="clear:both;"></div>
</div>

<div id="footer_language_selection" class="footer_div">
<% if User.language_choices.keys.size > 1 %>
<% form_tag do %>
<div class="form-element">
<noscript><label><%=t 'layouts.application.language' %></label></noscript>
<%= locale_dropdown(nil, { :default => I18n.locale, :pre_text => t('layouts.application.choose_language') }) -%>
<noscript><%= submit_tag t('layouts.application.change_language') %></noscript>
</div>
<% end %>
<% end %>
</div>
<%= render 'account/language_selection' %>
<% else -%>

Expand Down

0 comments on commit de005f8

Please sign in to comment.