Files
grecia/app/views/admin/progress_bars/edit.html.erb
Javi Martín 233ba3c72f Move progress bars form partial to a component
This way we can move some of the view logic to the Ruby class. It'll
also make it easier to write tests for it.
2024-11-08 15:03:55 +01:00

16 lines
436 B
Plaintext

<% if @progress_bar.primary? %>
<% bar_title = t("admin.progress_bars.edit.title.primary") %>
<% else %>
<% bar_title = t("admin.progress_bars.edit.title.secondary", title: @progress_bar.title) %>
<% end %>
<% provide :title do %>
<%= "#{t("admin.header.title")} - #{bar_title}" %>
<% end %>
<%= back_link_to progress_bars_index %>
<h2><%= bar_title %></h2>
<%= render Admin::ProgressBars::FormComponent.new(@progress_bar) %>