<% # encoding: utf-8 %>
		
		<% if @item.frontend_style == 'Single' %>

			<section> 

				<div class="side"></div>
				<div class="main">
					<div class="o-members">
						
						<%  @member_status.each do |ms| %>
						
						<h3 class="o-members-category h3"><%= ms.title %></h3>
						<ul class="o-members-list">

							<% @member_lists.get_role_member_data_by_sort(ms.id).each do |member| %>

							<li class="odd">
								<div class="o-members-pic"><%= show_avatar(member) %></div>
								<ul class="o-members-info">
									<li><b class="o-members-label"><%= @member_lists.get_member_list_attribute_field_name("staff","job_title") %></b><%= show_attribute_value(@member_lists.get_member_list_attribute_value(member.id,"staff","job_title").get_value_by_locale(I18n.locale)) %></li>
									<li><b class="o-members-label"><%= t("users.name")%></b><%= link_to member.name, panel_member_front_end_member_list_path(member.id), {:class => "o-members-link"} %></li>
									<li><b class="o-members-label"><%= t("users.office_tel")%></b><%= member.office_tel %></li>
									<li><b class="o-members-label"><%= t("users.email")%></b><%= member.email %></li>
									<li><b class="o-members-label"><%= @member_lists.get_member_list_attribute_field_name("staff","business") %></b><%= nl2br(@member_lists.get_member_list_attribute_value(member.id,"staff","business").get_value_by_locale(I18n.locale)) %></li>
									<li><b class="o-members-label"><%= @member_lists.get_member_list_attribute_field_name("staff","agent") %></b><%= @member_lists.get_member_list_attribute_value(member.id,"staff","agent").get_value_by_locale(I18n.locale) %></li>
								</ul>
							</li>

							<% end %>
								
						</ul>
						
						<% end %>

					</div>
				</div>
			</section>

		<% elsif @item.frontend_style == 'Two' %>

			<section> 

				<div class="side"></div>
				<div class="main">
					<div class="o-members view-columns">

						<%  @member_status.each do |ms| %>

						<h3 class="o-members-category h3"><%= ms.title %></h3>
						<ul class="o-members-list">

							<% @member_lists.get_role_member_data_by_sort(ms.id).each_with_index do |member, i| %>

							<li <%= ( (i + 1) % 2 != 0 ) ? "class=odd" : '' %>>
								<div class="o-members-pic"><%= show_avatar(member) %></div>
								<ul class="o-members-info">
									<li><b class="o-members-label"><%= @member_lists.get_member_list_attribute_field_name("staff","job_title") %></b><%= show_attribute_value(@member_lists.get_member_list_attribute_value(member.id,"staff","job_title").get_value_by_locale(I18n.locale)) %></li>
									<li><b class="o-members-label"><%= t("users.name")%></b><%= link_to member.name, panel_member_front_end_member_list_path(member.id), {:class => "o-members-link"} %></li>
									<li><b class="o-members-label"><%= t("users.office_tel")%></b><%= member.office_tel %></li>
									<li><b class="o-members-label"><%= t("users.email")%></b><%= member.email %></li>
									<li><b class="o-members-label"><%= @member_lists.get_member_list_attribute_field_name("staff","business") %></b><%= nl2br(@member_lists.get_member_list_attribute_value(member.id,"staff","business").get_value_by_locale(I18n.locale)) %></li>
									<li><b class="o-members-label"><%= @member_lists.get_member_list_attribute_field_name("staff","agent") %></b><%= @member_lists.get_member_list_attribute_value(member.id,"staff","agent").get_value_by_locale(I18n.locale) %></li>
								</ul>
							</li>

							<% end %>

						</ul>

						<% end %>

					</div>
				</div>
			</section>

		<% elsif @item.frontend_style == 'List' %>
				
				<div class="o-members view-ntu-lists">

						<%  @member_status.each do |ms| %>

						<h3 class="o-members-category h3"><%= ms.title %></h3>

						<table>
							<thead>
								<tr>
									<td><span class="job_title"><%= @member_lists.get_member_list_attribute_field_name("staff","job_title") %></span></td>
									<td><span class="name"><%= t("users.name")%></span></td>
									<td><span class="tel"><%= t("users.office_tel")%></span></td>
									<td><span class="business"><%= @member_lists.get_member_list_attribute_field_name("staff","business") %></span></td>
									<td><span class="agent"><%= @member_lists.get_member_list_attribute_field_name("staff","agent") %></span></td>
								</tr>
							</thead>

							<% @member_lists.get_role_member_data_by_sort(ms.id).each_with_index do |member, i| %>
							
							<tr>
								<td>
									<span class="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").get_value_by_locale(I18n.locale)) rescue '' %>
									</span>
								</td>
								<td>
									<span class="agent">
									<%= @member_lists.get_member_list_attribute_value(member.id,"staff","agent").get_value_by_locale(I18n.locale) rescue '' %>
									</span>
								</td>
							</tr>
							
							<% end %>

						</table>
						
						<% end %>

				</div>

		<% end %>


		<%= stylesheet_link_tag "member_staff/members" %>
