fixes conflicts with master
This commit is contained in:
@@ -95,6 +95,10 @@
|
||||
<strong><%= t("admin.menu.title_profiles") %></strong>
|
||||
</a>
|
||||
<ul <%= "class=is-active" if menu_profiles? %>>
|
||||
<li <%= "class=active" if controller_name == "administrators" %>>
|
||||
<%= link_to t("admin.menu.administrators"), admin_administrators_path %>
|
||||
</li>
|
||||
|
||||
<li <%= "class=active" if controller_name == "organizations" %>>
|
||||
<%= link_to t("admin.menu.organizations"), admin_organizations_path %>
|
||||
</li>
|
||||
@@ -171,5 +175,12 @@
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<li <%= "class=active" if controller_name == "newsletter" %>>
|
||||
<%= link_to admin_newsletters_path do %>
|
||||
<span class="icon-zip"></span>
|
||||
<%= t("admin.menu.newsletter") %>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
26
app/views/admin/administrators/_administrator.html.erb
Normal file
26
app/views/admin/administrators/_administrator.html.erb
Normal file
@@ -0,0 +1,26 @@
|
||||
<div class="small-12 column">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<%= administrator.name %>
|
||||
</td>
|
||||
<td>
|
||||
<%= administrator.email %>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<% if administrator.persisted? %>
|
||||
<%= link_to t('admin.administrators.administrator.delete'),
|
||||
admin_administrator_path(administrator),
|
||||
method: :delete,
|
||||
class: "button hollow alert" %>
|
||||
<% else %>
|
||||
<%= link_to t('admin.administrators.administrator.add'),{ controller: "admin/administrators", action: :create, user_id: administrator.user_id },
|
||||
method: :post,
|
||||
class: "button success" %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
46
app/views/admin/administrators/index.html.erb
Normal file
46
app/views/admin/administrators/index.html.erb
Normal file
@@ -0,0 +1,46 @@
|
||||
<h2 class="inline-block"><%= t("admin.administrators.index.title") %></h2>
|
||||
|
||||
<div class="row">
|
||||
<%= form_tag search_admin_administrators_path, method: :get, remote: true do %>
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= text_field_tag :email, '', placeholder: t('admin.administrators.search.email_placeholder') %>
|
||||
</div>
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= submit_tag t('admin.administrators.search.search'), class: 'button' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div id="search-result" class="row"></div>
|
||||
|
||||
<h3><%= page_entries_info @administrators %></h3>
|
||||
|
||||
<table id="administrators">
|
||||
<% @administrators.each do |administrator| %>
|
||||
<tr>
|
||||
<td>
|
||||
<%= administrator.name %>
|
||||
</td>
|
||||
<td>
|
||||
<%= administrator.email %>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<% if administrator.persisted? %>
|
||||
<%= link_to t('admin.administrators.administrator.delete'),
|
||||
admin_administrator_path(administrator),
|
||||
method: :delete,
|
||||
class: "button hollow alert"
|
||||
%>
|
||||
<% else %>
|
||||
<%= link_to t('admin.administrators.administrator.add'),
|
||||
{ controller: "admin/administrators", action: :create,
|
||||
user_id: administrator.user_id },
|
||||
method: :post,
|
||||
class: "button success" %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<%= paginate @administrators %>
|
||||
1
app/views/admin/administrators/search.js.erb
Normal file
1
app/views/admin/administrators/search.js.erb
Normal file
@@ -0,0 +1 @@
|
||||
$("#search-result").html("<%= j render 'administrator', administrator: @administrator %>");
|
||||
1
app/views/admin/administrators/user_not_found.js.erb
Normal file
1
app/views/admin/administrators/user_not_found.js.erb
Normal file
@@ -0,0 +1 @@
|
||||
$("#search-result").html("<div class=\"small-12 column\"><div class=\"callout alert\"><%= j t('admin.administrators.search.user_not_found') %></div></div>");
|
||||
@@ -20,7 +20,7 @@
|
||||
<td><%= geozone.name %></td>
|
||||
<td><%= geozone.external_code %></td>
|
||||
<td><%= geozone.census_code %></td>
|
||||
<td><%= geozone.html_map_coordinates %></td>
|
||||
<td class="break"><%= geozone.html_map_coordinates %></td>
|
||||
<td>
|
||||
<%= link_to t("admin.geozones.index.edit"), edit_admin_geozone_path(geozone), class: 'edit-banner button hollow' %>
|
||||
</td>
|
||||
|
||||
3
app/views/admin/newsletters/index.html.erb
Normal file
3
app/views/admin/newsletters/index.html.erb
Normal file
@@ -0,0 +1,3 @@
|
||||
<h2><%= t("admin.newsletters.index.title") %></h2>
|
||||
|
||||
<%= link_to t("admin.newsletters.index.button"), users_admin_newsletters_path, class: "button" %>
|
||||
@@ -20,29 +20,29 @@
|
||||
<div class="row stats-numbers">
|
||||
<div class="small-12 medium-3 column">
|
||||
<p class="featured">
|
||||
<%= t "admin.stats.show.summary.visits" %><br>
|
||||
<%= t "admin.stats.show.summary.visits" %> <br>
|
||||
<span class="number"><%= number_with_delimiter(@visits) %></span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= t "admin.stats.show.summary.debates" %><br>
|
||||
<%= t "admin.stats.show.summary.debates" %> <br>
|
||||
<span class="number"><%= number_with_delimiter(@debates) %></span>
|
||||
</p>
|
||||
<p>
|
||||
<%= t "admin.stats.show.summary.proposals" %><br>
|
||||
<%= t "admin.stats.show.summary.proposals" %> <br>
|
||||
<span class="number"><%= number_with_delimiter(@proposals) %></span>
|
||||
</p>
|
||||
<p>
|
||||
<%= t "admin.stats.show.summary.comments" %><br>
|
||||
<%= t "admin.stats.show.summary.comments" %> <br>
|
||||
<span class="number"><%= number_with_delimiter(@comments) %></span>
|
||||
</p>
|
||||
<% if feature?(:budgets) %>
|
||||
<p>
|
||||
<%= t "admin.stats.show.summary.budgets" %><br>
|
||||
<%= t "admin.stats.show.summary.budgets" %> <br>
|
||||
<span class="number"><%= number_with_delimiter(@budgets) %></span>
|
||||
</p>
|
||||
<p class="featured">
|
||||
<%= t "admin.stats.show.summary.budget_investments" %><br>
|
||||
<%= t "admin.stats.show.summary.budget_investments" %> <br>
|
||||
<span class="number"><%= number_with_delimiter(@investments) %></span>
|
||||
</p>
|
||||
<% end %>
|
||||
@@ -50,56 +50,56 @@
|
||||
|
||||
<div class="small-12 medium-3 column">
|
||||
<p class="featured">
|
||||
<%= t "admin.stats.show.summary.proposal_votes" %><br>
|
||||
<span class="number"><%= number_with_delimiter(@proposal_votes) %><br></span>
|
||||
<%= t "admin.stats.show.summary.proposal_votes" %> <br>
|
||||
<span class="number"><%= number_with_delimiter(@proposal_votes) %> <br></span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= t "admin.stats.show.summary.debate_votes" %><br>
|
||||
<%= t "admin.stats.show.summary.debate_votes" %> <br>
|
||||
<span class="number"><%= number_with_delimiter(@debate_votes) %></span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= t "admin.stats.show.summary.comment_votes" %><br>
|
||||
<%= t "admin.stats.show.summary.comment_votes" %> <br>
|
||||
<span class="number"><%= number_with_delimiter(@comment_votes) %></span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= t "admin.stats.show.summary.votes" %><br>
|
||||
<%= t "admin.stats.show.summary.votes" %> <br>
|
||||
<span class="number"><%= number_with_delimiter(@votes) %></span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-3 column">
|
||||
<p class="featured">
|
||||
<%= t "admin.stats.show.summary.verified_users" %><br>
|
||||
<%= t "admin.stats.show.summary.verified_users" %> <br>
|
||||
<span class="number"><%= number_with_delimiter(@verified_users) %></span>
|
||||
</p>
|
||||
|
||||
<p class="featured">
|
||||
<%= t "admin.stats.show.summary.unverified_users" %><br>
|
||||
<%= t "admin.stats.show.summary.unverified_users" %> <br>
|
||||
<span class="number"><%= number_with_delimiter(@unverified_users) %></span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-3 column">
|
||||
<p class="featured">
|
||||
<%= t "admin.stats.show.summary.users" %><br>
|
||||
<%= t "admin.stats.show.summary.users" %> <br>
|
||||
<span class="number"><%= number_with_delimiter(@users) %></span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= t "admin.stats.show.summary.user_level_two" %><br>
|
||||
<%= t "admin.stats.show.summary.user_level_two" %> <br>
|
||||
<span class="number"><%= number_with_delimiter(@user_level_two) %></span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= t "admin.stats.show.summary.user_level_three" %><br>
|
||||
<%= t "admin.stats.show.summary.user_level_three" %> <br>
|
||||
<span class="number"><%= number_with_delimiter(@user_level_three) %></span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= t "admin.stats.show.summary.verified_users_who_didnt_vote_proposals" %><br>
|
||||
<%= t "admin.stats.show.summary.verified_users_who_didnt_vote_proposals" %> <br>
|
||||
<span class="number">
|
||||
<%=number_with_delimiter(@user_ids_who_didnt_vote_proposals)%>
|
||||
</span>
|
||||
@@ -109,7 +109,7 @@
|
||||
<% if feature?(:spending_proposals) %>
|
||||
<div class="small-12 medium-3 column">
|
||||
<p class="featured">
|
||||
<%= t "admin.stats.show.summary.spending_proposals" %><br>
|
||||
<%= t "admin.stats.show.summary.spending_proposals" %> <br>
|
||||
<span class="number"><%= number_with_delimiter(@spending_proposals) %></span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user