Merge pull request #2060 from consul/consul-design

Consul design
This commit is contained in:
Raimond Garcia
2017-10-16 10:48:41 +02:00
committed by GitHub
19 changed files with 271 additions and 160 deletions

Binary file not shown.

View File

@@ -65,4 +65,9 @@
<glyph glyph-name="image" unicode="&#51;" d="M165 347c0-15-6-28-16-38-11-11-24-16-39-16-16 0-28 5-39 16-11 10-16 23-16 38 0 16 5 29 16 39 11 11 23 16 39 16 15 0 28-5 39-16 10-10 16-23 16-39z m292-109l0-128-402 0 0 55 91 91 46-46 146 147z m28 201l-458 0c-2 0-4-1-6-3-2-2-3-4-3-6l0-348c0-2 1-4 3-6 2-2 4-3 6-3l458 0c2 0 4 1 6 3 2 2 3 4 3 6l0 348c0 2-1 4-3 6-2 2-4 3-6 3z m45-9l0-348c0-12-4-23-13-32-9-9-20-13-32-13l-458 0c-12 0-23 4-32 13-9 9-13 20-13 32l0 348c0 12 4 23 13 32 9 9 20 13 32 13l458 0c12 0 23-4 32-13 9-9 13-20 13-32z"/>
<glyph glyph-name="search-plus" unicode="&#52;" d="M311 283l0-18c0-2-1-4-3-6-2-2-4-3-6-3l-64 0 0-64c0-2-1-5-3-6-2-2-4-3-6-3l-19 0c-2 0-4 1-6 3-2 1-3 4-3 6l0 64-64 0c-2 0-4 1-6 3-2 2-3 4-3 6l0 18c0 3 1 5 3 7 2 2 4 3 6 3l64 0 0 64c0 2 1 4 3 6 2 2 4 3 6 3l19 0c2 0 4-1 6-3 2-2 3-4 3-6l0-64 64 0c2 0 4-1 6-3 2-2 3-4 3-7z m36-9c0 36-12 66-37 91-25 25-55 37-91 37-35 0-65-12-90-37-25-25-38-55-38-91 0-35 13-65 38-90 25-25 55-38 90-38 36 0 66 13 91 38 25 25 37 55 37 90z m147-237c0-11-4-19-11-26-7-7-16-11-26-11-10 0-19 4-26 11l-98 98c-34-24-72-36-114-36-27 0-53 5-78 16-25 11-46 25-64 43-18 18-32 39-43 64-10 25-16 51-16 78 0 28 6 54 16 78 11 25 25 47 43 65 18 18 39 32 64 43 25 10 51 15 78 15 28 0 54-5 79-15 24-11 46-25 64-43 18-18 32-40 43-65 10-24 16-50 16-78 0-42-12-80-36-114l98-98c7-7 11-15 11-25z"/>
<glyph glyph-name="search-minus" unicode="&#53;" d="M311 283l0-18c0-2-1-4-3-6-2-2-4-3-6-3l-165 0c-2 0-4 1-6 3-2 2-3 4-3 6l0 18c0 3 1 5 3 7 2 2 4 3 6 3l165 0c2 0 4-1 6-3 2-2 3-4 3-7z m36-9c0 36-12 66-37 91-25 25-55 37-91 37-35 0-65-12-90-37-25-25-38-55-38-91 0-35 13-65 38-90 25-25 55-38 90-38 36 0 66 13 91 38 25 25 37 55 37 90z m147-237c0-11-4-19-11-26-7-7-16-11-26-11-10 0-19 4-26 11l-98 98c-34-24-72-36-114-36-27 0-53 5-78 16-25 11-46 25-64 43-18 18-32 39-43 64-10 25-16 51-16 78 0 28 6 54 16 78 11 25 25 47 43 65 18 18 39 32 64 43 25 10 51 15 78 15 28 0 54-5 79-15 24-11 46-25 64-43 18-18 32-40 43-65 10-24 16-50 16-78 0-42-12-80-36-114l98-98c7-7 11-15 11-25z"/>
<glyph glyph-name="calculator" unicode="&#54;" d="M110 73c0 10-4 19-11 26-7 7-16 11-26 11-10 0-19-4-26-11-7-7-10-16-10-26 0-10 3-19 10-26 7-7 16-10 26-10 10 0 19 3 26 10 7 7 11 16 11 26z m109 0c0 10-3 19-10 26-7 7-16 11-26 11-10 0-19-4-26-11-7-7-11-16-11-26 0-10 4-19 11-26 7-7 16-10 26-10 10 0 19 3 26 10 7 7 10 16 10 26z m-109 110c0 10-4 19-11 26-7 7-16 10-26 10-10 0-19-3-26-10-7-7-10-16-10-26 0-10 3-19 10-26 7-7 16-11 26-11 10 0 19 4 26 11 7 7 11 16 11 26z m219-110c0 10-3 19-11 26-7 7-15 11-25 11-11 0-19-4-26-11-7-7-11-16-11-26 0-10 4-19 11-26 7-7 15-10 26-10 10 0 18 3 25 10 8 7 11 16 11 26z m-110 110c0 10-3 19-10 26-7 7-16 10-26 10-10 0-19-3-26-10-7-7-11-16-11-26 0-10 4-19 11-26 7-7 16-11 26-11 10 0 19 4 26 11 7 7 10 16 10 26z m-109 110c0 10-4 18-11 25-7 8-16 11-26 11-10 0-19-3-26-11-7-7-10-15-10-25 0-11 3-19 10-26 7-7 16-11 26-11 10 0 19 4 26 11 7 7 11 15 11 26z m219-110c0 10-3 19-11 26-7 7-15 10-25 10-11 0-19-3-26-10-7-7-11-16-11-26 0-10 4-19 11-26 7-7 15-11 26-11 10 0 18 4 25 11 8 7 11 16 11 26z m-110 110c0 10-3 18-10 25-7 8-16 11-26 11-10 0-19-3-26-11-7-7-11-15-11-25 0-11 4-19 11-26 7-7 16-11 26-11 10 0 19 4 26 11 7 7 10 15 10 26z m220-220l0 110c0 10-4 18-11 26-7 7-16 10-26 10-10 0-18-3-25-10-8-8-11-16-11-26l0-110c0-10 3-18 11-26 7-7 15-10 25-10 10 0 19 3 26 10 7 8 11 16 11 26z m-110 220c0 10-3 18-11 25-7 8-15 11-25 11-11 0-19-3-26-11-7-7-11-15-11-25 0-11 4-19 11-26 7-7 15-11 26-11 10 0 18 4 25 11 8 7 11 15 11 26z m110 91l0 73c0 5-2 9-6 13-3 4-7 5-12 5l-366 0c-5 0-9-1-13-5-4-4-5-8-5-13l0-73c0-5 1-9 5-13 4-3 8-5 13-5l366 0c5 0 9 2 12 5 4 4 6 8 6 13z m0-91c0 10-4 18-11 25-7 8-16 11-26 11-10 0-18-3-26-11-7-7-10-15-10-25 0-11 3-19 10-26 8-7 16-11 26-11 10 0 19 4 26 11 7 7 11 15 11 26z m36 182l0-438c0-10-3-19-10-26-8-7-16-11-26-11l-402 0c-10 0-19 4-26 11-7 7-11 16-11 26l0 438c0 10 4 19 11 26 7 7 16 11 26 11l402 0c10 0 18-4 26-11 7-7 10-16 10-26z"/>
<glyph glyph-name="map-marker" unicode="&#55;" d="M329 329c0 20-7 38-21 52-15 14-32 21-52 21-20 0-37-7-52-21-14-14-21-32-21-52 0-20 7-37 21-52 15-14 32-21 52-21 20 0 37 7 52 21 14 15 21 32 21 52z m73 0c0-21-3-38-9-51l-104-221c-3-6-8-11-14-15-6-4-12-5-19-5-7 0-13 1-19 5-6 4-11 9-14 15l-104 221c-6 13-9 30-9 51 0 41 14 75 43 104 28 28 63 42 103 42 40 0 75-14 103-42 29-29 43-63 43-104z"/>
<glyph glyph-name="user-plus" unicode="&#56;" d="M165 256c-31 0-57 11-78 32-21 22-32 47-32 78 0 30 11 56 32 77 21 22 47 32 78 32 30 0 56-10 77-32 22-21 32-47 32-77 0-31-10-56-32-78-21-21-47-32-77-32z m274-37l100 0c3 0 5 0 7-2 2-2 3-4 3-7l0-55c0-2-1-4-3-6-2-2-4-3-7-3l-100 0 0-100c0-3-1-5-3-7-2-2-4-2-6-2l-55 0c-3 0-5 0-7 2-1 2-2 4-2 7l0 100-101 0c-2 0-4 1-6 3-2 2-3 4-3 6l0 55c0 3 1 5 3 7 2 2 4 2 6 2l101 0 0 101c0 2 1 5 2 6 2 2 4 3 7 3l55 0c2 0 4-1 6-3 2-1 3-4 3-6z m-210-64c0-9 3-18 10-25 8-8 16-11 26-11l73 0 0-68c-13-10-29-14-49-14l-249 0c-23 0-42 6-56 19-14 13-21 32-21 55 0 10 1 20 1 29 1 10 2 20 4 31 2 11 5 22 8 31 3 10 7 19 12 28 5 9 11 17 18 23 7 7 15 12 24 16 10 3 21 5 32 5 4 0 8-1 11-5 15-11 30-20 45-26 14-6 30-8 47-8 17 0 32 2 47 8 14 6 29 15 44 26 4 4 7 5 11 5 25 0 46-9 62-27l-64 0c-10 0-18-4-26-11-7-7-10-16-10-26z"/>
<glyph glyph-name="file-text-o" unicode="&#57;" d="M456 403c5-5 10-12 14-21 4-9 5-18 5-25l0-330c0-7-2-14-8-19-5-5-11-8-19-8l-384 0c-8 0-14 3-19 8-6 5-8 12-8 19l0 458c0 7 2 14 8 19 5 5 11 8 19 8l256 0c8 0 16-2 25-6 9-4 17-8 22-13z m-127 70l0-107 108 0c-2 5-4 9-7 11l-89 90c-2 2-6 4-12 6z m110-436l0 292-119 0c-8 0-14 3-19 8-6 5-8 12-8 20l0 118-220 0 0-438z m-293 246c0 3 1 5 3 7 2 2 4 3 6 3l202 0c2 0 4-1 6-3 2-2 3-4 3-7l0-18c0-3-1-5-3-6-2-2-4-3-6-3l-202 0c-2 0-4 1-6 3-2 1-3 3-3 6z m211-64c2 0 4 0 6-2 2-2 3-4 3-7l0-18c0-3-1-5-3-7-2-1-4-2-6-2l-202 0c-2 0-4 1-6 2-2 2-3 4-3 7l0 18c0 3 1 5 3 7 2 2 4 2 6 2z m0-73c2 0 4-1 6-2 2-2 3-4 3-7l0-18c0-3-1-5-3-7-2-1-4-2-6-2l-202 0c-2 0-4 1-6 2-2 2-3 4-3 7l0 18c0 3 1 5 3 7 2 1 4 2 6 2z"/>
<glyph glyph-name="file-text" unicode="&#33;" d="M456 376c3-3 5-6 8-10l-135 0 0 135c4-3 8-6 10-8z m-136-47l155 0 0-302c0-7-2-14-8-19-5-5-11-8-19-8l-384 0c-8 0-14 3-19 8-6 5-8 12-8 19l0 458c0 7 2 14 8 19 5 5 11 8 19 8l229 0 0-155c0-8 2-15 8-20 5-5 11-8 19-8z m46-210l0 18c0 3-1 5-3 7-2 1-4 2-6 2l-202 0c-2 0-4-1-6-2-2-2-3-4-3-7l0-18c0-3 1-5 3-7 2-1 4-2 6-2l202 0c2 0 4 1 6 2 2 2 3 4 3 7z m0 73l0 18c0 3-1 5-3 7-2 2-4 2-6 2l-202 0c-2 0-4 0-6-2-2-2-3-4-3-7l0-18c0-3 1-5 3-7 2-1 4-2 6-2l202 0c2 0 4 1 6 2 2 2 3 4 3 7z m0 73l0 18c0 3-1 5-3 7-2 2-4 3-6 3l-202 0c-2 0-4-1-6-3-2-2-3-4-3-7l0-18c0-3 1-5 3-6 2-2 4-3 6-3l202 0c2 0 4 1 6 3 2 1 3 3 3 6z"/>
</font></defs></svg>

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -268,3 +268,23 @@
.icon-search-minus::before {
content: '\35';
}
.icon-calculator::before {
content: '\36';
}
.icon-map-marker::before {
content: '\37';
}
.icon-user-plus::before {
content: '\38';
}
.icon-file-text-o::before {
content: '\39';
}
.icon-file-text::before {
content: '\21';
}

