+
<%= field.name %>
+ <% @course_acts.first(4).each do |act| %>
+ <% if act.org_act_type == "HomeworkCommon" %>
+ <% activity = HomeworkCommon.find(act.org_act_id) %>
+ <% iamge_path = get_image_path_from_content(activity.description) %>
+
+ <% if iamge_path.nil? %>
+ <%= link_to image_tag("/images/default_blank/right-01.jpg", :width => "330", :height => "210"), student_work_index_url_in_org(activity.id), :target => "_blank", :class =>"sn-activeimg" %>
<% else %>
- <%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "active-title" %>
+ <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), student_work_index_url_in_org(activity.id), :target => "_blank", :class =>"sn-activeimg" %>
<% end %>
-
- <%= format_date activity.updated_on %>
-
- <% elsif act.org_act_type == "News" %>
- <% activity = News.find(act.org_act_id) %>
- <% iamge_path = get_image_path_from_content(activity.description) %>
-
- <% if iamge_path.nil? %>
- <%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "330", :height => "210"), news_url_in_org(activity.id), :target => "_blank", :class =>"sn-activeimg" %>
- <% else %>
- <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), news_url_in_org(activity.id), :target => "_blank", :class =>"sn-activeimg" %>
- <% end %>
-
- <%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "active-title" %>
-
- <%= format_date activity.created_on %>
-
- <% elsif act.org_act_type == "Poll" %>
- <% activity = Poll.find(act.org_act_id) %>
- <% has_commit = has_commit_poll?(activity.id ,User.current)%>
- <% poll_name = activity.polls_name.empty? ? l(:label_poll_new) : activity.polls_name%>
- <% iamge_path = get_image_path_from_content(activity.polls_description) %>
- <% if ( activity.polls_status==2) %>
-
- <% if iamge_path.nil? %>
- <%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "330", :height => "210"), Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => "_blank", :class =>"sn-activeimg" %>
+
+ <%= link_to activity.name.to_s, student_work_index_url_in_org(activity.id), :target => '_blank', :class => "active-title" %>
+
+ <%= format_date activity.updated_at %>
+
+ <% elsif act.org_act_type == "Message" %>
+ <% activity = Message.find(act.org_act_id) %>
+ <% iamge_path = get_image_path_from_content(activity.content) %>
+
+ <% if iamge_path.nil? %>
+ <%= link_to image_tag("/images/default_blank/right-01.jpg", :width => "330", :height => "210"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-activeimg" %>
+ <% else %>
+ <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-activeimg" %>
+ <% end %>
+
+ <% 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 => "active-title" %>
<% else %>
- <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => "_blank", :class =>"sn-activeimg" %>
+ <%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "active-title" %>
<% end %>
-
- <% if has_commit %>
- <%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank', :class => "active-title" %>
+
+ <%= format_date activity.updated_on %>
+
+ <% elsif act.org_act_type == "News" %>
+ <% activity = News.find(act.org_act_id) %>
+ <% iamge_path = get_image_path_from_content(activity.description) %>
+
+ <% if iamge_path.nil? %>
+ <%= link_to image_tag("/images/default_blank/right-01.jpg", :width => "330", :height => "210"), news_url_in_org(activity.id), :target => "_blank", :class =>"sn-activeimg" %>
+ <% else %>
+ <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), news_url_in_org(activity.id), :target => "_blank", :class =>"sn-activeimg" %>
+ <% end %>
+
+ <%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "active-title" %>
+
+ <%= format_date activity.created_on %>
+
+ <% elsif act.org_act_type == "Poll" %>
+ <% activity = Poll.find(act.org_act_id) %>
+ <% has_commit = has_commit_poll?(activity.id ,User.current)%>
+ <% poll_name = activity.polls_name.empty? ? l(:label_poll_new) : activity.polls_name%>
+ <% iamge_path = get_image_path_from_content(activity.polls_description) %>
+ <% if ( activity.polls_status==2) %>
+
+ <% if iamge_path.nil? %>
+ <%= link_to image_tag("/images/default_blank/right-01.jpg", :width => "330", :height => "210"), Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => "_blank", :class =>"sn-activeimg" %>
<% else %>
- <%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank', :class => "active-title" %>
+ <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "330", :height => "210"), Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => "_blank", :class =>"sn-activeimg" %>
<% end %>
-
- <%= format_date activity.published_at %>
-
- <% end %>
- <% end %>
- <% end %>
+
+ <% if has_commit %>
+ <%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank', :class => "active-title" %>
+ <% else %>
+ <%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank', :class => "active-title" %>
+ <% end %>
+
+
<%= format_date activity.published_at %>
+
+ <% end %>
+ <% end %>
+ <% end %>
+