Skip to content

Commit

Permalink
Delete jump_to when is nothing to show (#33)
Browse files Browse the repository at this point in the history
* create override file

* add override file

* add script to override

* refactor override

* add conditional render

* change layout

* fix homepage system spec

* add override file spec

* disable rubocop in conference_helper_override

* remove byebug

* enable rubocop Style/SingleArgumentDig
  • Loading branch information
ElviaBth committed May 15, 2024
1 parent 4fe95cb commit 0b17eec
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<!-- replace "#conference_speakers-grid" -->

<% divisor = Rails.application.secrets.speakers_divisor.dig(conference.slug.to_sym) %>

<section id="conference_speakers-grid">
<% if divisor && divisor.respond_to?(:each) %>
<% all_filters = divisor.pluck(:position_filter).flatten.filter(&:presence) %>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!-- replace "erb[loud]:contains('layouts/decidim/shared/layout_two_col')" -->

<%
lay = if conference_nav_items(current_participatory_space).empty?
"layouts/decidim/shared/layout_center"
else
"layouts/decidim/shared/layout_two_col"
end
%>
<%= render layout: lay, locals: { reverse: true, main_enabled: false, columns: 10 } do %>
3 changes: 2 additions & 1 deletion spec/lib/overrides_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
files: {
"/app/controllers/decidim/conferences/conferences_controller.rb" => "4e1bd7427cfd12c79391b451e07a2e2a",
"/app/models/decidim/conference.rb" => "095732cb2451adfb9db7a46078dc3a51",
"/app/cells/decidim/conferences/content_blocks/highlighted_conferences_cell.rb" => "7f24462f802a2c277697205511103d90"
"/app/cells/decidim/conferences/content_blocks/highlighted_conferences_cell.rb" => "7f24462f802a2c277697205511103d90",
"/app/views/decidim/conferences/conferences/show.html.erb" => "93fa0d48a6117d3b1cb210ad1f17da7e"
}
},
{
Expand Down

0 comments on commit 0b17eec

Please sign in to comment.