修改组织一些功能jibug
This commit is contained in:
parent
ebb2f30f3b
commit
1fdd562bd3
|
@ -118,36 +118,15 @@
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="course-list">
|
<div class="course-list">
|
||||||
<ul class="clearfix">
|
<ul class="clearfix">
|
||||||
<% unless @course_acts_homework.nil? %>
|
<% unless @course_acts.nil? %>
|
||||||
<li >
|
<%= render :partial => 'organizations/org_new_course_pic', :locals => {:activities => @course_acts.first(3)} %>
|
||||||
<% @course_acts_homework.each do |act| %>
|
|
||||||
<%= render :partial => 'org_new_course_homework', :locals => {:activity => HomeworkCommon.find(act.org_act_id),:user_activity_id =>act.id, :course_activity => 0} %>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
|
||||||
<% end %>
|
|
||||||
<% unless @course_acts_message.nil? %>
|
|
||||||
<li >
|
|
||||||
<% @course_acts_message.each do |act| %>
|
|
||||||
<%= render :partial => 'org_new_course_message', :locals => {:activity => Message.find(act.org_act_id), :user_activity_id =>act.id} %>
|
|
||||||
<% end %>
|
|
||||||
</li>
|
|
||||||
<% end %>
|
|
||||||
<% unless @course_acts_news.nil? %>
|
|
||||||
<li >
|
|
||||||
<% @course_acts_news.each do |act| %>
|
|
||||||
<%= render :partial => 'org_new_course_news', :locals => {:activity => News.find(act.org_act_id), :user_activity_id =>act.id} %>
|
|
||||||
<% end %>
|
|
||||||
</li>
|
|
||||||
<% end %>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
|
<%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
</div><!--content end-->
|
</div><!--content end-->
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
|
@ -0,0 +1,78 @@
|
||||||
|
<% activities.each do |act| %>
|
||||||
|
<% if act.org_act_type == "HomeworkCommon" %>
|
||||||
|
<% activity = HomeworkCommon.find(act.org_act_id) %>
|
||||||
|
<li>
|
||||||
|
<a href="/#" title="">
|
||||||
|
<div class="course-list-img">
|
||||||
|
<% iamge_path = get_image_path_from_content(activity.description) %>
|
||||||
|
<% if iamge_path.nil? %>
|
||||||
|
<%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), student_work_index_url_in_org(activity.id), :target => "_blank" %>
|
||||||
|
<!--<img width="370" height="220" alt="#" src="/images/org_new_style/default-img.jpg">-->
|
||||||
|
<% else %>
|
||||||
|
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), student_work_index_url_in_org(activity.id), :target => "_blank" %>
|
||||||
|
<!--<img width="370" height="220" src="/files/uploads/image<%#= iamge_path %>" alt="" />-->
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<h5>
|
||||||
|
<%= link_to activity.name.to_s, student_work_index_url_in_org(activity.id), :target => '_blank' %>
|
||||||
|
</h5>
|
||||||
|
<div class="item-btm clearfix">
|
||||||
|
<%=link_to activity.try(:user).try(:realname).nil? ? activity.try(:user).try(:login) : activity.try(:user).try(:realname), user_path(activity.user), :class=>"publisher-name fl", :target => "_blank" %></a>
|
||||||
|
<p class="pass-time fl"><span><%= format_date activity.updated_at %></span></p>
|
||||||
|
<div class="fr right-info"> <span> <%= activity.journals_for_messages.count %></span></div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<% elsif act.org_act_type == "Message" %>
|
||||||
|
<% activity = Message.find(act.org_act_id) %>
|
||||||
|
<li>
|
||||||
|
<a href="/#" title="">
|
||||||
|
<div class="course-list-img">
|
||||||
|
<% iamge_path = get_image_path_from_content(activity.content) %>
|
||||||
|
<% if iamge_path.nil? %>
|
||||||
|
<%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank" %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank" %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<h5>
|
||||||
|
<% 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' %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank' %>
|
||||||
|
<% end %>
|
||||||
|
</h5>
|
||||||
|
<div class="item-btm clearfix">
|
||||||
|
<%=link_to activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname), user_path(activity.author), :class=>"publisher-name fl", :target => "_blank" %></a>
|
||||||
|
<p class="pass-time fl"><span><%= format_date activity.updated_on %></span></p>
|
||||||
|
<div class="fr right-info"> <span> <%= activity.children.count %></span></div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<% elsif act.org_act_type == "News" %>
|
||||||
|
<% activity = News.find(act.org_act_id) %>
|
||||||
|
<li>
|
||||||
|
<a href="/#" title="">
|
||||||
|
<div class="course-list-img">
|
||||||
|
<% iamge_path = get_image_path_from_content(activity.description) %>
|
||||||
|
<% if iamge_path.nil? %>
|
||||||
|
<%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), news_url_in_org(activity.id), :target => "_blank" %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), news_url_in_org(activity.id), :target => "_blank" %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<h5>
|
||||||
|
<%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank' %>
|
||||||
|
</h5>
|
||||||
|
<div class="item-btm clearfix">
|
||||||
|
<%=link_to activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname), user_path(activity.author), :class=>"publisher-name fl", :target => "_blank" %></a>
|
||||||
|
<p class="pass-time fl"><span><%= format_date activity.created_on %></span></p>
|
||||||
|
<div class="fr right-info"> <span> <%= activity.comments.count %></span></div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
|
|
Loading…
Reference in New Issue