Skip to content

Commit

Permalink
Show view all link in timeline component only when required
Browse files Browse the repository at this point in the history
  • Loading branch information
nid90 committed Jan 9, 2025
1 parent 5a6ec4e commit 3c36f74
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions app/components/timeline_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,19 @@
</li>
<% end %>

<li class="mt-6 last:mb-0 ms-4 text-secondary text-xs">
<%= render V2::ButtonComponent.new(label: "View all events",
scheme: :link,
type: :link_external,
options: view_all_link,
html_options: { class: "text-xs" },
authz: false,
size: :none,
arrow: :none) do |b|
b.with_icon("v2/activity.svg", size: :sm)
end %>
</li>
<% if view_all_link.present? && truncate %>
<li class="mt-6 last:mb-0 ms-4 text-secondary text-xs">
<%= render V2::ButtonComponent.new(label: "View all events",
scheme: :link,
type: :link_external,
options: view_all_link,
html_options: { class: "text-xs" },
authz: false,
size: :none,
arrow: :none) do |b|
b.with_icon("v2/activity.svg", size: :sm)
end %>
</li>
<% end %>
</ol>
<% end %>

0 comments on commit 3c36f74

Please sign in to comment.