From: Anton Khorev Date: Fri, 12 Jul 2024 13:56:36 +0000 (+0300) Subject: Add new diary comment template X-Git-Tag: live~410^2~1 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/b69159795bc9c1a916b0d59e3edbefbc700561fb?hp=d80fac7ad90bfd20d1ad66fba034c2a93e5713d2 Add new diary comment template To be used when create comment action fails. --- diff --git a/app/views/diary_comments/new.html.erb b/app/views/diary_comments/new.html.erb new file mode 100644 index 000000000..91e646944 --- /dev/null +++ b/app/views/diary_comments/new.html.erb @@ -0,0 +1,12 @@ +<% content_for :heading do %> +

<%= t ".heading" %>

+<% end %> + +<%= render :partial => "diary_entries/diary_entry_heading", :object => @entry, :as => "diary_entry" %> + +

<%= t "diary_entries.show.leave_a_comment" %>

+ +<%= 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 %> diff --git a/config/locales/en.yml b/config/locales/en.yml index c5978b5d7..1d86de208 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -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: