Updated to Rails 7.0.5.1
This commit is contained in:
parent
b1009ec4de
commit
31e1311fe6
147
Gemfile.lock
147
Gemfile.lock
@ -1,79 +1,79 @@
|
|||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
actioncable (7.0.5)
|
actioncable (7.0.5.1)
|
||||||
actionpack (= 7.0.5)
|
actionpack (= 7.0.5.1)
|
||||||
activesupport (= 7.0.5)
|
activesupport (= 7.0.5.1)
|
||||||
nio4r (~> 2.0)
|
nio4r (~> 2.0)
|
||||||
websocket-driver (>= 0.6.1)
|
websocket-driver (>= 0.6.1)
|
||||||
actionmailbox (7.0.5)
|
actionmailbox (7.0.5.1)
|
||||||
actionpack (= 7.0.5)
|
actionpack (= 7.0.5.1)
|
||||||
activejob (= 7.0.5)
|
activejob (= 7.0.5.1)
|
||||||
activerecord (= 7.0.5)
|
activerecord (= 7.0.5.1)
|
||||||
activestorage (= 7.0.5)
|
activestorage (= 7.0.5.1)
|
||||||
activesupport (= 7.0.5)
|
activesupport (= 7.0.5.1)
|
||||||
mail (>= 2.7.1)
|
mail (>= 2.7.1)
|
||||||
net-imap
|
net-imap
|
||||||
net-pop
|
net-pop
|
||||||
net-smtp
|
net-smtp
|
||||||
actionmailer (7.0.5)
|
actionmailer (7.0.5.1)
|
||||||
actionpack (= 7.0.5)
|
actionpack (= 7.0.5.1)
|
||||||
actionview (= 7.0.5)
|
actionview (= 7.0.5.1)
|
||||||
activejob (= 7.0.5)
|
activejob (= 7.0.5.1)
|
||||||
activesupport (= 7.0.5)
|
activesupport (= 7.0.5.1)
|
||||||
mail (~> 2.5, >= 2.5.4)
|
mail (~> 2.5, >= 2.5.4)
|
||||||
net-imap
|
net-imap
|
||||||
net-pop
|
net-pop
|
||||||
net-smtp
|
net-smtp
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
actionpack (7.0.5)
|
actionpack (7.0.5.1)
|
||||||
actionview (= 7.0.5)
|
actionview (= 7.0.5.1)
|
||||||
activesupport (= 7.0.5)
|
activesupport (= 7.0.5.1)
|
||||||
rack (~> 2.0, >= 2.2.4)
|
rack (~> 2.0, >= 2.2.4)
|
||||||
rack-test (>= 0.6.3)
|
rack-test (>= 0.6.3)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
||||||
actiontext (7.0.5)
|
actiontext (7.0.5.1)
|
||||||
actionpack (= 7.0.5)
|
actionpack (= 7.0.5.1)
|
||||||
activerecord (= 7.0.5)
|
activerecord (= 7.0.5.1)
|
||||||
activestorage (= 7.0.5)
|
activestorage (= 7.0.5.1)
|
||||||
activesupport (= 7.0.5)
|
activesupport (= 7.0.5.1)
|
||||||
globalid (>= 0.6.0)
|
globalid (>= 0.6.0)
|
||||||
nokogiri (>= 1.8.5)
|
nokogiri (>= 1.8.5)
|
||||||
actionview (7.0.5)
|
actionview (7.0.5.1)
|
||||||
activesupport (= 7.0.5)
|
activesupport (= 7.0.5.1)
|
||||||
builder (~> 3.1)
|
builder (~> 3.1)
|
||||||
erubi (~> 1.4)
|
erubi (~> 1.4)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
||||||
activejob (7.0.5)
|
activejob (7.0.5.1)
|
||||||
activesupport (= 7.0.5)
|
activesupport (= 7.0.5.1)
|
||||||
globalid (>= 0.3.6)
|
globalid (>= 0.3.6)
|
||||||
activemodel (7.0.5)
|
activemodel (7.0.5.1)
|
||||||
activesupport (= 7.0.5)
|
activesupport (= 7.0.5.1)
|
||||||
activerecord (7.0.5)
|
activerecord (7.0.5.1)
|
||||||
activemodel (= 7.0.5)
|
activemodel (= 7.0.5.1)
|
||||||
activesupport (= 7.0.5)
|
activesupport (= 7.0.5.1)
|
||||||
activestorage (7.0.5)
|
activestorage (7.0.5.1)
|
||||||
actionpack (= 7.0.5)
|
actionpack (= 7.0.5.1)
|
||||||
activejob (= 7.0.5)
|
activejob (= 7.0.5.1)
|
||||||
activerecord (= 7.0.5)
|
activerecord (= 7.0.5.1)
|
||||||
activesupport (= 7.0.5)
|
activesupport (= 7.0.5.1)
|
||||||
marcel (~> 1.0)
|
marcel (~> 1.0)
|
||||||
mini_mime (>= 1.1.0)
|
mini_mime (>= 1.1.0)
|
||||||
activesupport (7.0.5)
|
activesupport (7.0.5.1)
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||||
i18n (>= 1.6, < 2)
|
i18n (>= 1.6, < 2)
|
||||||
minitest (>= 5.1)
|
minitest (>= 5.1)
|
||||||
tzinfo (~> 2.0)
|
tzinfo (~> 2.0)
|
||||||
addressable (2.8.4)
|
addressable (2.8.4)
|
||||||
public_suffix (>= 2.0.2, < 6.0)
|
public_suffix (>= 2.0.2, < 6.0)
|
||||||
bcrypt (3.1.18)
|
bcrypt (3.1.19)
|
||||||
bindex (0.8.1)
|
bindex (0.8.1)
|
||||||
bootsnap (1.16.0)
|
bootsnap (1.16.0)
|
||||||
msgpack (~> 1.2)
|
msgpack (~> 1.2)
|
||||||
builder (3.2.4)
|
builder (3.2.4)
|
||||||
capybara (3.39.0)
|
capybara (3.39.2)
|
||||||
addressable
|
addressable
|
||||||
matrix
|
matrix
|
||||||
mini_mime (>= 0.1.3)
|
mini_mime (>= 0.1.3)
|
||||||
@ -97,20 +97,20 @@ GEM
|
|||||||
erubi (1.12.0)
|
erubi (1.12.0)
|
||||||
globalid (1.1.0)
|
globalid (1.1.0)
|
||||||
activesupport (>= 5.0)
|
activesupport (>= 5.0)
|
||||||
i18n (1.13.0)
|
i18n (1.14.1)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
importmap-rails (1.1.6)
|
importmap-rails (1.2.1)
|
||||||
actionpack (>= 6.0.0)
|
actionpack (>= 6.0.0)
|
||||||
railties (>= 6.0.0)
|
railties (>= 6.0.0)
|
||||||
io-console (0.6.0)
|
io-console (0.6.0)
|
||||||
irb (1.6.4)
|
irb (1.7.0)
|
||||||
reline (>= 0.3.0)
|
reline (>= 0.3.0)
|
||||||
jbuilder (2.11.5)
|
jbuilder (2.11.5)
|
||||||
actionview (>= 5.0.0)
|
actionview (>= 5.0.0)
|
||||||
activesupport (>= 5.0.0)
|
activesupport (>= 5.0.0)
|
||||||
loofah (2.20.0)
|
loofah (2.21.3)
|
||||||
crass (~> 1.0.2)
|
crass (~> 1.0.2)
|
||||||
nokogiri (>= 1.5.9)
|
nokogiri (>= 1.12.0)
|
||||||
mail (2.8.1)
|
mail (2.8.1)
|
||||||
mini_mime (>= 0.1.1)
|
mini_mime (>= 0.1.1)
|
||||||
net-imap
|
net-imap
|
||||||
@ -121,8 +121,8 @@ GEM
|
|||||||
method_source (1.0.0)
|
method_source (1.0.0)
|
||||||
mini_mime (1.1.2)
|
mini_mime (1.1.2)
|
||||||
mini_portile2 (2.8.2)
|
mini_portile2 (2.8.2)
|
||||||
minitest (5.18.0)
|
minitest (5.18.1)
|
||||||
msgpack (1.7.0)
|
msgpack (1.7.1)
|
||||||
mysql2 (0.5.5)
|
mysql2 (0.5.5)
|
||||||
net-imap (0.3.6)
|
net-imap (0.3.6)
|
||||||
date
|
date
|
||||||
@ -134,53 +134,54 @@ GEM
|
|||||||
net-smtp (0.3.3)
|
net-smtp (0.3.3)
|
||||||
net-protocol
|
net-protocol
|
||||||
nio4r (2.5.9)
|
nio4r (2.5.9)
|
||||||
nokogiri (1.14.3)
|
nokogiri (1.15.2)
|
||||||
mini_portile2 (~> 2.8.0)
|
mini_portile2 (~> 2.8.2)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
orm_adapter (0.5.0)
|
orm_adapter (0.5.0)
|
||||||
public_suffix (5.0.1)
|
public_suffix (5.0.1)
|
||||||
puma (5.6.5)
|
puma (5.6.6)
|
||||||
nio4r (~> 2.0)
|
nio4r (~> 2.0)
|
||||||
racc (1.6.2)
|
racc (1.7.1)
|
||||||
rack (2.2.7)
|
rack (2.2.7)
|
||||||
rack-test (2.1.0)
|
rack-test (2.1.0)
|
||||||
rack (>= 1.3)
|
rack (>= 1.3)
|
||||||
rails (7.0.5)
|
rails (7.0.5.1)
|
||||||
actioncable (= 7.0.5)
|
actioncable (= 7.0.5.1)
|
||||||
actionmailbox (= 7.0.5)
|
actionmailbox (= 7.0.5.1)
|
||||||
actionmailer (= 7.0.5)
|
actionmailer (= 7.0.5.1)
|
||||||
actionpack (= 7.0.5)
|
actionpack (= 7.0.5.1)
|
||||||
actiontext (= 7.0.5)
|
actiontext (= 7.0.5.1)
|
||||||
actionview (= 7.0.5)
|
actionview (= 7.0.5.1)
|
||||||
activejob (= 7.0.5)
|
activejob (= 7.0.5.1)
|
||||||
activemodel (= 7.0.5)
|
activemodel (= 7.0.5.1)
|
||||||
activerecord (= 7.0.5)
|
activerecord (= 7.0.5.1)
|
||||||
activestorage (= 7.0.5)
|
activestorage (= 7.0.5.1)
|
||||||
activesupport (= 7.0.5)
|
activesupport (= 7.0.5.1)
|
||||||
bundler (>= 1.15.0)
|
bundler (>= 1.15.0)
|
||||||
railties (= 7.0.5)
|
railties (= 7.0.5.1)
|
||||||
rails-dom-testing (2.0.3)
|
rails-dom-testing (2.0.3)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
nokogiri (>= 1.6)
|
nokogiri (>= 1.6)
|
||||||
rails-html-sanitizer (1.5.0)
|
rails-html-sanitizer (1.6.0)
|
||||||
loofah (~> 2.19, >= 2.19.1)
|
loofah (~> 2.21)
|
||||||
railties (7.0.5)
|
nokogiri (~> 1.14)
|
||||||
actionpack (= 7.0.5)
|
railties (7.0.5.1)
|
||||||
activesupport (= 7.0.5)
|
actionpack (= 7.0.5.1)
|
||||||
|
activesupport (= 7.0.5.1)
|
||||||
method_source
|
method_source
|
||||||
rake (>= 12.2)
|
rake (>= 12.2)
|
||||||
thor (~> 1.0)
|
thor (~> 1.0)
|
||||||
zeitwerk (~> 2.5)
|
zeitwerk (~> 2.5)
|
||||||
rake (13.0.6)
|
rake (13.0.6)
|
||||||
regexp_parser (2.8.0)
|
regexp_parser (2.8.1)
|
||||||
reline (0.3.3)
|
reline (0.3.5)
|
||||||
io-console (~> 0.5)
|
io-console (~> 0.5)
|
||||||
responders (3.1.0)
|
responders (3.1.0)
|
||||||
actionpack (>= 5.2)
|
actionpack (>= 5.2)
|
||||||
railties (>= 5.2)
|
railties (>= 5.2)
|
||||||
rexml (3.2.5)
|
rexml (3.2.5)
|
||||||
rubyzip (2.3.2)
|
rubyzip (2.3.2)
|
||||||
selenium-webdriver (4.9.1)
|
selenium-webdriver (4.10.0)
|
||||||
rexml (~> 3.2, >= 3.2.5)
|
rexml (~> 3.2, >= 3.2.5)
|
||||||
rubyzip (>= 1.2.2, < 3.0)
|
rubyzip (>= 1.2.2, < 3.0)
|
||||||
websocket (~> 1.0)
|
websocket (~> 1.0)
|
||||||
@ -193,8 +194,8 @@ GEM
|
|||||||
sprockets (>= 3.0.0)
|
sprockets (>= 3.0.0)
|
||||||
stimulus-rails (1.2.1)
|
stimulus-rails (1.2.1)
|
||||||
railties (>= 6.0.0)
|
railties (>= 6.0.0)
|
||||||
thor (1.2.1)
|
thor (1.2.2)
|
||||||
timeout (0.3.2)
|
timeout (0.4.0)
|
||||||
turbo-rails (1.4.0)
|
turbo-rails (1.4.0)
|
||||||
actionpack (>= 6.0.0)
|
actionpack (>= 6.0.0)
|
||||||
activejob (>= 6.0.0)
|
activejob (>= 6.0.0)
|
||||||
|
|||||||
@ -14,26 +14,7 @@
|
|||||||
*= require_self
|
*= require_self
|
||||||
*/
|
*/
|
||||||
|
|
||||||
html {
|
body, nav, main, footer {
|
||||||
box-sizing: border-box;
|
padding: 1rem;
|
||||||
font-size: 16px;
|
margin: 1rem;
|
||||||
}
|
|
||||||
|
|
||||||
*, *:before, *:after {
|
|
||||||
box-sizing: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
body, h1, h2, h3, h4, h5, h6, p, ol, ul {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
ol, ul {
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
max-width: 100%;
|
|
||||||
height: auto;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
class VirtualsController < ApplicationController
|
class VirtualsController < ApplicationController
|
||||||
before_action :set_virtual, only: %i[ show edit update destroy ]
|
before_action :set_virtual, only: %i[ show edit update destroy ]
|
||||||
|
before_action :set_domain, only: %i[ new create edit update destroy ]
|
||||||
# GET /virtuals or /virtuals.json
|
# GET /virtuals or /virtuals.json
|
||||||
def index
|
def index
|
||||||
@virtuals = Virtual.all
|
@virtuals = Virtual.all
|
||||||
@ -22,10 +22,11 @@ class VirtualsController < ApplicationController
|
|||||||
# POST /virtuals or /virtuals.json
|
# POST /virtuals or /virtuals.json
|
||||||
def create
|
def create
|
||||||
@virtual = Virtual.new(virtual_params)
|
@virtual = Virtual.new(virtual_params)
|
||||||
|
@virtual.domain_id = @domain.id
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @virtual.save
|
if @virtual.save
|
||||||
format.html { redirect_to virtual_url(@virtual), notice: "Virtual was successfully created." }
|
format.html { redirect_to domain_url(@domain), notice: "Virtual was successfully created." }
|
||||||
format.json { render :show, status: :created, location: @virtual }
|
format.json { render :show, status: :created, location: @virtual }
|
||||||
else
|
else
|
||||||
format.html { render :new, status: :unprocessable_entity }
|
format.html { render :new, status: :unprocessable_entity }
|
||||||
@ -38,7 +39,7 @@ class VirtualsController < ApplicationController
|
|||||||
def update
|
def update
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @virtual.update(virtual_params)
|
if @virtual.update(virtual_params)
|
||||||
format.html { redirect_to virtual_url(@virtual), notice: "Virtual was successfully updated." }
|
format.html { redirect_to domain_url(@domain), notice: "Virtual was successfully updated." }
|
||||||
format.json { render :show, status: :ok, location: @virtual }
|
format.json { render :show, status: :ok, location: @virtual }
|
||||||
else
|
else
|
||||||
format.html { render :edit, status: :unprocessable_entity }
|
format.html { render :edit, status: :unprocessable_entity }
|
||||||
@ -52,7 +53,7 @@ class VirtualsController < ApplicationController
|
|||||||
@virtual.destroy
|
@virtual.destroy
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { redirect_to virtuals_url, notice: "Virtual was successfully destroyed." }
|
format.html { redirect_to domain_url(@domain), notice: "Virtual was successfully destroyed." }
|
||||||
format.json { head :no_content }
|
format.json { head :no_content }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -63,6 +64,10 @@ class VirtualsController < ApplicationController
|
|||||||
@virtual = Virtual.find(params[:id])
|
@virtual = Virtual.find(params[:id])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def set_domain
|
||||||
|
@domain = Domain.find(params[:domain_id])
|
||||||
|
end
|
||||||
|
|
||||||
# Only allow a list of trusted parameters through.
|
# Only allow a list of trusted parameters through.
|
||||||
def virtual_params
|
def virtual_params
|
||||||
params.require(:virtual).permit(:email, :destination)
|
params.require(:virtual).permit(:email, :destination)
|
||||||
|
|||||||
@ -1,26 +1,27 @@
|
|||||||
<h2>Log in</h2>
|
<h2>Log in</h2>
|
||||||
|
|
||||||
<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
|
<div class="black asap m-l3">
|
||||||
<div class="field">
|
<%= form_for(resource, as: resource_name, url: session_path(resource_name), class: "p-10 border shadow br-b-8 md-w-50pc mx-auto") do |f| %>
|
||||||
<%= f.label :email %><br />
|
<div class="flex flex-column">
|
||||||
<%= f.email_field :email, autofocus: true, autocomplete: "email" %>
|
<%= f.label :email, class: "my-2" %>
|
||||||
|
<%= f.email_field :email, autofocus: true, autocomplete: "email", class:"input" %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field">
|
<div class="flex flex-column mt-3">
|
||||||
<%= f.label :password %><br />
|
<%= f.label :password, class: "my-2" %>
|
||||||
<%= f.password_field :password, autocomplete: "current-password" %>
|
<%= f.password_field :password, autocomplete: "current-password", class: "input" %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% if devise_mapping.rememberable? %>
|
<% if devise_mapping.rememberable? %>
|
||||||
<div class="field">
|
<div class="flex flex-items-center mt-4">
|
||||||
<%= f.check_box :remember_me %>
|
<%= f.check_box :remember_me, class: "checkbox mr-3" %>
|
||||||
<%= f.label :remember_me %>
|
<%= f.label :remember_me, class: "form-check-label" %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class="actions">
|
<div class="mt-4">
|
||||||
<%= f.submit "Log in" %>
|
<%= f.submit "Log in", class: "button" %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</div>
|
||||||
<%= render "devise/shared/links" %>
|
<%= render "devise/shared/links" %>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<h1>Domains</h1>
|
<h1>Domains <%= link_to "Add new domain",new_domain_path %> </h1>
|
||||||
|
|
||||||
<div id="domains">
|
<div id="domains">
|
||||||
<ul>
|
<ul>
|
||||||
@ -8,4 +8,4 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= link_to "New domain", new_domain_path %>
|
|
||||||
|
|||||||
@ -1,22 +1,38 @@
|
|||||||
<h1><%= @domain.domain %></h1>
|
<div class="w-100pc br-8 bg-white-lighter border-blue m-3">
|
||||||
|
<div class="p-5 br-t-8 bg-gray-darkest">
|
||||||
|
<h2 class="white fs-m1 fw-400"><%= @domain.domain %> <%= link_to "Edit", edit_domain_path(@domain), class: "inline-block br-3 bw-0 px-3 py-2 fs-s2 bg-blue-darker white pointer hover-opacity-80" %> <%= button_to "Delete", @domain, method: :delete, class: "inline-block button bg-red white focus-red" %></h2>
|
||||||
|
</div>
|
||||||
|
<div class="p-5">
|
||||||
|
<h2>Credentials (<%= @domain.credentials.count %>)</h2>
|
||||||
|
<ul>
|
||||||
|
<li><%= link_to "Add #{@domain.domain} email address", new_domain_credential_path(@domain) %>
|
||||||
|
<% @domain.credentials.each do |credential| %>
|
||||||
|
<li><%= credential.email %> <%= link_to "Edit", edit_domain_credential_path(@domain,credential) %> | <%= button_to "Destroy this credential", [@domain, credential], method: :delete %> </li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<h2>Virtuals (<%= @domain.virtuals.count %>)</h2>
|
||||||
|
<ul>
|
||||||
|
<li><%= link_to "Add #{@domain.domain} virtual email", new_domain_virtual_path(@domain) %></li>
|
||||||
|
<% @domain.virtuals.each do |virtual| %>
|
||||||
|
<li><%= virtual.email%> >> <%= virtual.destination%> <%= link_to "Edit", edit_domain_virtual_path(@domain,virtual)%> | <%= button_to "Delete", [@domain, virtual], method: :delete %></li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="flex justify-between p-5 br-b-8 border-t bc-gray-light">
|
||||||
|
<button class="inline-block br-3 bw-0 px-3 py-2 fs-s2 bg-blue-darker white pointer hover-opacity-80">Read
|
||||||
|
More</button>
|
||||||
|
<button class="inline-block br-3 bw-0 px-3 py-2 fs-s2 bg-gray-lighter black pointer hover-opacity-80">Cancel</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h1></h1>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
|
||||||
<div>
|
|
||||||
<%= link_to "Edit this domain", edit_domain_path(@domain) %> | <%= link_to "Back to domains", domains_path %> | <%= button_to "Destroy this domain", @domain, method: :delete %>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>Credentials (<%= @domain.credentials.count %>)</h2>
|
|
||||||
<ul>
|
|
||||||
<li><%= link_to "Add #{@domain.domain} email address", new_domain_credential_path(@domain) %>
|
|
||||||
<% @domain.credentials.each do |credential| %>
|
|
||||||
<li><%= credential.email %> <%= link_to "Edit", edit_domain_credential_path(@domain,credential) %> |
|
|
||||||
<%= button_to "Destroy this credential", [@domain, credential], method: :delete %> </li>
|
|
||||||
<% end %>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h2>Virtuals (<%= @domain.virtuals.count %>)</h2>
|
|
||||||
<ul>
|
|
||||||
<li><%= link_to "Add #{@domain.domain} virtual email", new_domain_virtual_path(@domain) %></li>
|
|
||||||
<% @domain.virtuals.each do |virtual| %>
|
|
||||||
<li><%= virtual.email%> >> <%= virtual.destination%></li>
|
|
||||||
<% end %>
|
|
||||||
</ul>
|
|
||||||
|
|||||||
@ -5,14 +5,41 @@
|
|||||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||||
<%= csrf_meta_tags %>
|
<%= csrf_meta_tags %>
|
||||||
<%= csp_meta_tag %>
|
<%= csp_meta_tag %>
|
||||||
|
<link rel="stylesheet" href="https://minimalistcss.github.io/dist/minimalist.min.css">
|
||||||
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
|
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
|
||||||
<%= javascript_importmap_tags %>
|
<%= javascript_importmap_tags %>
|
||||||
</head>
|
|
||||||
|
|
||||||
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<p class="notice"><%= notice %></p><p class="alert"><%= alert %></p>
|
<nav class="flex flex-column md-flex-row bg-gray-lighter px-4">
|
||||||
|
<div class="flex justify-between">
|
||||||
|
|
||||||
|
<a data-toggle="toggle-nav" data-target="#nav-items" href="#"
|
||||||
|
class="flex items-center ml-auto md-hidden opacity-70">
|
||||||
|
<div class="m-3 br-4 border-gray-darkest p-1">
|
||||||
|
<div class="border-t border-gray-darkest my-1 px-3"></div>
|
||||||
|
<div class="border-t border-gray-darkest my-1"></div>
|
||||||
|
<div class="border-t border-gray-darkest my-1"></div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div id="nav-items" class="hidden flex sm-w-100pc flex-column md-flex md-flex-row md-justify-start items-center">
|
||||||
|
<%= link_to "Home", root_path, class: "inline-block fs-s1 mx-3 py-3 gray-darkest no-underline hover-underline" %>
|
||||||
|
<% if user_signed_in? %><%= button_to "Log out", destroy_user_session_path, method: :delete, class: "button bg-red white focus-red" %><% end %>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<% if notice %><div class="bg-green-lightest green-darkest px-5 py-3 br-3 border-l bw-6 bc-green"><%= notice %></div><% end %>
|
||||||
|
<% if alert %><div class="bg-red-lightest red-darkest px-5 py-3 br-3 border-l bw-6 bc-red"><%= alert %></div><% end %>
|
||||||
|
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<hr/>
|
||||||
|
RoR Version <%= Rails.version %> (<%=Rails.env%>) | Ruby <%= "#{RUBY_VERSION}p#{RUBY_PATCHLEVEL}" %> | OS <%= RUBY_PLATFORM %>
|
||||||
|
</footer>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<%= form_with(model: virtual) do |form| %>
|
<%= form_with(model: [@domain,virtual]) do |form| %>
|
||||||
<% if virtual.errors.any? %>
|
<% if virtual.errors.any? %>
|
||||||
<div style="color: red">
|
<div style="color: red">
|
||||||
<h2><%= pluralize(virtual.errors.count, "error") %> prohibited this virtual from being saved:</h2>
|
<h2><%= pluralize(virtual.errors.count, "error") %> prohibited this virtual from being saved:</h2>
|
||||||
|
|||||||
@ -5,6 +5,5 @@
|
|||||||
<br>
|
<br>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<%= link_to "Show this virtual", @virtual %> |
|
<%= link_to "Back to #{@domain.domain}", domain_path(@domain) %>
|
||||||
<%= link_to "Back to virtuals", virtuals_path %>
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
<h1>New virtual</h1>
|
<h1>New virtual for <%= @domain.domain %></h1>
|
||||||
|
|
||||||
<%= render "form", virtual: @virtual %>
|
<%= render "form", virtual: @virtual %>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<%= link_to "Back to virtuals", virtuals_path %>
|
<%= link_to "Back to #{@domain.domain}", domain_path(@domain) %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user