orbit-member/app/views/panel/member/front_end/member_lists/index.html.erb

112 lines
3.6 KiB
Plaintext

<% # encoding: utf-8 %>
<% if !@member_lists.blank? %>
<% @job_title_field = @member_lists.get_member_list_attribute_field("teacher","job_title") %>
<section>
<div class="side"></div>
<div class="main">
<% if !@member_list_categorys.blank? %>
<ul class="o-members-nav">
<% @member_list_categorys.each do |mc| %>
<li class="<%= (params[:mcid] == mc.id.to_s or @mcs.to_s == mc.id.to_s) ? 'active' : '' %>"><a href="?&mcid=<%= mc.id %>"><%= mc.title %></a></li>
<% end %>
</ul>
<% end %>
<% if @item.frontend_style == 'Single' %>
<div class="o-members">
<%# @member_lists = @member_lists.where(:role_category_ids => @mcs) if !@mcs.blank? and @mlcs.include?(@mcs) %>
<% @member_status.each do |ms| %>
<% if @member_lists.where(:role_status_ids=>ms.id).count > 0 %>
<h3 class="o-members-category h3"><%= ms.title %></h3>
<ul class="o-members-list">
<% @member_lists.where(:role_status_ids=>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"><%= t("users.name")%></b><%= link_to member.name, panel_member_front_end_member_list_path(member.id), {:class => "o-members-link"} %></li>
<% @job_title = @member_lists.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?
%>
<li><b class="o-members-label">
<%= @job_title_field.title %></b>
<%= @job_title %>
</li>
<% end %>
<li><b class="o-members-label"><%= t("users.email")%></b><%= member.email %></li>
<% if !member.office_tel.blank? %>
<li><b class="o-members-label"><%= t("users.office_tel")%></b><%= member.office_tel %></li>
<% end %>
</ul>
</li>
<% end %>
</ul>
<% end %>
<% end %>
</div>
<% elsif @item.frontend_style == 'Two' or @item.frontend_style.blank? %>
<div class="o-members view-columns">
<%# @member_lists = @member_lists.where(:role_category_ids => @mcs) if !@mcs.blank? %>
<% @member_status.each do |ms| %>
<% if @member_lists.where(:role_status_ids=>ms.id).count > 0 %>
<h3 class="o-members-category h3"><%= ms.title %></h3>
<ul class="o-members-list">
<% @member_lists.where(:role_status_ids=>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"><%= t("users.name")%></b><%= link_to member.name, panel_member_front_end_member_list_path(member.id), {:class => "o-members-link"} %></li>
<% @job_title = @member_lists.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?
%>
<li><b class="o-members-label"><%= @job_title_field.title %></b><%= @job_title %></li>
<% end %>
<li><b class="o-members-label"><%= t("users.email")%></b> <%= member.email %></li>
<% if !member.office_tel.blank? %>
<li><b class="o-members-label"><%= t("users.office_tel")%></b><%= member.office_tel %></li>
<% end %>
</ul>
</li>
<% end %>
</ul>
<% end %>
<% end %>
</div>
<% end %>
</div>
</section>
<% end %>
<%#= stylesheet_link_tag "member/members" %>