<% if ma.class == OrgMessage %>
    <% if ma.message_type == 'ApplySubdomain'%>
        <ul class="homepageNewsList fl">
          <li class="homepageNewsPortrait fl">
            <a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.organization), :width => "30", :height => "30"), organization_path(ma.organization_id), :target => '_blank' %></a>
          </li>
          <li class="homepageNewsPubType fl">
            <%=link_to ma.organization.name, organization_path(ma.organization_id), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
            <span class='<%= ma.viewed == 0 ? 'homepageNewsTypeNotRead fl' : 'homepageNewsType fl' %>'>申请子域名：</span>
          </li>
          <li class="homepageHomeworkContent fl">
            <%= ma.content %>
          </li>
          <li class="homepageHomeworkContentWarn fl">
            <%=link_to (Secdomain.where("sub_type=2 and pid=?", ma.organization.id).count == 0 || (Secdomain.where("sub_type=2 and pid=?", ma.organization.id).count > 0 && Secdomain.where("sub_type=2 and pid=?", ma.organization.id).first.subname != ma.content)) ? "同意申请":"申请已批准",
                       agree_apply_subdomain_organizations_path( :organization_id => ma.organization_id, :org_domain => ma.content, :user_id => ma.sender_id, :act_id => ma.id ),
                       :id => "agree_apply_subdomain_#{ma.id}",
                       :method => 'post',
                       :remote => true,
                       :class => "green_btn_cir ml10",
                       :style => "color:#fff" %>
          </li>
          <li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
        </ul>
    <% end %>
    <% if ma.message_type == 'AgreeApplySubdomain'%>
        <ul class="homepageNewsList fl">
          <li class="homepageNewsPortrait fl">
            <a href="javascript:void(0);"><div class="navHomepageLogo fl"><%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %></div></a>
          </li>
          <li class="homepageNewsPubType fl">
            <span class='<%= ma.viewed == 0 ? 'homepageNewsTypeNotRead fl' : 'homepageNewsType fl' %>'>管理员同意了您的子域名申请：</span>
          </li>
          <li class="homepageNewsContent fl">
            <%= ma.content %>
          </li>
          <li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
        </ul>
    <% end %>
<% end %>