app/views/fe/answer_sheets/_element.html.erb in fe-1.0.0 vs app/views/fe/answer_sheets/_element.html.erb in fe-2.0.0

- old
+ new

@@ -1,13 +1,15 @@ <% if element.kind == "Fe::QuestionGrid" || element.kind == "Fe::QuestionGridWithTotal"-%> <li> - <label class="desc"><%= raw element.label %></label> + <% unless element.hide_label? %> + <label class="desc"><%= raw element.label %></label> + <% end %> <table class="grid"> <%- if element.cols -%> <tr> - <%- element.cols.split(';').each do |header| -%> - <th><%= raw header || '&nbsp;' %></th> + <%- element.cols.split(";").each do |header| -%> + <th><%= raw header || "&nbsp;" %></th> <%- end -%> </tr> <%- end -%> <tr> <%- col_count = 0 @@ -29,14 +31,14 @@ <%- else -%> <span class="answer"><%= simple_format grid_element.display_response(@answer_sheet) %></span> <%- end -%> <% elsif grid_element.is_a?(Fe::QuestionGrid) || grid_element.is_a?(Fe::QuestionGridWithTotal) %> <ul> - <%= render :partial => 'fe/answer_sheets/element', :object => grid_element %> + <%= render partial: "fe/answer_sheets/element", object: grid_element %> </ul> <% else %> - <%= render :partial => 'fe/questions/' + element.ptemplate, :object => element %> + <%= render partial: "fe/questions/" + element.ptemplate, object: element %> <% end %> <% end -%> </td> <%- col_count += 1 if col_count % element.num_cols == 0 then col_count = 0 -%></tr><tr><%- end -%> @@ -61,12 +63,12 @@ <%- end -%> <%- else -%> <span class="answer"><%= simple_format element.display_response(@answer_sheet) %></span> <%- end -%> <% else -%> - <%= render :partial => 'fe/questions/' + element.ptemplate, :object => element %> + <%= render partial: "fe/questions/" + element.ptemplate, object: element %> <% end -%> </li> <% element.choice_field_children.each do |choice_field_child| %> - <%= render 'fe/answer_sheets/element', element: choice_field_child %> + <%= render "fe/answer_sheets/element", element: choice_field_child %> <% end %> <% end -%>