Skip to content

Commit

Permalink
Minor visual and partner filter tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankocienski committed Sep 20, 2024
1 parent 563283f commit e6c8bc5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
4 changes: 4 additions & 0 deletions app/assets/stylesheets/event-site.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,7 @@ nav .active {
font-weight: bold;
}

.indent {
padding-left: 2em;
}

9 changes: 8 additions & 1 deletion app/helpers/partners_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,17 @@ def render_partner_event_by_day_list(event_instances)
end

def keywords_for_partner(partner)
extra_params = {
name: (@partner_name_filter if @partner_name_filter.present?)
}

partner
.keywords
.order(:name)
.map { |kw| link_to kw.name, partners_path(keyword: kw.name), class: 'keyword' }
.map { |kw|
link_to kw.name,
partners_path(extra_params.merge({keyword: kw.name})),
class: 'keyword' }
.join(' • ')
.html_safe
end
Expand Down
9 changes: 4 additions & 5 deletions app/views/partners/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@
- @partners.each do |partner|
%article.partner
%h3= link_to partner.name, partner_path(partner.slug)
%p
= partner.summary
.indent
%p= partner.summary
- if partner.partner_keywords.any?
%br
%small      #{keywords_for_partner partner}
%br
%p= keywords_for_partner partner
%br

0 comments on commit e6c8bc5

Please sign in to comment.