From aee695e94d79f455b173e27893916e814e393e31 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 1 Apr 2016 11:48:13 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E7=BB=87=E5=8A=A8=E6=80=81=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0poll=E3=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_org_new_course_pic.html.erb | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/app/views/organizations/_org_new_course_pic.html.erb b/app/views/organizations/_org_new_course_pic.html.erb index 26a5762bb..15a9c4582 100644 --- a/app/views/organizations/_org_new_course_pic.html.erb +++ b/app/views/organizations/_org_new_course_pic.html.erb @@ -71,7 +71,36 @@ - + <% 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%> + <% if ( activity.polls_status==2) %> +
  • + +
    + <% iamge_path = get_image_path_from_content(activity.polls_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 %> +
    +
    + <% if has_commit %> + <%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank' %> + <% else %> + <%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s, :target => '_blank' %> + <% end %> +
    +
    + +
  • + <% end %> <% end %> <% end %>