View File

@@ -55,8 +55,4 @@ module WelcomeHelper
end
end
def highlight_background
(feature?("user.recommendations") && current_user) ? "highlight" : ""
end
end

View File

@@ -136,7 +136,7 @@
<% if feature?(:legislation) %>
<li class="section-title <%= "active" if controller.class.parent == Admin::Legislation %>">
<%= link_to admin_legislation_processes_path do %>
<span class="icon-edit"></span>
<span class="icon-file-text"></span>
<strong><%= t("admin.menu.legislation") %></strong>
<% end %>
</li>
@@ -156,7 +156,7 @@
<li class="section-title">
<a href="#">
<span class="icon-settings"></span>
<span class="icon-edit"></span>
<strong><%= t("admin.menu.title_site_customization") %></strong>
</a>
<ul <%= "class=is-active" if menu_customization? &&
@@ -178,6 +178,7 @@
<li class="section-title <%= "active" if controller_name == "geozones" %>">
<%= link_to admin_geozones_path do %>
<span class="icon-map-marker"></span>
<strong><%= t('admin.menu.geozones') %></strong>
<% end %>
</li>
@@ -185,6 +186,7 @@
<% if feature?(:signature_sheets) %>
<li class="section-title <%= "active" if controller_name == "signature_sheets" %>">
<%= link_to admin_signature_sheets_path do %>
<span class="icon-file-text-o"></span>
<strong><%= t("admin.menu.signature_sheets") %></strong>
<% end %>
</li>

