ntu_dropdown_fix

This commit is contained in:
Spen 2013-05-01 19:11:22 +08:00 committed by Matt K. Fu
parent 287e77836d
commit b8da40b4ae
2 changed files with 4 additions and 4 deletions

View File

@ -181,7 +181,7 @@ class User
def self.get_member_list_attribute_value(user_id,role_type,field_key)
@attribute = ::Attribute.where(:key => role_type).first
@AttributeField = ::AttributeField.where(:key => field_key, :attribute_id => @attribute.id).first
return ::AttributeValue.where(attribute_field_id: @AttributeField.id, :user_id => user_id).first[I18n.locale.to_s]
return ::AttributeValue.where(attribute_field_id: @AttributeField.id, :user_id => user_id).first
end
def create_dept_cache

View File

@ -97,19 +97,19 @@
<tr>
<td>
<span class="job_title">
<%= show_attribute_value(@member_lists.get_member_list_attribute_value(member.id,"staff","job_title")) %>
<%= show_attribute_value(@member_lists.get_member_list_attribute_value(member.id,"staff","job_title").get_value_by_locale(I18n.locale)) rescue '' %>
</span>
</td>
<td><span class="name"><%= link_to member.name, "mailto:#{member.email}" %></span></td>
<td><span class="tel"><%= member.office_tel %></span></td>
<td>
<span class="business">
<%= nl2br(@member_lists.get_member_list_attribute_value(member.id,"staff","business")) %>
<%= nl2br(@member_lists.get_member_list_attribute_value(member.id,"staff","business").get_value_by_locale(I18n.locale)) rescue '' %>
</span>
</td>
<td>
<span class="agent">
<%= @member_lists.get_member_list_attribute_value(member.id,"staff","agent") %>
<%= @member_lists.get_member_list_attribute_value(member.id,"staff","agent").get_value_by_locale(I18n.locale) rescue '' %>
</span>
</td>
</tr>