<% activities.each do |act| %>
    <% if act.org_act_type == "Issue" %>
        <% activity = Issue.find(act.org_act_id) %>
        <div class="row-ziyuan fl">
          <%= link_to image_tag(url_to_avatar(activity.author),:width => "40", :height => "40"), user_path(activity.author), :class => "fl user-img" %>
          <!--<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>-->
          <div class="note-box fl">
            <%= link_to activity.subject.to_s, issue_url_in_org(activity.id), :target => '_blank', :class => "fl note-title" %>
            <%#= link_to activity.name.to_s, student_work_index_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %>
            <%#= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %>
            <p class="fl"><span >发布时间：<%= format_date activity.updated_on %></span>
              <span> 作者：<%= activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname) %></span>
              <span class="fr right-info2"> <%= activity.journals.count %></span> </p>
          </div>

        </div><!--row-ziyuan end-->
    <% elsif act.org_act_type == "Message" %>
        <% activity = Message.find(act.org_act_id) %>
        <div class="row-ziyuan fl">
          <%= link_to image_tag(url_to_avatar(activity.author),:width => "40", :height => "40"), user_path(activity.author), :class => "fl user-img" %>
          <!--<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>-->
          <div class="note-box fl">
            <% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
                <%= link_to activity.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "fl note-title" %>
            <% else %>
                <%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "fl note-title" %>
            <% end %>
            <%#= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %>
            <p class="fl"><span >发布时间：<%= format_date activity.updated_on %></span>
              <span> 作者：<%= activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname) %></span>
              <span class="fr right-info2"> <%= activity.children.count %></span> </p>
          </div>

        </div><!--row-ziyuan end-->
    <% elsif act.org_act_type == "News" %>
        <% activity = News.find(act.org_act_id) %>
        <div class="row-ziyuan fl">
          <%= link_to image_tag(url_to_avatar(activity.author),:width => "40", :height => "40"), user_path(activity.author), :class => "fl user-img" %>
          <!--<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>-->
          <div class="note-box fl">
            <%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl note-title" %>
            <p class="fl"><span >发布时间：<%= format_date activity.created_on %></span>
              <span> 作者：<%= activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname) %></span>
              <span class="fr right-info2"> <%= activity.comments.count %></span> </p>
          </div>
        </div><!--row-ziyuan end-->
    <% end %>

<% end %>