Use HTML beautifier to indent ERB files
We had inconsistent indentation in many places. Now we're fixing them and adding a linter to our CI so we don't accidentally introduce inconsistent indentations again.
This commit is contained in:
2
.github/workflows/linters.yml
vendored
2
.github/workflows/linters.yml
vendored
@@ -21,6 +21,8 @@ jobs:
|
||||
run: npx stylelint app/assets/stylesheets
|
||||
- name: Markdownlint
|
||||
run: bundle exec mdl *.md docs/
|
||||
- name: HTML Beautifier
|
||||
run: find app/ -name "*.html.erb" -exec bundle exec htmlbeautifier --lint-only --keep-blank-lines 1 {} +
|
||||
name: ${{ matrix.name }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
|
||||
1
Gemfile
1
Gemfile
@@ -95,6 +95,7 @@ group :development do
|
||||
gem "capistrano3-puma", "~> 5.2.0"
|
||||
gem "erb_lint", "~> 0.9.0", require: false
|
||||
gem "faraday-retry", "~> 2.2.1", require: false
|
||||
gem "htmlbeautifier", "~> 1.4.3", require: false
|
||||
gem "mdl", "~> 0.13.0", require: false
|
||||
gem "pronto", "~> 0.11.2", require: false
|
||||
gem "pronto-erb_lint", "~> 0.1.6", require: false
|
||||
|
||||
@@ -272,6 +272,7 @@ GEM
|
||||
hashery (2.1.2)
|
||||
hashie (5.0.0)
|
||||
highline (2.0.3)
|
||||
htmlbeautifier (1.4.3)
|
||||
htmlentities (4.3.4)
|
||||
httparty (0.22.0)
|
||||
csv
|
||||
@@ -755,6 +756,7 @@ DEPENDENCIES
|
||||
graphiql-rails (~> 1.8.0)
|
||||
graphql (~> 2.3.18)
|
||||
groupdate (~> 6.5.1)
|
||||
htmlbeautifier (~> 1.4.3)
|
||||
i18n-tasks (~> 0.9.37)
|
||||
image_processing (~> 1.13.0)
|
||||
invisible_captcha (~> 2.3.0)
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
|
||||
<div class="small-12 medium-3 column highlight padding">
|
||||
<strong><%= t("admin.poll_shifts.new.officer") %></strong>
|
||||
<br><%= officer.name %>
|
||||
<br>
|
||||
<%= officer.name %>
|
||||
<%= f.hidden_field :officer_id, value: officer.id %>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -17,28 +17,28 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% pages.each do |page| %>
|
||||
<tr id="<%= dom_id(page) %>">
|
||||
<td><%= page.title %></td>
|
||||
<td><%= page.slug %></td>
|
||||
<td><%= I18n.l page.created_at, format: :long %></td>
|
||||
<td><%= I18n.l page.updated_at, format: :long %></td>
|
||||
<td><%= t("admin.site_customization.pages.page.status_#{page.status}") %></td>
|
||||
<td>
|
||||
<%= render Admin::TableActionsComponent.new(page) do |actions| %>
|
||||
<%= actions.action(:cards,
|
||||
text: t("admin.site_customization.pages.page.see_cards"),
|
||||
path: admin_site_customization_page_widget_cards_path(page)) %>
|
||||
<% pages.each do |page| %>
|
||||
<tr id="<%= dom_id(page) %>">
|
||||
<td><%= page.title %></td>
|
||||
<td><%= page.slug %></td>
|
||||
<td><%= I18n.l page.created_at, format: :long %></td>
|
||||
<td><%= I18n.l page.updated_at, format: :long %></td>
|
||||
<td><%= t("admin.site_customization.pages.page.status_#{page.status}") %></td>
|
||||
<td>
|
||||
<%= render Admin::TableActionsComponent.new(page) do |actions| %>
|
||||
<%= actions.action(:cards,
|
||||
text: t("admin.site_customization.pages.page.see_cards"),
|
||||
path: admin_site_customization_page_widget_cards_path(page)) %>
|
||||
|
||||
<% if page.status == "published" %>
|
||||
<%= actions.action(:show,
|
||||
text: t("admin.site_customization.pages.index.see_page"),
|
||||
path: page.url) %>
|
||||
<% if page.status == "published" %>
|
||||
<%= actions.action(:show,
|
||||
text: t("admin.site_customization.pages.index.see_page"),
|
||||
path: page.url) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -30,7 +30,9 @@
|
||||
|
||||
<table class="investment-projects-summary">
|
||||
<thead>
|
||||
<tr><th colspan="2"><%= t("admin.stats.budget_balloting.votes_per_heading") %></th></tr>
|
||||
<tr>
|
||||
<th colspan="2"><%= t("admin.stats.budget_balloting.votes_per_heading") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@@ -49,7 +51,9 @@
|
||||
|
||||
<table class="investment-projects-summary user-count-by-heading">
|
||||
<thead>
|
||||
<tr><th colspan="2"><%= t("admin.stats.budget_balloting.participants_per_district") %></th></tr>
|
||||
<tr>
|
||||
<th colspan="2"><%= t("admin.stats.budget_balloting.participants_per_district") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<div class="small-12 medium-4 column">
|
||||
<%= tag.p(**options) do %>
|
||||
<%= text %> <br><span class="number"><%= amount %></span>
|
||||
<%= text %> <br>
|
||||
<span class="number"><%= amount %></span>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -24,7 +24,9 @@
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
<div class="progress-bar-placeholder"><div class="loading-bar"></div></div>
|
||||
<div class="progress-bar-placeholder">
|
||||
<div class="loading-bar"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
<h1>
|
||||
<%= link_to namespace_path do %>
|
||||
<%= setting["org_name"] %>
|
||||
<br><small><%= namespaced_header_title %></small>
|
||||
<br>
|
||||
<small><%= namespaced_header_title %></small>
|
||||
<% end %>
|
||||
</h1>
|
||||
|
||||
|
||||
@@ -47,9 +47,7 @@
|
||||
</p>
|
||||
|
||||
<% option.videos.each do |video| %>
|
||||
<%= link_to video.title,
|
||||
video.url,
|
||||
rel: "nofollow" %><br>
|
||||
<%= link_to video.title, video.url, rel: "nofollow" %><br>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -14,34 +14,34 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @admin_notifications.order(created_at: :desc).each do |admin_notification| %>
|
||||
<tr id="<%= dom_id(admin_notification) %>" class="admin_notification">
|
||||
<td>
|
||||
<%= admin_notification.title %>
|
||||
</td>
|
||||
<td>
|
||||
<%= segment_name(admin_notification.segment_recipient) %>
|
||||
</td>
|
||||
<td>
|
||||
<% if admin_notification.draft? %>
|
||||
<%= t("admin.admin_notifications.index.draft") %>
|
||||
<% else %>
|
||||
<%= l admin_notification.sent_at.to_date %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<% if admin_notification.draft? %>
|
||||
<%= render Admin::TableActionsComponent.new(admin_notification) do |actions| %>
|
||||
<%= actions.action(:preview, text: t("admin.admin_notifications.index.preview")) %>
|
||||
<% @admin_notifications.order(created_at: :desc).each do |admin_notification| %>
|
||||
<tr id="<%= dom_id(admin_notification) %>" class="admin_notification">
|
||||
<td>
|
||||
<%= admin_notification.title %>
|
||||
</td>
|
||||
<td>
|
||||
<%= segment_name(admin_notification.segment_recipient) %>
|
||||
</td>
|
||||
<td>
|
||||
<% if admin_notification.draft? %>
|
||||
<%= t("admin.admin_notifications.index.draft") %>
|
||||
<% else %>
|
||||
<%= l admin_notification.sent_at.to_date %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= render Admin::TableActionsComponent.new(admin_notification, actions: []) do |actions| %>
|
||||
<%= actions.action(:show, text: t("admin.admin_notifications.index.view")) %>
|
||||
</td>
|
||||
<td>
|
||||
<% if admin_notification.draft? %>
|
||||
<%= render Admin::TableActionsComponent.new(admin_notification) do |actions| %>
|
||||
<%= actions.action(:preview, text: t("admin.admin_notifications.index.preview")) %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= render Admin::TableActionsComponent.new(admin_notification, actions: []) do |actions| %>
|
||||
<%= actions.action(:show, text: t("admin.admin_notifications.index.view")) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% else %>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
<strong><%= t("admin.admin_notifications.show.segment_recipient") %></strong><br>
|
||||
<strong><%= t("admin.admin_notifications.show.segment_recipient") %></strong><br>
|
||||
<%= segment_name(@admin_notification.segment_recipient) %>
|
||||
<% if @admin_notification.draft? %>
|
||||
<%= t("admin.admin_notifications.show.will_get_notified",
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<%= render "shared/errors", resource: @investment %>
|
||||
|
||||
<% Budget::Investment.filter_params(params).to_h.each do |filter_name, filter_value| %>
|
||||
<%= hidden_field_tag filter_name, filter_value %>
|
||||
<%= hidden_field_tag filter_name, filter_value %>
|
||||
<% end %>
|
||||
|
||||
<div class="row expanded">
|
||||
@@ -74,9 +74,9 @@
|
||||
<div class="small-12 column margin-top">
|
||||
<%= f.label :valuator_ids %>
|
||||
<ul>
|
||||
<%= f.collection_check_boxes :valuator_group_ids, @valuator_groups, :id, :name do |group| %>
|
||||
<li><%= group.label(title: group.object.name) { group.check_box + truncate(group.object.name, length: 60) } %></li>
|
||||
<% end %>
|
||||
<%= f.collection_check_boxes :valuator_group_ids, @valuator_groups, :id, :name do |group| %>
|
||||
<li><%= group.label(title: group.object.name) { group.check_box + truncate(group.object.name, length: 60) } %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
<%= f.label :valuator_ids, t("admin.budget_investments.edit.assigned_valuators") %>
|
||||
<ul>
|
||||
<%= f.collection_check_boxes :valuator_ids, @valuators, :id, :email do |b| %>
|
||||
<li><%= b.label(title: valuator_label(b.object)) { b.check_box + truncate(b.object.description_or_email, length: 60) } %></li>
|
||||
<li><%= b.label(title: valuator_label(b.object)) { b.check_box + truncate(b.object.description_or_email, length: 60) } %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -93,11 +93,11 @@
|
||||
|
||||
<div class="row expanded margin-top">
|
||||
<% if @investment.incompatible? || @investment.winner? %>
|
||||
<div class="small-12 medium-3 column">
|
||||
<h2 id="incompatible"><%= t("admin.budget_investments.edit.compatibility") %></h2>
|
||||
<%= f.check_box :incompatible,
|
||||
title: t("admin.budget_investments.edit.compatibility") %>
|
||||
</div>
|
||||
<div class="small-12 medium-3 column">
|
||||
<h2 id="incompatible"><%= t("admin.budget_investments.edit.compatibility") %></h2>
|
||||
<%= f.check_box :incompatible,
|
||||
title: t("admin.budget_investments.edit.compatibility") %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="small-12 medium-3 column float-left">
|
||||
<h2 id="selected"><%= t("admin.budget_investments.edit.selection") %></h2>
|
||||
|
||||
@@ -39,17 +39,17 @@
|
||||
|
||||
<div class="in-favor inline-block">
|
||||
<span class="icon-like">
|
||||
<span class="show-for-sr"><%= t("votes.agree") %></span>
|
||||
</span>
|
||||
<span class="show-for-sr"><%= t("votes.agree") %></span>
|
||||
</span>
|
||||
<span class="percentage"><%= votes_percentage("likes", @debate) %></span>
|
||||
</div>
|
||||
|
||||
<span class="bullet"> • </span>
|
||||
|
||||
<div class="against inline-block">
|
||||
<span class="icon-unlike">
|
||||
<span class="show-for-sr"><%= t("votes.disagree") %></span>
|
||||
</span>
|
||||
<span class="icon-unlike">
|
||||
<span class="show-for-sr"><%= t("votes.disagree") %></span>
|
||||
</span>
|
||||
<span class="percentage"><%= votes_percentage("dislikes", @debate) %></span>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -14,21 +14,21 @@
|
||||
<th scope="col" class="small-4"><%= t("admin.shared.actions") %></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @investments.each do |investment| %>
|
||||
<tr id="<%= dom_id(investment) %>">
|
||||
<td class="align-top">
|
||||
<strong><%= investment.title %></strong>
|
||||
</td>
|
||||
<td>
|
||||
<div class="moderation-description">
|
||||
<%= wysiwyg(investment.description) %>
|
||||
</div>
|
||||
</td>
|
||||
<td class="align-top">
|
||||
<%= render Admin::HiddenTableActionsComponent.new(investment) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% @investments.each do |investment| %>
|
||||
<tr id="<%= dom_id(investment) %>">
|
||||
<td class="align-top">
|
||||
<strong><%= investment.title %></strong>
|
||||
</td>
|
||||
<td>
|
||||
<div class="moderation-description">
|
||||
<%= wysiwyg(investment.description) %>
|
||||
</div>
|
||||
</td>
|
||||
<td class="align-top">
|
||||
<%= render Admin::HiddenTableActionsComponent.new(investment) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -13,21 +13,21 @@
|
||||
<th scope="col"><%= t("admin.shared.actions") %></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @comments.each do |comment| %>
|
||||
<tr id="<%= dom_id(comment) %>">
|
||||
<td>
|
||||
<%= sanitize_and_auto_link comment.body %><br>
|
||||
<% if comment.commentable.hidden? %>
|
||||
(<%= t("admin.hidden_comments.index.hidden_#{comment.commentable_type.downcase}") %>: <%= comment.commentable.title %>)
|
||||
<% else %>
|
||||
<%= link_to comment.commentable.title, commentable_path(comment) %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<%= render Admin::HiddenTableActionsComponent.new(comment) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% @comments.each do |comment| %>
|
||||
<tr id="<%= dom_id(comment) %>">
|
||||
<td>
|
||||
<%= sanitize_and_auto_link comment.body %><br>
|
||||
<% if comment.commentable.hidden? %>
|
||||
(<%= t("admin.hidden_comments.index.hidden_#{comment.commentable_type.downcase}") %>: <%= comment.commentable.title %>)
|
||||
<% else %>
|
||||
<%= link_to comment.commentable.title, commentable_path(comment) %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<%= render Admin::HiddenTableActionsComponent.new(comment) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -14,21 +14,21 @@
|
||||
<th scope="col" class="small-4"><%= 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">
|
||||
<%= wysiwyg(debate.description) %>
|
||||
</div>
|
||||
</td>
|
||||
<td class="align-top">
|
||||
<%= render Admin::HiddenTableActionsComponent.new(debate) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% @debates.each do |debate| %>
|
||||
<tr id="<%= dom_id(debate) %>">
|
||||
<td class="align-top">
|
||||
<strong><%= debate.title %></strong>
|
||||
</td>
|
||||
<td>
|
||||
<div class="moderation-description">
|
||||
<%= wysiwyg(debate.description) %>
|
||||
</div>
|
||||
</td>
|
||||
<td class="align-top">
|
||||
<%= render Admin::HiddenTableActionsComponent.new(debate) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -14,21 +14,21 @@
|
||||
<th scope="col" class="small-4"><%= t("admin.shared.actions") %></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @proposal_notifications.each do |proposal_notification| %>
|
||||
<tr id="<%= dom_id(proposal_notification) %>">
|
||||
<td class="align-top">
|
||||
<strong><%= proposal_notification.title %></strong>
|
||||
</td>
|
||||
<td>
|
||||
<div class="moderation-description">
|
||||
<%= proposal_notification.body %>
|
||||
</div>
|
||||
</td>
|
||||
<td class="align-top">
|
||||
<%= render Admin::HiddenTableActionsComponent.new(proposal_notification) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% @proposal_notifications.each do |proposal_notification| %>
|
||||
<tr id="<%= dom_id(proposal_notification) %>">
|
||||
<td class="align-top">
|
||||
<strong><%= proposal_notification.title %></strong>
|
||||
</td>
|
||||
<td>
|
||||
<div class="moderation-description">
|
||||
<%= proposal_notification.body %>
|
||||
</div>
|
||||
</td>
|
||||
<td class="align-top">
|
||||
<%= render Admin::HiddenTableActionsComponent.new(proposal_notification) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -14,25 +14,25 @@
|
||||
<th scope="col" class="small-4"><%= 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>
|
||||
<%= wysiwyg(proposal.description) %>
|
||||
<% if proposal.video_url.present? %>
|
||||
<p><%= sanitize_and_auto_link proposal.video_url %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
</td>
|
||||
<td class="align-top">
|
||||
<%= render Admin::HiddenTableActionsComponent.new(proposal) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% @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>
|
||||
<%= wysiwyg(proposal.description) %>
|
||||
<% if proposal.video_url.present? %>
|
||||
<p><%= sanitize_and_auto_link proposal.video_url %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
</td>
|
||||
<td class="align-top">
|
||||
<%= render Admin::HiddenTableActionsComponent.new(proposal) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -13,23 +13,23 @@
|
||||
<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>
|
||||
<% @users.each do |user| %>
|
||||
<tr id="<%= dom_id(user) %>">
|
||||
<td>
|
||||
<p><%= link_to user.name, admin_hidden_user_path(user) %></p>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<%= render Admin::HiddenTableActionsComponent.new(user) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<td>
|
||||
<%= render Admin::HiddenTableActionsComponent.new(user) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<%= paginate @users %>
|
||||
<% else %>
|
||||
<div class="callout primary margin">
|
||||
<div class="callout primary margin">
|
||||
<%= t("admin.hidden_users.index.no_hidden_users") %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -29,31 +29,31 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @process.draft_versions.each do |draft_version| %>
|
||||
<tr id="<%= dom_id(draft_version) %>">
|
||||
<td>
|
||||
<%= link_to draft_version.title, edit_admin_legislation_process_draft_version_path(@process, draft_version) %>
|
||||
</td>
|
||||
<td><%= draft_version.created_at.to_date %></td>
|
||||
<td>
|
||||
<% if draft_version.status == "draft" %>
|
||||
<%= Legislation::DraftVersion.human_attribute_name(:status_draft) %>
|
||||
<%= link_to "(#{t("admin.legislation.draft_versions.index.preview")})",
|
||||
legislation_process_draft_version_path(@process, draft_version) %>
|
||||
<% else %>
|
||||
<%= Legislation::DraftVersion.human_attribute_name(:status_published) %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="text-center"><%= draft_version.total_comments %></td>
|
||||
<td class="text-center">
|
||||
<% if draft_version.final_version %>
|
||||
<span class="icon-check" title="<%= draft_version.final_version %>"></span>
|
||||
<% else %>
|
||||
<span class="icon-x delete" title="<%= draft_version.final_version %>"></span>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% @process.draft_versions.each do |draft_version| %>
|
||||
<tr id="<%= dom_id(draft_version) %>">
|
||||
<td>
|
||||
<%= link_to draft_version.title, edit_admin_legislation_process_draft_version_path(@process, draft_version) %>
|
||||
</td>
|
||||
<td><%= draft_version.created_at.to_date %></td>
|
||||
<td>
|
||||
<% if draft_version.status == "draft" %>
|
||||
<%= Legislation::DraftVersion.human_attribute_name(:status_draft) %>
|
||||
<%= link_to "(#{t("admin.legislation.draft_versions.index.preview")})",
|
||||
legislation_process_draft_version_path(@process, draft_version) %>
|
||||
<% else %>
|
||||
<%= Legislation::DraftVersion.human_attribute_name(:status_published) %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="text-center"><%= draft_version.total_comments %></td>
|
||||
<td class="text-center">
|
||||
<% if draft_version.final_version %>
|
||||
<span class="icon-check" title="<%= draft_version.final_version %>"></span>
|
||||
<% else %>
|
||||
<span class="icon-x delete" title="<%= draft_version.final_version %>"></span>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% end %>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
<% if @process.questions.any? %>
|
||||
<table class="stack">
|
||||
<thead>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t("admin.legislation.questions.table.title") %></th>
|
||||
<th><%= t("admin.legislation.questions.table.question_options") %></th>
|
||||
@@ -27,22 +27,22 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @process.questions.each do |question| %>
|
||||
<tr id="<%= dom_id(question) %>">
|
||||
<td>
|
||||
<%= link_to question.title, edit_admin_legislation_process_question_path(@process, question) %>
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<% question.question_options.each do |question_option| %>
|
||||
<li><%= "#{question_option.value} (#{question_option.answers_count})" %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</td>
|
||||
<td class="text-center"><%= question.answers_count %></td>
|
||||
<td class="text-center"><%= link_to question.comments.count, legislation_process_question_path(@process, question, anchor: "comments") %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% @process.questions.each do |question| %>
|
||||
<tr id="<%= dom_id(question) %>">
|
||||
<td>
|
||||
<%= link_to question.title, edit_admin_legislation_process_question_path(@process, question) %>
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<% question.question_options.each do |question_option| %>
|
||||
<li><%= "#{question_option.value} (#{question_option.answers_count})" %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</td>
|
||||
<td class="text-center"><%= question.answers_count %></td>
|
||||
<td class="text-center"><%= link_to question.comments.count, legislation_process_question_path(@process, question, anchor: "comments") %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% end %>
|
||||
|
||||
@@ -13,15 +13,15 @@
|
||||
<th scope="col"><%= t("admin.shared.actions") %></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @users.each do |user| %>
|
||||
<tr>
|
||||
<td><%= user.name %></td>
|
||||
<td><%= user.email %></td>
|
||||
<td>
|
||||
<%= render Admin::Roles::TableActionsComponent.new(user.manager || user.build_manager) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% @users.each do |user| %>
|
||||
<tr>
|
||||
<td><%= user.name %></td>
|
||||
<td><%= user.email %></td>
|
||||
<td>
|
||||
<%= render Admin::Roles::TableActionsComponent.new(user.manager || user.build_manager) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% else %>
|
||||
|
||||
@@ -13,15 +13,15 @@
|
||||
<th scope="col"><%= t("admin.shared.actions") %></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @users.each do |user| %>
|
||||
<tr>
|
||||
<td><%= user.name %></td>
|
||||
<td><%= user.email %></td>
|
||||
<td>
|
||||
<%= render Admin::Roles::TableActionsComponent.new(user.moderator || user.build_moderator) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% @users.each do |user| %>
|
||||
<tr>
|
||||
<td><%= user.name %></td>
|
||||
<td><%= user.email %></td>
|
||||
<td>
|
||||
<%= render Admin::Roles::TableActionsComponent.new(user.moderator || user.build_moderator) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% else %>
|
||||
|
||||
@@ -14,28 +14,28 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @newsletters.order(created_at: :desc).each do |newsletter| %>
|
||||
<tr id="<%= dom_id(newsletter) %>" class="newsletter">
|
||||
<td>
|
||||
<%= newsletter.subject %>
|
||||
</td>
|
||||
<td>
|
||||
<%= segment_name(newsletter.segment_recipient) %>
|
||||
</td>
|
||||
<td>
|
||||
<% if newsletter.draft? %>
|
||||
<%= t("admin.newsletters.index.draft") %>
|
||||
<% else %>
|
||||
<%= l newsletter.sent_at.to_date %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<%= render Admin::TableActionsComponent.new(newsletter) do |actions| %>
|
||||
<%= actions.action :preview, text: t("admin.newsletters.index.preview") %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% @newsletters.order(created_at: :desc).each do |newsletter| %>
|
||||
<tr id="<%= dom_id(newsletter) %>" class="newsletter">
|
||||
<td>
|
||||
<%= newsletter.subject %>
|
||||
</td>
|
||||
<td>
|
||||
<%= segment_name(newsletter.segment_recipient) %>
|
||||
</td>
|
||||
<td>
|
||||
<% if newsletter.draft? %>
|
||||
<%= t("admin.newsletters.index.draft") %>
|
||||
<% else %>
|
||||
<%= l newsletter.sent_at.to_date %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<%= render Admin::TableActionsComponent.new(newsletter) do |actions| %>
|
||||
<%= actions.action :preview, text: t("admin.newsletters.index.preview") %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% else %>
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<th scope="col"><%= t("admin.officials.index.name") %></th>
|
||||
<th scope="col"><%= t("admin.officials.index.official_position") %></th>
|
||||
<th scope="col"><%= t("admin.officials.index.official_level") %></th>
|
||||
<th scope="col" class="small-3"><%= t("admin.shared.actions") %></th>
|
||||
<th scope="col"><%= t("admin.officials.index.name") %></th>
|
||||
<th scope="col"><%= t("admin.officials.index.official_position") %></th>
|
||||
<th scope="col"><%= t("admin.officials.index.official_level") %></th>
|
||||
<th scope="col" class="small-3"><%= t("admin.shared.actions") %></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @users.each do |user| %>
|
||||
|
||||
@@ -21,30 +21,30 @@
|
||||
<th scpope="col" class="small-3"><%= t("admin.shared.actions") %></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @organizations.each do |organization| %>
|
||||
<% hidden += 1 and next if organization.user.nil? %>
|
||||
<tr id="<%= dom_id(organization) %>">
|
||||
<td><%= organization.name %></td>
|
||||
<td><%= organization.email %></td>
|
||||
<td><%= organization.phone_number %></td>
|
||||
<td><%= organization.responsible_name %></td>
|
||||
<td>
|
||||
<% if organization.verified? %>
|
||||
<span class="icon-check"></span>
|
||||
<%= t("admin.organizations.index.verified") %>
|
||||
<% elsif organization.rejected? %>
|
||||
<span class="icon-x rejected"></span>
|
||||
<%= t("admin.organizations.index.rejected") %>
|
||||
<% else %>
|
||||
<span class="icon-eye"></span>
|
||||
<%= t("admin.organizations.index.pending") %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<%= render Admin::Organizations::TableActionsComponent.new(organization) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% @organizations.each do |organization| %>
|
||||
<% hidden += 1 and next if organization.user.nil? %>
|
||||
<tr id="<%= dom_id(organization) %>">
|
||||
<td><%= organization.name %></td>
|
||||
<td><%= organization.email %></td>
|
||||
<td><%= organization.phone_number %></td>
|
||||
<td><%= organization.responsible_name %></td>
|
||||
<td>
|
||||
<% if organization.verified? %>
|
||||
<span class="icon-check"></span>
|
||||
<%= t("admin.organizations.index.verified") %>
|
||||
<% elsif organization.rejected? %>
|
||||
<span class="icon-x rejected"></span>
|
||||
<%= t("admin.organizations.index.rejected") %>
|
||||
<% else %>
|
||||
<span class="icon-eye"></span>
|
||||
<%= t("admin.organizations.index.pending") %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<%= render Admin::Organizations::TableActionsComponent.new(organization) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -16,29 +16,29 @@
|
||||
<th scpope="col" class="small-3"><%= t("admin.shared.actions") %></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @organizations.each do |organization| %>
|
||||
<tr>
|
||||
<td><%= organization.name %></td>
|
||||
<td><%= organization.email %></td>
|
||||
<td><%= organization.phone_number %></td>
|
||||
<td><%= organization.responsible_name %></td>
|
||||
<td>
|
||||
<% if organization.verified? %>
|
||||
<span class="icon-check"></span>
|
||||
<%= t("admin.organizations.index.verified") %>
|
||||
<% elsif organization.rejected? %>
|
||||
<span class="icon-x"></span>
|
||||
<%= t("admin.organizations.index.rejected") %>
|
||||
<% else %>
|
||||
<span class="icon-eye"></span>
|
||||
<%= t("admin.organizations.index.pending") %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<%= render Admin::Organizations::TableActionsComponent.new(organization) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% @organizations.each do |organization| %>
|
||||
<tr>
|
||||
<td><%= organization.name %></td>
|
||||
<td><%= organization.email %></td>
|
||||
<td><%= organization.phone_number %></td>
|
||||
<td><%= organization.responsible_name %></td>
|
||||
<td>
|
||||
<% if organization.verified? %>
|
||||
<span class="icon-check"></span>
|
||||
<%= t("admin.organizations.index.verified") %>
|
||||
<% elsif organization.rejected? %>
|
||||
<span class="icon-x"></span>
|
||||
<%= t("admin.organizations.index.rejected") %>
|
||||
<% else %>
|
||||
<span class="icon-eye"></span>
|
||||
<%= t("admin.organizations.index.pending") %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<%= render Admin::Organizations::TableActionsComponent.new(organization) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @booths.each do |booth| %>
|
||||
<tr>
|
||||
<td>
|
||||
<%= booth.name %>
|
||||
</td>
|
||||
<td>
|
||||
<%= booth.location %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<%= booth.name %>
|
||||
</td>
|
||||
<td>
|
||||
<%= booth.location %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
<th class="small-3"><%= t("admin.actions.actions") %></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @booths.each do |booth| %>
|
||||
<tr id="<%= dom_id(booth) %>" class="booth">
|
||||
<%= render "booth_assignment", booth: booth, booth_assignment: booth.assignment_on_poll(@poll) %>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% @booths.each do |booth| %>
|
||||
<tr id="<%= dom_id(booth) %>" class="booth">
|
||||
<%= render "booth_assignment", booth: booth, booth_assignment: booth.assignment_on_poll(@poll) %>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
<th><%= t("admin.actions.actions") %></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @booths.each do |booth| %>
|
||||
<%= render "booth", booth: booth %>
|
||||
<% end %>
|
||||
<% @booths.each do |booth| %>
|
||||
<%= render "booth", booth: booth %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -16,16 +16,16 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @officers.each do |user| %>
|
||||
<tr>
|
||||
<td>
|
||||
<strong>
|
||||
<%= link_to user.name, by_officer_admin_poll_officer_assignments_path(@poll, officer_id: user.id) %>
|
||||
</strong>
|
||||
</td>
|
||||
<td>
|
||||
<%= user.email %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<strong>
|
||||
<%= link_to user.name, by_officer_admin_poll_officer_assignments_path(@poll, officer_id: user.id) %>
|
||||
</strong>
|
||||
</td>
|
||||
<td>
|
||||
<%= user.email %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<div class="inline-block margin-left">
|
||||
<strong><%= t("admin.polls.index.geozone_restricted") %></strong>
|
||||
<br>
|
||||
<%= @poll.geozones.pluck(:name).to_sentence %>
|
||||
</div>
|
||||
<%= @poll.geozones.pluck(:name).to_sentence %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -15,22 +15,22 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @officers.each do |user| %>
|
||||
<tr>
|
||||
<td>
|
||||
<%= user.name %>
|
||||
</td>
|
||||
<td>
|
||||
<%= user.email %>
|
||||
</td>
|
||||
<td>
|
||||
<%= render Admin::TableActionsComponent.new(
|
||||
<tr>
|
||||
<td>
|
||||
<%= user.name %>
|
||||
</td>
|
||||
<td>
|
||||
<%= user.email %>
|
||||
</td>
|
||||
<td>
|
||||
<%= render Admin::TableActionsComponent.new(
|
||||
user,
|
||||
actions: [:edit],
|
||||
edit_text: t("admin.poll_shifts.new.edit_shifts"),
|
||||
edit_path: new_admin_booth_shift_path(officer_id: user.poll_officer.id)
|
||||
) %>
|
||||
</td>
|
||||
</tr>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -32,28 +32,28 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @content_blocks.each do |content_block| %>
|
||||
<tr id="<%= dom_id(content_block) %>">
|
||||
<td><%= "#{content_block.name} (#{content_block.locale})" %></td>
|
||||
<td><%= raw content_block.body %></td>
|
||||
<td>
|
||||
<%= render Admin::TableActionsComponent.new(content_block) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% @headings_content_blocks.each do |content_block| %>
|
||||
<tr id="<%= dom_id(content_block) %>">
|
||||
<td><%= "#{content_block.name} (#{content_block.locale})" %></td>
|
||||
<td><%= raw content_block.body %></td>
|
||||
<td>
|
||||
<%= render Admin::TableActionsComponent.new(
|
||||
<% @content_blocks.each do |content_block| %>
|
||||
<tr id="<%= dom_id(content_block) %>">
|
||||
<td><%= "#{content_block.name} (#{content_block.locale})" %></td>
|
||||
<td><%= raw content_block.body %></td>
|
||||
<td>
|
||||
<%= render Admin::TableActionsComponent.new(content_block) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% @headings_content_blocks.each do |content_block| %>
|
||||
<tr id="<%= dom_id(content_block) %>">
|
||||
<td><%= "#{content_block.name} (#{content_block.locale})" %></td>
|
||||
<td><%= raw content_block.body %></td>
|
||||
<td>
|
||||
<%= render Admin::TableActionsComponent.new(
|
||||
content_block,
|
||||
edit_path: admin_site_customization_edit_heading_content_block_path(content_block),
|
||||
destroy_path: admin_site_customization_delete_heading_content_block_path(content_block)
|
||||
) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% else %>
|
||||
|
||||
@@ -56,7 +56,9 @@
|
||||
<div class="small-12 medium-3 column">
|
||||
<p class="featured">
|
||||
<%= t "admin.stats.show.summary.proposal_votes" %> <br>
|
||||
<span class="number"><%= number_with_delimiter(@proposal_votes) %> <br></span>
|
||||
<span class="number">
|
||||
<%= number_with_delimiter(@proposal_votes) %> <br>
|
||||
</span>
|
||||
</p>
|
||||
<p>
|
||||
<%= t "admin.stats.show.summary.debate_votes" %> <br>
|
||||
|
||||
@@ -9,41 +9,41 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @system_emails.each do |system_email_title, system_email_actions| %>
|
||||
<tr id="<%= system_email_title %>" class="system_email">
|
||||
<td>
|
||||
<%= t("admin.system_emails.#{system_email_title}.title") %>
|
||||
</td>
|
||||
<td>
|
||||
<%= t("admin.system_emails.#{system_email_title}.description") %>
|
||||
</td>
|
||||
<td>
|
||||
<%= render Admin::TableActionsComponent.new(system_email_title, actions: []) do |actions| %>
|
||||
<% if system_email_actions.include?("view") %>
|
||||
<%= actions.action(:show,
|
||||
text: t("admin.shared.view"),
|
||||
path: admin_system_email_view_path(system_email_title)) %>
|
||||
<% end %>
|
||||
<% @system_emails.each do |system_email_title, system_email_actions| %>
|
||||
<tr id="<%= system_email_title %>" class="system_email">
|
||||
<td>
|
||||
<%= t("admin.system_emails.#{system_email_title}.title") %>
|
||||
</td>
|
||||
<td>
|
||||
<%= t("admin.system_emails.#{system_email_title}.description") %>
|
||||
</td>
|
||||
<td>
|
||||
<%= render Admin::TableActionsComponent.new(system_email_title, actions: []) do |actions| %>
|
||||
<% if system_email_actions.include?("view") %>
|
||||
<%= actions.action(:show,
|
||||
text: t("admin.shared.view"),
|
||||
path: admin_system_email_view_path(system_email_title)) %>
|
||||
<% end %>
|
||||
|
||||
<% if system_email_actions.include?("preview_pending") %>
|
||||
<%= actions.action(:preview_pending,
|
||||
text: t("admin.system_emails.preview_pending.action"),
|
||||
path: admin_system_email_preview_pending_path(system_email_title)) %>
|
||||
<%= actions.action(:send_pending,
|
||||
text: t("admin.system_emails.preview_pending.send_pending"),
|
||||
path: admin_system_email_send_pending_path(system_email_title),
|
||||
method: :put) %>
|
||||
<% end %>
|
||||
<% if system_email_actions.include?("preview_pending") %>
|
||||
<%= actions.action(:preview_pending,
|
||||
text: t("admin.system_emails.preview_pending.action"),
|
||||
path: admin_system_email_preview_pending_path(system_email_title)) %>
|
||||
<%= actions.action(:send_pending,
|
||||
text: t("admin.system_emails.preview_pending.send_pending"),
|
||||
path: admin_system_email_send_pending_path(system_email_title),
|
||||
method: :put) %>
|
||||
<% end %>
|
||||
|
||||
<% if system_email_actions.include?("edit_info") %>
|
||||
<p class="help-text">
|
||||
<%= t("admin.system_emails.edit_info") %><br>
|
||||
<code><%= "app/views/mailer/#{system_email_title}.html.erb" %></code>
|
||||
</p>
|
||||
<% if system_email_actions.include?("edit_info") %>
|
||||
<p class="help-text">
|
||||
<%= t("admin.system_emails.edit_info") %><br>
|
||||
<code><%= "app/views/mailer/#{system_email_title}.html.erb" %></code>
|
||||
</p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -18,22 +18,22 @@
|
||||
<th scope="col"><%= t("admin.actions.actions") %></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @tags.each do |tag| %>
|
||||
<tr>
|
||||
<td>
|
||||
<%= form_for(tag,
|
||||
url: admin_tag_path(tag),
|
||||
as: :tag,
|
||||
html: { id: "edit_tag_#{tag.id}" }) do |f| %>
|
||||
<% @tags.each do |tag| %>
|
||||
<tr>
|
||||
<td>
|
||||
<%= form_for(tag,
|
||||
url: admin_tag_path(tag),
|
||||
as: :tag,
|
||||
html: { id: "edit_tag_#{tag.id}" }) do |f| %>
|
||||
|
||||
<strong><%= tag.name %></strong>
|
||||
<% end %>
|
||||
</td>
|
||||
<td id="tag_<%= tag.id %>">
|
||||
<%= render Admin::TableActionsComponent.new(tag, actions: [:destroy]) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<strong><%= tag.name %></strong>
|
||||
<% end %>
|
||||
</td>
|
||||
<td id="tag_<%= tag.id %>">
|
||||
<%= render Admin::TableActionsComponent.new(tag, actions: [:destroy]) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<% provide :title, t("budgets.executions.page_title", budget: @budget.name) %>
|
||||
<% content_for :meta_description do %><%= @budget.description_for_phase("finished") %><% end %>
|
||||
<% provide :social_media_meta_tags do %>
|
||||
<%= render "shared/social_media_meta_tags",
|
||||
social_url: budget_executions_url(@budget),
|
||||
social_title: @budget.name,
|
||||
social_description: @budget.description_for_phase("finished") %>
|
||||
<%= render "shared/social_media_meta_tags",
|
||||
social_url: budget_executions_url(@budget),
|
||||
social_title: @budget.name,
|
||||
social_description: @budget.description_for_phase("finished") %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :canonical do %>
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
edit_budget_investment_path(investment.budget, investment),
|
||||
method: :get, class: "button hollow expanded" %>
|
||||
<% else %>
|
||||
<%= link_to image_path(investment.image),
|
||||
method: :delete,
|
||||
class: "button hollow alert expanded" do %>
|
||||
<span class="icon-image"></span>
|
||||
<%= t("images.remove_image") %>
|
||||
<% end %>
|
||||
<%= link_to image_path(investment.image),
|
||||
method: :delete,
|
||||
class: "button hollow alert expanded" do %>
|
||||
<span class="icon-image"></span>
|
||||
<%= t("images.remove_image") %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<% provide :social_media_meta_tags do %>
|
||||
<%= render "shared/social_media_meta_tags",
|
||||
social_url: budget_investments_path(investment),
|
||||
social_title: investment.title,
|
||||
social_description: investment.description,
|
||||
twitter_image_url: (investment.image.present? ? polymorphic_path(investment.image.variant(:thumb)) : nil),
|
||||
og_image_url: (investment.image.present? ? polymorphic_path(investment.image.variant(:thumb)) : nil) %>
|
||||
<%= render "shared/social_media_meta_tags",
|
||||
social_url: budget_investments_path(investment),
|
||||
social_title: investment.title,
|
||||
social_description: investment.description,
|
||||
twitter_image_url: (investment.image.present? ? polymorphic_path(investment.image.variant(:thumb)) : nil),
|
||||
og_image_url: (investment.image.present? ? polymorphic_path(investment.image.variant(:thumb)) : nil) %>
|
||||
<% end %>
|
||||
|
||||
<section class="budget-investment-show" id="<%= dom_id(investment) %>">
|
||||
@@ -120,6 +120,6 @@
|
||||
|
||||
<%= render "communities/access_button", community: investment.community %>
|
||||
|
||||
</aside>
|
||||
</aside>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -30,40 +30,40 @@
|
||||
<tbody>
|
||||
<% amount_available = heading_price %>
|
||||
<% investments.each do |investment| %>
|
||||
<tr id="<%= dom_id(investment) %>"
|
||||
class="budget-investments <%= investment.winner? ? "success" : "js-discarded" %>"
|
||||
style="<%= investment.winner? ? "" : "display: none" %>">
|
||||
<td>
|
||||
<% if investment.winner? %>
|
||||
<span class="icon-check">
|
||||
<span class="show-for-sr">
|
||||
<%= t("budgets.results.accepted") %>
|
||||
</span>
|
||||
<tr id="<%= dom_id(investment) %>"
|
||||
class="budget-investments <%= investment.winner? ? "success" : "js-discarded" %>"
|
||||
style="<%= investment.winner? ? "" : "display: none" %>">
|
||||
<td>
|
||||
<% if investment.winner? %>
|
||||
<span class="icon-check">
|
||||
<span class="show-for-sr">
|
||||
<%= t("budgets.results.accepted") %>
|
||||
</span>
|
||||
<% else %>
|
||||
<span class="icon-x delete">
|
||||
<span class="show-for-sr">
|
||||
<%= t("budgets.results.discarded") %>
|
||||
</span>
|
||||
</span>
|
||||
<% else %>
|
||||
<span class="icon-x delete">
|
||||
<span class="show-for-sr">
|
||||
<%= t("budgets.results.discarded") %>
|
||||
</span>
|
||||
<% end %>
|
||||
<%= link_to investment.title, budget_investment_path(@budget, investment) %>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<%= investment.ballot_lines_count %>
|
||||
</td>
|
||||
<% if @budget.show_money? %>
|
||||
<td class="text-center">
|
||||
<%= @budget.formatted_amount(investment.price) %>
|
||||
</td>
|
||||
<% if results_type == :compatible %>
|
||||
<td class="small text-right"
|
||||
title="<%= @budget.formatted_amount(amount_available) %> - <%= @budget.formatted_amount(investment.price) %>">
|
||||
<%= @budget.formatted_amount(amount_available - investment.price) %>
|
||||
<% amount_available -= investment.price if investment.winner? %>
|
||||
</td>
|
||||
<% end %>
|
||||
</span>
|
||||
<% end %>
|
||||
<%= link_to investment.title, budget_investment_path(@budget, investment) %>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<%= investment.ballot_lines_count %>
|
||||
</td>
|
||||
<% if @budget.show_money? %>
|
||||
<td class="text-center">
|
||||
<%= @budget.formatted_amount(investment.price) %>
|
||||
</td>
|
||||
<% if results_type == :compatible %>
|
||||
<td class="small text-right"
|
||||
title="<%= @budget.formatted_amount(amount_available) %> - <%= @budget.formatted_amount(investment.price) %>">
|
||||
<%= @budget.formatted_amount(amount_available - investment.price) %>
|
||||
<% amount_available -= investment.price if investment.winner? %>
|
||||
</td>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<% provide :title, t("budgets.results.page_title", budget: @budget.name) %>
|
||||
<% content_for :meta_description do %><%= @budget.description_for_phase("finished") %><% end %>
|
||||
<% provide :social_media_meta_tags do %>
|
||||
<%= render "shared/social_media_meta_tags",
|
||||
social_url: budget_results_url(@budget),
|
||||
social_title: @budget.name,
|
||||
social_description: @budget.description_for_phase("finished") %>
|
||||
<%= render "shared/social_media_meta_tags",
|
||||
social_url: budget_results_url(@budget),
|
||||
social_title: @budget.name,
|
||||
social_description: @budget.description_for_phase("finished") %>
|
||||
<% end %>
|
||||
<% content_for :canonical do %>
|
||||
<%= render "shared/canonical", href: budget_results_url(@budget) %>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<% provide :title, t("stats.budgets.page_title", budget: @budget.name) %>
|
||||
<% provide :social_media_meta_tags do %>
|
||||
<%= render "shared/social_media_meta_tags",
|
||||
social_url: budget_stats_url(@budget),
|
||||
social_title: @budget.name,
|
||||
social_description: @budget.description_for_phase("finished") %>
|
||||
<%= render "shared/social_media_meta_tags",
|
||||
social_url: budget_stats_url(@budget),
|
||||
social_title: @budget.name,
|
||||
social_description: @budget.description_for_phase("finished") %>
|
||||
<% end %>
|
||||
|
||||
<div class="participation-stats budgets-stats">
|
||||
@@ -40,10 +40,10 @@
|
||||
</p>
|
||||
<% end %>
|
||||
<p class="help-text">
|
||||
<%= t("stats.budgets.participatory_disclaimer") %>
|
||||
<%= t("stats.budgets.participatory_disclaimer") %>
|
||||
</p>
|
||||
<p class="help-text">
|
||||
<%= t("stats.budgets.heading_disclaimer") %>
|
||||
<%= t("stats.budgets.heading_disclaimer") %>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<% if author?(@community, participant) %>
|
||||
•
|
||||
<span class="label round is-author">
|
||||
<%= t("comments.comment.author") %>
|
||||
<%= t("comments.comment.author") %>
|
||||
</span>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
</div>
|
||||
<div class="poster-content">
|
||||
<h2><%= t("dashboard.poster.index.support") %></h2>
|
||||
<%= image_tag "quote_before_blue.png", alt: "" %>
|
||||
<h3><%= proposal.title %></h3>
|
||||
<%= image_tag "quote_after_blue.png", alt: "" %>
|
||||
<%= image_tag "quote_before_blue.png", alt: "" %>
|
||||
<h3><%= proposal.title %></h3>
|
||||
<%= image_tag "quote_after_blue.png", alt: "" %>
|
||||
<p class="poster-footer">
|
||||
<%= sanitize(t("dashboard.poster.index.footer", link: proposal_url(proposal))) %>
|
||||
</p>
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
<%= f.email_field :email, autofocus: true, value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
|
||||
|
||||
<% if @requires_password %>
|
||||
<p><%= f.password_field :password %></p>
|
||||
<p><%= f.password_field :password_confirmation %></p>
|
||||
<p><%= f.password_field :password %></p>
|
||||
<p><%= f.password_field :password_confirmation %></p>
|
||||
<% end %>
|
||||
|
||||
<%= hidden_field_tag :confirmation_token, @confirmation_token %>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
</div>
|
||||
<div class="progress" role="progressbar" tabindex="0" aria-valuenow="0" aria-valuemin="0"
|
||||
aria-valuetext="<%= "#{next_goal_progress}%" %>" aria-valuemax="100">
|
||||
<div class="progress-meter" style="width: <%= next_goal_progress %>%"></div>
|
||||
<div class="progress-meter" style="width: <%= next_goal_progress %>%"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html <%= common_html_attributes %>>
|
||||
<head>
|
||||
<title><%= t("mailers.title") %></title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<meta name="viewport" id="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0,maximum-scale=10.0" />
|
||||
</head>
|
||||
<body style="background: #fff; font-family:font-family: 'Open Sans','Helvetica Neue',arial,sans-serif !important; margin: 0 10px; padding: 0; text-align: left;">
|
||||
<head>
|
||||
<title><%= t("mailers.title") %></title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<meta name="viewport" id="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0,maximum-scale=10.0" />
|
||||
</head>
|
||||
<body style="background: #fff; font-family:font-family: 'Open Sans','Helvetica Neue',arial,sans-serif !important; margin: 0 10px; padding: 0; text-align: left;">
|
||||
|
||||
<%= render "layouts/mailer_header" %>
|
||||
<%= render "layouts/mailer_header" %>
|
||||
|
||||
<table cellpadding="0" cellspacing="0" border="0" style="background: #fff; margin: 0 auto; max-width: 700px; width:100%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<%= yield %>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table cellpadding="0" cellspacing="0" border="0" style="background: #fff; margin: 0 auto; max-width: 700px; width:100%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<%= yield %>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<%= render "layouts/mailer_footer" %>
|
||||
</body>
|
||||
<%= render "layouts/mailer_footer" %>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<div class="comment-footer">
|
||||
<% if annotation.comments.roots.count > Legislation::Annotation::COMMENTS_PAGE_SIZE %>
|
||||
<%= link_to legislation_process_draft_version_annotation_path(annotation.draft_version.process, annotation.draft_version, annotation), class: "button" do %>
|
||||
<strong><%= t("legislation.annotations.comments.see_all") %></strong>
|
||||
<strong><%= t("legislation.annotations.comments.see_all") %></strong>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
<aside class="small-12 medium-3 column">
|
||||
<div class="sidebar-divider"></div>
|
||||
<h2><%= t("legislation.shared.share") %></h2>
|
||||
<%= render "/shared/social_share",
|
||||
title: t("legislation.shared.share_comment", version_name: @draft_version.title.downcase, process_name: @process.title),
|
||||
url: legislation_process_draft_version_path(process, draft_version) %>
|
||||
<%= render "/shared/social_share",
|
||||
title: t("legislation.shared.share_comment", version_name: @draft_version.title.downcase, process_name: @process.title),
|
||||
url: legislation_process_draft_version_path(process, draft_version) %>
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<% provide :title, @proposal.title %>
|
||||
<% content_for :meta_description do %><%= @proposal.summary %><% end %>
|
||||
<% provide :social_media_meta_tags do %>
|
||||
<%= render "shared/social_media_meta_tags",
|
||||
social_url: legislation_process_proposal_url(process_id: @process),
|
||||
social_title: @proposal.title,
|
||||
social_description: @proposal.summary %>
|
||||
<%= render "shared/social_media_meta_tags",
|
||||
social_url: legislation_process_proposal_url(process_id: @process),
|
||||
social_title: @proposal.title,
|
||||
social_description: @proposal.summary %>
|
||||
<% end %>
|
||||
<% content_for :canonical do %>
|
||||
<%= render "shared/canonical", href: legislation_process_proposal_url(process_id: @process) %>
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
officing_poll_ballot_sheets_path(poll),
|
||||
class: "button" %>
|
||||
|
||||
<%= link_to t("officing.polls.final.add_results"),
|
||||
new_officing_poll_ballot_sheet_path(poll),
|
||||
class: "button hollow" %>
|
||||
<%= link_to t("officing.polls.final.add_results"),
|
||||
new_officing_poll_ballot_sheet_path(poll),
|
||||
class: "button hollow" %>
|
||||
<% else %>
|
||||
<%= link_to t("officing.polls.final.add_results"),
|
||||
new_officing_poll_result_path(poll),
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
<%= results_by_booth[booth_assignment].first.booth_assignment.booth.name %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to t("officing.results.new.see_results"), officing_poll_results_path(@poll, date: l(date), booth_assignment_id: booth_assignment) %>
|
||||
<%= link_to t("officing.results.new.see_results"), officing_poll_results_path(@poll, date: l(date), booth_assignment_id: booth_assignment) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
method: :post,
|
||||
remote: true,
|
||||
html: { id: "new_officing_voter" } do |f| %>
|
||||
<%= f.hidden_field :poll_id, value: poll.id %>
|
||||
<%= f.hidden_field :user_id, value: @user.id %>
|
||||
<%= f.submit t("officing.voters.show.submit"),
|
||||
class: "button success",
|
||||
data: { disable_with: t("officing.voters.can_vote.submit_disable_with") } %>
|
||||
<%= f.hidden_field :poll_id, value: poll.id %>
|
||||
<%= f.hidden_field :user_id, value: @user.id %>
|
||||
<%= f.submit t("officing.voters.show.submit"),
|
||||
class: "button success",
|
||||
data: { disable_with: t("officing.voters.can_vote.submit_disable_with") } %>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
@@ -13,18 +13,18 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @polls.each do |poll| %>
|
||||
<tr id="<%= dom_id(poll) %>">
|
||||
<td>
|
||||
<%= poll.name %>
|
||||
</td>
|
||||
<% if poll.votable_by?(@user) %>
|
||||
<%= render "can_vote", poll: poll %>
|
||||
<% elsif poll.voted_by?(@user) || poll.user_has_an_online_ballot?(@user) %>
|
||||
<%= render "already_voted" %>
|
||||
<% else %>
|
||||
<%= render "cannot_vote" %>
|
||||
<% end %>
|
||||
</tr>
|
||||
<tr id="<%= dom_id(poll) %>">
|
||||
<td>
|
||||
<%= poll.name %>
|
||||
</td>
|
||||
<% if poll.votable_by?(@user) %>
|
||||
<%= render "can_vote", poll: poll %>
|
||||
<% elsif poll.voted_by?(@user) || poll.user_has_an_online_ballot?(@user) %>
|
||||
<%= render "already_voted" %>
|
||||
<% else %>
|
||||
<%= render "cannot_vote" %>
|
||||
<% end %>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<% provide :title, t("devise_views.organizations.registrations.new.title") %>
|
||||
<h2><%= t("devise_views.organizations.registrations.new.title") %></h2>
|
||||
|
||||
<%= form_for(resource, as: :user, url: organization_registration_path) do |f| %>
|
||||
<%= render "shared/errors", resource: resource %>
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<%= form_for(resource, as: :user, url: organization_registration_path) do |f| %>
|
||||
<%= render "shared/errors", resource: resource %>
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
|
||||
<%= f.fields_for :organization do |fo| %>
|
||||
<%= fo.text_field :name, autofocus: true, maxlength: Organization.name_max_length %>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<h3><%= link_to @proposal.title, @proposal %></h3>
|
||||
|
||||
<div data-alert class="callout warning">
|
||||
<%= t("proposals.retire_form.warning") %>
|
||||
<%= t("proposals.retire_form.warning") %>
|
||||
</div>
|
||||
|
||||
<%= render "shared/globalize_locales", resource: @proposal, manage_languages: false %>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<% provide :title, @proposal.title %>
|
||||
<% provide :social_media_meta_tags do %>
|
||||
<%= render "shared/social_media_meta_tags",
|
||||
social_url: proposal_url(@proposal),
|
||||
social_title: @proposal.title,
|
||||
social_description: @proposal.summary %>
|
||||
<%= render "shared/social_media_meta_tags",
|
||||
social_url: proposal_url(@proposal),
|
||||
social_title: @proposal.title,
|
||||
social_description: @proposal.summary %>
|
||||
<% end %>
|
||||
<% content_for :canonical do %>
|
||||
<%= render "shared/canonical", href: proposal_url(@proposal) %>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<% if resource.author.hidden? || resource.author.erased? %>
|
||||
<span class="icon-deleted author-deleted"></span>
|
||||
<span class="author deleted">
|
||||
<%= t("shared.author_info.author_deleted") %>
|
||||
<%= t("shared.author_info.author_deleted") %>
|
||||
</span>
|
||||
<% else %>
|
||||
<%= render Shared::AvatarComponent.new(resource.author, size: 32, class: "author-photo") %>
|
||||
<span class="author">
|
||||
<%= link_to resource.author.name, user_path(resource.author) %>
|
||||
<%= link_to resource.author.name, user_path(resource.author) %>
|
||||
</span>
|
||||
|
||||
<% if resource.respond_to?(:association_name) && resource.association_name.present? %>
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
|
||||
<% valid_filters.each do |filter| %>
|
||||
<% if current_filter == filter %>
|
||||
<li class="is-active"><h2><%= t("#{i18n_namespace}.filters.#{filter}") %></h2></li>
|
||||
<li class="is-active">
|
||||
<h2><%= t("#{i18n_namespace}.filters.#{filter}") %></h2>
|
||||
</li>
|
||||
<% else %>
|
||||
<li><%= link_to t("#{i18n_namespace}.filters.#{filter}"),
|
||||
current_path_with_query_params(filter: filter, page: 1) %></li>
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
<p id="price">
|
||||
<strong>
|
||||
<%= t("valuation.budget_investments.show.price") %>
|
||||
(<%= t("valuation.budget_investments.show.currency") %>):
|
||||
(<%= t("valuation.budget_investments.show.currency") %>):
|
||||
</strong>
|
||||
<% if @investment.price.present? %>
|
||||
<%= @investment.price %>
|
||||
<% else %>
|
||||
<%= t("valuation.budget_investments.show.undefined") %>
|
||||
<%= t("valuation.budget_investments.show.undefined") %>
|
||||
<% end %>
|
||||
</p>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<% if @investment.price_first_year.present? %>
|
||||
<%= @investment.price_first_year %>
|
||||
<% else %>
|
||||
<%= t("valuation.budget_investments.show.undefined") %>
|
||||
<%= t("valuation.budget_investments.show.undefined") %>
|
||||
<% end %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
@@ -6,21 +6,21 @@
|
||||
<fieldset class="fieldset">
|
||||
<legend><%= t("valuation.budget_investments.edit.feasibility") %></legend>
|
||||
<div class="small-4 column">
|
||||
<span class="radio">
|
||||
<%= f.radio_button :feasibility, "undecided" %>
|
||||
</span>
|
||||
<span class="radio">
|
||||
<%= f.radio_button :feasibility, "undecided" %>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="small-4 column">
|
||||
<span class="radio">
|
||||
<%= f.radio_button :feasibility, "feasible" %>
|
||||
</span>
|
||||
<span class="radio">
|
||||
<%= f.radio_button :feasibility, "feasible" %>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="small-4 column">
|
||||
<span class="radio">
|
||||
<%= f.radio_button :feasibility, "unfeasible" %>
|
||||
</span>
|
||||
<span class="radio">
|
||||
<%= f.radio_button :feasibility, "unfeasible" %>
|
||||
</span>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
@@ -33,25 +33,25 @@
|
||||
<div class="row">
|
||||
<div class="small-12 medium-8">
|
||||
<div class="small-12 medium-3 column">
|
||||
<%= f.select :document_type, document_types, prompt: "" %>
|
||||
<%= f.select :document_type, document_types, prompt: "" %>
|
||||
</div>
|
||||
<div class="small-12 medium-5 column end">
|
||||
|
||||
<div class="inline-block">
|
||||
<%= f.label :document_number, t("verification.residence.new.document_number") %>
|
||||
</div>
|
||||
<div class="inline-block">
|
||||
<%= f.label :document_number, t("verification.residence.new.document_number") %>
|
||||
</div>
|
||||
|
||||
<button type="button" class="inline-block" data-toggle="info-document-number">
|
||||
<span class="icon-help"></span>
|
||||
<span class="show-for-sr"><%= t("verification.residence.new.document_number_help_title") %></span>
|
||||
</button>
|
||||
<button type="button" class="inline-block" data-toggle="info-document-number">
|
||||
<span class="icon-help"></span>
|
||||
<span class="show-for-sr"><%= t("verification.residence.new.document_number_help_title") %></span>
|
||||
</button>
|
||||
|
||||
<div class="dropdown-pane" id="info-document-number" data-dropdown
|
||||
data-hover="true" data-hover-pane="true">
|
||||
<%= sanitize(t("verification.residence.new.document_number_help_text")) %>
|
||||
</div>
|
||||
<div class="dropdown-pane" id="info-document-number" data-dropdown
|
||||
data-hover="true" data-hover-pane="true">
|
||||
<%= sanitize(t("verification.residence.new.document_number_help_text")) %>
|
||||
</div>
|
||||
|
||||
<%= f.text_field :document_number, label: false %>
|
||||
<%= f.text_field :document_number, label: false %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
<% @verified_users.each do |verified_user| %>
|
||||
<% if verified_user.email.present? %>
|
||||
<li id="<%= dom_id(verified_user) %>_email">
|
||||
<span><%= mask_email(verified_user.email) %></span>
|
||||
<span><%= render "form", url: email_path, verified_user: verified_user %></span>
|
||||
<span><%= mask_email(verified_user.email) %></span>
|
||||
<span><%= render "form", url: email_path, verified_user: verified_user %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -15,15 +15,15 @@ describe Admin::Stats::SDG::GoalComponent do
|
||||
|
||||
render_inline component
|
||||
|
||||
expect(page).to have_text "Proposals 3"
|
||||
expect(page).to have_text "Polls 2"
|
||||
expect(page).to have_text "Debates 1"
|
||||
expect(page).to have_text "Proposals 3", normalize_ws: true
|
||||
expect(page).to have_text "Polls 2", normalize_ws: true
|
||||
expect(page).to have_text "Debates 1", normalize_ws: true
|
||||
expect("Current budget").to appear_before("Past year budget")
|
||||
expect(page).to have_text "Investment projects sent 2"
|
||||
expect(page).to have_text "Winner investment projects 0"
|
||||
expect(page).to have_text "Approved amount $0"
|
||||
expect(page).to have_text "Investment projects sent 1"
|
||||
expect(page).to have_text "Winner investment projects 1"
|
||||
expect(page).to have_text "Approved amount $1,000"
|
||||
expect(page).to have_text "Investment projects sent 2", normalize_ws: true
|
||||
expect(page).to have_text "Winner investment projects 0", normalize_ws: true
|
||||
expect(page).to have_text "Approved amount $0", normalize_ws: true
|
||||
expect(page).to have_text "Investment projects sent 1", normalize_ws: true
|
||||
expect(page).to have_text "Winner investment projects 1", normalize_ws: true
|
||||
expect(page).to have_text "Approved amount $1,000", normalize_ws: true
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user