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 7589e7c0..699a05c8 100644 --- a/app/assets/javascripts/basic/orbit_js_1.0.1.js +++ b/app/assets/javascripts/basic/orbit_js_1.0.1.js @@ -39,8 +39,10 @@ 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)); @@ -71,6 +73,7 @@ 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'); }; @@ -540,6 +543,7 @@ 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 491ffd6c..0b2af80e 100644 --- a/app/assets/javascripts/member.js +++ b/app/assets/javascripts/member.js @@ -3,5 +3,4 @@ //= require lib/all-list //= require lib/jquery.fastLiveFilter.js //= require lib/checkbox.card.js -//= require lib/jquery.form.js -//= require lib/member/member-role.js \ No newline at end of file +//= require lib/jquery.form.js \ No newline at end of file diff --git a/app/controllers/admin/items_controller.rb b/app/controllers/admin/items_controller.rb index 8bef587a..f9a7c971 100644 --- a/app/controllers/admin/items_controller.rb +++ b/app/controllers/admin/items_controller.rb @@ -40,18 +40,8 @@ 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? - - 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["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 '' 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 8f864313..49cd459b 100644 --- a/app/controllers/admin/page_parts_controller.rb +++ b/app/controllers/admin/page_parts_controller.rb @@ -68,19 +68,8 @@ 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 [] - - - 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["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 '' 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 b6c402dc..a21d32a7 100644 --- a/app/models/user/role_category.rb +++ b/app/models/user/role_category.rb @@ -3,8 +3,6 @@ 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 0baabc15..2b1651fa 100644 --- a/app/models/user/user.rb +++ b/app/models/user/user.rb @@ -186,21 +186,20 @@ class User }.uniq! end - def self.get_member_list_attribute_field(role_type,field_key) + def self.get_member_list_attribute_field_name(role_type,field_key) @attribute = ::Attribute.where(:key => role_type).first - return ::AttributeField.where(:key => field_key, :attribute_id => @attribute.id).first + return ::AttributeField.where(:key => field_key, :attribute_id => @attribute.id).first.title end - 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 + 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 end - def self.get_role_member_data_by_sort(role, field_key, role_status_id) + def self.get_role_member_data_by_sort(role_status_id) a = Array.new - 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 ] } + 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 ] } 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 f57b0b70..649f5818 100644 --- a/app/views/admin/attributes/_attribute.html.erb +++ b/app/views/admin/attributes/_attribute.html.erb @@ -18,7 +18,7 @@
- <%= 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} %> + <%= 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" %>
diff --git a/app/views/admin/attributes/index.js.erb b/app/views/admin/attributes/index.js.erb index 53bc8e3e..2a246c25 100644 --- a/app/views/admin/attributes/index.js.erb +++ b/app/views/admin/attributes/index.js.erb @@ -1,4 +1,3 @@ -// $("#attributes_index").html("<%= j render 'admin/attributes/index' %>") -location.reload(); +$("#attributes_index").html("<%= j render 'admin/attributes/index' %>") $.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 a2a9d733..83b0f532 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,7 +18,15 @@ <%= role_filter.title %> <% end %> - - <%= 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} %> + + <%#= 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" %> + +
+
+ \ 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 44fbc916..e6d12464 100644 --- a/app/views/admin/role_filters/index.html.erb +++ b/app/views/admin/role_filters/index.html.erb @@ -1,4 +1,3 @@ - <% content_for :side_bar do %> <%= render :partial => 'admin/users_new_interface/side_bar' %> <% end %> @@ -10,6 +9,14 @@ <%= 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" %> @@ -20,4 +27,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 dff40533..04f52c87 100644 --- a/app/views/admin/role_filters/index.js.erb +++ b/app/views/admin/role_filters/index.js.erb @@ -1,4 +1,3 @@ -// $("#role_filters_index").html("<%= j render 'index' %>") -location.reload(); +$("#role_filters_index").html("<%= j render 'index' %>") $.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 48c811f3..34aa0f5a 100644 --- a/app/views/admin/roles/sub_role.html.erb +++ b/app/views/admin/roles/sub_role.html.erb @@ -2,6 +2,7 @@ <%= 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" %> @@ -9,6 +10,13 @@ <%= 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 aa5888ab..609124ed 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.where(:disabled=>false).asc("_id")%> \ No newline at end of file +<%=render :partial=>"role",:collection=>Role.all.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 75a8b0d7..9c001efd 100644 --- a/app/views/layouts/member.html.erb +++ b/app/views/layouts/member.html.erb @@ -24,16 +24,8 @@
<%= 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 8984a1e2..56754203 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,27 +27,22 @@ 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_status = RoleStatus.can_display.any_in(:_id => params[:category_id]).asc("key") + @member_list_categorys = RoleCategory.where(:role_id => @role_id,disable: false).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 + if !params[:category_id].blank? + @member_status = RoleStatus.can_display.any_in(:_id => params[:category_id]).asc("key") else - # @member_lists = User.where(:role_ids => @role_id) - @member_lists = '' + @member_status = RoleStatus.can_display.where(:role_id => @role_id).asc("key") 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 9e1e5bec..46c2fa52 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,9 +1,5 @@ <% # encoding: utf-8 %> -<% if !@member_lists.blank? %> - - <% @job_title_field = @member_lists.get_member_list_attribute_field("teacher","job_title") %> -
@@ -12,7 +8,7 @@ <% if !@member_list_categorys.blank? %> <% end %> @@ -21,8 +17,6 @@
- <%# @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 %> @@ -36,11 +30,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 = @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 %> + <%= @member_lists.get_member_list_attribute_field_name("teacher","job_title") %> <%= @job_title %>
  • <% end %> @@ -61,10 +55,12 @@ <% 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 %> @@ -78,10 +74,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 = @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 @@
    -<% 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' %>
    - - <% 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.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 %> -
    +
    +
    - <% 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.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 %> -
    - - <% 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.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| %> + @@ -183,12 +121,9 @@ <% end %> - <% end %> - <% end %> -<% end %> -<%= stylesheet_link_tag "member_staff/members" %> + <%= stylesheet_link_tag "member_staff/members" %>
    <%= @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 '' %>