Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add alert flash message and move to partial #62

Merged
merged 1 commit into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions app/views/assertions/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<div class="container px-6 mx-auto mt-10 grid">
<% if notice.present? %>
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block" id="notice"><%= notice %></p>
<% end %>
<%= render 'layouts/flash' %>

<% content_for :title, "Assertions" %>

Expand Down
4 changes: 1 addition & 3 deletions app/views/assertions/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<div class="container px-6 mx-auto mt-10 grid">
<div class="mx-auto">
<% if notice.present? %>
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block" id="notice"><%= notice %></p>
<% end %>
<%= render 'layouts/flash' %>

<%= render @assertion %>

Expand Down
7 changes: 7 additions & 0 deletions app/views/layouts/_flash.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<% if notice.present? %>
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block" id="notice"><%= notice %></p>
<% end %>

<% if alert.present? %>
<p class="py-2 px-3 bg-red-50 mb-5 text-red-500 font-medium rounded-lg inline-block" id="alert"><%= alert %></p>
<% end %>
4 changes: 1 addition & 3 deletions app/views/model_versions/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<div class="container px-6 mx-auto mt-10 grid">
<% if notice.present? %>
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block" id="notice"><%= notice %></p>
<% end %>
<%= render 'layouts/flash' %>

<% content_for :title, "Model versions" %>

Expand Down
4 changes: 1 addition & 3 deletions app/views/model_versions/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<div class="container px-6 mx-auto mt-10 grid">
<% if notice.present? %>
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block" id="notice"><%= notice %></p>
<% end %>
<%= render 'layouts/flash' %>

<%= render @model_version %>

Expand Down
4 changes: 1 addition & 3 deletions app/views/models/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<div class="container px-6 mx-auto mt-10 grid">
<% if notice.present? %>
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block" id="notice"><%= notice %></p>
<% end %>
<%= render 'layouts/flash' %>

<% content_for :title, "Models" %>

Expand Down
4 changes: 1 addition & 3 deletions app/views/models/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<div class="container px-6 mx-auto mt-10 grid">
<% if notice.present? %>
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block" id="notice"><%= notice %></p>
<% end %>
<%= render 'layouts/flash' %>

<%= render @model %>

Expand Down
4 changes: 1 addition & 3 deletions app/views/prompts/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<div class="container px-6 mx-auto mt-10 grid">
<% if notice.present? %>
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block" id="notice"><%= notice %></p>
<% end %>
<%= render 'layouts/flash' %>

<% content_for :title, "Prompts" %>

Expand Down
4 changes: 1 addition & 3 deletions app/views/prompts/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<div class="container px-6 mx-auto mt-10 grid">
<% if notice.present? %>
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block" id="notice"><%= notice %></p>
<% end %>
<%= render 'layouts/flash' %>

<%= render @prompt %>

Expand Down
4 changes: 1 addition & 3 deletions app/views/test_model_version_runs/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<div class="container px-6 mx-auto mt-10 grid">
<% if notice.present? %>
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block" id="notice"><%= notice %></p>
<% end %>
<%= render 'layouts/flash' %>

<%= render @test_model_version_run %>

Expand Down
4 changes: 1 addition & 3 deletions app/views/test_runs/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<div class="container px-6 mx-auto mt-10 grid">
<% if notice.present? %>
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block" id="notice"><%= notice %></p>
<% end %>
<%= render 'layouts/flash' %>

<% content_for :title, "Test Runs" %>

Expand Down
4 changes: 1 addition & 3 deletions app/views/test_runs/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<div class="container px-6 mx-auto mt-10 grid">
<% if notice.present? %>
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block" id="notice"><%= notice %></p>
<% end %>
<%= render 'layouts/flash' %>

<%= render @test_run %>

Expand Down
Loading