<% content_for :breadcrumb do %> <% end %> <% if @question.any_of?(:name, :machine_name, :default_value, :unit_value_down, :unit_value_up, :account) %>
<%= _('Simulation') %>
<%= render partial: 'citizen_budget_model/shared/translated_field', locals: {record: @question, attribute: :name} %> <%= render partial: 'citizen_budget_model/shared/field', locals: {record: @question, attribute: :machine_name} %> <%= render partial: 'citizen_budget_model/shared/field', locals: {record: @question, attribute: :default_value, formatter: value_formatter(@question)} %> <%= render partial: 'citizen_budget_model/shared/field', locals: {record: @question, attribute: :unit_value_down, formatter: currency_formatter} %> <%= render partial: 'citizen_budget_model/shared/field', locals: {record: @question, attribute: :unit_value_up, formatter: currency_formatter} %> <%= render partial: 'citizen_budget_model/shared/field', locals: {record: @question, attribute: :account} %>
<% end %> <% if @question.any_of?(:widget, :unit_name, :labels, :options, :revenue) %>
<%= _('Widget') %>
<%= render partial: 'citizen_budget_model/shared/field', locals: {record: @question, attribute: :widget} %> <%= render partial: 'citizen_budget_model/shared/translated_field', locals: {record: @question, attribute: :unit_name} %> <%= render partial: 'citizen_budget_model/shared/field', locals: {record: @question, attribute: :minimum, formatter: value_formatter(@question)} %> <%= render partial: 'citizen_budget_model/shared/field', locals: {record: @question, attribute: :maximum, formatter: value_formatter(@question)} %> <%= render partial: 'citizen_budget_model/shared/field', locals: {record: @question, attribute: :step, formatter: value_formatter(@question)} %> <%= render partial: 'citizen_budget_model/shared/translated_field', locals: {record: @question, attribute: :labels} %> <%= render partial: 'citizen_budget_model/shared/field', locals: {record: @question, attribute: :options} %> <%= render partial: 'citizen_budget_model/shared/field', locals: {record: @question, attribute: :revenue} %>
<% end %>
<% text_panel = [:title, :description, :modal, :popover] %> <% if visible?(@question, *text_panel) && @question.any_of?(*text_panel) %>
<%= render partial: 'citizen_budget_model/shared/translated_field', locals: {record: @question, attribute: :title} %> <%= render partial: 'citizen_budget_model/shared/translated_field', locals: {record: @question, attribute: :description} %> <%= render partial: 'citizen_budget_model/shared/translated_field', locals: {record: @question, attribute: :modal} %> <%= render partial: 'citizen_budget_model/shared/translated_field', locals: {record: @question, attribute: :popover} %>
<% end %> <% html_panel = [:required, :placeholder, :maxlength, :rows, :cols, :size, :html_class] %> <% if visible?(@question, *html_panel) && @question.any_of?(*html_panel) %>
<%= render partial: 'citizen_budget_model/shared/field', locals: {record: @question, attribute: :required} %> <%= render partial: 'citizen_budget_model/shared/translated_field', locals: {record: @question, attribute: :placeholder} %> <% [:maxlength, :rows, :cols, :size, :html_class].each do |attribute| %> <%= render partial: 'citizen_budget_model/shared/field', locals: {record: @question, attribute: attribute} %> <% end %>
<% end %>