planner/lib/planner_web/templates/task/show.html.eex

26 lines
938 B
Elixir

<div class="box">
<%= if not is_nil(@task.due_at) or is_nil(@task.filed_at) do %>
<div class="tags">
<%= if not is_nil(@task.due_at) do %><span class="tag is-warning">due: <%= @task.due_at %></span><% end %>
<%= if is_nil(@task.filed_at) do %><span class="tag is-danger">unfiled</span><% end %>
</div>
<% end %>
<div class="mb-5">
<%= md_to_html @task.value %>
</div>
<div class="tags">
<span class="tag is-light">updated: <%= @task.updated_at %></span>
<span class="tag is-light">created: <%= @task.inserted_at %></span>
</div>
<div class="field is-grouped">
<p class="control">
<%= link "edit", to: Routes.task_path(@conn, :edit, @task.id), class: "button is-dark" %>
</p>
<p class="control">
<%= link "delete", to: Routes.task_path(@conn, :delete, @task.id), class: "button is-dark", method: :delete, data: [confirm: "are you sure?"] %>
</p>
</div>
</div>