Rewrite views with Bootstrap

This commit is contained in:
ricola 2025-12-04 01:00:19 +01:00
parent 529f7118b1
commit 5a278fcddf
19 changed files with 424 additions and 279 deletions

View file

@ -1,18 +1,18 @@
<h1><%= _("Admin") %></h1>
<h1 class="mb-5"><%= _("Admin") %></h1>
<h2><%= @user.email %></h2>
<h2 class="mb-4"><%= @user.email %></h2>
<p><%= _("Created: %{date}") % { date: format_date(@user.created_at) } %></p>
<p><%= _("Updated: %{date}") % { date: format_date(@user.updated_at) } %></p>
<p><%= _("Admin: %{admin}") % { admin: @user.admin ? _("Yes") : _("No") } %></p>
<p class="mb-5"><%= _("Admin: %{admin}") % { admin: @user.admin ? _("Yes") : _("No") } %></p>
<h2><%= _("Organized votes") %></h2>
<h2 class="mb-4"><%= _("Organized votes") %></h2>
<% unless @user.organizers.blank? %>
<ul>
<ul class="mb-5">
<% @user.organizers.each do |organizer| %>
<li>
<%= organizer.user.email %>
@ -23,15 +23,15 @@
<% else %>
<p><%= _("No vote organized.") %></p>
<p class="mb-5"><%= _("No vote organized.") %></p>
<% end %>
<h2><%= _("Ratings") %></h2>
<h2 class="mb-4"><%= _("Ratings") %></h2>
<% unless @user.ratings.blank? %>
<ul>
<ul class="mb-5">
<% @user.ratings.collect { |rating| rating.vote }.uniq.each do |vote| %>
<li>
<%= vote.title %>
@ -42,14 +42,14 @@
<% else %>
<p><%= _("No rating.") %></p>
<p class="mb-5"><%= _("No rating.") %></p>
<% end %>
<% if @user.ratings.blank? and @user.organizers.blank? %>
<form action="/admin/users/<%= @user.id %>/delete" method="post">
<button type="submit"><%= _("Delete user") %></button>
<button type="submit" class="btn btn-outline-danger"><%= _("Delete user") %></button>
</form>
<% end %>