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