Skip to content

Commit

Permalink
Creating the Views
Browse files Browse the repository at this point in the history
  • Loading branch information
QISUN000 committed Feb 27, 2025
1 parent 945b1d0 commit 17706ce
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 8 deletions.
20 changes: 18 additions & 2 deletions app/views/customers/alphabetized.html.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
<h1>Customers#alphabetized</h1>
<p>Find me in app/views/customers/alphabetized.html.erb</p>
<section class="section">
<div class="container">
<h1 class="title">Customers (Alphabetized)</h1>

<div class="buttons mb-4">
<%= link_to "View All", root_path, class: "button is-info" %>
<%= link_to "View Missing Email", customers_missing_email_path, class: "button is-warning" %>
</div>

<div class="columns is-multiline">
<% @customers.each do |customer| %>
<div class="column is-one-third">
<%= render customer %>
</div>
<% end %>
</div>
</div>
</section>
20 changes: 18 additions & 2 deletions app/views/customers/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
<h1>Customers#index</h1>
<p>Find me in app/views/customers/index.html.erb</p>
<section class="section">
<div class="container">
<h1 class="title">All Customers</h1>

<div class="buttons mb-4">
<%= link_to "View Alphabetized", customers_alphabetized_path, class: "button is-info" %>
<%= link_to "View Missing Email", customers_missing_email_path, class: "button is-warning" %>
</div>

<div class="columns is-multiline">
<% @customers.each do |customer| %>
<div class="column is-one-third">
<%= render customer %>
</div>
<% end %>
</div>
</div>
</section>
20 changes: 18 additions & 2 deletions app/views/customers/missing_email.html.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
<h1>Customers#missing_email</h1>
<p>Find me in app/views/customers/missing_email.html.erb</p>
<section class="section">
<div class="container">
<h1 class="title">Customers Missing Email</h1>

<div class="buttons mb-4">
<%= link_to "View All", root_path, class: "button is-info" %>
<%= link_to "View Alphabetized", customers_alphabetized_path, class: "button is-info" %>
</div>

<div class="columns is-multiline">
<% @customers.each do |customer| %>
<div class="column is-one-third">
<%= render customer %>
</div>
<% end %>
</div>
</div>
</section>
4 changes: 2 additions & 2 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Rails.application.routes.draw do
get "customers/index"
get "customers/alphabetized"
get "customers/missing_email"
get 'customers/alphabetized', to: 'customers#alphabetized'
get 'customers/missing_email', to: 'customers#missing_email'
devise_for :admin_users, ActiveAdmin::Devise.config
ActiveAdmin.routes(self)
# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
Expand Down

0 comments on commit 17706ce

Please sign in to comment.