<div metal:use-macro="request.sdiapi.main_template" i18n:domain="substanced">

  <div metal:fill-slot="main">

    <div tal:repeat="(catalog,indexes) catalogs" style="margin-bottom: 20px">
    
      <div class="panel panel-default">
        <div class="panel-heading" i18n:translate="">
          Catalog service at "${request.resource_path(catalog)}"
        </div>
        <div class="panel-body">
          <table class="table table-striped">

            <thead>
              <tr>
                <th i18n:translate="">Index name</th>
                <th i18n:translate="">Value</th>
              </tr>
            </thead>

            <tbody>
              <tr tal:repeat="index indexes">
                <td>${index['index'].__name__}</td>
                <td>${index['value']}</td>
              </tr>
            </tbody>
          </table>

          <form action="@@indexing" method="post" onsubmit="sdi.loading_indicator_on()">
            <input type="hidden" name="csrf_token" 
                   value="${request.session.get_csrf_token()}"/>
            <input type="submit" name="form.reindex" class="btn btn-primary" value="Reindex This Object" i18n:attributes="value"/>
          </form>

        </div>
      </div>
    </div>

  </div>

</div>

