]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/user_blocks/revoke_all.html.erb
Merge pull request #4595 from AntonKhorev/simplify-links-on-trace-pages
[rails.git] / app / views / user_blocks / revoke_all.html.erb
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..7fef69b57fabddf64f3bf19f92529a7f0bf93532 100644 (file)
@@ -0,0 +1,27 @@
+<% @title = t ".title",
+              :block_on => @user.display_name %>
+
+<% content_for :heading do %>
+  <h1><%= t ".heading_html",
+            :block_on => link_to(@user.display_name,
+                                 user_path(@user)) %></h1>
+<% end %>
+
+<% unless @user.blocks.active.empty? %>
+
+  <%= bootstrap_form_for :revoke_all, :url => { :action => "revoke_all" } do |f| %>
+    <div class="mb-3">
+      <div class="form-check">
+        <%= check_box_tag "confirm", "yes", false, { :class => "form-check-input" } %>
+        <%= label_tag "confirm", t(".confirm",
+                                   :active_blocks => t(".active_blocks",
+                                                       :count => @user.blocks.active.count)), { :class => "form-check-label" } %>
+      </div>
+    </div>
+
+    <%= f.primary t(".revoke") %>
+  <% end %>
+
+<% else %>
+<p><%= t ".empty", :name => @user.display_name %></p>
+<% end %>