aboutsummaryrefslogtreecommitdiff
path: root/shardweb/lib/templates/directory
diff options
context:
space:
mode:
Diffstat (limited to 'shardweb/lib/templates/directory')
-rw-r--r--shardweb/lib/templates/directory/view.html.eex38
1 files changed, 38 insertions, 0 deletions
diff --git a/shardweb/lib/templates/directory/view.html.eex b/shardweb/lib/templates/directory/view.html.eex
new file mode 100644
index 0000000..b981391
--- /dev/null
+++ b/shardweb/lib/templates/directory/view.html.eex
@@ -0,0 +1,38 @@
+<!-- Page Heading -->
+<div class="row">
+ <div class="col-lg-12">
+ <h1 class="page-header">
+ <%= @name %>
+ <small>directory contents</small>
+
+ </h1>
+ <ol class="breadcrumb">
+ <li class="active">
+ <i class="fa fa-folder"></i> <%= @name %>
+ </li>
+ </ol>
+ </div>
+</div>
+<!-- /.row -->
+
+<%= render ShardWeb.LayoutView, "flashes.html", assigns %>
+
+<table class="table table-striped">
+ <tr>
+ <th>Name</th>
+ <th>Shard</th>
+ <th>Id</th>
+ </tr>
+ <%= for {name, manifest} <- dir_contents(@conn, @shard) do %>
+ <tr>
+ <td>
+ <strong><%= name %></strong>
+ </td>
+ <td>
+ <%= render ShardWeb.PageView, "shard_entry.html", conn: @conn, manifest: manifest %>
+ </td>
+ <td><small><%= (SData.term_hash manifest) |> Base.encode16 %></small></td>
+ </tr>
+ <% end %>
+</table>
+