From 4c399821684fa38b0d52b03932d7856b569478ab Mon Sep 17 00:00:00 2001 From: Guillermo Ramos Date: Tue, 4 Feb 2020 16:06:14 +0100 Subject: Exports (WIP) --- lib/waev_web/controllers/exports_controller.ex | 7 ++++++ lib/waev_web/router.ex | 2 ++ lib/waev_web/templates/exports/show.html.eex | 35 ++++++++++++++++++++++++++ lib/waev_web/views/exports_view.ex | 3 +++ 4 files changed, 47 insertions(+) create mode 100644 lib/waev_web/controllers/exports_controller.ex create mode 100644 lib/waev_web/templates/exports/show.html.eex create mode 100644 lib/waev_web/views/exports_view.ex (limited to 'lib/waev_web') diff --git a/lib/waev_web/controllers/exports_controller.ex b/lib/waev_web/controllers/exports_controller.ex new file mode 100644 index 0000000..a50896e --- /dev/null +++ b/lib/waev_web/controllers/exports_controller.ex @@ -0,0 +1,7 @@ +defmodule WaevWeb.ExportsController do + use WaevWeb, :controller + + def show(conn, %{"id" => id}) do + render(conn, "show.html", id: id) + end +end diff --git a/lib/waev_web/router.ex b/lib/waev_web/router.ex index e98f87a..edd2c69 100644 --- a/lib/waev_web/router.ex +++ b/lib/waev_web/router.ex @@ -17,6 +17,8 @@ defmodule WaevWeb.Router do pipe_through :browser get "/", PageController, :index + # index,edit,new,show,create,update + resources "/exports", ExportsController, only: [:show] end # Other scopes may use custom stacks. diff --git a/lib/waev_web/templates/exports/show.html.eex b/lib/waev_web/templates/exports/show.html.eex new file mode 100644 index 0000000..4351a17 --- /dev/null +++ b/lib/waev_web/templates/exports/show.html.eex @@ -0,0 +1,35 @@ +ID: <%= @id %> + +
+
+
+

Left

+
    +
  • + Link 1 +
  • +
  • + Text 2 +
  • +
  • + Text 3 +
  • +
+
+
+

Right

+
    +
  • + Link 1 +
  • +
  • + Text 2 +
  • +
  • + Text 3 +
  • +
+
+
+
+ diff --git a/lib/waev_web/views/exports_view.ex b/lib/waev_web/views/exports_view.ex new file mode 100644 index 0000000..c4b637f --- /dev/null +++ b/lib/waev_web/views/exports_view.ex @@ -0,0 +1,3 @@ +defmodule WaevWeb.ExportsView do + use WaevWeb, :view +end -- cgit v1.2.3