nhironaka/maitri-app

View on GitHub
app/views/patients/_patient_list.html.erb

Summary

Maintainability
Test Coverage
<div class="table_container">
  <div class="table_header_container" id="table_header_">
    <table id="table_header">
      <thead>
        <tr>
          <% attr_map.keys.each do |attrb| %>
            <th id='<%=attrb%>_col'><%= sortable attrb %></th>
          <% end %>
        </tr>
      </thead>
    </table>
  </div>
  <div class="scrolling_table" id="patients_table_" onscroll="synch_scroll()">
    <table id="patients_table">
      <tbody>
        <% if not @patients.nil? %>
          <% @patients.each do |patient| %>
            <tr>
              <% attr_map.values.each do |val| %>
                <% if val == :two %>
                  <td><%= link_to patient.two, patient_path(patient), {:style=>'color:#008B00;', :class => "css_class"} %></td>
                <%else%>
                  <td><%= patient[val] %></td>
                  <%end%>
              <%end%>
            </tr>
          <% end %>
        <% end %>
     </tbody>
    </table>
  </div> 
</div>