View File

@@ -2,34 +2,46 @@
<%= render 'shared/filter_subnav', i18n_namespace: "admin.comments.index" %>
<h3><%= page_entries_info @comments %></h3>
<% if @comments.any? %>
<h3 class="margin"><%= page_entries_info @comments %></h3>
<table>
<% @comments.each do |comment| %>
<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 %>
</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 hollow on-hover-block" %>
<% unless comment.confirmed_hide? %>
<%= link_to t("admin.actions.confirm_hide"),
confirm_hide_admin_comment_path(comment, request.query_parameters),
<table>
<thead>
<th scope="col" class="small-9"><%= t("admin.shared.description") %></th>
<th scope="col"><%= t("admin.shared.actions") %></th>
</thead>
<tbody>
<% @comments.each do |comment| %>
<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 %>
</td>
<td>
<%= link_to t("admin.actions.restore"),
restore_admin_comment_path(comment, request.query_parameters),
method: :put,
class: "button hollow warning on-hover-block" %>
<% end %>
</td>
</tr>
<% end %>
</table>
data: { confirm: t("admin.actions.confirm") },
class: "button hollow warning" %>
<% unless comment.confirmed_hide? %>
<%= link_to t("admin.actions.confirm_hide"),
confirm_hide_admin_comment_path(comment, request.query_parameters),
method: :put,
class: "button" %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
<%= paginate @comments %>
<%= paginate @comments %>
<% else %>
<div class="callout primary margin">
<%= t("admin.comments.index.no_hidden_comments") %>
</div>
<% end %>

