diff --git a/app/assets/stylesheets/alchemy/_mixins.scss b/app/assets/stylesheets/alchemy/_mixins.scss
index f68687d3f4..2251b133b6 100644
--- a/app/assets/stylesheets/alchemy/_mixins.scss
+++ b/app/assets/stylesheets/alchemy/_mixins.scss
@@ -49,9 +49,8 @@
border-color: $hover-border-color;
}
- &:active, &:active:focus {
- border-color: $hover-border-color;
- box-shadow: none;
+ &:active, &.active {
+ box-shadow: inset $button-box-shadow;
}
&:focus {
diff --git a/app/assets/stylesheets/alchemy/_variables.scss b/app/assets/stylesheets/alchemy/_variables.scss
index 343c204b5e..a690a60fab 100644
--- a/app/assets/stylesheets/alchemy/_variables.scss
+++ b/app/assets/stylesheets/alchemy/_variables.scss
@@ -76,7 +76,7 @@ $button-text-shadow: none !default;
$button-box-shadow: 0px 1px 1px -1px #333 !default;
$button-focus-box-shadow: 0px 1px 1px 0px $button-focus-border-color !default;
$button-padding: 0.55em 2em !default;
-$small-button-padding: 0.4em 1.25em !default;
+$small-button-padding: 0.4em 0.8em !default;
$button-margin: $form-field-margin !default;
$secondary-button-bg-color: transparent !default;
diff --git a/app/helpers/alchemy/admin/pages_helper.rb b/app/helpers/alchemy/admin/pages_helper.rb
index f46664bff3..60f2922537 100644
--- a/app/helpers/alchemy/admin/pages_helper.rb
+++ b/app/helpers/alchemy/admin/pages_helper.rb
@@ -9,13 +9,13 @@ module PagesHelper
#
def preview_sizes_for_select
options_for_select([
- 'auto',
- [Alchemy.t('240', scope: 'preview_sizes'), 240],
- [Alchemy.t('320', scope: 'preview_sizes'), 320],
- [Alchemy.t('480', scope: 'preview_sizes'), 480],
- [Alchemy.t('768', scope: 'preview_sizes'), 768],
- [Alchemy.t('1024', scope: 'preview_sizes'), 1024],
- [Alchemy.t('1280', scope: 'preview_sizes'), 1280]
+ "auto",
+ [Alchemy.t("240", scope: "preview_sizes"), 240],
+ [Alchemy.t("320", scope: "preview_sizes"), 320],
+ [Alchemy.t("480", scope: "preview_sizes"), 480],
+ [Alchemy.t("768", scope: "preview_sizes"), 768],
+ [Alchemy.t("1024", scope: "preview_sizes"), 1024],
+ [Alchemy.t("1280", scope: "preview_sizes"), 1280],
])
end
@@ -27,30 +27,30 @@ def page_layout_label(page)
if page.persisted? && page.definition.blank?
[
page_layout_missing_warning,
- Alchemy.t(:page_type)
- ].join(' ').html_safe
+ Alchemy.t(:page_type),
+ ].join(" ").html_safe
else
Alchemy.t(:page_type)
end
end
- def page_status_checkbox(page, attribute)
- label = page.class.human_attribute_name(attribute)
+ def page_status_checkbox(page, attribute, label: nil)
+ label_text = label || page.class.human_attribute_name(attribute)
if page.attribute_fixed?(attribute)
checkbox = check_box(:page, attribute, disabled: true)
- hint = content_tag(:span, class: 'hint-bubble') do
+ hint = content_tag(:span, class: "hint-bubble") do
Alchemy.t(:attribute_fixed, attribute: attribute)
end
- content = content_tag(:span, class: 'with-hint') do
- "#{checkbox}\n#{label}\n#{hint}".html_safe
+ content = content_tag(:span, class: "with-hint") do
+ "#{checkbox}\n#{label_text}\n#{hint}".html_safe
end
else
checkbox = check_box(:page, attribute)
- content = "#{checkbox}\n#{label}".html_safe
+ content = "#{checkbox}\n#{label_text}".html_safe
end
- content_tag(:label, class: 'checkbox') { content }
+ content_tag(:label, class: "checkbox") { content }
end
end
end
diff --git a/app/views/alchemy/admin/pages/_menu_fields.html.erb b/app/views/alchemy/admin/pages/_menu_fields.html.erb
index dadb0f2641..3d091e4271 100644
--- a/app/views/alchemy/admin/pages/_menu_fields.html.erb
+++ b/app/views/alchemy/admin/pages/_menu_fields.html.erb
@@ -1,33 +1,37 @@
-<% if @page.menus.any? %>
-
- <% @page.menus.each do |menu| %>
-
+<% if Alchemy::Node.roots.where(language: @page.language).any? %>
+ <% unless @page.language_root %>
+ <%= page_status_checkbox(@page, :visible, label: Alchemy.t("show in url of child pages")) %>
+ <% end %>
+ <% if @page.menus.any? %>
+
+ <% @page.menus.each do |menu| %>
+
+ <% end %>
+ <% else %>
+ <%= Alchemy.t("attach to a menu") %>
+ <%= f.input :menu_id, collection: Alchemy::Node.roots.map { |n|
+ [I18n.t(n.name, scope: [:alchemy, :menu_names]), n.id]
+ },
+ prompt: Alchemy.t("Please choose a menu"),
+ input_html: { class: "alchemy_selectbox" },
+ wrapper_html: { class: "hidden" },
+ label: false %>
+
<% end %>
-<% elsif Alchemy::Node.roots.any? %>
- <%= page_status_checkbox(@page, :visible) %>
- <%= f.input :menu_id, collection: Alchemy::Node.roots.map { |n| [n.name, n.id] },
- prompt: Alchemy.t('Please choose a menu'),
- input_html: { class: 'alchemy_selectbox' },
- wrapper_html: { style: @page.visible? ? 'display: block' : 'display: none' },
- label: false %>
-
<% else %>
<%= page_status_checkbox(@page, :visible) %>
<% end %>