Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 1st, 2012  |  syntax: None  |  size: 2.30 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <div class="submit_question">
  2.   <h4 style="float:left">
  3.     <%= h( ( question.value_in(:short_title, @authorization_record.language) + "- " + question.value_in(:title, @authorization_record.language, loop_item))) %><%=  " *" if question.is_mandatory %>
  4.   </h4>
  5.   <div class="clear">
  6.     <% if question.description.present?  -%>
  7.         <p class="q_description"><%= h(question.value_in(:description, @authorization_record.language)) %></p>
  8.     <% end -%>
  9.     <%# if answer = current_user_answers(question) -%>
  10.     <div class="answer_fields_wrapper">
  11.       <% if question.answer_type.help_text.present? -%>
  12.           <p class="tooltips" style="float: right">
  13.             <%= tooltip(question.value_in(:short_title, @authorization_record.language), question.answer_type.value_in(:help_text, @authorization_record.language)) %>
  14.             <%#= image_tag('qmark.png', :size => "20x20", :title => "Answering tips - " + h(question.answer_type.help_text), :class => "img_tooltip")%>
  15.           </p>
  16.       <% end -%>
  17.       <%= render :partial => "#{question.answer_type_type.underscore}s/submission", :locals => { :question => question, :answer_type => question.answer_type, :loop_item => loop_item, :looping_identifier => looping_identifier } %>
  18.     </div>
  19.     <div id="answer_doc_<%= question.id.to_s + (looping_identifier ? "_#{looping_identifier}" : "")%>" class="clear">
  20.       <% answer = Answer.find_by_question_id_and_user_id_and_looping_identifier(question.id, current_user, looping_identifier ? looping_identifier : nil) %>
  21.       <% if answer.present? and answer.documents.present? -%>
  22.           <div id="docs_list_<%= question.id.to_s + (looping_identifier ? "_#{looping_identifier}" : "")%>">
  23.             <p>You have added the following documents to this answer.</p>
  24.             <ul>
  25.               <% answer.documents.each do |document| -%>
  26.                   <li><%= link_to h(document.doc_file_name), document.doc.url %> <%=h document.description %></li>
  27.               <% end -%>
  28.             </ul>
  29.           </div>
  30.       <% end %>
  31.       <p><%= link_to "Add or remove documents from this answer", add_document_answer_path(question, :looping_identifier => looping_identifier ? looping_identifier : nil), :class => "get" %></p>
  32.     </div><!-- /answer_doc_id -->
  33.     <%# end -%>
  34.   </div>
  35. </div><!-- /questions_show -->