Skip to content

Commit

Permalink
panel_inner_args
Browse files Browse the repository at this point in the history
  • Loading branch information
nimmolo committed Aug 14, 2024
1 parent 32068f4 commit b8cfe33
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 7 additions & 1 deletion app/helpers/content_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def panel_block(**args, &block)

tag.div(
class: class_names("panel panel-default", args[:class]),
**args.except(:class, :inner_class, :inner_id, :heading, :heading_links)
**args.except(*panel_inner_args)
) do
concat(heading)
if args[:collapse].present?
Expand All @@ -164,6 +164,12 @@ def panel_block(**args, &block)
end
end

# Args passed to panel components that are not applied to the outer div.
def panel_inner_args
[:class, :inner_class, :inner_id, :heading, :heading_links, :collapse,
:collapse_show, :footer].freeze
end

def panel_block_heading(args)
if args[:heading]
tag.div(class: "panel-heading") do
Expand Down
6 changes: 0 additions & 6 deletions app/views/controllers/observations/form/_record_step.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,5 @@
<%= render(partial: "observations/form/details",
locals: { f:, button_name:, location:, logging_optional: }) %>

<%= tag.div(class: "panel-body mt-4") do
tag.div(class: "text-center", id: "step-nav-1") do
tab_link(:NEXT.l, id: "identify", button: true)
end
end %>

<% end %>
<% end %>

0 comments on commit b8cfe33

Please sign in to comment.