View File

@@ -2,33 +2,47 @@
<%= render 'shared/filter_subnav', i18n_namespace: "admin.debates.index" %>
<h3><%= page_entries_info @debates %></h3>
<% if @debates.any? %>
<h3 class="margin"><%= page_entries_info @debates %></h3>
<table>
<% @debates.each do |debate| %>
<tr id="<%= dom_id(debate) %>">
<td>
<strong><%= debate.title %></strong>
<br>
<div class="moderation-description">
<%= debate.description %>
</div>
</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 hollow on-hover" %>
<% unless debate.confirmed_hide? %>
<%= link_to t("admin.actions.confirm_hide"),
confirm_hide_admin_debate_path(debate, request.query_parameters),
<table>
<thead>
<th scope="col"><%= t("admin.shared.title") %></th>
<th scope="col" class="small-6"><%= t("admin.shared.description") %></th>
<th scope="col" class="small-3"><%= t("admin.shared.actions") %></th>
</thead>
<tbody>
<% @debates.each do |debate| %>
<tr id="<%= dom_id(debate) %>">
<td class="align-top">
<strong><%= debate.title %></strong>
</td>
<td>
<div class="moderation-description">
<%= debate.description %>
</div>
</td>
<td class="align-top">
<%= link_to t("admin.actions.restore"),
restore_admin_debate_path(debate, request.query_parameters),
method: :put,
class: "button hollow warning on-hover" %>
<% end %>
</td>
</tr>
<% end %>
</table>
data: { confirm: t("admin.actions.confirm") },
class: "button hollow warning" %>
<% unless debate.confirmed_hide? %>
<%= link_to t("admin.actions.confirm_hide"),
confirm_hide_admin_debate_path(debate, request.query_parameters),
method: :put,
class: "button" %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
<%= paginate @debates %>
<%= paginate @debates %>
<% else %>
<div class="callout primary margin">
<%= t("admin.debates.index.no_hidden_debates") %>
</div>
<% end %>

