]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/notes/new.html.erb
Merge remote-tracking branch 'upstream/pull/5494'
[rails.git] / app / views / notes / new.html.erb
index ee9837056b0c5756cf2994a6ef93f6358439e291..5be707dfe38462acc700e9fd4a1c8449799ab801 100644 (file)
@@ -4,13 +4,27 @@
 
 <div class="note">
   <p class="alert alert-info"><%= t(".intro") %></p>
+  <% if !current_user %>
+    <div class="alert alert-warning pb-0">
+      <p><%= t ".anonymous_warning_html",
+               :log_in => link_to(t(".anonymous_warning_log_in"), login_path(:referer => new_note_path)),
+               :sign_up => link_to(t(".anonymous_warning_sign_up"), new_user_path) %></p>
+    <% if @anonymous_notes_count >= 10 %>
+      <p><%= t ".counter_warning_html",
+               :x_anonymous_notes => t(".x_anonymous_notes", :count => @anonymous_notes_count),
+               :contribute_by_yourself => link_to(t(".counter_warning_guide_link.text"), t(".counter_warning_guide_link.url")),
+               :community_can_help => link_to(t(".counter_warning_forum_link.text"), t(".counter_warning_forum_link.url")) %></p>
+    <% end %>
+    </div>
+  <% end %>
+  <p class="alert alert-warning" id="new-note-zoom-warning" hidden><%= t "javascripts.site.createnote_disabled_tooltip" %></p>
   <form action="#">
     <input type="hidden" name="lon" autocomplete="off">
     <input type="hidden" name="lat" autocomplete="off">
     <div class="mb-3">
       <textarea class="form-control" name="text" cols="40" rows="10" maxlength="2000" placeholder="<%= t(".advice") %>"></textarea>
     </div>
-    <div class="btn-wrapper">
+    <div>
       <input type="submit" name="add" value="<%= t(".add") %>" disabled="1" class="btn btn-primary">
     </div>
   </form>