Remove i18n_variable for views
This commit is contained in:
1 parent
49dd3a1770
commit
53cae0a9ee
32 files changed
+64
-63
No files matched your search
@@ -16,7 +16,7 @@
|
||||
</label>
|
||||
<label>
|
||||
<span><%= t('admin.role') %>:</span>
|
||||
<%= f.select :role_id, @roles.sort_by{|role| role.key }.collect {|role| [ role.i18n_variable[I18n.locale], role.id ]}, :selected => (@user.role_id || Role.get_role_from_key('student')) %>
|
||||
<%= f.select :role_id, @roles.sort_by{|role| role.key }.collect {|role| [ role.title, role.id ]}, :selected => (@user.role_id || Role.get_role_from_key('student')) %>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<div id='roles'>
|
||||
<% @roles.each do |role| %>
|
||||
<div id="<%= role.id %>_block" class="attributes_block <%= @class %>" <%= raw(' style="display: none;"') unless ((@user.role.id.eql?(role.id) rescue nil) || (role.key.eql?('student') && @user.new_record?)) %>>
|
||||
<h2><%= role.i18n_variable[I18n.locale] %></h2>
|
||||
<h2><%= role.title %></h2>
|
||||
<hr class="<#%= @user.role.key %>_block">
|
||||
<%= render :partial => 'sub_role_selector', :locals => {:f => f, :role => role} %>
|
||||
<%= render :partial => 'sub_role', :collection => role.sub_roles, :locals => {:f => f, :role => role} %>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div id="basic_block" class="attributes_block <%= @class %>">
|
||||
<h2><%= info.i18n_variable[I18n.locale] %></h2>
|
||||
<h2><%= info.title %></h2>
|
||||
<hr>
|
||||
<div class="info_input">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
@@ -15,7 +15,7 @@
|
||||
<% info.get_enabled_attribute_fields.each do |attr| %>
|
||||
<%= f.fields_for :attribute_values, @user.get_value_from_field_id(attr.id) do |f| %>
|
||||
<tr class="list_item">
|
||||
<td><%= attr.i18n_variable[I18n.locale] %></td>
|
||||
<td><%= attr.title %></td>
|
||||
<% if attr["locale"] && attr["markup"] == 'text_field' %>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<td><%= f.text_field locale %></td>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<tbody>
|
||||
<% show_attribute.get_enabled_attribute_fields.each do |attr| %>
|
||||
<tr class="list_item">
|
||||
<td><%= attr.i18n_variable[I18n.locale] %></td>
|
||||
<td><%= attr.title %></td>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<td>
|
||||
<% if attr["locale"] && attr["markup"] == 'text_field' %>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div id="sub_role_<%= show_sub_role.id %>" class="group">
|
||||
<h2><%= show_sub_role.i18n_variable[I18n.locale] %></h2>
|
||||
<h2><%= show_sub_role.title %></h2>
|
||||
<%= render :partial => 'show_attribute', :object => show_sub_role %>
|
||||
</div>
|
||||
@@ -1,5 +1,5 @@
|
||||
<div id="sub_role_<%= sub_role.id %>" class="group" <%= raw(' style="display: none;"') unless @user.sub_role_ids.include?(sub_role.id) %>>
|
||||
<h2><%= sub_role.i18n_variable[I18n.locale] %></h2>
|
||||
<h2><%= sub_role.title %></h2>
|
||||
<div class="info_input">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<thead class="list_head">
|
||||
@@ -14,7 +14,7 @@
|
||||
<% sub_role.get_enabled_attribute_fields.each do |attr| %>
|
||||
<%= f.fields_for :attribute_values, @user.get_value_from_field_id(attr.id) do |f| %>
|
||||
<tr class="list_item">
|
||||
<td><%= attr.i18n_variable[I18n.locale] %></td>
|
||||
<td><%= attr.title %></td>
|
||||
<% if attr["locale"] && attr["markup"] == 'text_field' %>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<td><%= f.text_field locale %></td>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% role.sub_roles.each do |sub_role| %>
|
||||
<%= f.label sub_role.i18n_variable[I18n.locale], :for => "check_sub_role_#{sub_role.id}", :class => 'sub_role_select' %>
|
||||
<%= f.label sub_role.title, :for => "check_sub_role_#{sub_role.id}", :class => 'sub_role_select' %>
|
||||
<%= check_box_tag "user[sub_role_ids][]", sub_role.id, @user.sub_role_ids.include?(sub_role.id), :id => "check_sub_role_#{sub_role.id}", :class => 'sub_role_select' %>
|
||||
<% end %>
|
||||
@@ -20,7 +20,7 @@
|
||||
<tbody>
|
||||
<% @users.each do |user| %>
|
||||
<tr class="have">
|
||||
<td class="roles <%= user.role.key.downcase rescue nil %>"><%= user.role.i18n_variable[I18n.locale] rescue nil %></td>
|
||||
<td class="roles <%= user.role.key.downcase rescue nil %>"><%= user.role.title rescue nil %></td>
|
||||
<td class="name"><%= user.name ? user.name : 'bob' %></td>
|
||||
<td class="email"><%= user.email %></td>
|
||||
<td class="admin"><%= user.admin ? t(:yes_) : t(:no_) %></td>
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
</div>
|
||||
<% @infos.each do |a| %>
|
||||
<div id="basic_block" class="roles_block <%= @class %>">
|
||||
<h2><%= a.i18n_variable[I18n.locale] %></h2>
|
||||
<h2><%= a.title %></h2>
|
||||
<hr>
|
||||
<%= render :partial => 'show_attribute', :object => a %>
|
||||
</div>
|
||||
<% end -%>
|
||||
|
||||
<div id="basic_block" class="roles_block <%= @class %>">
|
||||
<h2><%= @user.role.i18n_variable[I18n.locale] %></h2>
|
||||
<h2><%= @user.role.title %></h2>
|
||||
<hr class="<%= @user.role.key %>_block">
|
||||
<%= render :partial => 'show_sub_role', :collection => @user.sub_roles %>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user