diff --git a/app/views/poll/_poll.html.erb b/app/views/poll/_poll.html.erb index 33bff6258..4f307279b 100644 --- a/app/views/poll/_poll.html.erb +++ b/app/views/poll/_poll.html.erb @@ -1,91 +1,51 @@ <% has_commit = has_commit_poll?(poll.id ,User.current)%> <% poll_name = poll.polls_name.empty? ? l(:label_poll_new) : poll.polls_name%> -
  • - <% if @is_teacher %> - <% if has_commit %> - - <%= link_to poll_name, poll_result_poll_path(poll.id), :class => "polls_title polls_title_w fl", :style => "max-width: 550px;width: 550px;" %> - - <% else %> - <%= link_to poll_name, poll_path(poll.id), :class => "polls_title polls_title_w fl" %> - <% end %> - <% else %> - <% if has_commit && poll.polls_status == 2 %> - <%= link_to poll_name, poll_result_poll_path(poll.id), :class => "polls_title polls_title_w fl", :style => "max-width: 500px;width: auto;" %> - <% elsif !has_commit && poll.polls_status == 2 %> - <%= link_to poll_name, poll_path(poll.id), :class => "polls_title polls_title_w fl", :style => "max-width: 550px;width: 550px;" %> - <% end %> - <% end %> -
  • -<% if !@is_teacher && has_commit && poll.polls_status == 2%> -
  • 已答
  • -<% end %> - -<%if @is_teacher%> - <% if poll.polls_status == 1%> -
  • 统计结果
  • - <% elsif poll.polls_status == 2 || poll.polls_status == 3 %> -
  • - <%= link_to l(:label_statistical_results), statistics_result_poll_path(poll.id), :class => "pollsbtn fl ml10"%> -
  • - <% end%> -<% end%> - - -<%if @is_teacher %> - <% if poll.polls_status == 1 %> -
  • - - 发布问卷 - -
  • - <% elsif poll.polls_status == 2%> -
  • - - 取消发布 - -
  • - <% else%> -
  • - 发布问卷 -
  • - <% end%> -<% end%> - -
  • - <% if @is_teacher %> - - <%= link_to(l(:button_delete), poll, - method: :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "polls_de fr ml15 mr10") %> +<% if @is_teacher%> +
  • + <% if has_commit %> + <%= link_to poll_name, poll_result_poll_path(poll.id), :class => "polls_title polls_title_w fl c_dblue"%> + <% else %> + <%= link_to poll_name, poll_path(poll.id), :class => "polls_title polls_title_w fl c_dblue" %> + <% end %> +
  • + + <% if poll.polls_status == 1%> +
  • 统计结果
  • + <% elsif poll.polls_status == 2 || poll.polls_status == 3 %> +
  • <%= link_to l(:label_statistical_results), statistics_result_poll_path(poll.id), :class => "pollsbtn fl ml10"%>
  • <% end%> - -<% if @is_teacher%> <% if poll.polls_status == 1 %> -
  • - <%= link_to l(:button_edit), edit_poll_path(poll.id), :class => "polls_de fr ml15"%> -
  • +
  • 发布问卷
  • + <% elsif poll.polls_status == 2%> +
  • 取消发布
  • <% else%> -
  • - 编辑 -
  • +
  • 发布问卷
  • <% end%> -<% end%> -<% if @is_teacher%> - <% if poll.polls_status == 2 %> -
  • - 关闭 -
  • - <% else %> -
  • - 关闭 -
  • - <% end%> + <%= link_to(l(:button_delete), poll,:method => :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "polls_de fr ml5 mr10") %> -<% end %> + <% if poll.polls_status == 1 %> +
  • <%= link_to l(:button_edit), edit_poll_path(poll.id), :class => "polls_de fr ml5"%>
  • + <% else%> +
  • 编辑
  • + <% end%> + <% if poll.polls_status == 2 %> +
  • 关闭
  • + <% else %> +
  • 关闭
  • + <% end%> -
  • - <%= format_time poll.created_at%> -
  • \ No newline at end of file +
  • <%= format_date poll.created_at.to_date%>
  • +<% else%> + <% if poll.polls_status == 2%> + <% if has_commit%> +
  • <%= link_to poll_name, poll_result_poll_path(poll.id), :class => "polls_title polls_title_st fl c_dblue" %>
  • +
  • 已答
  • + <%else%> + <%= link_to poll_name, poll_path(poll.id), :class => "polls_title polls_title_st fl c_dblue"%> + <%end%> + <% end%> +
  • <%= format_date poll.created_at.to_date%>
  • +<% end%> \ No newline at end of file diff --git a/app/views/poll/_poll_list.html.erb b/app/views/poll/_poll_list.html.erb index f57a4a5ff..becfc32a5 100644 --- a/app/views/poll/_poll_list.html.erb +++ b/app/views/poll/_poll_list.html.erb @@ -9,7 +9,7 @@
    <% @polls.each do |poll|%> -