用户表

<%= form_tag '/eric_weixin/cms/weixin/weixin_users', method: :get do %>
<%= select_tag :subscribe, options_from_collection_for_select({1=>'订阅',0=>'取消订阅'},'first','second',params[:subscribe]),prompt:"ALL" %>
<%= text_field_tag :nickname, params[:nickname] ,placeholder:"ALL" %>
<%= select_tag :sex, options_from_collection_for_select(::EricWeixin::WeixinUser::SEX,'first','second',params[:sex]), prompt:"ALL" %>
<%= text_field_tag :city, params[:city] ,placeholder:"ALL" %>
<%= text_field_tag :province, params[:province] ,placeholder:"ALL" %>
<%= text_field_tag :first_register_channel, params[:first_register_channel], placeholder: "ALL" %>
<%= text_field_tag :last_register_channel, params[:last_register_channel], placeholder: "ALL" %>
<%= date_field_tag :start_date, params[:start_date] %>
<%= date_field_tag :end_date, params[:end_date] %>
<%= select_tag :public_account_id, options_from_collection_for_select(@public_accounts, 'id', 'name', (params[:public_account_id].blank? ? '' : params[:public_account_id])), prompt: '请选择公众账号' %>
<%= submit_tag '加载用户', class: 'button tiny' %>
<% end %> <% unless @weixin_users.blank? %> <%= will_paginate @collection, renderer: FoundationPagination::Rails %> <% @weixin_users.each do |user| %> <% end %>
openid 是否订阅 昵称 性别 语言 城市 省份 国家 头像 关注时间 备注 最后一次注册渠道 第一次注册渠道操作
<%= user.openid %> <%= case user.subscribe when 1 then '是' when 0 then '否' end %> <%= user.nickname %> <%= case user.sex when 1 then '男' when 2 then '女' else '未知' end %> <%= case user.language when 'zh_CN' then '简体中文' when 'zh_TW' then '繁体中文' when 'en' then '英文' else '其它' end %> <%= user.city %> <%= user.province %> <%= user.country %> <%= image_tag(user.headimgurl, height: '32', width: '32') %> <%= Time.at(user.subscribe_time.to_i).chinese_format %> <%= user.remark %> <%= user.last_register_channel %> <%= user.first_register_channel %> <%= link_to '备注', "javascript:open_modal(#{user.id})" %>
<%= will_paginate @collection, renderer: FoundationPagination::Rails %> <% end %> <%= hidden_field_tag :hidden_user_id %>