diff --git a/app/views/admin/poll/officers/index.html.erb b/app/views/admin/poll/officers/index.html.erb index d6e11682b..fd9619167 100644 --- a/app/views/admin/poll/officers/index.html.erb +++ b/app/views/admin/poll/officers/index.html.erb @@ -12,40 +12,42 @@ <%= page_entries_info @officers, entry_name: t('admin.poll_officers.officer.entry_name') %> - - - - - - - - - <% @officers.each do |officer| %> - - - - - - <% end %> - -
<%= t('admin.poll_officers.officer.name') %><%= t('admin.poll_officers.officer.email') %>
- <%= officer.name %> - - <%= officer.email %> - - <% if officer.persisted? %> - <%= link_to t('admin.poll_officers.officer.delete'), - admin_officer_path(officer), - method: :delete, - class: "button hollow alert" - %> - <% else %> - <%= link_to t('admin.poll_officers.officer.add'), - { controller: "admin/poll/officers", action: :create, - user_id: officer.user_id }, - method: :post, - class: "button success" %> - <% end %> -
+<% if @officers.any? %> + + + + + + + + + <% @officers.each do |officer| %> + + + + + + <% end %> + +
<%= t('admin.poll_officers.officer.name') %><%= t('admin.poll_officers.officer.email') %>
+ <%= officer.name %> + + <%= officer.email %> + + <% if officer.persisted? %> + <%= link_to t('admin.poll_officers.officer.delete'), + admin_officer_path(officer), + method: :delete, + class: "button hollow alert" + %> + <% else %> + <%= link_to t('admin.poll_officers.officer.add'), + { controller: "admin/poll/officers", action: :create, + user_id: officer.user_id }, + method: :post, + class: "button success" %> + <% end %> +
-<%= paginate @officers %> + <%= paginate @officers %> +<% end %> \ No newline at end of file