diff --git a/app/views/account/calculators/show.html.erb b/app/views/account/calculators/show.html.erb index fa61078c3..3616a870b 100644 --- a/app/views/account/calculators/show.html.erb +++ b/app/views/account/calculators/show.html.erb @@ -1 +1,31 @@ -<%= render "calculators/partials/logo_picture", calculator: @calculator %> \ No newline at end of file +
+ <%= link_to account_calculators_path, class: "back-arrow" do %> + <%= inline_svg "icons/arrow-left.svg", class: "z-1 mr-2 mb-0.5" %> + <%= t('buttons.back') %> + <% end %> + +
+ <%= t('.name') %>: +

<%= @calculator.name %>

+
+ +
+ <%= t('.slug') %>: +

<%= @calculator.slug %>

+
+ + <%= render "calculators/partials/logo_picture", calculator: @calculator %> + +
+ <%= link_to t('.edit'), + edit_account_calculator_path(@calculator.slug, locale: I18n.locale), + class: "btn btn-green" %> + + <%= button_to account_calculator_path(@calculator.slug, locale: I18n.locale), + method: :delete, + data: { turbo_confirm: t('.confirm_delete') }, + class: "btn btn-danger" do %> + <%= t('.delete') %> + <% end %> +
+
diff --git a/app/views/calculators/partials/_logo_picture.html.erb b/app/views/calculators/partials/_logo_picture.html.erb index b803427a9..81cc837e6 100644 --- a/app/views/calculators/partials/_logo_picture.html.erb +++ b/app/views/calculators/partials/_logo_picture.html.erb @@ -1 +1,5 @@ -<%= image_tag(@calculator.logo_picture.variant(resize_to_fill: [428, 307])) if @calculator.logo_picture.attached? %> \ No newline at end of file +<% if @calculator.logo_picture.attached? %> + <%= image_tag(@calculator.logo_picture.variant(resize_to_fill: [428, 307]))%> +<% else %> + <%= image_tag "scales.png", alt: "Default image" %> +<% end %>