View File

@@ -2,32 +2,42 @@
<%= render 'shared/filter_subnav', i18n_namespace: "admin.hidden_users.index" %>
<h3><%= page_entries_info @users %></h3>
<% if @users.any? %>
<h3 class="margin"><%= page_entries_info @users %></h3>
<table>
<% @users.each do |user| %>
<tr id="<%= dom_id(user) %>">
<td>
<p><%= link_to user.name, admin_hidden_user_path(user) %></p>
</td>
<table>
<thead>
<th scope="col" class="small-9"><%= t("admin.hidden_users.index.user") %></th>
<th scope="col"><%= t("admin.shared.actions") %></th>
</thead>
<tbody>
<% @users.each do |user| %>
<tr id="<%= dom_id(user) %>">
<td>
<p><%= link_to user.name, admin_hidden_user_path(user) %></p>
</td>
<td class="text-right">
<%= link_to t("admin.actions.restore"),
restore_admin_hidden_user_path(user, request.query_parameters),
method: :put,
data: { confirm: t("admin.actions.confirm") },
class: "button hollow on-hover" %>
<% unless user.confirmed_hide? %>
<%= link_to t("admin.actions.confirm_hide"),
confirm_hide_admin_hidden_user_path(user, request.query_parameters),
method: :put,
class: "button hollow warning on-hover" %>
<% end %>
</td>
</tr>
<td>
<%= link_to t("admin.actions.restore"),
restore_admin_hidden_user_path(user, request.query_parameters),
method: :put,
data: { confirm: t("admin.actions.confirm") },
class: "button hollow warning" %>
<% unless user.confirmed_hide? %>
<%= link_to t("admin.actions.confirm_hide"),
confirm_hide_admin_hidden_user_path(user, request.query_parameters),
method: :put,
class: "button" %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
<%= paginate @users %>
<% else %>
<div class="callout primary margin">
<%= t("admin.hidden_users.index.no_hidden_users") %>
</div>
<% end %>
</table>
<%= paginate @users %>

