diff --git a/app/assets/javascripts/basic/orbit_js_1.0.1.js b/app/assets/javascripts/basic/orbit_js_1.0.1.js index 699a05c8..7589e7c0 100644 --- a/app/assets/javascripts/basic/orbit_js_1.0.1.js +++ b/app/assets/javascripts/basic/orbit_js_1.0.1.js @@ -39,10 +39,8 @@ if($.support.touch) { if(!$(this).closest('div').hasClass('togglebox')) { $(this).wrap('
'); if($(this).attr('type') == "hidden" && $(this).attr('value') == 'true') { - console.log('true') $(this).wrap('
'); } else { - console.log('false') $(this).wrap('
'); } $('').insertAfter($(this)); @@ -73,7 +71,6 @@ if($.support.touch) { $(this).parent('.togglebox').removeClass('disable').closest('li').removeClass('disabled'); }; } else { - console.log($(this)) if($(this).prop('checked')) { $(this).parent('.togglebox').addClass('disable').closest('li').addClass('disabled'); }; @@ -543,7 +540,6 @@ function changeStatusHidden() { // Document Ready $(function() { - console.log('true') showFiltersOnPageRefresh(); new ini(); diff --git a/app/assets/javascripts/member.js b/app/assets/javascripts/member.js index 0b2af80e..491ffd6c 100644 --- a/app/assets/javascripts/member.js +++ b/app/assets/javascripts/member.js @@ -3,4 +3,5 @@ //= require lib/all-list //= require lib/jquery.fastLiveFilter.js //= require lib/checkbox.card.js -//= require lib/jquery.form.js \ No newline at end of file +//= require lib/jquery.form.js +//= require lib/member/member-role.js \ No newline at end of file diff --git a/app/controllers/admin/items_controller.rb b/app/controllers/admin/items_controller.rb index f9a7c971..8bef587a 100644 --- a/app/controllers/admin/items_controller.rb +++ b/app/controllers/admin/items_controller.rb @@ -40,8 +40,18 @@ class Admin::ItemsController < OrbitBackendController m["main"] = [module_app.label, module_app.id.to_s] m["sub"] = module_app.app_pages.map{|name, data| [t(data["i18n"]), name]} rescue [] m["sub"] << [I18n.t('default_widget.default_widget'),'default_widget'] if module_app.has_default_widget? - m["category"] = module_app.categories.map{|category| [category.title, category.id.to_s] } rescue '' - m["tags"] = module_app.tags.map{|tag| [tag.name, tag.id.to_s] } rescue '' + + if module_app.key == 'member' + m["category"] = RoleStatus.where(:role_id=> RoleStatus.get_role_data("teacher") ).map{|category| [category.title, category.id.to_s] } rescue '' + m["tags"] = RoleCategory.where(:role_id=> RoleCategory.get_role_data("teacher") ).map{|category| [category.title, category.id.to_s] } rescue '' + elsif module_app.key == 'member_staff' + m["category"] = RoleStatus.where(:role_id=> RoleStatus.get_role_data("staff") ).map{|category| [category.title, category.id.to_s] } rescue '' + m["tags"] = RoleCategory.where(:role_id=> RoleCategory.get_role_data("staff") ).map{|category| [category.title, category.id.to_s] } rescue '' + else + m["category"] = module_app.categories.map{|category| [category.title, category.id.to_s] } rescue '' + m["tags"] = module_app.tags.map{|tag| [tag.name, tag.id.to_s] } rescue '' + end + m["count"] = module_app.get_registration.get_data_count.to_a module_apps << m end diff --git a/app/controllers/admin/page_parts_controller.rb b/app/controllers/admin/page_parts_controller.rb index 2b670b93..bde46659 100644 --- a/app/controllers/admin/page_parts_controller.rb +++ b/app/controllers/admin/page_parts_controller.rb @@ -63,8 +63,19 @@ class Admin::PagePartsController < OrbitBackendController m = {} m["main"] = [module_app.label, module_app.id.to_s] m["sub"] = module_app.widgets.map{|name, data| [t(data["i18n"]), name]} rescue [] - m["category"] = module_app.categories.map{|category| [category.title, category.id.to_s] } rescue '' - m["tags"] = module_app.tags.map{|tag| [tag.name, tag.id.to_s] } rescue '' + + + if module_app.key == 'member' + m["category"] = RoleStatus.can_display.where(:role_id=> RoleStatus.get_role_data("teacher") ).map{|category| [category.title, category.id.to_s] } rescue '' + m["tags"] = RoleCategory.can_display.where(:role_id=> RoleCategory.get_role_data("teacher") ).map{|category| [category.title, category.id.to_s] } rescue '' + elsif module_app.key == 'member_staff' + m["category"] = RoleStatus.can_display.where(:role_id=> RoleStatus.get_role_data("staff") ).map{|category| [category.title, category.id.to_s] } rescue '' + m["tags"] = RoleCategory.can_display.where(:role_id=> RoleCategory.get_role_data("staff") ).map{|category| [category.title, category.id.to_s] } rescue '' + else + m["category"] = module_app.categories.map{|category| [category.title, category.id.to_s] } rescue '' + m["tags"] = module_app.tags.map{|tag| [tag.name, tag.id.to_s] } rescue '' + end + m["count"] = module_app.get_registration.get_data_count.to_a module_apps << m end diff --git a/app/models/user/role_category.rb b/app/models/user/role_category.rb index a21d32a7..b6c402dc 100644 --- a/app/models/user/role_category.rb +++ b/app/models/user/role_category.rb @@ -3,6 +3,8 @@ class RoleCategory < RoleFilter has_and_belongs_to_many :users belongs_to :role + scope :can_display,where(disable: false) + def self.get_role_data(role_key) @role = Role.where(:key =>role_key).first diff --git a/app/models/user/user.rb b/app/models/user/user.rb index 2b1651fa..0baabc15 100644 --- a/app/models/user/user.rb +++ b/app/models/user/user.rb @@ -186,20 +186,21 @@ class User }.uniq! end - def self.get_member_list_attribute_field_name(role_type,field_key) + def self.get_member_list_attribute_field(role_type,field_key) @attribute = ::Attribute.where(:key => role_type).first - return ::AttributeField.where(:key => field_key, :attribute_id => @attribute.id).first.title + return ::AttributeField.where(:key => field_key, :attribute_id => @attribute.id).first end - def self.get_member_list_attribute_value(user_id,role_type,field_key) - @attribute = ::Attribute.where(:key => role_type).first - @AttributeField = ::AttributeField.where(:key => field_key, :attribute_id => @attribute.id).first - return ::AttributeValue.where(attribute_field_id: @AttributeField.id, :user_id => user_id).first + def self.get_member_list_attribute_value(user_id,field_id) + # @attribute = ::Attribute.where(:key => role_type).first + # @AttributeField = ::AttributeField.where(:key => field_key, :attribute_id => @attribute.id).first + return ::AttributeValue.where(attribute_field_id: field_id, :user_id => user_id).first end - def self.get_role_member_data_by_sort(role_status_id) + def self.get_role_member_data_by_sort(role, field_key, role_status_id) a = Array.new - where(:role_status_ids=>role_status_id).desc(:_id).collect{|t| a << [ get_member_list_attribute_value(t.id,"staff","job_title")['val'].to_i, t ] } + attribute_field_data = get_member_list_attribute_field(role,field_key) + where(:role_status_ids=>role_status_id).desc(:_id).collect{|t| a << [ get_member_list_attribute_value(t.id,attribute_field_data.id)['val'].to_i, t ] } member_data = a.sort member_data_tmp = member_data.collect {|v| v[1] } end diff --git a/app/views/admin/attributes/_attribute.html.erb b/app/views/admin/attributes/_attribute.html.erb index 649f5818..f57b0b70 100644 --- a/app/views/admin/attributes/_attribute.html.erb +++ b/app/views/admin/attributes/_attribute.html.erb @@ -18,7 +18,7 @@
- <%= link_to (check_box_tag 'accept', false , :class => 'toggle-check', :data=>{:deploy=>"right"}) , eval("admin_#{@attribute_type}_toggle_path(attribute)"), method: :post, remote: true, class: "switch" %> + <%= check_box_tag 'accept', attribute.disabled ? 'fasle' : 'true', false ,{ :class => 'toggle-check role_filter_checked', :data=>{:deploy=>"right"}, :data=>{:path=> eval("admin_#{@attribute_type}_toggle_path(attribute)")}, :checked=> attribute.disabled} %>
diff --git a/app/views/admin/attributes/index.js.erb b/app/views/admin/attributes/index.js.erb index 2a246c25..53bc8e3e 100644 --- a/app/views/admin/attributes/index.js.erb +++ b/app/views/admin/attributes/index.js.erb @@ -1,3 +1,4 @@ -$("#attributes_index").html("<%= j render 'admin/attributes/index' %>") +// $("#attributes_index").html("<%= j render 'admin/attributes/index' %>") +location.reload(); $.pageslide.close(); openSlide(); \ No newline at end of file diff --git a/app/views/admin/role_filters/_role_filter.html.erb b/app/views/admin/role_filters/_role_filter.html.erb index 83b0f532..a2a9d733 100644 --- a/app/views/admin/role_filters/_role_filter.html.erb +++ b/app/views/admin/role_filters/_role_filter.html.erb @@ -1,5 +1,5 @@ - + <%= role_filter.key %> <% if @types.is_localized?(:title) %> <% @site_valid_locales.each_with_index do |locale, i| %> @@ -18,15 +18,7 @@ <%= role_filter.title %> <% end %> - - <%#= link_to role_filter.disable ? t(:disable) : t(:enable), polymorphic_path([:admin, role_filter]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"btn btn-mini btn-success", :type=>"button" %> - -
-
- <%= link_to (check_box_tag 'accept', false , :class => 'toggle-check', :data=>{:deploy=>"right"}) , eval("admin_#{@app_type == 'role_statuses' ? 'role_status' : @app_type }_toggle_path(role_filter)"), method: :post, remote: true, class: "switch" %> - -
-
- + + <%= check_box_tag 'accept', role_filter.disable ? 'fasle' : 'true', false ,{ :class => 'toggle-check role_filter_checked', :data=>{:deploy=>"right"}, :data=>{:path=> eval("admin_#{@app_type == 'role_statuses' ? 'role_status' : @app_type }_toggle_path(role_filter)")}, :checked=> role_filter.disable} %> \ No newline at end of file diff --git a/app/views/admin/role_filters/index.html.erb b/app/views/admin/role_filters/index.html.erb index e6d12464..44fbc916 100644 --- a/app/views/admin/role_filters/index.html.erb +++ b/app/views/admin/role_filters/index.html.erb @@ -1,3 +1,4 @@ + <% content_for :side_bar do %> <%= render :partial => 'admin/users_new_interface/side_bar' %> <% end %> @@ -9,14 +10,6 @@ <%= stylesheet_link_tag "lib/togglebox.css" %> <% end -%> -
- -
- -
<%= link_to content_tag(:i, nil, class: "icons-plus") + " " + t(:add), eval("new_admin_#{@app_type == 'role_statuses' ? 'role_status' : @app_type }_path(:role_id=>params[:role_id])"), class: "btn btn-primary open-slide" %> @@ -27,4 +20,4 @@ <%= render 'index' %>
- +<% @path = "/admin/#{@app_type == 'role_category' ? 'role_categorys' : @app_type }/" %> \ No newline at end of file diff --git a/app/views/admin/role_filters/index.js.erb b/app/views/admin/role_filters/index.js.erb index 04f52c87..dff40533 100644 --- a/app/views/admin/role_filters/index.js.erb +++ b/app/views/admin/role_filters/index.js.erb @@ -1,3 +1,4 @@ -$("#role_filters_index").html("<%= j render 'index' %>") +// $("#role_filters_index").html("<%= j render 'index' %>") +location.reload(); $.pageslide.close(); openSlide(); \ No newline at end of file diff --git a/app/views/admin/roles/sub_role.html.erb b/app/views/admin/roles/sub_role.html.erb index 34aa0f5a..48c811f3 100644 --- a/app/views/admin/roles/sub_role.html.erb +++ b/app/views/admin/roles/sub_role.html.erb @@ -2,7 +2,6 @@ <%= render :partial => 'admin/users_new_interface/side_bar' %> <% end %> - <% content_for :page_specific_css do -%> <%= stylesheet_link_tag "lib/wrap-nav.css" %> <%= stylesheet_link_tag "lib/pageslide.css" %> @@ -10,13 +9,6 @@ <%= stylesheet_link_tag "lib/togglebox.css" %> <% end -%> -
- -
-
<%= link_to content_tag(:i,t("new.sub_role"),:class=>"icon-plus"),eval("admin_#{@attribute_type}_add_sub_role_path(@attribute)"),:class=>"btn btn-primary open-slide"%> diff --git a/app/views/admin/users_new_interface/_roles.html.erb b/app/views/admin/users_new_interface/_roles.html.erb index 609124ed..aa5888ab 100644 --- a/app/views/admin/users_new_interface/_roles.html.erb +++ b/app/views/admin/users_new_interface/_roles.html.erb @@ -1 +1 @@ -<%=render :partial=>"role",:collection=>Role.all.asc("_id")%> \ No newline at end of file +<%=render :partial=>"role",:collection=>Role.where(:disabled=>false).asc("_id")%> \ No newline at end of file diff --git a/app/views/layouts/member.html.erb b/app/views/layouts/member.html.erb index 9c001efd..75a8b0d7 100644 --- a/app/views/layouts/member.html.erb +++ b/app/views/layouts/member.html.erb @@ -24,8 +24,16 @@
<%= yield :right_nav %>
diff --git a/vendor/built_in_modules/member/app/controllers/panel/member/front_end/member_lists_controller.rb b/vendor/built_in_modules/member/app/controllers/panel/member/front_end/member_lists_controller.rb index 56754203..8984a1e2 100644 --- a/vendor/built_in_modules/member/app/controllers/panel/member/front_end/member_lists_controller.rb +++ b/vendor/built_in_modules/member/app/controllers/panel/member/front_end/member_lists_controller.rb @@ -27,22 +27,27 @@ class Panel::Member::FrontEnd::MemberListsController < OrbitWidgetController @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_list_categorys = RoleCategory.where(:role_id => @role_id,disable: false).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 } + + @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 = '' end - if !params[:mcid].blank? - @member_lists = User.where(:role_ids => @role_id, :role_category_ids => params[:mcid]) - else - @member_lists = User.where(:role_ids => @role_id) - end - - end def show diff --git a/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/index.html.erb b/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/index.html.erb index 46c2fa52..9e1e5bec 100644 --- a/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/index.html.erb +++ b/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/index.html.erb @@ -1,5 +1,9 @@ <% # encoding: utf-8 %> +<% if !@member_lists.blank? %> + + <% @job_title_field = @member_lists.get_member_list_attribute_field("teacher","job_title") %> +
@@ -8,7 +12,7 @@ <% if !@member_list_categorys.blank? %> <% end %> @@ -17,6 +21,8 @@
+ <%# @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 %> @@ -30,11 +36,11 @@
<%= 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_field.title %> <%= @job_title %>
  • <% end %> @@ -55,12 +61,10 @@ <% elsif @item.frontend_style == 'Two' or @item.frontend_style.blank? %> -
    - -
    -
    + <%# @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 @@
    <%= 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 @@
    +<% 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 9af71929..b9a18cae 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 e01e97b9..42466797 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 dc3210da..f79c82b9 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 f171bd7b..dbe0d702 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' %>
    + + <% if !@member_list_categorys.blank? %> +
      + <% @member_list_categorys.each do |mc| %> +
    • <%= mc.title %>
    • + <% end %> +
    + <% end %> + + <% if @item.frontend_style == 'Single' %> +
    <% @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 %> +
    -
    -
    - <% elsif @item.frontend_style == 'Two' %> + <% elsif @item.frontend_style == 'Two' %> -
    - -
    -
    <% @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_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 %> +
    + + <% end %> +
    <% elsif @item.frontend_style == 'List' %> + + <% if !@member_list_categorys.blank? %> +
      + <% @member_list_categorys.each do |mc| %> +
    • <%= mc.title %>
    • + <% end %> +
    + <% 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_with_index do |member, i| %> + <% @member_lists.where(:role_status_ids=>ms.id).each_with_index do |member, i| %> - @@ -121,9 +183,12 @@ <% end %> + <% end %> + <% end %> +<% end %> - <%= stylesheet_link_tag "member_staff/members" %> +<%= stylesheet_link_tag "member_staff/members" %>
    <%= @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 %>