aboutsummaryrefslogtreecommitdiff
path: root/web/templates/audio_file
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--web/templates/audio_file/edit.html.eex6
-rw-r--r--web/templates/audio_file/form.html.eex29
-rw-r--r--web/templates/audio_file/index.html.eex30
-rw-r--r--web/templates/audio_file/new.html.eex6
-rw-r--r--web/templates/audio_file/show.html.eex23
5 files changed, 94 insertions, 0 deletions
diff --git a/web/templates/audio_file/edit.html.eex b/web/templates/audio_file/edit.html.eex
new file mode 100644
index 0000000..d5f9593
--- /dev/null
+++ b/web/templates/audio_file/edit.html.eex
@@ -0,0 +1,6 @@
+<h2>Edit audio file</h2>
+
+<%= render "form.html", changeset: @changeset,
+ action: audio_file_path(@conn, :update, @audio_file) %>
+
+<%= link "Back", to: audio_file_path(@conn, :index) %>
diff --git a/web/templates/audio_file/form.html.eex b/web/templates/audio_file/form.html.eex
new file mode 100644
index 0000000..2667f23
--- /dev/null
+++ b/web/templates/audio_file/form.html.eex
@@ -0,0 +1,29 @@
+<%= form_for @changeset, @action, [multipart: true], fn f -> %>
+ <%= if @changeset.action do %>
+ <div class="alert alert-danger">
+ <p>Oops, something went wrong! Please check the errors below.</p>
+ </div>
+ <% end %>
+
+ <div class="form-group">
+ <%= label f, :audio_path, class: "control-label" %>
+ <%= file_input f, :audio_path, class: "form-control" %>
+ <%= error_tag f, :audio_path %>
+ </div>
+
+ <div class="form-group">
+ <%= label f, :transcription_file_path, class: "control-label" %>
+ <%= text_input f, :transcription_file_path, class: "form-control" %>
+ <%= error_tag f, :transcription_file_path %>
+ </div>
+
+ <div class="form-group">
+ <%= label f, :audio_duration, class: "control-label" %>
+ <%= text_input f, :audio_duration, class: "form-control" %>
+ <%= error_tag f, :audio_duration %>
+ </div>
+
+ <div class="form-group">
+ <%= submit "Submit", class: "btn btn-primary" %>
+ </div>
+<% end %>
diff --git a/web/templates/audio_file/index.html.eex b/web/templates/audio_file/index.html.eex
new file mode 100644
index 0000000..445178d
--- /dev/null
+++ b/web/templates/audio_file/index.html.eex
@@ -0,0 +1,30 @@
+<h2>Listing audio file</h2>
+
+<table class="table">
+ <thead>
+ <tr>
+ <th>Audio path</th>
+ <th>Transcription file path</th>
+ <th>Audio duration</th>
+
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+<%= for audio_file <- @audio_file do %>
+ <tr>
+ <td><%= audio_file.audio_path %></td>
+ <td><%= audio_file.transcription_file_path %></td>
+ <td><%= audio_file.audio_duration %></td>
+
+ <td class="text-right">
+ <%= link "Show", to: audio_file_path(@conn, :show, audio_file), class: "btn btn-default btn-xs" %>
+ <%= link "Edit", to: audio_file_path(@conn, :edit, audio_file), class: "btn btn-default btn-xs" %>
+ <%= link "Delete", to: audio_file_path(@conn, :delete, audio_file), method: :delete, data: [confirm: "Are you sure?"], class: "btn btn-danger btn-xs" %>
+ </td>
+ </tr>
+<% end %>
+ </tbody>
+</table>
+
+<%= link "New audio file", to: audio_file_path(@conn, :new) %>
diff --git a/web/templates/audio_file/new.html.eex b/web/templates/audio_file/new.html.eex
new file mode 100644
index 0000000..916f7a3
--- /dev/null
+++ b/web/templates/audio_file/new.html.eex
@@ -0,0 +1,6 @@
+<h2>New audio file</h2>
+
+<%= render "form.html", changeset: @changeset,
+ action: audio_file_path(@conn, :create) %>
+
+<%= link "Back", to: audio_file_path(@conn, :index) %>
diff --git a/web/templates/audio_file/show.html.eex b/web/templates/audio_file/show.html.eex
new file mode 100644
index 0000000..2cc05d4
--- /dev/null
+++ b/web/templates/audio_file/show.html.eex
@@ -0,0 +1,23 @@
+<h2>Show audio file</h2>
+
+<ul>
+
+ <li>
+ <strong>Audio path:</strong>
+ <%= @audio_file.audio_path %>
+ </li>
+
+ <li>
+ <strong>Transcription file path:</strong>
+ <%= @audio_file.transcription_file_path %>
+ </li>
+
+ <li>
+ <strong>Audio duration:</strong>
+ <%= @audio_file.audio_duration %>
+ </li>
+
+</ul>
+
+<%= link "Edit", to: audio_file_path(@conn, :edit, @audio_file) %>
+<%= link "Back", to: audio_file_path(@conn, :index) %>