34 lines
1.9 KiB
Plaintext
34 lines
1.9 KiB
Plaintext
<p class="mt10 mb10">
|
|
<span class="questionLabel" id="poll_question_number_<%=poll_question.id %>"><%= poll_question.question_number%></span>
|
|
<%if poll_question.is_necessary == 1%>
|
|
<span class="c_red questionLabel ml5" title="必答">*</span>
|
|
<%end%>
|
|
</p>
|
|
<div id="toolbar" class="undis">
|
|
<% poll = poll_question.poll %>
|
|
<% count = poll.poll_questions.count %>
|
|
<% unless poll_question.question_number == 1 %>
|
|
<%= link_to('', {:controller => 'poll', :action => 'update_question_num', :id => poll.id, :ques_id => poll_question.id, :opr => 'up'},:remote => true, :method => 'post', :class => "poll-up mb8", :title => '上移') %>
|
|
<% end %>
|
|
<% if poll_question.question_number < count %>
|
|
<%= link_to('', {:controller => 'poll', :action => 'update_question_num', :id => poll.id, :ques_id => poll_question.id, :opr => 'down'},:remote => true, :method => 'post', :class => "poll-down mb8", :title => '下移') %>
|
|
<% end %>
|
|
<div class="poll-add mb8 pr">
|
|
<ul class="poll-add-menu fontGrey3">
|
|
<li><a href="javascript:void(0);" onclick=" dismiss('<%=type %>',<%=poll_question.id%>);insert_MC('<%=type %>',<%=poll_question.id%>);">单选题</a></li>
|
|
<li><a href="javascript:void(0);" onclick=" dismiss('<%=type %>',<%=poll_question.id%>);insert_MCQ('<%=type %>',<%=poll_question.id%>);">多选题</a></li>
|
|
<li><a href="javascript:void(0);" onclick=" dismiss('<%=type %>',<%=poll_question.id%>);insert_SINGLE('<%=type %>',<%=poll_question.id%>);">主观题</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<%= link_to("", delete_poll_question_poll_index_path(:poll_question => poll_question.id),
|
|
method: :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "poll-delete", :title => "删除") %>
|
|
</div>
|
|
<script>
|
|
$('.poll-container').mouseover(function(){
|
|
$(this).find("#toolbar, .poll-edit").show();
|
|
})
|
|
$('.poll-container').mouseout(function(){
|
|
$(this).find("#toolbar, .poll-edit").hide();
|
|
})
|
|
</script> |