]> git.openstreetmap.org Git - rails.git/commitdiff
Add new diary comment template
authorAnton Khorev <tony29@yandex.ru>
Fri, 12 Jul 2024 13:56:36 +0000 (16:56 +0300)
committerAnton Khorev <tony29@yandex.ru>
Fri, 12 Jul 2024 14:34:32 +0000 (17:34 +0300)
To be used when create comment action fails.

app/views/diary_comments/new.html.erb [new file with mode: 0644]
config/locales/en.yml

diff --git a/app/views/diary_comments/new.html.erb b/app/views/diary_comments/new.html.erb
new file mode 100644 (file)
index 0000000..91e6469
--- /dev/null
@@ -0,0 +1,12 @@
+<% content_for :heading do %>
+  <h1><%= t ".heading" %></h1>
+<% end %>
+
+<%= render :partial => "diary_entries/diary_entry_heading", :object => @entry, :as => "diary_entry" %>
+
+<h3><%= t "diary_entries.show.leave_a_comment" %></h3>
+
+<%= bootstrap_form_for @diary_comment, :url => comment_diary_entry_path(@entry.user, @entry) do |f| %>
+  <%= f.richtext_field :body, :cols => 80, :rows => 20, :hide_label => true %>
+  <%= f.primary %>
+<% end %>
index c5978b5d74fa644d5ea1a59e021ecd652210298b..1d86de20820ca29752ac71fd226ee5f956fae2e7 100644 (file)
@@ -609,6 +609,8 @@ en:
       comment: Comment
       newer_comments: "Newer Comments"
       older_comments: "Older Comments"
+    new:
+      heading: Add a comment to the following diary entry discussion?
   doorkeeper:
     errors:
       messages: