<h1 class="head">XML-Import</h1>
<br />

<% if @result.is_a?(String) %>
  <h2>Fehlerbericht</h2>
  <%= @result %>
  
  
<% else %>
  <h2>Ergebnis</h2>
  <table>
    <tr>
      <th></th>
      <th class="caption">geliefert</th>
      <th class="caption">ungültig</th>
      <th class="caption">importiert</th>
    </tr>
    <tr>
      <th class="caption">Kläranlagen</th>
      <td class="numeric"><%=  @result['plants']['total'] %></td>
      <td class="numeric"><%=  @result['plants']['total']-@result['plants']['valid'] %></td>
      <td class="numeric"><%=  @result['plants']['new'] %></td>
    </tr>
    <tr>
      <th class="caption">Siedlungsgebiete</th>
      <td class="numeric"><%=  @result['agglomerations']['total'] %></td>
      <td class="numeric"><%=  @result['agglomerations']['total']-@result['agglomerations']['valid'] %></td>
      <td class="numeric"><%=  @result['agglomerations']['new'] %></td>
    </tr>
    <tr>
      <th class="caption">Einleitstellen</th>
      <td class="numeric"><%=  @result['discharge_points']['total'] %></td>
      <td class="numeric"><%=  @result['discharge_points']['total']-@result['discharge_points']['valid'] %></td>
      <td class="numeric"><%=  @result['discharge_points']['new'] %></td>
    </tr>
    <tr>
      <th class="caption">Zuordungen K-S</th>
      <td class="numeric"><%=  @result['relations']['total'] %></td>
      <td class="numeric"><%=  @result['relations']['total']-@result['relations']['valid'] %></td>
      <td class="numeric"><%=  @result['relations']['new'] %></td>
    </tr>


  </table>
<% end %>
