From cca822c5704c729165ac278a4cd85b723387244c Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Tue, 17 Mar 2026 20:35:40 -0400 Subject: [PATCH] better display flags --- app/views/items/index.html.erb | 12 ++++++++++-- app/views/items/show.html.erb | 8 ++++---- config/locales/en.yml | 2 ++ 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/app/views/items/index.html.erb b/app/views/items/index.html.erb index d35186e..9b3d4e9 100644 --- a/app/views/items/index.html.erb +++ b/app/views/items/index.html.erb @@ -26,10 +26,18 @@ <%= truncate(item.description, length: 60) %> <%= number_to_currency(item.unit_price) %> - <%= item.taxable ? content_tag(:span, '', class: 'icon icon-ok') : "" %> + <% if item.taxable %> + <%=t(:yes)%> + <% else %> + <%=t(:no)%> + <% end %> - <%= checked_image item.active %> + <% if item.active %> + <%=t(:yes)%> + <% else %> + <%=t(:no)%> + <% end %> <%= link_to l(:button_edit), edit_item_path(item), class: 'icon icon-edit' %> diff --git a/app/views/items/show.html.erb b/app/views/items/show.html.erb index be2015a..b86351d 100644 --- a/app/views/items/show.html.erb +++ b/app/views/items/show.html.erb @@ -18,17 +18,17 @@

Taxable: <% if @item.taxable %> - Yes + <%=t(:yes)%> <% else %> - No + <%=t(:no)%> <% end %>

Active: <% if @item.active %> - Yes + <%=t(:yes)%> <% else %> - No + <%=t(:no)%> <% end %>

diff --git a/config/locales/en.yml b/config/locales/en.yml index 90cc89e..300e11e 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -27,11 +27,13 @@ en: label_line_items: "Line Items" label_price: "Unit Price" label_item_new: "New Item" + label_no: "No" label_qty: "Quantity" label_remove: "Remove" label_sync_now_accounts: "Sync Accounts" label_sync_now_items: "Sync Items" label_total: "Total" + label_yes: "Yes" notice_added_from: "Added from issue #" \ No newline at end of file