Skip to content
Snippets Groups Projects
Commit 9eeed489 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

better layout

parent bfb39dda
No related branches found
No related tags found
No related merge requests found
class Admin::Communication::ApplicationController < Admin::ApplicationController class Admin::Communication::ApplicationController < Admin::ApplicationController
def breadcrumb def breadcrumb
super if @website
add_breadcrumb Communication.model_name.human short_breadcrumb
breadcrumb_for @website
else
super
add_breadcrumb Communication.model_name.human
end
end end
end end
...@@ -3,11 +3,6 @@ class Admin::Communication::Website::ApplicationController < Admin::Communicatio ...@@ -3,11 +3,6 @@ class Admin::Communication::Website::ApplicationController < Admin::Communicatio
protected protected
def breadcrumb
short_breadcrumb
breadcrumb_for @website, website_id: nil
end
def default_url_options def default_url_options
return {} unless params.has_key? :website_id return {} unless params.has_key? :website_id
{ {
......
...@@ -60,12 +60,6 @@ class Admin::Communication::WebsitesController < Admin::Communication::Applicati ...@@ -60,12 +60,6 @@ class Admin::Communication::WebsitesController < Admin::Communication::Applicati
protected protected
def breadcrumb
super
add_breadcrumb Communication::Website.model_name.human(count: 2), admin_communication_websites_path
breadcrumb_for @website
end
def website_params def website_params
params.require(:communication_website).permit(:name, :domain, :repository, :access_token, :about_type, :about_id) params.require(:communication_website).permit(:name, :domain, :repository, :access_token, :about_type, :about_id)
end end
......
<% content_for :title, @website %> <% content_for :title, @website %>
<p> <% content_for :title_right do %>
<%= link_to @website.domain_url, @website.domain_url, target: :_blank %> <%= link_to @website.domain_url, @website.domain_url, target: :_blank %>
</p> <% end %>
<p> <p>
<%= I18n.t("activerecord.attributes.communication/website.about_#{@website.about_type}") %> <%= I18n.t("activerecord.attributes.communication/website.about_#{@website.about_type}") %>
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
<%= render 'admin/application/top' %> <%= render 'admin/application/top' %>
<main class="content"> <main class="content">
<div class="container-fluid p-0"> <div class="container-fluid p-0">
<p class="float-end pt-2"><%= yield :title_right %></p>
<h1><%= yield :title %></h1> <h1><%= yield :title %></h1>
<%= yield %> <%= yield %>
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment