<!DOCTYPE html>
<html>
<%- include partial/head.ejs %>
  <body>
    <div class="container-fluid" id="container">
      <div class="row row-offcanvas row-offcanvas-left">
<%- include partial/stranski-menu.ejs %>
        <div class="container-fluid main col-sm-12">
          <div class="page-header">
            <h1><%= title %></h1>
          </div>
<%- include partial/iskalnik.ejs %>
          <table class="table">
            <thead>
              <tr>
                <th>Naziv</th>
                <th>Šifra proračunskega uporabnika</th>
                <th>Naslov</th>
                <th>Pošta</th>
                <th>Poštna številka</th>
                <th>Občina</th>
                <th></th>
              </tr>
            </thead>
            <% for(i = 0; i < results.length; i++) { %>
            <tr>
              <td><a href="/organ/<%= results[i].sifra_pu %>"><%= results[i].naziv %></a></td>
              <td><a href="/organ/<%= results[i].sifra_pu %>"><%= results[i].sifra_pu %></a></td>
              <td><%= results[i].naslov %></td>
              <td><%= results[i].posta %></td>
              <td align="right"><%= results[i].postna_stevilka %></td>
              <td><%= results[i].obcina %></td>
              <% 
                var barva = 'black';
                if(results[i].lokacija) barva = 'green';
                if(!results[i].sifra_pu) barva = 'gray';
              %>
              <td><span class="fa fa-globe <%= barva %>" aria-hidden="true"></td>
            </tr>
            <% } %>
          </table>
          <p><small>Render Engine: <%= engine %></small></p> 
        </div>
      </div>
    </div> <!-- /container -->    
<%- include partial/eof.ejs %>
  </body>
</html>
