From db644c85be3aff0022b645a5819b4495ccac90aa Mon Sep 17 00:00:00 2001 From: Manuel Bustillo Date: Fri, 1 Nov 2024 19:08:01 +0100 Subject: [PATCH] Remove HTML views --- app/views/expenses/_expense.html.erb | 19 ---------- app/views/expenses/_form.html.erb | 34 ----------------- app/views/expenses/edit.html.erb | 12 ------ app/views/expenses/index.html.erb | 30 --------------- app/views/expenses/new.html.erb | 11 ------ app/views/expenses/show.html.erb | 12 ------ app/views/guests/_form.html.erb | 39 -------------------- app/views/guests/_guest.html.erb | 24 ------------ app/views/guests/edit.html.erb | 12 ------ app/views/guests/index.html.erb | 39 -------------------- app/views/guests/new.html.erb | 11 ------ app/views/guests/show.html.erb | 12 ------ app/views/layouts/application.html.erb | 18 --------- app/views/tables_arrangements/index.html.erb | 11 ------ app/views/tables_arrangements/show.html.erb | 18 --------- 15 files changed, 302 deletions(-) delete mode 100644 app/views/expenses/_expense.html.erb delete mode 100644 app/views/expenses/_form.html.erb delete mode 100644 app/views/expenses/edit.html.erb delete mode 100644 app/views/expenses/index.html.erb delete mode 100644 app/views/expenses/new.html.erb delete mode 100644 app/views/expenses/show.html.erb delete mode 100644 app/views/guests/_form.html.erb delete mode 100644 app/views/guests/_guest.html.erb delete mode 100644 app/views/guests/edit.html.erb delete mode 100644 app/views/guests/index.html.erb delete mode 100644 app/views/guests/new.html.erb delete mode 100644 app/views/guests/show.html.erb delete mode 100644 app/views/layouts/application.html.erb delete mode 100644 app/views/tables_arrangements/index.html.erb delete mode 100644 app/views/tables_arrangements/show.html.erb diff --git a/app/views/expenses/_expense.html.erb b/app/views/expenses/_expense.html.erb deleted file mode 100644 index 5bac9f6..0000000 --- a/app/views/expenses/_expense.html.erb +++ /dev/null @@ -1,19 +0,0 @@ -<%# Copyright (C) 2024 Manuel Bustillo %> - -
-

- Name: - <%= expense.name %> -

- -

- Amount: - <%= expense.amount %> -

- -

- Pricing type: - <%= expense.pricing_type %> -

- -
diff --git a/app/views/expenses/_form.html.erb b/app/views/expenses/_form.html.erb deleted file mode 100644 index 8d9cd9c..0000000 --- a/app/views/expenses/_form.html.erb +++ /dev/null @@ -1,34 +0,0 @@ -<%# Copyright (C) 2024 Manuel Bustillo %> - -<%= form_with(model: expense) do |form| %> - <% if expense.errors.any? %> -
-

<%= pluralize(expense.errors.count, "error") %> prohibited this expense from being saved:

- - -
- <% end %> - -
- <%= form.label :name, style: "display: block" %> - <%= form.text_field :name %> -
- -
- <%= form.label :amount, style: "display: block" %> - <%= form.text_field :amount %> -
- -
- <%= form.label :pricing_type, style: "display: block" %> - <%= form.text_field :pricing_type %> -
- -
- <%= form.submit %> -
-<% end %> diff --git a/app/views/expenses/edit.html.erb b/app/views/expenses/edit.html.erb deleted file mode 100644 index 032aba0..0000000 --- a/app/views/expenses/edit.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -<%# Copyright (C) 2024 Manuel Bustillo %> - -

Editing expense

- -<%= render "form", expense: @expense %> - -
- -
- <%= link_to "Show this expense", @expense %> | - <%= link_to "Back to expenses", expenses_path %> -
diff --git a/app/views/expenses/index.html.erb b/app/views/expenses/index.html.erb deleted file mode 100644 index 6e4fd28..0000000 --- a/app/views/expenses/index.html.erb +++ /dev/null @@ -1,30 +0,0 @@ -<%# Copyright (C) 2024 Manuel Bustillo %> - -

<%= notice %>

- -

Expenses

- -
- - - - - - - <% @expenses.each do |expense| %> - - - - - - - <% end %> - - - - - -
NameAmount
<%= expense.name %><%= expense.amount.to_currency %><%= link_to "Show", expense %><%= link_to "Edit", edit_expense_path(expense) %>
Total<%= @expenses.sum(&:amount).to_currency %>
-
- -<%= link_to "New expense", new_expense_path %> diff --git a/app/views/expenses/new.html.erb b/app/views/expenses/new.html.erb deleted file mode 100644 index a7b9844..0000000 --- a/app/views/expenses/new.html.erb +++ /dev/null @@ -1,11 +0,0 @@ -<%# Copyright (C) 2024 Manuel Bustillo %> - -

New expense

- -<%= render "form", expense: @expense %> - -
- -
- <%= link_to "Back to expenses", expenses_path %> -
diff --git a/app/views/expenses/show.html.erb b/app/views/expenses/show.html.erb deleted file mode 100644 index b2bec00..0000000 --- a/app/views/expenses/show.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -<%# Copyright (C) 2024 Manuel Bustillo %> - -

<%= notice %>

- -<%= render @expense %> - -
- <%= link_to "Edit this expense", edit_expense_path(@expense) %> | - <%= link_to "Back to expenses", expenses_path %> - - <%= button_to "Destroy this expense", @expense, method: :delete %> -
diff --git a/app/views/guests/_form.html.erb b/app/views/guests/_form.html.erb deleted file mode 100644 index e2daaf5..0000000 --- a/app/views/guests/_form.html.erb +++ /dev/null @@ -1,39 +0,0 @@ -<%# Copyright (C) 2024 Manuel Bustillo %> - -<%= form_with(model: guest) do |form| %> - <% if guest.errors.any? %> -
-

