forked from crazycode/ThunderSurvey
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_field.html.erb
25 lines (22 loc) · 1.15 KB
/
_field.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<div class="edit" onmouseover="toggle_opration(this, true);" onmouseout="toggle_opration(this, false);" id="<%= field.id %>">
<div class="opration" style="display:none;">
<% if field.intern.blank? -%>
<%= link_to(t(:edit), "#", :onclick => "field_start_editing(this);return false;", :class => 'ag') %>
<%= link_to(t(:duplicate), "#", :onclick => "form_dup_field(this);return false;", :class => 'ag') %>
<%= link_to(t(:delete), form_field_path(parent, field.id, :edit_key => parent.edit_key),
:update => "flash",
:method => "delete",
:confirm => t(:are_you_sure),
:remote => true, :class => 'remove ag') %>
<% else %>
<%= t(:reserved) %>
<% end -%>
</div>
<div class="question" ondblclick="field_start_editing(this);">
<%= render :partial => "/forms/#{field.input}_field", :locals => {:field => field, :row => @row} %>
</div>
<div class="form" style="display:none;">
<%= render :partial => "/fields/form", :locals => {:parent => parent, :field => field, :row => @row} %>
</div>
</div>
<div style="clear:both"></div>