socialforge/app/views/users/_user_message_org.html.erb

41 lines
2.3 KiB
Plaintext

<% 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='homepageNewsType fl'>申请子域名:</span>
</li>
<li class="homepageHomeworkContent fl">
<%= ma.content %>
</li>
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
<li class="homepageHomeworkContentWarn fr">
<%=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 => 'link-blue fr'
%>
</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='homepageNewsType fl'>管理员同意了您的子域名申请:</span>
</li>
<li class="homepageNewsContent fl">
<%= ma.content %>
</li>
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% end %>