- <%# @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 %>
@@ -78,10 +74,10 @@
-<% end %>
-<%= stylesheet_link_tag "member/members" %>
+ <%#= stylesheet_link_tag "member/members" %>
diff --git a/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/show.html.erb b/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/show.html.erb
index b9a18cae..9af71929 100644
--- a/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/show.html.erb
+++ b/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/show.html.erb
@@ -36,7 +36,7 @@
<% end -%>
<% end -%>
- <%= render :partial=> "show_roles",:collection=>@member.roles.where(:disabled=>false).asc(:created_at) %>
+ <%= render :partial=> "show_roles",:collection=>@member.roles.asc(:created_at) %>
diff --git a/vendor/built_in_modules/member_staff/app/assets/stylesheets/member_staff/members.css b/vendor/built_in_modules/member_staff/app/assets/stylesheets/member_staff/members.css
index 42466797..e01e97b9 100755
--- a/vendor/built_in_modules/member_staff/app/assets/stylesheets/member_staff/members.css
+++ b/vendor/built_in_modules/member_staff/app/assets/stylesheets/member_staff/members.css
@@ -8,36 +8,6 @@
.o-members-category:first-child {
margin-top: 0;
}
-.o-members-nav {
- margin: 0 0 10px;
- padding: 0;
- list-style: none;
-}
-.o-members-nav:after {
- content: "";
- clear: both;
- display: block;
- height: 0;
- visibility: hidden;
-}
-.o-members-nav li {
- float: left;
-}
-.o-members-nav li + li {
- margin-left: 8px;
-}
-.o-members-nav li a {
- display: inline-block;
- line-height: 23px;
- padding: 5px 8px;
- height: 23px;
- background-color: #ccc;
- border-radius: 3px;
-}
-.o-members-nav li.active a {
- color: #FFF;
- background-color: #0088CE;
-}
.o-members-list {
list-style: none;
margin: 0;
@@ -137,4 +107,4 @@
font-size: 16px;
margin: 0;
line-height: 40px;
-}
+}
\ No newline at end of file
diff --git a/vendor/built_in_modules/member_staff/app/controllers/panel/member_staff/front_end/member_staff_lists_controller.rb b/vendor/built_in_modules/member_staff/app/controllers/panel/member_staff/front_end/member_staff_lists_controller.rb
index f79c82b9..dc3210da 100644
--- a/vendor/built_in_modules/member_staff/app/controllers/panel/member_staff/front_end/member_staff_lists_controller.rb
+++ b/vendor/built_in_modules/member_staff/app/controllers/panel/member_staff/front_end/member_staff_lists_controller.rb
@@ -27,25 +27,17 @@ class Panel::MemberStaff::FrontEnd::MemberStaffListsController < OrbitWidgetCont
@member_role = Role.where(:_id => @role_id)
@member_subroles = SubRole.where(:role_id => @role_id, :disabled => false)
-
- @member_list_categorys = RoleCategory.can_display.any_in(:_id => params[:tag_id]).asc("key")
- @member_status = RoleStatus.can_display.any_in(:_id => params[:category_id]).asc("key")
+ if !params[:category_id].blank?
+ @member_status = RoleStatus.can_display.any_in(:_id => params[:category_id]).asc("key")
- @mlcs = @member_list_categorys.map{|category| category.id.to_s }
+ @member_lists = User.where(:role_ids => @role_id)
- @mcs = params[:mcid].blank? ? @mlcs.first : params[:mcid]
-
- if !@member_list_categorys.blank? or !@member_status.blank?
-
- if !@mcs.blank? and @mlcs.include?(@mcs)
- @member_lists = User.where(:role_ids => @role_id,:role_category_ids => @mcs).asc(:position)
- else
- @member_lists = User.where(:role_ids => @role_id).asc(:position)
- end
else
- # @member_lists = User.where(:role_ids => @role_id)
- @member_lists = ''
+ @member_status = RoleStatus.can_display.where(:role_id => @role_id).asc("key")
+
+ @member_lists = User.where(:role_ids => @role_id)
+
end
end
diff --git a/vendor/built_in_modules/member_staff/app/views/panel/member_staff/front_end/member_staff_lists/index.html.erb b/vendor/built_in_modules/member_staff/app/views/panel/member_staff/front_end/member_staff_lists/index.html.erb
index dbe0d702..f171bd7b 100644
--- a/vendor/built_in_modules/member_staff/app/views/panel/member_staff/front_end/member_staff_lists/index.html.erb
+++ b/vendor/built_in_modules/member_staff/app/views/panel/member_staff/front_end/member_staff_lists/index.html.erb
@@ -1,61 +1,29 @@
<% # encoding: utf-8 %>
-
-<% if !@member_lists.blank? %>
-
-<% @job_title_field = @member_lists.get_member_list_attribute_field("staff","job_title") %>
-<% @job_business_field = @member_lists.get_member_list_attribute_field("staff","business") %>
- <% if @item.frontend_style == 'Single' or @item.frontend_style == 'Two' %>
+ <% if @item.frontend_style == 'Single' %>
<%= show_avatar(member) %>
- <%= t("users.name")%><%= link_to member.name, panel_member_front_end_member_list_path(member.id), {:class => "o-members-link"} %> - <% @job_title = @member_lists.get_member_list_attribute_value(member.id,@job_title_field.id).get_value_by_locale(I18n.locale) + <% @job_title = show_attribute_value(@member_lists.get_member_list_attribute_value(member.id,"teacher","job_title").get_value_by_locale(I18n.locale)) if @job_title != 'NoData' and !@job_title.blank? %> -
- <%= @job_title_field.title %><%= @job_title %> +
- <%= @member_lists.get_member_list_attribute_field_name("teacher","job_title") %><%= @job_title %> <% end %>
- <%= t("users.email")%> <%= member.email %>
- <%= t("users.office_tel")%><%= member.office_tel %> @@ -102,6 +98,5 @@
-
- <% if !@member_list_categorys.blank? %>
-
+ -
- <% @member_list_categorys.each do |mc| %>
-
- <%= mc.title %> - <% end %> -
<% @member_status.each do |ms| %>
-
- <% if @member_lists.where(:role_status_ids=>ms.id).count > 0 %>
+ <%= ms.title %>
-
- <% @member_lists.where(:role_status_ids=>ms.id).each do |member| %>
+ <% @member_lists.get_role_member_data_by_sort(ms.id).each do |member| %>
-
<%= show_avatar(member) %>
-
- <% @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?
- %>
-
- - <%= @job_title_field.title %> - <%= @job_title %> - - <% end %> +
- <%= @member_lists.get_member_list_attribute_field_name("staff","job_title") %><%= show_attribute_value(@member_lists.get_member_list_attribute_value(member.id,"staff","job_title").get_value_by_locale(I18n.locale)) %>
- <%= t("users.name")%><%= link_to member.name, panel_member_front_end_member_list_path(member.id), {:class => "o-members-link"} %>
- <%= t("users.office_tel")%><%= member.office_tel %>
- <%= t("users.email")%><%= member.email %> - - <% @job_business = @member_lists.get_member_list_attribute_value(member.id,@job_business_field.id).get_value_by_locale(I18n.locale) - if @job_business != 'NoData' and !@job_business.blank? - %> -
- - <%= @job_business_field.title %> - <%= @job_business %> - - <% end %> +
- <%= @member_lists.get_member_list_attribute_field_name("staff","business") %><%= nl2br(@member_lists.get_member_list_attribute_value(member.id,"staff","business").get_value_by_locale(I18n.locale)) %> +
- <%= @member_lists.get_member_list_attribute_field_name("staff","agent") %><%= @member_lists.get_member_list_attribute_value(member.id,"staff","agent").get_value_by_locale(I18n.locale) %>
@@ -65,47 +33,34 @@
<% end %>
- <% end %>
-
<% @member_status.each do |ms| %>
- <% if @member_lists.where(:role_status_ids=>ms.id).count > 0 %>
-
-
- <% end %>
-
<%= ms.title %>
-
- <% @member_lists.where(:role_status_ids=>ms.id).each_with_index do |member, i| %>
+ <% @member_lists.get_role_member_data_by_sort(ms.id).each_with_index do |member, i| %>
- >
<%= show_avatar(member) %>
-
- <% @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?
- %>
-
- - <%= @job_title_field.title %> - <%= @job_title %> - - <% end %> +
- <%= @member_lists.get_member_list_attribute_field_name("staff","job_title") %><%= show_attribute_value(@member_lists.get_member_list_attribute_value(member.id,"staff","job_title").get_value_by_locale(I18n.locale)) %>
- <%= t("users.name")%><%= link_to member.name, panel_member_front_end_member_list_path(member.id), {:class => "o-members-link"} %>
- <%= t("users.office_tel")%><%= member.office_tel %>
- <%= t("users.email")%><%= member.email %> - - - <% @job_business = @member_lists.get_member_list_attribute_value(member.id,@job_business_field.id).get_value_by_locale(I18n.locale) - if @job_business != 'NoData' and !@job_business.blank? - %> -
- - <%= @job_business_field.title %> - <%= @job_business %> - - <% end %> +
- <%= @member_lists.get_member_list_attribute_field_name("staff","business") %><%= nl2br(@member_lists.get_member_list_attribute_value(member.id,"staff","business").get_value_by_locale(I18n.locale)) %> +
- <%= @member_lists.get_member_list_attribute_field_name("staff","agent") %><%= @member_lists.get_member_list_attribute_value(member.id,"staff","agent").get_value_by_locale(I18n.locale) %>
@@ -115,64 +70,47 @@
<% end %>
- <% end %>
-
-
- <% @member_list_categorys.each do |mc| %>
-
- <%= mc.title %> - <% end %> -
<% @member_status.each do |ms| %>
- <% if @member_lists.where(:role_status_ids=>ms.id).count > 0 %>
-
<%= ms.title %>
<%= @job_title_field.title %> | +<%= @member_lists.get_member_list_attribute_field_name("staff","job_title") %> | <%= t("users.name")%> | <%= t("users.office_tel")%> | -<%= @job_business_field.title %> | +<%= @member_lists.get_member_list_attribute_field_name("staff","business") %> | +<%= @member_lists.get_member_list_attribute_field_name("staff","agent") %> |
- <% @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? - %> - <%= @job_title %> - <% end %> + <%= show_attribute_value(@member_lists.get_member_list_attribute_value(member.id,"staff","job_title").get_value_by_locale(I18n.locale)) rescue '' %> | <%= link_to member.name, "mailto:#{member.email}" %> | <%= member.office_tel %> | - <% @job_business = @member_lists.get_member_list_attribute_value(member.id,@job_business_field.id).get_value_by_locale(I18n.locale) - if @job_business != 'NoData' and !@job_business.blank? - %> - <%= @job_business %> - <% end %> + <%= nl2br(@member_lists.get_member_list_attribute_value(member.id,"staff","business").get_value_by_locale(I18n.locale)) rescue '' %> + + | ++ + <%= @member_lists.get_member_list_attribute_value(member.id,"staff","agent").get_value_by_locale(I18n.locale) rescue '' %> |