diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index 647e76657..1b41fada2 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -234,4 +234,10 @@ module UsersHelper false end + + # base user上面的navbar显示内容 + def show_item_on_navbar params + displayed_item = %w|index| + displayed_item.include?(params['action']) + end end diff --git a/app/views/account/register.html.erb b/app/views/account/register.html.erb index 2e82dcd1c..3aabc814a 100644 --- a/app/views/account/register.html.erb +++ b/app/views/account/register.html.erb @@ -297,7 +297,7 @@
<%= f.text_field :mail, :required => true %>
<%="#{l(:label_mail_attention)} "%>
-<%= f.select :language, lang_options_for_select %>
+<%= f.select :language, lang_options_for_select , :required => true %>
diff --git a/app/views/layouts/base_users.html.erb b/app/views/layouts/base_users.html.erb index 32e517ab0..513aba827 100644 --- a/app/views/layouts/base_users.html.erb +++ b/app/views/layouts/base_users.html.erb @@ -1,4 +1,4 @@ -<% @nav_dispaly_user_label = 1 %> +<% @nav_dispaly_user_label = show_item_on_navbar(params) %>