<%= image_tag(url_to_avatar(user),width:"50px",height:"50px",class:"radius mr15") %>
<div class="flex1">
  <li class="clearfix mb20">
    <%= link_to user.try(:show_real_name),user_path(user),class: "fl mr15 color-grey-3 font-16" %>
    <span class="fl color-grey-9 mt3"><%= time_from_now(apply.updated_at) %></span>
    <span class="fl color-grey-9 mt3 ml50">IP：<%= user_ip_addr apply.user_ip %></span>
    <span class="fr">
      <% if apply.is_confirm != 0 %>
        <% apply_user = apply&.reviews&.acted_forum&.last&.user %>
        <% if apply_user.present? %>
          <span class="fl mr20">
            <%= link_to apply_user.try(:show_real_name), user_path(apply_user) %>
          </span>
          <% end %>
        <% if apply.is_confirm == 2 %>
          <span class="color-red fl ml20">已拒绝</span>
        <% else %>
          <span class="color-green fl ml20">已同意</span>
          <a href="javascript:void(0)" class="color-blue ml20" onclick="refuseClick(<%= apply.id %>)">撤销审核</a>
        <% end %>
      <% else %>
        <%= link_to "私信", message_detail_user_path(current_user, :user_id => apply.user_id), :class => "edu-default-btn edu-orangeline-btn ml20 fl",target:"_blank" %>
        <%= link_to "同意", confirm_apply_admins_forum_apply_path(id:apply.id,review_result:"0"),remote: true, method: :post, class: "edu-default-btn edu-blueline-btn ml20 fl", data:{confirm: "是否同意申请版主?"} %>
        <%# <%= link_to "拒绝", confirm_apply_admins_forum_apply_path(id:apply.id,review_result:"0"),remote: true, method: :post, class: "edu-default-btn edu-blueline-btn ml20 fl", data:{confirm: "是否同意申请版主?"} %> %>
        <a href="javascript:void(0)" class="edu-default-btn edu-greyline-btn ml20 fl" onclick="refuseClick(<%= apply.id %>)">拒绝</a>
      <% end %>
    </span>
  </li>
  <div class="width100">
    <span class="color-grey-9">申请成为"<%= link_to apply.forum_section.try(:title), "/memos/forum_memos/#{apply.id}", class: "color-blue" %>"的版主</span>
  </div>
  <% if apply.is_confirm == 2 %>
    <p class="color-orange lineh-35 mt10"><span class="fl color-orange mr5">拒绝原因:</span><%= apply&.reviews&.apply_forum&.first&.reason.to_s %></p>
  <% end %>
  <% if apply.is_confirm != 2 %>
    <%= labelled_form_for apply, :url => confirm_apply_admins_forum_apply_path(apply, is_confirm: apply.is_confirm), :html => {id:"refuseContent_#{apply.id}",class:"none",method: :post, remote: true} do |f| %>
      <div class="df mt10">
        <input type="hidden" id="review_result_type" name="review_result" value="1" />
        <span class="refuse_reason color-orange mr5"><%= apply.is_confirm == 0 ? "拒绝原因" : "撤销审核原因" %>:</span>
        <div class="flex1">
          <textarea name="reason" maxlength="200" placeholder="我想说点什么呢,200字以内" class="winput-100-70 mt8 mb10"></textarea>
          <li class="clearfix">
            <a href="javascript:void(0)" class="edu-default-btn edu-greyback-btn fl mr20" onclick="cancelRefuse(<%= apply.id %>)">取消</a>
            <%= f.submit "确定",class:"edu-default-btn edu-blueback-btn fl mr20" %>
          </li>
        </div>
      </div>
    <% end %>
  <% end %>

  <!-- 点击拒绝显示的部分 -->
</div>