app/helpers/para/admin/page_helper.rb in para-0.11.4 vs app/helpers/para/admin/page_helper.rb in para-0.12.0
- old
+ new
@@ -2,24 +2,23 @@
module Admin
module PageHelper
def page_top_bar(options = {})
top_bar = content_tag(:div, class: 'page-title row') do
content_tag(:h1, options[:title]) +
-
- if (actions = actions_for(options[:type]))
- actions.map(&method(:build_action)).join('').html_safe
- end
+ if (actions = actions_for(options[:type]))
+ actions.map(&method(:build_action)).join('').html_safe
+ end
end
# Return both top bar and component navigation to be displayed at the top of the
# page.
top_bar + component_navigation
end
def build_action(action)
link_options = action.fetch(:link_options, {})
- link_options[:class] ||= "btn btn-default btn-shadow"
+ link_options[:class] ||= 'btn btn-default btn-shadow btn-sm'
content_tag(:div, class: 'actions-control pull-right') do
link_to(action[:url], link_options) do
(
(fa_icon(action[:icon], class: 'fa-fw') if action[:icon]) +
@@ -47,13 +46,13 @@
# we try to render the partial from the relative path of the model, else we
# use the component class as the base target path
partial_target = parent_component.try(:model_type) || parent_component
render partial: find_partial_for(partial_target, :navigation),
- locals: {
- parent_component: parent_component,
- active_component: @component
- }
+ locals: {
+ parent_component: parent_component,
+ active_component: @component
+ }
end
end
end
end