View File

@@ -1,11 +1,31 @@
<ul class="menu simple clear">
<li <%= "class=active" if active == 'info' %>>
<%= link_to t("admin.legislation.processes.subnav.info"), edit_admin_legislation_process_path(process) %>
</li>
<li <%= "class=active" if active == 'questions' %>>
<%= link_to t("admin.legislation.processes.subnav.questions"), admin_legislation_process_questions_path(process) %>
</li>
<li <%= "class=active" if active == 'draft_versions' %>>
<%= link_to t("admin.legislation.processes.subnav.draft_texts"), admin_legislation_process_draft_versions_path(process) %>
</li>
<% if active == 'info' %>
<li class="active">
<h2><%= t("admin.legislation.processes.subnav.info") %></h2>
</li>
<% else %>
<li>
<%= link_to t("admin.legislation.processes.subnav.info"), edit_admin_legislation_process_path(process) %>
</li>
<% end %>
<% if active == 'questions' %>
<li class="active">
<h2><%= t("admin.legislation.processes.subnav.questions") %></h2>
</li>
<% else %>
<li>
<%= link_to t("admin.legislation.processes.subnav.questions"), admin_legislation_process_questions_path(process) %>
</li>
<% end %>
<% if active == 'draft_versions' %>
<li class="active">
<h2><%= t("admin.legislation.processes.subnav.draft_texts") %></h2>
</li>
<% else %>
<li>
<%= link_to t("admin.legislation.processes.subnav.draft_texts"), admin_legislation_process_draft_versions_path(process) %>
</li>
<% end %>
</ul>

View File

@@ -2,41 +2,55 @@
<%= render 'shared/filter_subnav', i18n_namespace: "admin.proposals.index" %>
<h3><%= page_entries_info @proposals %></h3>
<% if @proposals.any? %>
<h3 class="margin"><%= page_entries_info @proposals %></h3>
<table>
<% @proposals.each do |proposal| %>
<tr id="<%= dom_id(proposal) %>">
<td>
<strong><%= proposal.title %></strong>
<br>
<div class="moderation-description">
<p><%= proposal.summary %></p>
<%= proposal.description %>
<% if proposal.external_url.present? %>
<p><%= text_with_links proposal.external_url %></p>
<% end %>
<% if proposal.video_url.present? %>
<p><%= text_with_links proposal.video_url %></p>
<% end %>
<p><%= proposal.question %></p>
</div>
</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 hollow on-hover-block" %>
<% unless proposal.confirmed_hide? %>
<%= link_to t("admin.actions.confirm_hide"),
confirm_hide_admin_proposal_path(proposal, request.query_parameters),
<table>
<thead>
<th scope="col"><%= t("admin.shared.title") %></th>
<th scope="col" class="small-6"><%= t("admin.shared.description") %></th>
<th scope="col" class="small-3"><%= t("admin.shared.actions") %></th>
</thead>
<tbody>
<% @proposals.each do |proposal| %>
<tr id="<%= dom_id(proposal) %>">
<td class="align-top">
<strong><%= proposal.title %></strong>
</td>
<td>
<div class="moderation-description">
<p><small><%= proposal.summary %></small></p>
<%= proposal.description %>
<% if proposal.external_url.present? %>
<p><%= text_with_links proposal.external_url %></p>
<% end %>
<% if proposal.video_url.present? %>
<p><%= text_with_links proposal.video_url %></p>
<% end %>
<p><%= proposal.question %></p>
</div>
</td>
<td class="align-top">
<%= link_to t("admin.actions.restore"),
restore_admin_proposal_path(proposal, request.query_parameters),
method: :put,
class: "button hollow warning on-hover-block" %>
<% end %>
</td>
</tr>
<% end %>
</table>
data: { confirm: t("admin.actions.confirm") },
class: "button hollow warning" %>
<% unless proposal.confirmed_hide? %>
<%= link_to t("admin.actions.confirm_hide"),
confirm_hide_admin_proposal_path(proposal, request.query_parameters),
method: :put,
class: "button" %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
<%= paginate @proposals %>
<%= paginate @proposals %>
<% else %>
<div class="callout primary margin">
<%= t("admin.proposals.index.no_hidden_proposals") %>
</div>
<% end %>

