<%= @name %> <%= @manifest |> ShardURI.from_manifest %>

<%= render ShardWeb.LayoutView, "flashes.html", assigns %> <%= for {name, {manifest, stored}} <- dir_contents(@conn, @manifest) do %> <% end %>
Name Shard URI
<%= if stored do %> <% else %> <% end %> <%= name %> <%= render ShardWeb.PageView, "shard_entry.html", conn: @conn, manifest: manifest, pk: @pk %> <%= form_for @conn, directory_path(@conn, :dir_rm), [class: "form-inline", style: "display: inline"], fn f -> %> <%= hidden_input f, :dir_name, value: @name %> <%= hidden_input f, :dir_public, value: @public %> <%= hidden_input f, :item_name, value: name %> <%= submit "Remove", [class: "btn btn-xs btn-danger"] %> <% end %> <%= form_for @conn, directory_path(@conn, :dir_set_stored), [class: "form-inline", style: "display: inline"], fn f -> %> <%= hidden_input f, :dir_name, value: @name %> <%= hidden_input f, :dir_public, value: @public %> <%= hidden_input f, :item_name, value: name %> <%= hidden_input f, :item_stored, value: (if stored do "false" else "true" end) %> <%= if stored do %> <%= submit "Don't store", [class: "btn btn-xs btn-warning"] %> <% else %> <%= submit "Store", [class: "btn btn-xs btn-success"] %> <% end %> <% end %> <%= manifest |> ShardURI.from_manifest %>
<%= if @owner == @pk do %>
Add existing item <%= form_for @conn, directory_path(@conn, :dir_add), [class: "form-horizontal"], fn f -> %> <%= hidden_input f, :dir_name, value: @name %> <%= hidden_input f, :dir_public, value: @public %>
<%= label :add_name, "Name:", class: ["col-sm-2 control-label"] %>
<%= text_input f, :add_name, [class: "form-control", value: ""] %>
<%= label :add_uri, "URI:", class: ["col-sm-2 control-label"] %>
<%= text_input f, :add_uri, [class: "form-control", placeholder: "example: shard:identity:xxx"] %>
<%= submit "Add", [class: "btn btn-default"] %>
<% end %>
<% end %>