% rebase('base.tpl')

<style>
td .fa {
  font-size: 1.3em;
  margin-right: 0.5em;
}

</style>

<h3>
  <i class="fa fa-folder-o" aria-hidden="true"></i>
  objects/{{current_dir}}
</h3>

<h4><a href="/list/{{parent_dir}}">Parent directory</a></h4>

<table class="u-full-width"
       style="margin-top:1em">
  <tbody>
    %for item in content:
      <tr>
        <td>
          %if item['is_dir'] == True:
          <i class="fa fa-folder-o" aria-hidden="true"></i>
          <a href="/list/{{current_dir}}/{{item['name']}}">
            {{item['name']}}
          </a>
          %else:
            <i class="fa fa-file-o" aria-hidden="true"></i>
            %if item['is_object_file'] == True:
            <a href="/render/{{current_dir}}/{{item['name']}}">
              {{item['name']}}
            </a>
            %else:
              {{item['name']}}
            %end
          %end
        </td>
        <td>
            {{item['size']}}
        </td>
      </tr>
    %end
  </tbody>
</table>
