<div class="default_member">
    <div class="member-data">
		<table>
			<tbody>

				<% @job_title_field = User.get_member_list_attribute_field("staff","job_title") %>

                <% 
                  @member_role = @member.roles.where(:key=>"staff", :disabled=>false)
                  @category = @member.role_categorys.where(:role_id=>@member_role[0]['_id'])

                  if !@category.blank?
                %>
                <tr>
                  <td><%= t('category')%></td>
                  <td><%= show_attribute_value(@member.role_categorys.where(:role_id=>@member_role[0]['_id']).map{|t|t.title.to_s}.join(',')) rescue '' %></td>
                </tr>

                <% end -%>				

				<% 
					@job_title = show_attribute_value(User.get_member_list_attribute_value(@member.id,@job_title_field.id).get_value_by_locale(I18n.locale))
				   if @job_title != 'NoData' and !@job_title.blank? and @job_title_field.to_show == true
				%>
				<tr>
					<td><%= @job_title_field.title %></td>
					<td><%= @job_title %></td>
				</tr>
				<% end -%>

				<tr>
					<td><%= t('users.name')%></td>
					<td><%= @member.name%></td>
				</tr>
				<tr>
					<td><%= t('users.email')%></td>
					<td><a href="mailto:<%= @member.email %>"><%= @member.email %></a></td>
				</tr>
				<% if !@member.office_tel.blank? %>
				<tr>
					<td><%= t('users.office_tel')%></td>
					<td><%= @member.office_tel%></td>
				</tr>
				<% end %>

				<% @profile_data.each do |item| %>
				<% if !item[:value].blank? %>
				<tr>
					<td><%= item[:name] %></td>
					<td><%= show_attribute_value(item[:value]) %></td>
				</tr>
				<% end -%>
				<% end -%>

				<%= render :partial=> "show_roles",:collection=>@member_role %>

			</tbody>
		</table>
	</div>

    <div class="member-pic">
     <%= image_tag(@member.avatar) %>
    </div>
	
</div>


<%= stylesheet_link_tag "member_staff/default_member" %>
		
