+ <%# @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 %>
@@ -74,10 +78,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 9af71929f..b9a18caea 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.asc(:created_at) %>
+ <%= render :partial=> "show_roles",:collection=>@member.roles.where(:disabled=>false).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 e01e97b9e..42466797b 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,6 +8,36 @@
.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;
@@ -107,4 +137,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 dc3210da7..f79c82b99 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,17 +27,25 @@ 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")
- if !params[:category_id].blank?
- @member_status = RoleStatus.can_display.any_in(:_id => params[:category_id]).asc("key")
+ @member_status = RoleStatus.can_display.any_in(:_id => params[:category_id]).asc("key")
- @member_lists = User.where(:role_ids => @role_id)
+ @mlcs = @member_list_categorys.map{|category| category.id.to_s }
+ @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_status = RoleStatus.can_display.where(:role_id => @role_id).asc("key")
-
- @member_lists = User.where(:role_ids => @role_id)
-
+ # @member_lists = User.where(:role_ids => @role_id)
+ @member_lists = ''
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 f171bd7ba..dbe0d7027 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,29 +1,61 @@
<% # 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' %>
+ <% if @item.frontend_style == 'Single' or @item.frontend_style == 'Two' %>
<%= 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 = show_attribute_value(@member_lists.get_member_list_attribute_value(member.id,"teacher","job_title").get_value_by_locale(I18n.locale)) + <% @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? %> -
- <%= @member_lists.get_member_list_attribute_field_name("teacher","job_title") %><%= @job_title %> +
- <%= @job_title_field.title %><%= @job_title %> <% end %>
- <%= t("users.email")%> <%= member.email %>
- <%= t("users.office_tel")%><%= member.office_tel %> @@ -98,5 +102,6 @@
+
+ <% 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.get_role_member_data_by_sort(ms.id).each do |member| %>
+ <% @member_lists.where(:role_status_ids=>ms.id).each do |member| %>
-
<%= show_avatar(member) %>
-
-
- <%= @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)) %> + <% @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 %>
- <%= 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 %> -
- <%= @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) %> + + <% @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 %>
@@ -33,34 +65,47 @@
<% end %>
+ <% end %>
+
<% @member_status.each do |ms| %>
+ <% if @member_lists.where(:role_status_ids=>ms.id).count > 0 %>
+
+
+ <% end %>
+
<%= ms.title %>
-
- <% @member_lists.get_role_member_data_by_sort(ms.id).each_with_index do |member, i| %>
+ <% @member_lists.where(:role_status_ids=>ms.id).each_with_index do |member, i| %>
- >
<%= show_avatar(member) %>
-
-
- <%= @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)) %> + <% @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 %>
- <%= 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 %> -
- <%= @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) %> + + + <% @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 %>
@@ -70,47 +115,64 @@
<% 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 %>
<%= @member_lists.get_member_list_attribute_field_name("staff","job_title") %> | +<%= @job_title_field.title %> | <%= t("users.name")%> | <%= t("users.office_tel")%> | -<%= @member_lists.get_member_list_attribute_field_name("staff","business") %> | -<%= @member_lists.get_member_list_attribute_field_name("staff","agent") %> | +<%= @job_business_field.title %> |
- <%= show_attribute_value(@member_lists.get_member_list_attribute_value(member.id,"staff","job_title").get_value_by_locale(I18n.locale)) rescue '' %> + <% @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 %> | <%= link_to member.name, "mailto:#{member.email}" %> | <%= member.office_tel %> | - <%= 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 '' %> + <% @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 %> |