Merge branch 'sw_new_course' of http://repository.trustie.net/xianbo/trustie2 into sw_new_course
Conflicts: public/javascripts/course.jssw_new_course
commit
be46142b3c
@ -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%>
|
||||
<li title="<%= poll.polls_name %>">
|
||||
<% if @is_teacher %>
|
||||
<% if has_commit %>
|
||||
<sapn class="polls_title fl">
|
||||
<%= link_to poll_name, poll_result_poll_path(poll.id), :class => "polls_title polls_title_w fl", :style => "max-width: 550px;width: 550px;" %>
|
||||
</sapn>
|
||||
<% 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 %>
|
||||
</li>
|
||||
<% if !@is_teacher && has_commit && poll.polls_status == 2%>
|
||||
<li class="pollsbtn_tip fl ml5">已答</li>
|
||||
<% end %>
|
||||
|
||||
<%if @is_teacher%>
|
||||
<% if poll.polls_status == 1%>
|
||||
<li class="pollsbtn fl ml10 pollsbtn_grey">统计结果</li>
|
||||
<% elsif poll.polls_status == 2 || poll.polls_status == 3 %>
|
||||
<li>
|
||||
<%= link_to l(:label_statistical_results), statistics_result_poll_path(poll.id), :class => "pollsbtn fl ml10"%>
|
||||
</li>
|
||||
<% end%>
|
||||
<% end%>
|
||||
|
||||
|
||||
<%if @is_teacher %>
|
||||
<% if poll.polls_status == 1 %>
|
||||
<li>
|
||||
<a href="#" class="pollsbtn btn_pu fl ml5" onclick="poll_submit(<%= poll.id%>,<%= poll.polls_name.length %>);">
|
||||
发布问卷
|
||||
</a>
|
||||
</li>
|
||||
<% elsif poll.polls_status == 2%>
|
||||
<li>
|
||||
<a href="#" class="pollsbtn btn_de fl ml5" onclick="republish_poll(<%= poll.id%>);">
|
||||
取消发布
|
||||
</a>
|
||||
</li>
|
||||
<% else%>
|
||||
<li class="pollsbtn fl ml10 pollsbtn_grey" style="margin-left: 5px;" >
|
||||
发布问卷
|
||||
</li>
|
||||
<% end%>
|
||||
<% end%>
|
||||
|
||||
<li>
|
||||
<% 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%>
|
||||
<li title="<%= poll.polls_name %>">
|
||||
<% 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 %>
|
||||
</li>
|
||||
|
||||
<% if poll.polls_status == 1%>
|
||||
<li class="pollsbtn fl ml10 pollsbtn_grey">统计结果</li>
|
||||
<% elsif poll.polls_status == 2 || poll.polls_status == 3 %>
|
||||
<li><%= link_to l(:label_statistical_results), statistics_result_poll_path(poll.id), :class => "pollsbtn fl ml10"%></li>
|
||||
<% end%>
|
||||
</li>
|
||||
|
||||
<% if @is_teacher%>
|
||||
<% if poll.polls_status == 1 %>
|
||||
<li>
|
||||
<%= link_to l(:button_edit), edit_poll_path(poll.id), :class => "polls_de fr ml15"%>
|
||||
</li>
|
||||
<li><a href="#" class="pollsbtn btn_pu fl ml5" onclick="poll_submit(<%= poll.id%>,<%= poll.polls_name.length %>);">发布问卷</a></li>
|
||||
<% elsif poll.polls_status == 2%>
|
||||
<li><a href="#" class="pollsbtn btn_de fl ml5" onclick="republish_poll(<%= poll.id%>);">取消发布</a></li>
|
||||
<% else%>
|
||||
<li class="polls_de_grey fr ml15">
|
||||
编辑
|
||||
</li>
|
||||
<li class="pollsbtn fl ml10 pollsbtn_grey" style="margin-left: 5px;" >发布问卷</li>
|
||||
<% end%>
|
||||
<% end%>
|
||||
|
||||
<% if @is_teacher%>
|
||||
<% if poll.polls_status == 2 %>
|
||||
<li>
|
||||
<a class="polls_de fr ml15" onclick="close_poll(<%= poll.id%>);">关闭</a>
|
||||
</li>
|
||||
<% else %>
|
||||
<li class="polls_de_grey fr ml15">
|
||||
关闭
|
||||
</li>
|
||||
<% 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 %>
|
||||
<li><%= link_to l(:button_edit), edit_poll_path(poll.id), :class => "polls_de fr ml5"%></li>
|
||||
<% else%>
|
||||
<li class="polls_de_grey fr ml5">编辑</li>
|
||||
<% end%>
|
||||
|
||||
<% if poll.polls_status == 2 %>
|
||||
<li><a class="polls_de fr ml5" onclick="close_poll(<%= poll.id%>);" href="">关闭</a></li>
|
||||
<% else %>
|
||||
<li class="polls_de_grey fr ml5">关闭</li>
|
||||
<% end%>
|
||||
|
||||
<li class="polls_date fr mr10">
|
||||
<%= format_time poll.created_at%>
|
||||
</li>
|
||||
<li class="polls_date fr"><%= format_date poll.created_at.to_date%></li>
|
||||
<% else%>
|
||||
<% if poll.polls_status == 2%>
|
||||
<% if has_commit%>
|
||||
<li><%= link_to poll_name, poll_result_poll_path(poll.id), :class => "polls_title polls_title_st fl c_dblue" %></li>
|
||||
<li class="pollsbtn_tip fl ml5">已答</li>
|
||||
<%else%>
|
||||
<%= link_to poll_name, poll_path(poll.id), :class => "polls_title polls_title_st fl c_dblue"%>
|
||||
<%end%>
|
||||
<% end%>
|
||||
<li class="polls_date fr mr10"><%= format_date poll.created_at.to_date%></li>
|
||||
<% end%>
|
@ -1,8 +1,6 @@
|
||||
<div class="ur_page_head ur_editor02"><!--头部显示 start-->
|
||||
<div class="ur_page_head ur_editor02" ><!--头部显示 start-->
|
||||
<a href="#" class="ur_icon_edit" title="编辑" onclick="pollsEdit();"></a>
|
||||
<h1 class="ur_page_title" id="polls_name_h">
|
||||
<%= poll.polls_name%>
|
||||
</h1>
|
||||
<h1 class="ur_page_title" id="polls_name_h"><%= poll.polls_name%></h1>
|
||||
<%= @poll.polls_description.nil? ? "" : @poll.polls_description.html_safe%>
|
||||
<div class="cl"></div>
|
||||
</div><!--头部显示 end-->
|
@ -1,46 +1,35 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>
|
||||
<%= l(:label_poll_result) %>
|
||||
</title>
|
||||
<%= stylesheet_link_tag 'polls', :media => 'all' %>
|
||||
</head>
|
||||
<body>
|
||||
<div class="polls_content polls_box" id="polls">
|
||||
<div class="ur_page_head" >
|
||||
<h1 class="ur_page_title">
|
||||
<%= @poll.polls_name %>
|
||||
<%= l(:label_poll) %>
|
||||
</h1>
|
||||
</div>
|
||||
<div>
|
||||
<% @poll_questions.each do |poll_question| %>
|
||||
<ol style="margin-left: -40px;">
|
||||
<li class="ur_question_item">
|
||||
<div class="ur_title_result">
|
||||
<%= stylesheet_link_tag 'polls', :media => 'all' %>
|
||||
<div class="polls_content polls_box" id="polls">
|
||||
<div class="ur_page_head" >
|
||||
<h1 class="ur_page_title">
|
||||
<%= @poll.polls_name %>
|
||||
<%= l(:label_poll) %>
|
||||
</h1>
|
||||
</div>
|
||||
<div>
|
||||
<% @poll_questions.each do |poll_question| %>
|
||||
<ol>
|
||||
<li class="ur_question_item">
|
||||
<div class="ur_title_result">
|
||||
<span class="title_index">
|
||||
第<%= poll_question.question_number %>题:
|
||||
</span>
|
||||
<%= poll_question.question_title %>
|
||||
<span class="title_index">
|
||||
[<%= options_show(poll_question.question_type) %>]
|
||||
</span>
|
||||
</div>
|
||||
<% if poll_question.question_type == 1 || poll_question.question_type == 2 %>
|
||||
<%= render :partial =>'choice_show', :locals =>{ :poll_question => poll_question } %>
|
||||
<% else %>
|
||||
<%= render :partial =>'quiz_answers', :locals =>{ :poll_question => poll_question } %>
|
||||
<% end %>
|
||||
</li>
|
||||
</ol>
|
||||
<% end %>
|
||||
<ul class="wlist">
|
||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<%= poll_question.question_title %>
|
||||
<span class="title_index">
|
||||
[<%= options_show(poll_question.question_type) %>]
|
||||
</span>
|
||||
</div>
|
||||
<% if poll_question.question_type == 1 || poll_question.question_type == 2 %>
|
||||
<%= render :partial =>'choice_show', :locals =>{ :poll_question => poll_question } %>
|
||||
<% else %>
|
||||
<%= render :partial =>'quiz_answers', :locals =>{ :poll_question => poll_question } %>
|
||||
<% end %>
|
||||
</li>
|
||||
</ol>
|
||||
<% end %>
|
||||
<ul class="wlist">
|
||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in new issue