View File

@@ -1,39 +1,40 @@
<h2><%= t("admin.tags.index.add_tag") %></h2>
<%= form_for(@tag, url: admin_tags_path, as: :tag) do |f| %>
<div class="row">
<div class="small-12 medium-6 column">
<%= f.label :name, t("admin.tags.name.placeholder") %>
<%= f.text_field :name, placeholder: t("admin.tags.name.placeholder"), label: false %>
</div>
<div class="small-12 medium-6">
<%= f.label :name, t("admin.tags.name.placeholder") %>
<%= f.text_field :name, placeholder: t("admin.tags.name.placeholder"), label: false %>
</div>
<%= f.submit(t("admin.tags.create"), class: "button success") %>
<% end %>
<h3><%= t("admin.tags.index.title") %>: <%= page_entries_info @tags %></h3>
<hr>
<h3 class="margin"><%= t("admin.tags.index.title") %>: <%= page_entries_info @tags %></h3>
<table>
<thead>
<th scope="col" class="small-9"><%= t("admin.tags.index.topic") %></th>
<th scope="col"><%= t("admin.actions.actions") %></th>
</thead>
<tbody>
<% @tags.each do |tag| %>
<tr>
<td class="with-button">
<td>
<%= form_for(tag,
url: admin_tag_path(tag),
as: :tag,
html: { id: "edit_tag_#{tag.id}", class: "text-right"}) do |f| %>
html: { id: "edit_tag_#{tag.id}"}) do |f| %>
<span class="float-left text-left">
<strong><%= tag.name %></strong>
</span>
<%= link_to t("admin.tags.destroy"), admin_tag_path(tag), method: :delete, class: "button hollow alert on-hover" %>
<strong><%= tag.name %></strong>
<% end %>
</td>
<td id="tag_<%= tag.id %>">
<%= link_to t("admin.tags.destroy"), admin_tag_path(tag), method: :delete, class: "button hollow alert" %>
</td>
</tr>
<% end %>
</tbody>
</table>
<%= paginate @tags %>

View File

@@ -22,12 +22,12 @@
<%= render "recommended",
recommended_debates: @recommended_debates,
recommended_proposals: @recommended_proposals %>
<hr>
<% end %>
<% cache [locale_and_user_status, @featured_debates, @featured_proposals, 'featured'] do %>
<main>
<div class="small-12 column text-center <%= highlight_background %>">
<div class="small-12 column text-center">
<div class="row margin padding">
<div class="small-12 medium-3 column">
<h2><%= t("welcome.debates.title") %></h2>
@@ -47,6 +47,5 @@
</div>
</div>
</div>
</main>
<% end %>

View File

