From ccf588845a6e595d1c9b2726a05eddd34bc92488 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Wed, 20 Mar 2024 13:59:15 +0100 Subject: tags: added a way to update tags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's useful to just rename tags which have quite some references that you don't want to nuke. Signed-off-by: Miquel Sabaté Solà --- app/views/tags/_tag.html.erb | 1 + app/views/tags/edit.html.erb | 9 +++++++++ app/views/tags/new.html.erb | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 app/views/tags/edit.html.erb (limited to 'app/views') diff --git a/app/views/tags/_tag.html.erb b/app/views/tags/_tag.html.erb index 65c6d4e..0a82898 100644 --- a/app/views/tags/_tag.html.erb +++ b/app/views/tags/_tag.html.erb @@ -3,6 +3,7 @@ <%= tag.name %>
+ <%= link_to I18n.t('general.edit'), edit_tag_path(tag) %> | <%= link_to I18n.t('general.delete'), tag_path(tag), data: { "turbo-method": :delete } %>
diff --git a/app/views/tags/edit.html.erb b/app/views/tags/edit.html.erb new file mode 100644 index 0000000..44214a3 --- /dev/null +++ b/app/views/tags/edit.html.erb @@ -0,0 +1,9 @@ +
+
+
+

<%= I18n.t('tags.update') %> — <%= link_to I18n.t('general.back-to-list'), tags_path %>

+ + <%= render "form", tag: @tag %> +
+
+
diff --git a/app/views/tags/new.html.erb b/app/views/tags/new.html.erb index 9d6e1a8..97cd410 100644 --- a/app/views/tags/new.html.erb +++ b/app/views/tags/new.html.erb @@ -1,6 +1,6 @@
-
+

<%= I18n.t('tags.new') %> — <%= link_to I18n.t('general.back-to-list'), tags_path %>

<%= render "form", tag: @tag %> -- cgit v1.2.3