improves styles for admin activity views
This commit is contained in:
@@ -29,7 +29,7 @@ module AdminHelper
|
|||||||
end
|
end
|
||||||
|
|
||||||
def menu_profiles?
|
def menu_profiles?
|
||||||
["administrators", "organizations", "officials", "moderators", "valuators", "managers", "users"].include? controller_name
|
["administrators", "organizations", "officials", "moderators", "valuators", "managers", "users", "activity"].include? controller_name
|
||||||
end
|
end
|
||||||
|
|
||||||
def menu_banners?
|
def menu_banners?
|
||||||
|
|||||||
@@ -115,7 +115,7 @@
|
|||||||
<%= link_to t("admin.menu.officials"), admin_officials_path %>
|
<%= link_to t("admin.menu.officials"), admin_officials_path %>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li <%= "class=active" if controller_name == "moderators" %>>
|
<li <%= "class=active" if controller_name == "moderators" || controller_name == "activity" %>>
|
||||||
<%= link_to t('admin.menu.moderators'), admin_moderators_path%>
|
<%= link_to t('admin.menu.moderators'), admin_moderators_path%>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|||||||
@@ -1,43 +1,56 @@
|
|||||||
|
<%= back_link_to admin_moderators_path %>
|
||||||
|
|
||||||
<h2><%= t("admin.activity.show.title") %></h2>
|
<h2><%= t("admin.activity.show.title") %></h2>
|
||||||
|
|
||||||
<%= render 'shared/filter_subnav', i18n_namespace: "admin.activity.show" %>
|
<%= render 'shared/filter_subnav', i18n_namespace: "admin.activity.show" %>
|
||||||
|
|
||||||
<h3><%= page_entries_info @activity %></h3>
|
<% if @activity.any? %>
|
||||||
|
<h3 class="margin"><%= page_entries_info @activity %></h3>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<thead>
|
||||||
<th><%= t("admin.activity.show.type") %></th>
|
<tr>
|
||||||
<th><%= t("admin.activity.show.action") %></th>
|
<th scope="col"><%= t("admin.activity.show.type") %></th>
|
||||||
<th class="text-left"><%= t("admin.activity.show.content") %></th>
|
<th scope="col"><%= t("admin.activity.show.action") %></th>
|
||||||
<th><%= t("admin.activity.show.by") %></th>
|
<th scope="col" class="small-6"><%= t("admin.activity.show.content") %></th>
|
||||||
</tr>
|
<th scope="col"><%= t("admin.activity.show.by") %></th>
|
||||||
<% @activity.each do |activity| %>
|
</tr>
|
||||||
<tr id="<%= dom_id(activity) %>">
|
</thead>
|
||||||
<td>
|
<tbody>
|
||||||
<%= activity.actionable_type.constantize.model_name.human %><br>
|
<% @activity.each do |activity| %>
|
||||||
<span class="date"><%= l activity.actionable.created_at.to_date %></span>
|
<tr id="<%= dom_id(activity) %>">
|
||||||
</td>
|
<td class="align-top">
|
||||||
<td>
|
<strong><%= activity.actionable_type.constantize.model_name.human %></strong><br>
|
||||||
<%= t("admin.activity.show.actions.#{activity.action}") %><br>
|
<span class="date"><%= l activity.actionable.created_at.to_date %></span>
|
||||||
<span class="date"><%= l activity.created_at.to_date %></span>
|
</td>
|
||||||
</td>
|
<td class="align-top">
|
||||||
<td>
|
<%= t("admin.activity.show.actions.#{activity.action}") %><br>
|
||||||
<% case activity.actionable_type %>
|
<span class="date"><%= l activity.created_at.to_date %></span>
|
||||||
<% when "User" %>
|
</td>
|
||||||
<%= activity.actionable.username %> (<%= activity.actionable.email %>)
|
<td class="align-top">
|
||||||
<% when "Comment" %>
|
<% case activity.actionable_type %>
|
||||||
<%= activity.actionable.body %>
|
<% when "User" %>
|
||||||
<% else %>
|
<%= activity.actionable.username %> (<%= activity.actionable.email %>)
|
||||||
<strong><%= activity.actionable.title %></strong>
|
<% when "Comment" %>
|
||||||
<br>
|
<%= activity.actionable.body %>
|
||||||
<div class="proposal-description">
|
<% else %>
|
||||||
<%= activity.actionable.description %>
|
<strong><%= activity.actionable.title %></strong>
|
||||||
</div>
|
<br>
|
||||||
<% end %>
|
<div class="proposal-description">
|
||||||
</td>
|
<%= activity.actionable.description %>
|
||||||
<td><%= activity.user.name %> (<%= activity.user.email %>)</td>
|
</div>
|
||||||
</tr>
|
<% end %>
|
||||||
<% end %>
|
<td class="align-top">
|
||||||
</table>
|
<%= activity.user.name %> (<%= activity.user.email %>)
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
<%= paginate @activity %>
|
<%= paginate @activity %>
|
||||||
|
<% else %>
|
||||||
|
<div class="callout primary">
|
||||||
|
<%= t("admin.activity.show.no_activity") %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ en:
|
|||||||
on_users: Users
|
on_users: Users
|
||||||
title: Moderator activity
|
title: Moderator activity
|
||||||
type: Type
|
type: Type
|
||||||
|
no_activity: There ares no moderators activity.
|
||||||
budgets:
|
budgets:
|
||||||
index:
|
index:
|
||||||
title: Participatory budgets
|
title: Participatory budgets
|
||||||
|
|||||||
@@ -60,8 +60,9 @@ es:
|
|||||||
on_debates: Debates
|
on_debates: Debates
|
||||||
on_proposals: Propuestas
|
on_proposals: Propuestas
|
||||||
on_users: Usuarios
|
on_users: Usuarios
|
||||||
title: Actividad de los Moderadores
|
title: Actividad de Moderadores
|
||||||
type: Tipo
|
type: Tipo
|
||||||
|
no_activity: No hay actividad de moderadores.
|
||||||
budgets:
|
budgets:
|
||||||
index:
|
index:
|
||||||
title: Presupuestos participativos
|
title: Presupuestos participativos
|
||||||
|
|||||||
Reference in New Issue
Block a user