From 033d07a519bac03fdfd28ca15e09cc287e80fd14 Mon Sep 17 00:00:00 2001 From: neodarz Date: Tue, 24 Jan 2017 17:09:18 +0100 Subject: Initial commit with non-functional pieces of code about file upload --- web/templates/audio_file/edit.html.eex | 6 ++++++ web/templates/audio_file/form.html.eex | 29 +++++++++++++++++++++++++++++ web/templates/audio_file/index.html.eex | 30 ++++++++++++++++++++++++++++++ web/templates/audio_file/new.html.eex | 6 ++++++ web/templates/audio_file/show.html.eex | 23 +++++++++++++++++++++++ 5 files changed, 94 insertions(+) create mode 100644 web/templates/audio_file/edit.html.eex create mode 100644 web/templates/audio_file/form.html.eex create mode 100644 web/templates/audio_file/index.html.eex create mode 100644 web/templates/audio_file/new.html.eex create mode 100644 web/templates/audio_file/show.html.eex (limited to 'web/templates/audio_file') 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 @@ +

Edit audio file

+ +<%= 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 %> +
+

Oops, something went wrong! Please check the errors below.

+
+ <% end %> + +
+ <%= label f, :audio_path, class: "control-label" %> + <%= file_input f, :audio_path, class: "form-control" %> + <%= error_tag f, :audio_path %> +
+ +
+ <%= label f, :transcription_file_path, class: "control-label" %> + <%= text_input f, :transcription_file_path, class: "form-control" %> + <%= error_tag f, :transcription_file_path %> +
+ +
+ <%= label f, :audio_duration, class: "control-label" %> + <%= text_input f, :audio_duration, class: "form-control" %> + <%= error_tag f, :audio_duration %> +
+ +
+ <%= submit "Submit", class: "btn btn-primary" %> +
+<% 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 @@ +

Listing audio file

+ + + + + + + + + + + + +<%= for audio_file <- @audio_file do %> + + + + + + + +<% end %> + +
Audio pathTranscription file pathAudio duration
<%= audio_file.audio_path %><%= audio_file.transcription_file_path %><%= audio_file.audio_duration %> + <%= 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" %> +
+ +<%= 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 @@ +

New audio file

+ +<%= 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 @@ +

Show audio file

+ + + +<%= link "Edit", to: audio_file_path(@conn, :edit, @audio_file) %> +<%= link "Back", to: audio_file_path(@conn, :index) %> -- cgit v1.2.1