Show search source badges only with show_sources param

The badges are a debugging aid - render them only when explicitly
requested via ?show_sources=1 instead of on every search.
This commit is contained in:
Christoph Haas 2026-08-23 10:49:32 +02:00
parent 323b7004ed
commit 4c736096ae
3 changed files with 19 additions and 4 deletions

View file

@ -24,7 +24,7 @@
= pkg.name
.text
= pkg.description
- if @search_sources[pkg.id]
- if search_sources_visible? && @search_sources[pkg.id]
.text.search-source
span.label.secondary = search_source_label(@search_sources[pkg.id])
- elsif @view_style==:list
@ -40,7 +40,7 @@
a href=package_path(name: pkg.name)
=pkg.name
p =pkg.description
- if @search_sources[pkg.id]
- if search_sources_visible? && @search_sources[pkg.id]
p
span.label.secondary = search_source_label(@search_sources[pkg.id])
.listview.longdescription