@@ -213,6 +213,7 @@ en:
hidden_debate: Hidden debate
hidden_proposal: Hidden proposal
title: Hidden comments
no_hidden_comments: There is no hidden comments.
dashboard:
index:
back: Go back to %{org}
@@ -226,6 +227,7 @@ en:
with_confirmed_hide: Confirmed
without_confirmed_hide: Pending
title: Hidden debates
no_hidden_debates: There is no hidden debates.
hidden_users:
index:
filter: Filter
@@ -234,6 +236,8 @@ en:
with_confirmed_hide: Confirmed
without_confirmed_hide: Pending
title: Hidden users
user: User
no_hidden_users: There is no hidden users.
show:
email: 'Email:'
hidden_at: 'Hidden at:'
@@ -715,6 +719,7 @@ en:
with_confirmed_hide: Confirmed
without_confirmed_hide: Pending
title: Hidden proposals
no_hidden_proposals: There is no hidden proposals.
settings:
flash:
updated: Value updated
@@ -757,6 +762,9 @@ en:
placeholder: Search user by name or email
search_results: "Search results"
no_search_results: "No results found."
actions: Actions
title: Title
description: Description
spending_proposals:
index:
geozone_filter_all: All zones
@@ -901,11 +909,12 @@ en:
total: Total
proposals_with_notifications: Proposals with notifications
tags:
create: Create Topic
destroy: Destroy Topic
create: Create topic
destroy: Destroy topic
index:
add_tag: Add a new proposal topic
title: Proposal topics
topic: Topic
name:
placeholder: Type the name of the topic
users:

View File

@@ -213,6 +213,7 @@ es:
hidden_debate: Debate oculto
hidden_proposal: Propuesta oculta
title: Comentarios ocultos
no_hidden_comments: No hay comentarios ocultos.
dashboard:
index:
back: Volver a %{org}
@@ -226,6 +227,7 @@ es:
with_confirmed_hide: Confirmados
without_confirmed_hide: Pendientes
title: Debates ocultos
no_hidden_debates: No hay debates ocultos.
hidden_users:
index:
filter: Filtro
@@ -234,6 +236,8 @@ es:
with_confirmed_hide: Confirmados
without_confirmed_hide: Pendientes
title: Usuarios bloqueados
user: Usuario
no_hidden_users: No hay uusarios bloqueados.
show:
email: 'Email:'
hidden_at: 'Bloqueado:'
@@ -717,6 +721,7 @@ es:
with_confirmed_hide: Confirmadas
without_confirmed_hide: Pendientes
title: Propuestas ocultas
no_hidden_proposals: No hay propuestas ocultas.
settings:
flash:
updated: Valor actualizado
@@ -759,6 +764,9 @@ es:
placeholder: Buscar usuario por nombre o email
search_results: "Resultados de la búsqueda"
no_search_results: "No se han encontrado resultados."
actions: Acciones
title: "Título"
description: "Descripción"
spending_proposals:
index:
geozone_filter_all: Todos los ámbitos de actuación
@@ -903,11 +911,12 @@ es:
total: Total
proposals_with_notifications: Propuestas con notificaciones
tags:
create: Crear Tema
destroy: Eliminar Tema
create: Crear tema
destroy: Eliminar tema
index:
add_tag: Añade un nuevo tema de propuesta
title: Temas de propuesta
topic: Tema
name:
placeholder: Escribe el nombre del tema
users:

View File

@@ -23,7 +23,7 @@ feature 'Admin tags' do
within("form.new_tag") do
fill_in "tag_name", with: 'important issues'
click_button 'Create Topic'
click_button 'Create topic'
end
visit admin_tags_path
@@ -39,8 +39,8 @@ feature 'Admin tags' do
expect(page).to have_content @tag1.name
expect(page).to have_content tag2.name
within("#edit_tag_#{tag2.id}") do
click_link 'Destroy Topic'
within("#tag_#{tag2.id}") do
click_link 'Destroy topic'
end
visit admin_tags_path
@@ -58,8 +58,8 @@ feature 'Admin tags' do
expect(page).to have_content @tag1.name
expect(page).to have_content tag2.name
within("#edit_tag_#{tag2.id}") do
click_link 'Destroy Topic'
within("#tag_#{tag2.id}") do
click_link 'Destroy topic'
end
visit admin_tags_path
@@ -81,7 +81,7 @@ feature 'Admin tags' do
within("form.new_tag") do
fill_in "tag_name", with: "wow_category"
click_button 'Create Topic'
click_button 'Create topic'
end
expect(ActsAsTaggableOn::Tag.category.where(name: "wow_category")).to exist