vegantech/sims

View on GitHub
app/views/grouped_progress_entries/edit.html.erb

Summary

Maintainability
Test Coverage
<h1>Enter Progress Monitor Scores and Comments</h1>

<h2>
Intervention-<%=@grouped_progress_entry %>
</h2>

<h3>
  <%=@probe_definition.title %>
</h3>
<p>
  <%=@probe_definition.description %>
</p>
<%=links_and_attachments(@probe_definition, 'p') %>


<p>Min: <%=@probe_definition.minimum_score %> -  Max: <%=@probe_definition.maximum_score %></p>

<%="Benchmarks:" if  @probe_definition.probe_definition_benchmarks.any? %> <br />
<%= @probe_definition.probe_definition_benchmarks.join('<br />') %>

<%= form_for(@grouped_progress_entry) do |f| %>
  <div>
    <span class="check_all">
      <%=label_tag "check_all", "Check All" %>
      <%=check_box_tag 'check_all'%>
    </span>
    <span id="global_date">
      <%=f.unobtrusive_date_picker :global_date , {:order => [:month, :day, :year]}%>
    </span>
  </div>


  <%#= f.error_messages %>
  <table>
    <thead>
      <tr>
        <th>&nbsp;</th>
        <th>End <%=help_popup "This allows you to end multiple interventions at once.   Click the End link at the bottom to view the End Intervention Form." %></th>
        <th>Student</th>
        <th>Score <%=help_popup("You may enter a score in the left field, or a ratio using the right two fields which will populate the score field for you.")%></th>
        <th>Date</th>
        <th>Comment</th>
      </tr>
    </thead>
    <tbody id="grouped_progress_list">
      <% for @student_intervention in @grouped_progress_entry.student_interventions  %>
        <tr>
          <%= fields_for "student_intervention[]" do |field| %>
            <td><div style="color: red"><%=@student_intervention.errors%></div></td>
            <td><%=check_box_tag 'end_intervention[]', @student_intervention.id, false, :id => "end_intervention_#{@student_intervention.id}" %></td>
            <td><%= label_tag "end_intervention_#{@student_intervention.id}", @student_intervention.student %></td>
            <td><%= field.text_field :score, :size=>4, :maxlength=>4, :class => 'score'%> or
              <%=field.text_field :numerator, :size => 4,:class => "numerator"%>:<%=field.text_field :denominator, :size =>4,:class => "demoninator"%> </td>
            <td class="date"><%@student_intervention.date%><%= field.unobtrusive_date_picker :date, :order => [:month, :day, :year] %></td>
            <td><%= field.text_area(:comment, :size => '25x2', :class => 'spell_check') %> </td>

          <% end %>
        </tr>
     <% end %>

    </tbody>
  </table>
  <p>
  <%=link_to("Add Participant", '#', :id => 'new_participant_link') %>
  <%= render  :partial => 'new_participant', :locals => {:users => @grouped_progress_entry.staff} %>
</p>
  <div id="participants_list">
  </div>
  <p>
  <%= f.submit 'Add Scores' %> <%=spell_check_button%>
  </p>
  <p>
    <%= render :partial => 'interventions/end/link' %>
  </p>

<% end %>
<div id="grouped_end_reasons">
<%= render 'interventions/end/reasons', :intervention => @grouped_progress_entry %>
</div>
<%= link_to 'Back', grouped_progress_entries_path %>