From d69ae84963466634cf518a4f1ec38bf914663ed0 Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Thu, 17 Aug 2023 19:20:37 +0300 Subject: [PATCH] Add color keys to note tables --- app/views/notes/index.html.erb | 5 ++++- config/locales/en.yml | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/views/notes/index.html.erb b/app/views/notes/index.html.erb index dd0cb2608..ef6251634 100644 --- a/app/views/notes/index.html.erb +++ b/app/views/notes/index.html.erb @@ -1,6 +1,9 @@ <% content_for :heading do %>

<%= t ".heading", :user => @user.display_name %>

-

<%= t ".subheading_html", :user => link_to(@user.display_name, user_path(@user)) %>

+

<%= t ".subheading_html", + :user => link_to(@user.display_name, user_path(@user)), + :submitted => tag.span(t(".subheading_submitted"), :class => "px-2 py-1 bg-primary bg-opacity-25"), + :commented => tag.span(t(".subheading_commented"), :class => "px-2 py-1 bg-white") %>

<% end %> <% if @notes.empty? %> diff --git a/config/locales/en.yml b/config/locales/en.yml index e14c5806c..7635c483d 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2878,7 +2878,9 @@ en: index: title: "Notes submitted or commented on by %{user}" heading: "%{user}'s Notes" - subheading_html: "Notes submitted or commented on by %{user}" + subheading_html: "Notes %{submitted} or %{commented} by %{user}" + subheading_submitted: "submitted" + subheading_commented: "commented on" no_notes: No notes id: "Id" creator: "Creator" -- 2.39.5