Improves all pages for admin section
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<tr>
|
||||
<th><%= t("admin.activity.show.type") %></th>
|
||||
<th><%= t("admin.activity.show.action") %></th>
|
||||
<th> </th>
|
||||
<th class="text-left"><%= t("admin.activity.show.content") %></th>
|
||||
<th><%= t("admin.activity.show.by") %></th>
|
||||
</tr>
|
||||
<% @activity.each do |activity| %>
|
||||
|
||||
@@ -3,38 +3,18 @@
|
||||
<%= render 'errors' %>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-3 column">
|
||||
<div class="small-12 medium-6 large-3 column">
|
||||
<%= f.label :style, t("admin.banners.banner.style") %>
|
||||
<%= f.select :style, options_for_select(@banner_styles, @banner.style),:include_blank => '-',
|
||||
label: false,placeholder: t("admin.banners.banner.style") %>
|
||||
</div>
|
||||
<div class="small-3 column">
|
||||
<div class="small-12 medium-6 large-3 column">
|
||||
<%= f.label :image, t("admin.banners.banner.image") %>
|
||||
<%= f.select :image, options_for_select(@banner_imgs, @banner.image),:include_blank => '-',
|
||||
label: false, placeholder: t("admin.banners.banner.image") %>
|
||||
</div>
|
||||
<div class="small-12 column">
|
||||
<%= f.label :title, t("admin.banners.banner.title") %>
|
||||
<%= f.text_field :title, placeholder: t("admin.banners.banner.title"), label: false,
|
||||
data: {js_banner_title: "js_banner_title"} %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
<%= f.label :description, t("admin.banners.banner.description") %>
|
||||
<%= f.text_field :description,
|
||||
label: false,
|
||||
data: {js_banner_description: "js_banner_description"},
|
||||
placeholder: t("admin.banners.banner.description") %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
<%= f.label :target_url, t("admin.banners.banner.target_url") %>
|
||||
<%= f.text_field :target_url,
|
||||
label: false,
|
||||
placeholder: t("admin.banners.banner.target_url") %>
|
||||
</div>
|
||||
<% date_started_at = @banner.post_started_at.present? ? I18n.localize(@banner.post_started_at) : "" %>
|
||||
<div class="small-3 column">
|
||||
<div class="small-12 medium-6 large-3 column">
|
||||
<%= f.label :post_started_at, t("admin.banners.banner.post_started_at") %>
|
||||
<%= f.text_field :post_started_at,
|
||||
label: false,
|
||||
@@ -44,7 +24,7 @@
|
||||
id: "post_started_at" %>
|
||||
</div>
|
||||
<% date_ended_at = @banner.post_ended_at.present? ? I18n.localize(@banner.post_ended_at) : ""%>
|
||||
<div class="small-3 column">
|
||||
<div class="small-12 medium-6 large-3 column">
|
||||
<%= f.label :post_ended_at, t("admin.banners.banner.post_ended_at") %>
|
||||
<%= f.text_field :post_ended_at,
|
||||
label: false,
|
||||
@@ -53,9 +33,36 @@
|
||||
class: "js-calendar-full",
|
||||
id: "post_ended_at" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="actions small-12 column">
|
||||
<%= f.submit(class: "button", value: t("admin.banners.edit.form.submit_button")) %>
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= f.label :title, t("admin.banners.banner.title") %>
|
||||
<%= f.text_field :title, placeholder: t("admin.banners.banner.title"), label: false,
|
||||
data: {js_banner_title: "js_banner_title"} %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= f.label :target_url, t("admin.banners.banner.target_url") %>
|
||||
<%= f.text_field :target_url,
|
||||
label: false,
|
||||
placeholder: t("admin.banners.banner.target_url") %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<%= f.label :description, t("admin.banners.banner.description") %>
|
||||
<%= f.text_field :description,
|
||||
label: false,
|
||||
data: {js_banner_description: "js_banner_description"},
|
||||
placeholder: t("admin.banners.banner.description") %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="actions small-12 medium-3 column">
|
||||
<%= f.submit(class: "button expanded", value: t("admin.banners.edit.form.submit_button")) %>
|
||||
</div>
|
||||
</div>
|
||||
<div id="js-banner-style" class="<%= @banner.style %>">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%= link_to t("admin.banners.index.create"),
|
||||
new_admin_banner_path, class: "button large success float-right" %>
|
||||
new_admin_banner_path, class: "button success float-right" %>
|
||||
|
||||
<h2 class="inline-block"><%= t("admin.banners.index.title") %></h2>
|
||||
|
||||
@@ -11,6 +11,12 @@
|
||||
<% @banners.each do |banner| %>
|
||||
<tr id="<%= dom_id(banner) %>">
|
||||
<td class="small-12 medium-9">
|
||||
<small>
|
||||
<%= t("admin.banners.banner.post_started_at")%> <strong><%= banner.post_started_at %></strong>
|
||||
|
|
||||
<%= t("admin.banners.banner.post_ended_at")%> <strong><%= banner.post_ended_at%></strong>
|
||||
</small>
|
||||
|
||||
<div class="<%= banner.style %>">
|
||||
<div class="<%= banner.image %>">
|
||||
<%= link_to banner.target_url do %>
|
||||
@@ -19,24 +25,15 @@
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<%= t("admin.banners.banner.post_started_at")%> <strong><%= banner.post_started_at %></strong>
|
||||
|
|
||||
<%= t("admin.banners.banner.post_ended_at")%> <strong><%= banner.post_ended_at%></strong>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<%= link_to edit_admin_banner_path(banner),
|
||||
class: 'edit-banner button' do %>
|
||||
<span class="icon-edit"></span>
|
||||
<%= t("admin.banners.index.edit") %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to admin_banner_path(banner), method: :delete,
|
||||
class: 'delete' do %>
|
||||
<span class="icon-delete"></span>
|
||||
<%= t("admin.banners.index.delete") %>
|
||||
<% end %>
|
||||
<td class="text-right">
|
||||
<%= link_to t("admin.banners.index.edit"), edit_admin_banner_path(banner),
|
||||
class: 'edit-banner button hollow' %>
|
||||
|
||||
<%= link_to t("admin.banners.index.delete"), admin_banner_path(banner),
|
||||
method: :delete,
|
||||
class: 'button hollow alert' %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
@@ -4,34 +4,32 @@
|
||||
|
||||
<h3><%= page_entries_info @comments %></h3>
|
||||
|
||||
<ul class="admin-list">
|
||||
<table>
|
||||
<% @comments.each do |comment| %>
|
||||
<li id="<%= dom_id(comment) %>">
|
||||
<div class="row">
|
||||
<div class="small-12 medium-8 column">
|
||||
<tr id="<%= dom_id(comment) %>">
|
||||
<td>
|
||||
<%= text_with_links comment.body %><br>
|
||||
<% if comment.commentable.hidden? %>
|
||||
(<%= t("admin.comments.index.hidden_#{comment.commentable_type.downcase}") %>: <%= comment.commentable.title %>)
|
||||
<% else %>
|
||||
<%= link_to comment.commentable.title, comment.commentable %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="small-6 medium-4 column text-right">
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<%= link_to t("admin.actions.restore"),
|
||||
restore_admin_comment_path(comment, request.query_parameters),
|
||||
method: :put,
|
||||
data: { confirm: t("admin.actions.confirm") },
|
||||
class: "button small success float-right" %>
|
||||
class: "button hollow on-hover" %>
|
||||
<% unless comment.confirmed_hide? %>
|
||||
<%= link_to t("admin.actions.confirm_hide"),
|
||||
confirm_hide_admin_comment_path(comment, request.query_parameters),
|
||||
method: :put,
|
||||
class: "button small warning float-right" %>
|
||||
class: "button hollow warning on-hover" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</ul>
|
||||
</table>
|
||||
|
||||
<%= paginate @comments %>
|
||||
|
||||
@@ -14,19 +14,17 @@
|
||||
<%= debate.description %>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<td class="text-right">
|
||||
<%= link_to t("admin.actions.restore"),
|
||||
restore_admin_debate_path(debate, request.query_parameters),
|
||||
method: :put,
|
||||
data: { confirm: t("admin.actions.confirm") },
|
||||
class: "button small success no-margin" %>
|
||||
</td>
|
||||
<td>
|
||||
class: "button hollow on-hover" %>
|
||||
<% unless debate.confirmed_hide? %>
|
||||
<%= link_to t("admin.actions.confirm_hide"),
|
||||
confirm_hide_admin_debate_path(debate, request.query_parameters),
|
||||
method: :put,
|
||||
class: "button small warning float-right" %>
|
||||
class: "button hollow warning on-hover" %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -1,13 +1,24 @@
|
||||
<span><%= manager.name %></span>
|
||||
<span class="bullet"> • </span>
|
||||
<span><%= manager.email %></span>
|
||||
<% if manager.persisted? %>
|
||||
<div class="small-12 column">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<%= manager.name %>
|
||||
</td>
|
||||
<td>
|
||||
<%= manager.email %>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<% if manager.persisted? %>
|
||||
<%= link_to t('admin.managers.manager.delete'),
|
||||
admin_manager_path(manager),
|
||||
method: :delete,
|
||||
class: "button small alert float-right"
|
||||
class: "button hollow alert"
|
||||
%>
|
||||
<% else %>
|
||||
<% else %>
|
||||
<%= link_to t('admin.managers.manager.add'),{ controller: "admin/managers", action: :create, user_id: manager.user_id },
|
||||
method: :post, class: "button small success float-right" %>
|
||||
<% end %>
|
||||
method: :post, class: "button success" %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<h2><%= t("admin.managers.index.title") %></h2>
|
||||
|
||||
<div class="row">
|
||||
<div class="column">
|
||||
<%= form_tag search_admin_managers_path, method: :get, remote: true do %>
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= text_field_tag :email, '', placeholder: t('admin.managers.search.email_placeholder') %>
|
||||
@@ -9,16 +9,35 @@
|
||||
<%= submit_tag t('admin.managers.search.search'), class: 'button' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div id="search-result" class="row small"></div>
|
||||
|
||||
<div id="search-result" class="row"></div>
|
||||
|
||||
<h3><%= page_entries_info @managers %></h3>
|
||||
<ul id="managers" class="admin-list">
|
||||
|
||||
<table id="managers">
|
||||
<% @managers.each do |manager| %>
|
||||
<li>
|
||||
<%= render 'manager', manager: manager %>
|
||||
</li>
|
||||
<tr>
|
||||
<td>
|
||||
<%= manager.name %>
|
||||
</td>
|
||||
<td>
|
||||
<%= manager.email %>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<% if manager.persisted? %>
|
||||
<%= link_to t('admin.managers.manager.delete'),
|
||||
admin_manager_path(manager),
|
||||
method: :delete,
|
||||
class: "button hollow alert"
|
||||
%>
|
||||
<% else %>
|
||||
<%= link_to t('admin.managers.manager.add'),{ controller: "admin/managers", action: :create, user_id: manager.user_id },
|
||||
method: :post, class: "button success" %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<%= paginate @managers %>
|
||||
|
||||
@@ -1 +1 @@
|
||||
$("#search-result").html("<div class=\"panel column\"><%= j render 'manager', manager: @manager %></div>");
|
||||
$("#search-result").html("<%= j render 'manager', manager: @manager %>");
|
||||
|
||||
@@ -1 +1 @@
|
||||
$("#search-result").html("<div class=\"panel column\"><%= j t('admin.managers.search.user_not_found') %></div>");
|
||||
$("#search-result").html("<div class=\"small-12 column\"><div class=\"callout alert\"><%= j t('admin.managers.search.user_not_found') %></div></div>");
|
||||
|
||||
@@ -1,13 +1,26 @@
|
||||
<span><%= moderator.name %></span>
|
||||
<span class="bullet"> • </span>
|
||||
<span><%= moderator.email %></span>
|
||||
<% if moderator.persisted? %>
|
||||
<div class="small-12 column">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<%= moderator.name %>
|
||||
</td>
|
||||
<td>
|
||||
<%= moderator.email %>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<% if moderator.persisted? %>
|
||||
<%= link_to t('admin.moderators.moderator.delete'),
|
||||
admin_moderator_path(moderator),
|
||||
method: :delete,
|
||||
class: "button small alert float-right"
|
||||
%>
|
||||
<% else %>
|
||||
class: "button hollow alert" %>
|
||||
<% else %>
|
||||
<%= link_to t('admin.moderators.moderator.add'),{ controller: "admin/moderators", action: :create, user_id: moderator.user_id },
|
||||
method: :post, class: "button small success float-right" %>
|
||||
<% end %>
|
||||
method: :post,
|
||||
class: "button success" %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<h2><%= t("admin.moderators.index.title") %></h2>
|
||||
|
||||
<div class="row">
|
||||
<div class="column">
|
||||
<%= form_tag search_admin_moderators_path, method: :get, remote: true do %>
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= text_field_tag :email, '', placeholder: t('admin.moderators.search.email_placeholder') %>
|
||||
@@ -9,16 +9,38 @@
|
||||
<%= submit_tag t('admin.moderators.search.search'), class: 'button' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div id="search-result" class="row small"></div>
|
||||
|
||||
<div id="search-result" class="row"></div>
|
||||
|
||||
<h3><%= page_entries_info @moderators %></h3>
|
||||
<ul id="moderators" class="admin-list">
|
||||
|
||||
<table id="moderators">
|
||||
<% @moderators.each do |moderator| %>
|
||||
<li>
|
||||
<%= render 'moderator', moderator: moderator %>
|
||||
</li>
|
||||
<tr>
|
||||
<td>
|
||||
<%= moderator.name %>
|
||||
</td>
|
||||
<td>
|
||||
<%= moderator.email %>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<% if moderator.persisted? %>
|
||||
<%= link_to t('admin.moderators.moderator.delete'),
|
||||
admin_moderator_path(moderator),
|
||||
method: :delete,
|
||||
class: "button hollow alert"
|
||||
%>
|
||||
<% else %>
|
||||
<%= link_to t('admin.moderators.moderator.add'),
|
||||
{ controller: "admin/moderators", action: :create,
|
||||
user_id: moderator.user_id },
|
||||
method: :post,
|
||||
class: "button success" %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<%= paginate @moderators %>
|
||||
|
||||
@@ -1 +1 @@
|
||||
$("#search-result").html("<div class=\"panel column\"><%= j render 'moderator', moderator: @moderator %></div>");
|
||||
$("#search-result").html("<%= j render 'moderator', moderator: @moderator %>");
|
||||
|
||||
@@ -1 +1 @@
|
||||
$("#search-result").html("<div class=\"panel column\"><%= j t('admin.moderators.search.user_not_found') %></div>");
|
||||
$("#search-result").html("<div class=\"small-12 column\"><div class=\"callout alert\"><%= j t('admin.moderators.search.user_not_found') %></div></div>");
|
||||
|
||||
@@ -1,15 +1,20 @@
|
||||
<h2>
|
||||
<%= t("admin.officials.edit.title") %>
|
||||
<span class="official float-right"><strong><%= @user.name %></strong> (<%= @user.email %>)</span>
|
||||
</h2>
|
||||
<%= render 'shared/back_link' %>
|
||||
|
||||
<%= form_for @user, url: admin_official_path(@user) do |f| %>
|
||||
<div class="clear"></div>
|
||||
|
||||
<div class="official float-right"><strong><%= @user.name %></strong> (<%= @user.email %>)</div>
|
||||
|
||||
<h2 class="inline-block"><%= t("admin.officials.edit.title") %></h2>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6 column end">
|
||||
<%= form_for @user, url: admin_official_path(@user) do |f| %>
|
||||
<%= f.text_field :official_position %>
|
||||
<%= f.select :official_level, official_level_options %>
|
||||
<%= link_to t("admin.officials.edit.back"), admin_officials_path, class: "button small secondary" %>
|
||||
<%= f.submit %>
|
||||
|
||||
<% if @user.official? %>
|
||||
<%= link_to t("admin.officials.edit.destroy"), admin_official_path(@user), method: :delete, class: 'delete' %>
|
||||
<%= link_to t("admin.officials.edit.destroy"), admin_official_path(@user), method: :delete, class: 'button hollow alert' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= f.submit class: "button hollow" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,20 +4,24 @@
|
||||
|
||||
<h3><%= page_entries_info @officials %></h3>
|
||||
|
||||
<ul class="admin-list">
|
||||
<% @officials.each do |official| %>
|
||||
<li>
|
||||
<table>
|
||||
<% @officials.each do |official| %>
|
||||
<tr>
|
||||
<td>
|
||||
<%= link_to official.name, edit_admin_official_path(official) %>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="level"><%= t("admin.officials.level_#{official.official_level}") %></span>
|
||||
<span class="bullet"> • </span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="label round level-<%= official.official_level %>">
|
||||
<%= official.official_position %>
|
||||
</span>
|
||||
|
||||
<%= link_to official.official? ? t("admin.officials.search.edit_official") : t("admin.officials.search.make_official"), edit_admin_official_path(official), class: "button small float-right" %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
(<%= t("admin.officials.level_#{official.official_level}") %>)
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<%= link_to official.official? ? t("admin.officials.search.edit_official") : t("admin.officials.search.make_official"),
|
||||
edit_admin_official_path(official), class: "button hollow" %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<%= paginate @officials %>
|
||||
|
||||
@@ -4,18 +4,22 @@
|
||||
|
||||
<h3><%= page_entries_info @users %></h3>
|
||||
|
||||
<ul class="admin-list">
|
||||
<table>
|
||||
<% @users.each do |user| %>
|
||||
<li>
|
||||
<tr>
|
||||
<td>
|
||||
<%= link_to user.name, edit_admin_official_path(user) %>
|
||||
<span class="bullet"> • </span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="label round level-<%= user.official_level %>">
|
||||
<%= user.official_position %>
|
||||
</span>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="level"><%= t("admin.officials.level_#{user.official_level}") %></span>
|
||||
|
||||
<%= link_to user.official? ? t("admin.officials.search.edit_official") : t("admin.officials.search.make_official"), edit_admin_official_path(user), class: "button small float-right" %>
|
||||
</li>
|
||||
(<%= t("admin.officials.level_#{user.official_level}") %>)
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<%= link_to user.official? ? t("admin.officials.search.edit_official") : t("admin.officials.search.make_official"),
|
||||
edit_admin_official_path(user), class: "button hollow" %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</ul>
|
||||
</table>
|
||||
|
||||
@@ -22,12 +22,12 @@
|
||||
<% @organizations.each do |organization| %>
|
||||
<% hidden += 1 and next if organization.user.nil? || organization.user.hidden? %>
|
||||
<tr id="<%= dom_id(organization) %>">
|
||||
<td><%= organization.name %></td>
|
||||
<td><%= organization.email %></td>
|
||||
<td><%= organization.phone_number %></td>
|
||||
<td><%= organization.responsible_name %></td>
|
||||
<td><p><%= organization.name %></p></td>
|
||||
<td><p><%= organization.email %></p></td>
|
||||
<td><p><%= organization.phone_number %></p></td>
|
||||
<td><p><%= organization.responsible_name %></p></td>
|
||||
<% if organization.verified? %>
|
||||
<td class="verified">
|
||||
<td class="verified text-center">
|
||||
<span class="icon-check"></span>
|
||||
<%= t("admin.organizations.index.verified") %>
|
||||
</td>
|
||||
@@ -36,20 +36,21 @@
|
||||
<td>
|
||||
<%= link_to t("admin.organizations.index.verify"),
|
||||
verify_admin_organization_path(organization, request.query_parameters),
|
||||
method: :put, class: "button small success"
|
||||
method: :put, class: "button success expanded"
|
||||
%>
|
||||
</td>
|
||||
<% end %>
|
||||
<% if organization.rejected? %>
|
||||
<td class="rejected">
|
||||
<td class="rejected text-center">
|
||||
<span class="icon-x"></span>
|
||||
<%= t("admin.organizations.index.rejected") %>
|
||||
</td>
|
||||
<% end %>
|
||||
<% if can? :reject, organization %>
|
||||
<td><%= link_to t("admin.organizations.index.reject"),
|
||||
<td>
|
||||
<%= link_to t("admin.organizations.index.reject"),
|
||||
reject_admin_organization_path(organization, request.query_parameters),
|
||||
method: :put, class: "button small alert"
|
||||
method: :put, class: "button hollow alert expanded"
|
||||
%>
|
||||
</td>
|
||||
<% end %>
|
||||
@@ -57,6 +58,10 @@
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<%= t("admin.organizations.index.hidden_count", count: hidden) if hidden > 0 %>
|
||||
<% if hidden > 0 %>
|
||||
<div class="callout primary">
|
||||
<%= t("admin.organizations.index.hidden_count_html", count: hidden) %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= paginate @organizations %>
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
<table id="search-results">
|
||||
<% @organizations.each do |organization| %>
|
||||
<tr>
|
||||
<td><%= organization.name %></td>
|
||||
<td><%= organization.email %></td>
|
||||
<td><%= organization.phone_number %></td>
|
||||
<td><%= organization.responsible_name %></td>
|
||||
<td><p><%= organization.name %></p></td>
|
||||
<td><p><%= organization.email %></p></td>
|
||||
<td><p><%= organization.phone_number %></p></td>
|
||||
<td><p><%= organization.responsible_name %></p></td>
|
||||
<% if organization.verified? %>
|
||||
<td class="verified">
|
||||
<td class="verified text-center">
|
||||
<span class="icon-check"></span>
|
||||
<%= t("admin.organizations.index.verified") %>
|
||||
</td>
|
||||
@@ -32,12 +32,12 @@
|
||||
<td>
|
||||
<%= link_to t("admin.organizations.index.verify"),
|
||||
verify_admin_organization_path(organization, request.query_parameters),
|
||||
method: :put, class: "button small success"
|
||||
method: :put, class: "button success expanded"
|
||||
%>
|
||||
</td>
|
||||
<% end %>
|
||||
<% if organization.rejected? %>
|
||||
<td class="rejected">
|
||||
<td class="rejected text-center">
|
||||
<span class="icon-x"></span>
|
||||
<%= t("admin.organizations.index.rejected") %>
|
||||
</td>
|
||||
@@ -45,7 +45,7 @@
|
||||
<% if can? :reject, organization %>
|
||||
<td><%= link_to t("admin.organizations.index.reject"),
|
||||
reject_admin_organization_path(organization, request.query_parameters),
|
||||
method: :put, class: "button small alert"
|
||||
method: :put, class: "button hollow alert expanded"
|
||||
%>
|
||||
</td>
|
||||
<% end %>
|
||||
|
||||
@@ -22,19 +22,17 @@
|
||||
<p><%= proposal.question %></p>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<td class="text-right">
|
||||
<%= link_to t("admin.actions.restore"),
|
||||
restore_admin_proposal_path(proposal, request.query_parameters),
|
||||
method: :put,
|
||||
data: { confirm: t("admin.actions.confirm") },
|
||||
class: "button small success no-margin" %>
|
||||
</td>
|
||||
<td>
|
||||
class: "button hollow on-hover" %>
|
||||
<% unless proposal.confirmed_hide? %>
|
||||
<%= link_to t("admin.actions.confirm_hide"),
|
||||
confirm_hide_admin_proposal_path(proposal, request.query_parameters),
|
||||
method: :put,
|
||||
class: "button small warning float-right" %>
|
||||
class: "button hollow warning on-hover" %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -1,68 +1,97 @@
|
||||
<h2><%= t("admin.settings.index.title") %></h2>
|
||||
|
||||
<ul class="admin-list">
|
||||
<table>
|
||||
<tbody>
|
||||
<% @settings.each do |setting| %>
|
||||
<li>
|
||||
<tr>
|
||||
<td class="small-12 medium-4">
|
||||
<strong><%= t("settings.#{setting.key}") %></strong>
|
||||
|
||||
</td>
|
||||
<td class="small-12 medium-8">
|
||||
<%= form_for(setting, url: admin_setting_path(setting), html: { id: "edit_#{dom_id(setting)}"}) do |f| %>
|
||||
<div class="small-12 medium-6 large-9 column">
|
||||
<%= f.text_area :value, label: false, id: dom_id(setting), lines: 1 %>
|
||||
<%= f.submit(t('admin.settings.index.update_setting'), class: "button small success") %>
|
||||
</div>
|
||||
<div class="small-12 medium-6 large-3 column">
|
||||
<%= f.submit(t('admin.settings.index.update_setting'), class: "button hollow expanded") %>
|
||||
</div>
|
||||
<% end %>
|
||||
</li>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</ul>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h2><%= t("admin.settings.index.feature_flags") %></h2>
|
||||
|
||||
<ul class="admin-list">
|
||||
<table>
|
||||
<tbody>
|
||||
<% @feature_flags.each do |feature_flag| %>
|
||||
<li>
|
||||
<tr>
|
||||
<td>
|
||||
<strong><%= t("settings.#{feature_flag.key}") %></strong>
|
||||
</td>
|
||||
|
||||
<div>
|
||||
<td>
|
||||
<%= feature_flag.enabled? ? t("admin.settings.index.features.enabled") : t("admin.settings.index.features.disabled") %>
|
||||
<div>
|
||||
</td>
|
||||
|
||||
<td class="text-right">
|
||||
<%= form_for(feature_flag, url: admin_setting_path(feature_flag), html: { id: "edit_#{dom_id(feature_flag)}"}) do |f| %>
|
||||
|
||||
<%= f.hidden_field :value, id: dom_id(feature_flag), value: (feature_flag.enabled? ? "" : "active") %>
|
||||
<%= f.submit(t("admin.settings.index.features.#{feature_flag.enabled? ? 'disable' : 'enable'}"), class: "button small #{feature_flag.enabled? ? 'warning' : 'success'}", data: {confirm: t("admin.actions.confirm")}) %>
|
||||
<%= f.submit(t("admin.settings.index.features.#{feature_flag.enabled? ? 'disable' : 'enable'}"),
|
||||
class: "button expanded #{feature_flag.enabled? ? 'hollow alert' : 'success'}",
|
||||
data: {confirm: t("admin.actions.confirm")}) %>
|
||||
<% end %>
|
||||
</li>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</ul>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<% if @banner_styles.present? %>
|
||||
<h2><%= t("admin.settings.index.banners") %></h2>
|
||||
|
||||
<ul class="admin-list">
|
||||
<table>
|
||||
<tbody>
|
||||
<% @banner_styles.each do |setting| %>
|
||||
<li>
|
||||
<tr>
|
||||
<td>
|
||||
<strong><%= t("settings.#{setting.key}") %></strong>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<%= form_for(setting, url: admin_setting_path(setting), html: { id: "edit_#{dom_id(setting)}"}) do |f| %>
|
||||
<%= f.text_area :value, label: false, id: dom_id(setting), lines: 1 %>
|
||||
<%= f.submit(t('admin.settings.index.update_setting'), class: "button small success") %>
|
||||
<%= f.submit(t('admin.settings.index.update_setting'), class: "button hollow") %>
|
||||
<% end %>
|
||||
</li>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</ul>
|
||||
</tbody>
|
||||
</table>
|
||||
<% end %>
|
||||
|
||||
<% if @banner_imgs.present?%>
|
||||
<h2><%= t("admin.settings.index.banner_imgs") %></h2>
|
||||
|
||||
<ul class="admin-list">
|
||||
<table>
|
||||
<tbody>
|
||||
<% @banner_imgs.each do |setting| %>
|
||||
<li>
|
||||
<tr>
|
||||
<td>
|
||||
<strong><%= t("settings.#{setting.key}") %></strong>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<%= form_for(setting, url: admin_setting_path(setting), html: { id: "edit_#{dom_id(setting)}"}) do |f| %>
|
||||
<%= f.text_area :value, label: false, id: dom_id(setting), lines: 1 %>
|
||||
<%= f.submit(t('admin.settings.index.update_setting'), class: "button small success") %>
|
||||
<% end %>
|
||||
</li>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</ul>
|
||||
</tbody>
|
||||
</table>
|
||||
<% end %>
|
||||
|
||||
@@ -22,29 +22,29 @@
|
||||
|
||||
<h3><%= t("admin.tags.index.title") %>: <%= page_entries_info @tags %></h3>
|
||||
|
||||
<ul class="admin-list">
|
||||
<table>
|
||||
<% @tags.each do |tag| %>
|
||||
<li>
|
||||
<span class="tag"><%= tag.name %></span>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<%= form_for(tag,
|
||||
url: admin_tag_path(tag),
|
||||
as: :tag,
|
||||
html: { id: "edit_tag_#{tag.id}", class: "text-right"}) do |f| %>
|
||||
|
||||
<span class="float-left">
|
||||
<span class="float-left text-left">
|
||||
<strong><%= tag.name %></strong>
|
||||
<%= f.label "featured_#{tag.id}" do %>
|
||||
<%= f.check_box :featured, title: t('admin.tags.mark_as_featured'), label: false, id: "tag_featured_#{tag.id}", class: "inline-block" %>
|
||||
<span class="checkbox inline-block"><%= t("admin.tags.mark_as_featured") %></span>
|
||||
<% end %>
|
||||
</span>
|
||||
|
||||
<%= f.submit(t("admin.tags.update"), class: "button small success") %>
|
||||
|
||||
<%= link_to t("admin.tags.destroy"), admin_tag_path(tag), method: :delete, class: "delete" %>
|
||||
<%= f.submit(t("admin.tags.update"), class: "button hollow on-hover") %>
|
||||
<%= link_to t("admin.tags.destroy"), admin_tag_path(tag), method: :delete, class: "button hollow alert on-hover" %>
|
||||
<% end %>
|
||||
</li>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</ul>
|
||||
</table>
|
||||
|
||||
<%= paginate @tags %>
|
||||
|
||||
@@ -4,25 +4,29 @@
|
||||
|
||||
<h3><%= page_entries_info @users %></h3>
|
||||
|
||||
<ul class="admin-list">
|
||||
<table>
|
||||
<% @users.each do |user| %>
|
||||
<li id="<%= dom_id(user) %>">
|
||||
<%= link_to user.name, admin_user_path(user) %>
|
||||
<tr id="<%= dom_id(user) %>">
|
||||
<td>
|
||||
<p><%= link_to user.name, admin_user_path(user) %></p>
|
||||
</td>
|
||||
|
||||
<td class="text-right">
|
||||
<%= link_to t("admin.actions.restore"),
|
||||
restore_admin_user_path(user, request.query_parameters),
|
||||
method: :put,
|
||||
data: { confirm: t("admin.actions.confirm") },
|
||||
class: "button small success float-right" %>
|
||||
class: "button hollow on-hover" %>
|
||||
<% unless user.confirmed_hide? %>
|
||||
<%= link_to t("admin.actions.confirm_hide"),
|
||||
confirm_hide_admin_user_path(user, request.query_parameters),
|
||||
method: :put,
|
||||
class: "button small warning float-right" %>
|
||||
class: "button hollow warning on-hover" %>
|
||||
<% end %>
|
||||
</li>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</ul>
|
||||
</table>
|
||||
|
||||
<%= paginate @users %>
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
<%= render 'shared/back_link' %>
|
||||
|
||||
<h2><%= t("admin.users.show.title", user: @user.name) %></h2>
|
||||
|
||||
<p>
|
||||
@@ -5,37 +7,33 @@
|
||||
<strong><%= t("admin.users.show.registered_at") %></strong> <%= @user.confirmed_at %> |
|
||||
<strong><%= t("admin.users.show.hidden_at") %></strong> <%= @user.hidden_at %>
|
||||
</p>
|
||||
<p>
|
||||
<%= link_to t("admin.users.show.back"), admin_users_path,
|
||||
class: "button small secondary" %>
|
||||
</p>
|
||||
|
||||
<% if @debates.present? %>
|
||||
<h3><%= page_entries_info @debates %></h3>
|
||||
<% end %>
|
||||
|
||||
<ul class="admin-list">
|
||||
<% @debates.each do |debate| %>
|
||||
<li>
|
||||
<table>
|
||||
<% @debates.each do |debate| %>
|
||||
<tr>
|
||||
<td>
|
||||
<%= link_to debate.title, debate_path(debate) %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<% if @comments.present? %>
|
||||
<h3><%= page_entries_info @comments %></h3>
|
||||
<% end %>
|
||||
|
||||
<ul class="admin-list">
|
||||
<% @comments.each do |comment| %>
|
||||
<li id="<%= dom_id(comment) %>">
|
||||
<div class="row">
|
||||
<div class="small-12 medium-10 column">
|
||||
<table>
|
||||
<% @comments.each do |comment| %>
|
||||
<tr id="<%= dom_id(comment) %>">
|
||||
<td>
|
||||
<%= text_with_links comment.body %>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<%= paginate [@debates, @comments].sort_by {|x| x.size}.last %>
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
<h3><%= t('admin.valuators.valuator.user_found') %>:</h3>
|
||||
<div class="row">
|
||||
<div class="small-12 medium-12 column">
|
||||
<h4>
|
||||
<div class="small-12 column">
|
||||
<h3><%= t('admin.valuators.valuator.user_found') %></h3>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<%= valuator.name %>
|
||||
<span class="bullet"> • </span>
|
||||
</td>
|
||||
<td>
|
||||
<%= valuator.email %>
|
||||
</h4>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<% unless @valuator.persisted? %>
|
||||
<%= form_for @valuator, url: admin_valuators_path do |f| %>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<h2><%= t("admin.valuators.index.title") %></h2>
|
||||
|
||||
<div class="row">
|
||||
<div class="column">
|
||||
<%= form_tag search_admin_valuators_path, method: :get, remote: true do %>
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= text_field_tag :email, '', placeholder: t('admin.valuators.search.email_placeholder') %>
|
||||
@@ -9,22 +9,28 @@
|
||||
<%= submit_tag t('admin.valuators.search.search'), class: 'button radius' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div id="search-result" class="row small"></div>
|
||||
|
||||
<div id="search-result" class="row"></div>
|
||||
|
||||
<h3><%= page_entries_info @valuators %></h3>
|
||||
<ul id="valuators" class="admin-list">
|
||||
|
||||
<table id="valuators">
|
||||
<% @valuators.each do |valuator| %>
|
||||
<li>
|
||||
<span><%= valuator.name %></span>
|
||||
<span class="bullet"> • </span>
|
||||
<span><%= valuator.email %></span>
|
||||
<tr>
|
||||
<td>
|
||||
<%= valuator.name %>
|
||||
</td>
|
||||
<td>
|
||||
<%= valuator.email %>
|
||||
</td>
|
||||
<td>
|
||||
<% if valuator.description.present? %>
|
||||
<span class="bullet"> • </span>
|
||||
<span><%= valuator.description %></span>
|
||||
<%= valuator.description %>
|
||||
<% end %>
|
||||
</li>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</ul>
|
||||
</table>
|
||||
|
||||
<%= paginate @valuators %>
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
<%= link_to admin_spending_proposals_path, class: "back" do %>
|
||||
<span class="icon-angle-left"></span>
|
||||
<%= t("shared.back") %>
|
||||
<% end %>
|
||||
<%= render 'shared/back_link' %>
|
||||
|
||||
<h2><%= t("admin.valuators.summary.title") %></h2>
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
$("#search-result").html("<h4><%= j t('admin.valuators.search.user_not_found') %></h4>");
|
||||
$("#search-result").html("<div class=\"small-12 column\"><div class=\"callout alert\"><%= j t('admin.valuators.search.user_not_found') %></div></div>");
|
||||
|
||||
@@ -4,13 +4,17 @@
|
||||
|
||||
<h3><%= page_entries_info @users %></h3>
|
||||
|
||||
<ul class="admin-list">
|
||||
<% @users.each do |user| %>
|
||||
<li id="<%= dom_id(user) %>">
|
||||
<table>
|
||||
<% @users.each do |user| %>
|
||||
<tr id="<%= dom_id(user) %>">
|
||||
<td>
|
||||
<%= link_to user.name, admin_user_path(user) %>
|
||||
</td>
|
||||
<td>
|
||||
<%= render "pending_step", user: user %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<%= paginate @users %>
|
||||
@@ -14,20 +14,39 @@
|
||||
</head>
|
||||
|
||||
<body class="admin">
|
||||
<div class="off-canvas-wrapper">
|
||||
<div class="off-canvas-wrapper-inner" data-off-canvas-wrapper>
|
||||
<div class="off-canvas position-left" id="offCanvas" data-off-canvas>
|
||||
|
||||
<button class="close-button" aria-label="Close menu" type="button" data-close>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
|
||||
<%= side_menu %>
|
||||
</div>
|
||||
|
||||
<div class="off-canvas-content" data-off-canvas-content>
|
||||
<%= render 'layouts/admin_header' %>
|
||||
|
||||
<main class="no-margin-top row no-max-width collapse">
|
||||
<div class="small-12 medium-3 large-2 column">
|
||||
|
||||
<div class="show-for-small-only">
|
||||
<button type="button" class="button hollow expanded" data-toggle="offCanvas"><%= t("admin.menu.admin") %></button>
|
||||
</div>
|
||||
|
||||
<div class="hide-for-small-only">
|
||||
<%= side_menu %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="admin-content small-12 medium-9 large-10 column">
|
||||
|
||||
<%= render 'layouts/flash' %>
|
||||
|
||||
<%= yield %>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -50,6 +50,7 @@ en:
|
||||
hide: Hidden
|
||||
restore: Restored
|
||||
by: Moderated by
|
||||
content: Content
|
||||
filter: Show
|
||||
filters:
|
||||
all: All
|
||||
@@ -93,6 +94,7 @@ en:
|
||||
user_not_found: User not found
|
||||
menu:
|
||||
activity: Moderator activity
|
||||
admin: Admin menu
|
||||
banner: Manage banners
|
||||
debate_topics: Debate topics
|
||||
hidden_comments: Hidden comments
|
||||
@@ -140,7 +142,6 @@ en:
|
||||
cost: Cost
|
||||
officials:
|
||||
edit:
|
||||
back: Back
|
||||
destroy: Remove 'Official' status
|
||||
title: 'Officials: Edit user'
|
||||
flash:
|
||||
@@ -166,9 +167,9 @@ en:
|
||||
pending: Pending
|
||||
rejected: Rejected
|
||||
verified: Verified
|
||||
hidden_count:
|
||||
one: There is also one organisation with no users or with a hidden user
|
||||
other: There are %{count} organisations with no users or with a hidden user
|
||||
hidden_count_html:
|
||||
one: There is also <strong>one organisation</strong> with no users or with a hidden user.
|
||||
other: There are <strong>%{count} organisations</strong> with no users or with a hidden user.
|
||||
reject: Reject
|
||||
rejected: Rejected
|
||||
search: Search
|
||||
@@ -306,11 +307,10 @@ en:
|
||||
without_confirmed_hide: Pending
|
||||
title: Hidden users
|
||||
show:
|
||||
back: Back
|
||||
email: 'Email:'
|
||||
hidden_at: 'Hidden at:'
|
||||
registered_at: 'Registered at:'
|
||||
title: Activity of user %{user}
|
||||
title: Activity of user (%{user})
|
||||
verifications:
|
||||
index:
|
||||
phone_not_given: Phone not given
|
||||
|
||||
@@ -11,7 +11,7 @@ es:
|
||||
unmark_featured: Quitar destacado
|
||||
banners:
|
||||
index:
|
||||
title: Anuncios
|
||||
title: Banners
|
||||
create: Crear un banner
|
||||
edit: Editar banner
|
||||
delete: Eliminar banner
|
||||
@@ -48,6 +48,7 @@ es:
|
||||
hide: Ocultado
|
||||
restore: Restaurado
|
||||
by: Moderado por
|
||||
content: Contenido
|
||||
filter: Mostrar
|
||||
filters:
|
||||
all: Todo
|
||||
@@ -91,6 +92,7 @@ es:
|
||||
user_not_found: Usuario no encontrado
|
||||
menu:
|
||||
activity: Actividad de moderadores
|
||||
admin: Menú de administración
|
||||
banner: Gestionar banners
|
||||
debate_topics: Temas de debate
|
||||
hidden_comments: Comentarios ocultos
|
||||
@@ -138,7 +140,6 @@ es:
|
||||
cost: Coste total
|
||||
officials:
|
||||
edit:
|
||||
back: Volver
|
||||
destroy: Eliminar condición de 'Cargo Público'
|
||||
title: 'Cargos Públicos: Editar usuario'
|
||||
flash:
|
||||
@@ -164,9 +165,9 @@ es:
|
||||
pending: Pendientes
|
||||
rejected: Rechazadas
|
||||
verified: Verificadas
|
||||
hidden_count:
|
||||
one: Hay además una organización sin usuario o con el usuario bloqueado
|
||||
other: Hay %{count} organizaciones sin usuario o con el usuario bloqueado
|
||||
hidden_count_html:
|
||||
one: Hay además <strong>una organización</strong> sin usuario o con el usuario bloqueado.
|
||||
other: Hay <strong>%{count} organizaciones</strong> sin usuario o con el usuario bloqueado.
|
||||
reject: Rechazar
|
||||
rejected: Rechazada
|
||||
search: Buscar
|
||||
@@ -304,11 +305,10 @@ es:
|
||||
without_confirmed_hide: Pendientes
|
||||
title: Usuarios bloqueados
|
||||
show:
|
||||
back: Volver
|
||||
email: 'Email:'
|
||||
hidden_at: 'Bloqueado:'
|
||||
registered_at: 'Fecha de alta:'
|
||||
title: Actividad del usuario %{user}
|
||||
title: Actividad del usuario (%{user})
|
||||
verifications:
|
||||
index:
|
||||
phone_not_given: No ha dado su teléfono
|
||||
|
||||
Reference in New Issue
Block a user