<%= pluralize(guest.errors.count, "error") %> prohibited this guest from being saved:

- - -
- <% end %> - -
- <%= form.label :first_name, style: "display: block" %> - <%= form.text_field :first_name %> -
- -
- <%= form.label :last_name, style: "display: block" %> - <%= form.text_field :last_name %> -
- -
- <%= form.label :email, style: "display: block" %> - <%= form.text_field :email %> -
- -
- <%= form.label :phone, style: "display: block" %> - <%= form.text_field :phone %> -
- -
- <%= form.submit %> -
-<% end %> diff --git a/app/views/guests/_guest.html.erb b/app/views/guests/_guest.html.erb deleted file mode 100644 index ed160f9..0000000 --- a/app/views/guests/_guest.html.erb +++ /dev/null @@ -1,24 +0,0 @@ -<%# Copyright (C) 2024 Manuel Bustillo %> - -
-

- First name: - <%= guest.first_name %> -

- -

- Last name: - <%= guest.last_name %> -

- -

- Email: - <%= guest.email %> -

- -

- Phone: - <%= guest.phone %> -

- -
diff --git a/app/views/guests/edit.html.erb b/app/views/guests/edit.html.erb deleted file mode 100644 index d59a8e7..0000000 --- a/app/views/guests/edit.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -<%# Copyright (C) 2024 Manuel Bustillo %> - -

Editing guest

- -<%= render "form", guest: @guest %> - -
- -
- <%= link_to "Show this guest", @guest %> | - <%= link_to "Back to guests", guests_path %> -
diff --git a/app/views/guests/index.html.erb b/app/views/guests/index.html.erb deleted file mode 100644 index 3ef84c4..0000000 --- a/app/views/guests/index.html.erb +++ /dev/null @@ -1,39 +0,0 @@ -<%# Copyright (C) 2024 Manuel Bustillo %> - -

<%= notice %>

- -

Guests

- -
- - - - - - - - - - - <% @guests.each_with_index do |guest, i| %> - - - - - - - - - - - <% end %> -
Row #NameEmailPhoneAffinity groupsUnbreakable bonds
<%= i + 1 %><%= guest.full_name %><%= guest.email %><%= guest.phone %><%= guest.affinity_groups.pluck(:name).join(", ") %><%= guest.unbreakable_bonds.pluck(:name).join(", ") %><%= link_to "Show", guest %><%= link_to "Edit", edit_guest_path(guest) %>
-
- -<%= link_to "New guest", new_guest_path %> - -<%= form_with url: import_guests_path, method: :post do |form| %> - <%= form.label :file %> - <%= form.file_field :file %> - <%= form.submit "Import" %> -<% end %> diff --git a/app/views/guests/new.html.erb b/app/views/guests/new.html.erb deleted file mode 100644 index 8405d09..0000000 --- a/app/views/guests/new.html.erb +++ /dev/null @@ -1,11 +0,0 @@ -<%# Copyright (C) 2024 Manuel Bustillo %> - -

New guest

- -<%= render "form", guest: @guest %> - -
- -
- <%= link_to "Back to guests", guests_path %> -
diff --git a/app/views/guests/show.html.erb b/app/views/guests/show.html.erb deleted file mode 100644 index 6976007..0000000 --- a/app/views/guests/show.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -<%# Copyright (C) 2024 Manuel Bustillo %> - -

<%= notice %>

- -<%= render @guest %> - -
- <%= link_to "Edit this guest", edit_guest_path(@guest) %> | - <%= link_to "Back to guests", guests_path %> - - <%= button_to "Destroy this guest", @guest, method: :delete %> -
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb deleted file mode 100644 index 4c8aeb2..0000000 --- a/app/views/layouts/application.html.erb +++ /dev/null @@ -1,18 +0,0 @@ -<%# Copyright (C) 2024 Manuel Bustillo %> - - - - - WeddingPlanner - - <%= csrf_meta_tags %> - <%= csp_meta_tag %> - - <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %> - <%= javascript_importmap_tags %> - - - - <%= yield %> - - diff --git a/app/views/tables_arrangements/index.html.erb b/app/views/tables_arrangements/index.html.erb deleted file mode 100644 index b24f7da..0000000 --- a/app/views/tables_arrangements/index.html.erb +++ /dev/null @@ -1,11 +0,0 @@ -<%# Copyright (C) 2024 Manuel Bustillo %> - -

Tables arrangements

- -
    - <% @tables_arrangements.each_with_index do |tables_arrangement, i| %> -
  1. -

    <%= link_to "Arrangement ##{i+1}", tables_arrangement_path(tables_arrangement) %> Discomfort: <%= tables_arrangement.discomfort %>

    -
  2. - <% end %> -
\ No newline at end of file diff --git a/app/views/tables_arrangements/show.html.erb b/app/views/tables_arrangements/show.html.erb deleted file mode 100644 index cc90581..0000000 --- a/app/views/tables_arrangements/show.html.erb +++ /dev/null @@ -1,18 +0,0 @@ -<%# Copyright (C) 2024 Manuel Bustillo %> - -

ID: <%= @tables_arrangement.id %>

- -

Discomfort: <%= @tables_arrangement.discomfort %>

- -

Seats

- -<% @seats.each do |table_number, seats| %> - -

Table <%= table_number %>

- - -<% end %> \ No newline at end of file