<% @table_fields.each do |f| %> <% tmp = f.to_s.gsub(/ask\./,'') %> <% if @ask_setting.default_setting[tmp].nil? || @ask_setting.default_setting[tmp] %> <%= thead(f) %> <% end %> <% end %> <% situation_class_relation = { "is_waiting"=>"label-important", "is_processed"=>"label-warning", "is_referral"=>"", "is_published"=>"label-success" } situation_trans = AskTicketStatus.all.map{|a| [a.key, a.title]}.to_h %> <% @askquestions.each do |b| %> <% if @ask_setting.default_setting['name'].nil? || @ask_setting.default_setting['name'] %> <% end %> <% if @ask_setting.default_setting['phone'] %> <% end %> <% if @ask_setting.default_setting['appointment'] %> <% end %> <% end %>
<%= situation_trans[b.situation] %> <%= b.category.title rescue 'category not set' %>
<% if b.situation == 'is_published' %> <%= link_to b.title,((Page.where(:module=>'ask').first.url+"?item=#{b.id}") rescue "javascript:alert('#{t('ask.no_index_page')}')") %> <% else %> <%= b.title %> <% end %> <%= b.name %> <%= b.phone %><%= b.appointment.strftime("%Y-%m-%d %H:%M") rescue nil %><%= b.created_at.strftime("%Y-%m-%d %H:%M") rescue nil %> <%= b.ip %>
<%= content_tag :div, class: "bottomnav clearfix" do content_tag :div, paginate(@askquestions), class: "pagination pagination-centered" end %>