Merge pull request #5892 from consuldemocracy/html_indentation
Add a linter to check indentation in ERB+HTML files
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 -e {} +
|
||||
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)
|
||||
|
||||
@@ -812,7 +812,6 @@
|
||||
|
||||
.proposal h3 {
|
||||
font-size: rem-calc(20);
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -88,15 +88,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
.supports-container {
|
||||
border-top: 1px solid $border;
|
||||
|
||||
@include breakpoint(medium) {
|
||||
border-left: 1px solid $border;
|
||||
border-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.participation-not-allowed {
|
||||
background: $warning-bg;
|
||||
color: $color-warning;
|
||||
@@ -394,41 +385,53 @@
|
||||
|
||||
@include breakpoint(medium) {
|
||||
min-height: $line-height * 15;
|
||||
|
||||
.with-image > .row {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.budget-investments-list .budget-investment,
|
||||
.proposals-list .proposal,
|
||||
.legislation-proposals .proposal {
|
||||
.debates-list,
|
||||
.proposals-list,
|
||||
.budget-investments-list,
|
||||
.legislation-proposals {
|
||||
|
||||
@include breakpoint(medium) {
|
||||
.panel {
|
||||
column-gap: calc(rem-calc(map-get($grid-column-gutter, medium)) * 3 / 4);
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.panel {
|
||||
> * {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
&.with-image {
|
||||
padding: 0 calc($line-height / 2) 0 0;
|
||||
&.with-image {
|
||||
padding-bottom: 0;
|
||||
padding-top: 0;
|
||||
|
||||
.panel-image {
|
||||
margin-#{$global-left}: rem-calc(-12);
|
||||
text-align: center;
|
||||
|
||||
~ * {
|
||||
padding-top: calc($line-height / 2);
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.column:first-child {
|
||||
overflow: hidden;
|
||||
}
|
||||
.debate-content,
|
||||
.budget-investment-content,
|
||||
.proposal-content {
|
||||
flex-basis: calc((35rem - 100%) * 999);
|
||||
flex-grow: 1000;
|
||||
max-width: 50rem;
|
||||
|
||||
.column:nth-child(2) {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.column:last-child:not(:first-child) {
|
||||
padding-top: calc($line-height / 2);
|
||||
}
|
||||
|
||||
img {
|
||||
height: 100%;
|
||||
max-width: 12rem;
|
||||
+ * {
|
||||
flex-basis: 22.5%;
|
||||
flex-shrink: 0;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -592,27 +595,19 @@
|
||||
.legislation-proposals {
|
||||
|
||||
.votes {
|
||||
border-top: 1px solid $border;
|
||||
margin-top: $line-height;
|
||||
padding: calc($line-height / 2) 0;
|
||||
position: relative;
|
||||
|
||||
@include breakpoint(medium) {
|
||||
border-left: 1px solid $border;
|
||||
border-top: 0;
|
||||
margin-top: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.total-votes {
|
||||
float: right;
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
line-height: $line-height * 2;
|
||||
|
||||
@include breakpoint(medium) {
|
||||
display: block;
|
||||
float: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -624,12 +619,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
.proposal-show .votes,
|
||||
.debate-show .votes {
|
||||
border: 0;
|
||||
padding: calc($line-height / 2) 0;
|
||||
}
|
||||
|
||||
.proposal,
|
||||
.budget-investment {
|
||||
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
.in-favor-against {
|
||||
@include flex-with-gap($line-height * 0.25);
|
||||
|
||||
@include breakpoint(medium) {
|
||||
@include flex-with-gap($line-height * 0.75);
|
||||
}
|
||||
@include flex-with-gap($line-height * 0.75);
|
||||
|
||||
&,
|
||||
.in-favor,
|
||||
@@ -77,16 +73,8 @@
|
||||
}
|
||||
|
||||
.percentage {
|
||||
display: inline-block;
|
||||
display: block;
|
||||
font-size: $small-font-size;
|
||||
line-height: $line-height * 2;
|
||||
padding-right: calc($line-height / 2);
|
||||
vertical-align: top;
|
||||
|
||||
@include breakpoint(medium) {
|
||||
display: block;
|
||||
line-height: $line-height;
|
||||
padding-right: 0;
|
||||
}
|
||||
line-height: $line-height;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</h2>
|
||||
<p class="confirmed">
|
||||
<%= t("budgets.ballots.show.voted_info") %>
|
||||
<p>
|
||||
</p>
|
||||
<p><%= t("budgets.ballots.show.voted_info_2") %></p>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
<% if budget.image.present? %>
|
||||
<div class="budget-header with-background-image"
|
||||
style="<%= attached_background_css polymorphic_path(budget.image.variant(:large)) %>">
|
||||
<% else %>
|
||||
<div class="budget-header">
|
||||
<% end %>
|
||||
<div <%= tag.attributes(html_attributes) %>>
|
||||
<div class="row">
|
||||
<div class="small-12 column text-center">
|
||||
<span class="budget-title"><%= t("budgets.index.title") %></span>
|
||||
|
||||
@@ -5,4 +5,17 @@ class Budgets::BudgetComponent < ApplicationComponent
|
||||
def initialize(budget)
|
||||
@budget = budget
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def html_attributes
|
||||
if budget.image.present?
|
||||
{
|
||||
class: "budget-header with-background-image",
|
||||
style: attached_background_css(polymorphic_path(budget.image.variant(:large)))
|
||||
}
|
||||
else
|
||||
{ class: "budget-header" }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</header>
|
||||
<p><%= t("cookies_management.description") %><p>
|
||||
<p><%= t("cookies_management.description") %></p>
|
||||
<% if more_info_link.present? %>
|
||||
<p><%= link_to t("cookies_consent.more_info_link"), more_info_link, target: "_blank" %></p>
|
||||
<% end %>
|
||||
|
||||
@@ -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 %>
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
<% else %>
|
||||
<dl>
|
||||
<% targets.sort.each do |target| %>
|
||||
<dt><%= target.code %><dt>
|
||||
<dd><%= target.long_title %><dd>
|
||||
<dt><%= target.code %></dt>
|
||||
<dd><%= target.long_title %></dd>
|
||||
<% end %>
|
||||
</dl>
|
||||
<% end %>
|
||||
|
||||
@@ -18,13 +18,13 @@ module LegislationHelper
|
||||
}
|
||||
end
|
||||
|
||||
def banner_color?
|
||||
@process.background_color.present? && @process.font_color.present?
|
||||
def banner_color?(process)
|
||||
process.background_color.present? && process.font_color.present?
|
||||
end
|
||||
|
||||
def css_for_process_header
|
||||
if banner_color?
|
||||
"background: #{@process.background_color};color: #{@process.font_color};"
|
||||
def css_for_process_header(process)
|
||||
if banner_color?(process)
|
||||
"background: #{process.background_color};color: #{process.font_color};"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -64,22 +64,6 @@ module ProposalsHelper
|
||||
proposals_current_view == "default" ? "minimal" : "default"
|
||||
end
|
||||
|
||||
def css_for_proposal_info_row(proposal)
|
||||
if proposal.image.present?
|
||||
if params[:selected].present?
|
||||
"small-12 medium-9 column"
|
||||
else
|
||||
"small-12 medium-6 large-7 column"
|
||||
end
|
||||
else
|
||||
if params[:selected].present?
|
||||
"small-12 column"
|
||||
else
|
||||
"small-12 medium-9 column"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def show_proposal_votes?
|
||||
params[:selected].blank?
|
||||
end
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
<br>
|
||||
<%= sanitize(activity.actionable.description) %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="align-top">
|
||||
<%= activity.user.name %> (<%= activity.user.email %>)
|
||||
</td>
|
||||
|
||||
@@ -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,16 @@
|
||||
<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 %>
|
||||
<div class="callout alert margin">
|
||||
|
||||
@@ -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 %>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
<table>
|
||||
</table>
|
||||
<% else %>
|
||||
<div class="callout primary">
|
||||
<%= t("admin.documents.index.no_documents") %>
|
||||
|
||||
@@ -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 %>
|
||||
|
||||
@@ -2,69 +2,55 @@
|
||||
<div class="panel <%= ("with-image" if feature?(:allow_images) && investment.image.present?) %>">
|
||||
|
||||
<% if feature?(:allow_images) && investment.image.present? %>
|
||||
<div class="row">
|
||||
|
||||
<div class="small-12 medium-3 large-2 column text-center">
|
||||
<div class="panel-image">
|
||||
<%= image_tag investment.image.variant(:thumb), alt: investment.image.title.unicode_normalize %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-6 large-7 column">
|
||||
<% else %>
|
||||
<div class="row">
|
||||
<div class="small-12 medium-9 column">
|
||||
<% end %>
|
||||
<div class="budget-investment-content">
|
||||
|
||||
<% cache [locale_and_user_status(investment), "index", investment, investment.author] do %>
|
||||
<h3><%= link_to investment.title, namespaced_budget_investment_path(investment) %></h3>
|
||||
<div class="budget-investment-content">
|
||||
<% cache [locale_and_user_status(investment), "index", investment, investment.author] do %>
|
||||
<h3><%= link_to investment.title, namespaced_budget_investment_path(investment) %></h3>
|
||||
|
||||
<%= render Budgets::Investments::InfoComponent.new(investment) %>
|
||||
<%= render Budgets::Investments::InfoComponent.new(investment) %>
|
||||
|
||||
<div class="investment-project-description">
|
||||
<%= wysiwyg(investment.description) %>
|
||||
<div class="truncate"></div>
|
||||
</div>
|
||||
<%= render "shared/tags", taggable: investment, limit: 5 %>
|
||||
<% end %>
|
||||
<div class="investment-project-description">
|
||||
<%= wysiwyg(investment.description) %>
|
||||
<div class="truncate"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% unless investment.unfeasible? %>
|
||||
|
||||
<% if investment.should_show_votes? %>
|
||||
<div id="<%= dom_id(investment) %>_votes"
|
||||
class="small-12 medium-3 column text-center">
|
||||
<%= render Budgets::Investments::VotesComponent.new(investment) %>
|
||||
</div>
|
||||
<% elsif investment.should_show_vote_count? %>
|
||||
<div id="<%= dom_id(investment) %>_votes"
|
||||
class="small-12 medium-3 column text-center">
|
||||
<div class="supports">
|
||||
<span class="total-supports no-button">
|
||||
<%= t("budgets.investments.investment.supports",
|
||||
count: investment.total_votes) %>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<% elsif investment.should_show_ballots? && !management_controller? %>
|
||||
<div id="<%= dom_id(investment) %>_ballot"
|
||||
class="small-12 medium-3 column text-center">
|
||||
<%= render "/budgets/investments/ballot",
|
||||
investment: investment,
|
||||
investment_ids: investment_ids,
|
||||
ballot: ballot %>
|
||||
</div>
|
||||
<% elsif investment.should_show_price? %>
|
||||
<div id="<%= dom_id(investment) %>_price"
|
||||
class="supports small-12 medium-3 column text-center">
|
||||
<div class="supports">
|
||||
<span class="total-supports no-button">
|
||||
<%= investment.formatted_price %>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= render "shared/tags", taggable: investment, limit: 5 %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% unless investment.unfeasible? %>
|
||||
<% if investment.should_show_votes? %>
|
||||
<div id="<%= dom_id(investment) %>_votes">
|
||||
<%= render Budgets::Investments::VotesComponent.new(investment) %>
|
||||
</div>
|
||||
<% elsif investment.should_show_vote_count? %>
|
||||
<div id="<%= dom_id(investment) %>_votes">
|
||||
<div class="supports">
|
||||
<span class="total-supports no-button">
|
||||
<%= t("budgets.investments.investment.supports",
|
||||
count: investment.total_votes) %>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<% elsif investment.should_show_ballots? && !management_controller? %>
|
||||
<div id="<%= dom_id(investment) %>_ballot">
|
||||
<%= render "/budgets/investments/ballot",
|
||||
investment: investment,
|
||||
investment_ids: investment_ids,
|
||||
ballot: ballot %>
|
||||
</div>
|
||||
<% elsif investment.should_show_price? %>
|
||||
<div id="<%= dom_id(investment) %>_price" class="supports">
|
||||
<div class="supports">
|
||||
<span class="total-supports no-button">
|
||||
<%= investment.formatted_price %>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
<div id="<%= dom_id(investment) %>" class="budget-investment minimal clear">
|
||||
<div class="panel">
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<div class="budget-investment-content">
|
||||
<% cache [locale_and_user_status(investment), "index_minimal", investment, investment.author] do %>
|
||||
<h3><%= link_to investment.title, namespaced_budget_investment_path(investment) %></h3>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="budget-investment-content">
|
||||
<% cache [locale_and_user_status(investment), "index_minimal", investment, investment.author] do %>
|
||||
<h3><%= link_to investment.title, namespaced_budget_investment_path(investment) %></h3>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -1,57 +1,51 @@
|
||||
<% cache [locale_and_user_status, debate, current_user&.voted_as_when_voted_for(debate)] do %>
|
||||
<div id="<%= dom_id(debate) %>" class="debate clear" data-type="debate">
|
||||
<div class="panel">
|
||||
<div class="row">
|
||||
<div class="debate-content">
|
||||
<h3><%= link_to debate.title, debate %></h3>
|
||||
<p class="debate-info">
|
||||
<%= l debate.created_at.to_date %>
|
||||
<span class="bullet"> • </span>
|
||||
<%= render Shared::CommentsCountComponent.new(
|
||||
debate.comments_count,
|
||||
url: debate_path(debate, anchor: "comments")
|
||||
) %>
|
||||
|
||||
<div class="small-12 medium-9 column">
|
||||
<div class="debate-content">
|
||||
<h3><%= link_to debate.title, debate %></h3>
|
||||
<p class="debate-info">
|
||||
<%= l debate.created_at.to_date %>
|
||||
<% if debate.author.hidden? || debate.author.erased? %>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="author">
|
||||
<%= t("debates.show.author_deleted") %>
|
||||
</span>
|
||||
<% else %>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="author">
|
||||
<%= debate.author.name %>
|
||||
</span>
|
||||
<% if debate.author.display_official_position_badge? %>
|
||||
<span class="bullet"> • </span>
|
||||
<%= render Shared::CommentsCountComponent.new(
|
||||
debate.comments_count,
|
||||
url: debate_path(debate, anchor: "comments")
|
||||
) %>
|
||||
<span class="label round level-<%= debate.author.official_level %>">
|
||||
<%= debate.author.official_position %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if debate.author.hidden? || debate.author.erased? %>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="author">
|
||||
<%= t("debates.show.author_deleted") %>
|
||||
</span>
|
||||
<% else %>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="author">
|
||||
<%= debate.author.name %>
|
||||
</span>
|
||||
<% if debate.author.display_official_position_badge? %>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="label round level-<%= debate.author.official_level %>">
|
||||
<%= debate.author.official_position %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if debate.author.verified_organization? %>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="label round is-association">
|
||||
<%= t("shared.collective") %>
|
||||
</span>
|
||||
<% end %>
|
||||
|
||||
<% if debate.author.verified_organization? %>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="label round is-association">
|
||||
<%= t("shared.collective") %>
|
||||
</span>
|
||||
<% end %>
|
||||
|
||||
</p>
|
||||
<div class="debate-description">
|
||||
<%= wysiwyg(debate.description) %>
|
||||
<div class="truncate"></div>
|
||||
</div>
|
||||
<%= render "shared/tags", taggable: debate, limit: 5 %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="<%= dom_id(debate) %>_votes" class="small-12 medium-3 column">
|
||||
<%= render Debates::VotesComponent.new(debate) %>
|
||||
</p>
|
||||
<div class="debate-description">
|
||||
<%= wysiwyg(debate.description) %>
|
||||
<div class="truncate"></div>
|
||||
</div>
|
||||
<%= render "shared/tags", taggable: debate, limit: 5 %>
|
||||
</div>
|
||||
|
||||
<div id="<%= dom_id(debate) %>_votes">
|
||||
<%= render Debates::VotesComponent.new(debate) %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
<div id="<%= dom_id(debate) %>" class="debate minimal clear" data-type="debate">
|
||||
<div class="panel">
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<div class="debate-content">
|
||||
<% cache [locale_and_user_status,
|
||||
"index_minimal", debate, current_user&.voted_as_when_voted_for(debate)] do %>
|
||||
<h3><%= link_to debate.title, debate %></h3>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="debate-content">
|
||||
<% cache [locale_and_user_status,
|
||||
"index_minimal", debate, current_user&.voted_as_when_voted_for(debate)] do %>
|
||||
<h3><%= link_to debate.title, debate %></h3>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -69,7 +69,6 @@
|
||||
<p><%= t("debates.index.section_footer.help_text_1") %></p>
|
||||
<p><%= sanitize(t("debates.index.section_footer.help_text_2",
|
||||
org: link_to(setting["org_name"], new_user_registration_path))) %></p>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -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 %>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
<%= form_for(resource, as: resource_name, url: [resource_name, :password_expired], html: { method: :put }) do |f| %>
|
||||
|
||||
<%= f.password_field :current_password %></p>
|
||||
<%= f.password_field :password, label: t("devise.password_expired.new_password") %></p>
|
||||
<%= f.password_field :password_confirmation %></p>
|
||||
<%= f.password_field :current_password %>
|
||||
<%= f.password_field :password, label: t("devise.password_expired.new_password") %>
|
||||
<%= f.password_field :password_confirmation %>
|
||||
|
||||
<p><%= f.submit t("devise.password_expired.change_password") %></p>
|
||||
<% end %>
|
||||
|
||||
@@ -3,20 +3,6 @@
|
||||
<%= link_to t("devise_views.shared.links.login"), new_session_path(resource_name) %><br>
|
||||
<% end -%>
|
||||
|
||||
<%#- if devise_mapping.registerable? &&
|
||||
controller_name != "registrations" ||
|
||||
controller_path != "users/registrations" %>
|
||||
<%#= link_to t("devise_views.shared.links.signup"), new_user_registration_path %><!-- <br> -->
|
||||
<%# end -%>
|
||||
|
||||
<%#- if devise_mapping.registerable? && controller_name == "registrations" && controller_path != "organizations/registrations" %>
|
||||
<%#= link_to t("devise_views.shared.links.organization_signup"), new_organization_registration_path %>
|
||||
<%# end -%>
|
||||
|
||||
<%#- if devise_mapping.recoverable? && controller_name != "passwords" && controller_name != "registrations" %>
|
||||
<%#= link_to t("devise_views.shared.links.new_password"), new_password_path(resource_name) %><!-- <br> -->
|
||||
<%# end -%>
|
||||
|
||||
<%- if devise_mapping.confirmable? && controller_name != "confirmations" %>
|
||||
<%= link_to t("devise_views.shared.links.new_confirmation"), new_confirmation_path(resource_name) %><br>
|
||||
<% end -%>
|
||||
|
||||
@@ -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;">
|
||||
<html <%= common_html_attributes %> id="mailer_layout">
|
||||
<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>
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
<span id="annotation-link" data-sub-annotation-ids="8">
|
||||
<%= render "annotation_link", annotation: annotation %>
|
||||
<span>
|
||||
</span>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -58,14 +58,14 @@
|
||||
<div><span class="panel-title"><%= t("legislation.draft_versions.show.text_body") %></span></div>
|
||||
</div>
|
||||
<div id="sticky-panel" class="draft-text">
|
||||
<% if @draft_version.final_version? %>
|
||||
<section>
|
||||
<% else %>
|
||||
<section class="legislation-annotatable"
|
||||
data-legislation-draft-version-id="<%= @draft_version.id %>"
|
||||
data-legislation-annotatable-base-url="<%= legislation_process_draft_version_path(@process, @draft_version) %>"
|
||||
data-legislation-open-phase="<%= @process.allegations_phase.open? %>">
|
||||
<% end %>
|
||||
<section <%= tag.attributes(
|
||||
class: "legislation-annotatable",
|
||||
data: {
|
||||
"legislation-draft-version-id": @draft_version.id,
|
||||
"legislation-annotatable-base-url": legislation_process_draft_version_path(@process, @draft_version),
|
||||
"legislation-open-phase": @process.allegations_phase.open?
|
||||
}
|
||||
) unless @draft_version.final_version? %>>
|
||||
<%= AdminLegislationSanitizer.new.sanitize(@draft_version.body_html) %>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<div class="legislation-hero jumbo" style="<%= css_for_process_header %>">
|
||||
<div class="legislation-hero jumbo" style="<%= css_for_process_header(@process) %>">
|
||||
<div class="row">
|
||||
<div class="small-12 medium-9 column">
|
||||
|
||||
<% if banner_color? %>
|
||||
<% if banner_color?(@process) %>
|
||||
<%= link_to t("shared.back"),
|
||||
legislation_processes_path,
|
||||
class: "icon-angle-left",
|
||||
|
||||
@@ -12,10 +12,7 @@
|
||||
<%= markdown @process.additional_info if @process.additional_info %>
|
||||
</div>
|
||||
|
||||
<button type="button" class="button" data-toggle="additional_info"
|
||||
<% if banner_color? %>
|
||||
style="background:<%= process.font_color %>; color:<%= process.background_color %>;"
|
||||
<% end %>>
|
||||
<button type="button" class="button" data-toggle="additional_info" style="<%= css_for_process_header(process) %>">
|
||||
<%= t("legislation.processes.header.additional_info") %>
|
||||
</button>
|
||||
<% end %>
|
||||
|
||||
@@ -2,78 +2,74 @@
|
||||
class="proposal clear <%= ("successful" if proposal.total_votes > Proposal.votes_needed_for_success) %>"
|
||||
data-type="proposal">
|
||||
<div class="panel <%= ("with-image" if proposal.image.present?) %>">
|
||||
<div class="icon-successful"></div>
|
||||
<% if proposal.total_votes > Proposal.votes_needed_for_success %>
|
||||
<div class="icon-successful"></div>
|
||||
<% end %>
|
||||
|
||||
<% if proposal.image.present? %>
|
||||
<div class="row">
|
||||
<div class="small-12 medium-3 large-2 column text-center">
|
||||
<%= image_tag proposal.image.variant(:thumb),
|
||||
alt: proposal.image.title.unicode_normalize %>
|
||||
</div>
|
||||
<div class="small-12 medium-6 large-7 column margin-top">
|
||||
<% else %>
|
||||
<div class="row">
|
||||
<div class="small-12 medium-9 column">
|
||||
<div class="panel-image">
|
||||
<%= image_tag proposal.image.variant(:thumb),
|
||||
alt: proposal.image.title.unicode_normalize %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="proposal-content">
|
||||
<% cache [locale_and_user_status(proposal), "index", proposal, proposal.author] do %>
|
||||
<h3><%= link_to proposal.title, legislation_process_proposal_path(proposal.legislation_process_id, proposal) %></h3>
|
||||
<p class="proposal-info">
|
||||
<%= l proposal.created_at.to_date %>
|
||||
|
||||
<div class="proposal-content">
|
||||
<% cache [locale_and_user_status(proposal), "index", proposal, proposal.author] do %>
|
||||
<h3><%= link_to proposal.title, legislation_process_proposal_path(proposal.legislation_process_id, proposal) %></h3>
|
||||
<p class="proposal-info">
|
||||
<%= l proposal.created_at.to_date %>
|
||||
<span class="bullet"> • </span>
|
||||
<%= render Shared::CommentsCountComponent.new(
|
||||
proposal.comments_count,
|
||||
url: legislation_process_proposal_path(
|
||||
proposal.legislation_process_id,
|
||||
proposal,
|
||||
anchor: "comments"
|
||||
)
|
||||
) %>
|
||||
|
||||
<% if proposal.author.hidden? || proposal.author.erased? %>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="author">
|
||||
<%= t("proposals.show.author_deleted") %>
|
||||
</span>
|
||||
<% else %>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="author">
|
||||
<%= proposal.author.name %>
|
||||
</span>
|
||||
<% if proposal.author.display_official_position_badge? %>
|
||||
<span class="bullet"> • </span>
|
||||
<%= render Shared::CommentsCountComponent.new(
|
||||
proposal.comments_count,
|
||||
url: legislation_process_proposal_path(
|
||||
proposal.legislation_process_id,
|
||||
proposal,
|
||||
anchor: "comments"
|
||||
)
|
||||
) %>
|
||||
|
||||
<% if proposal.author.hidden? || proposal.author.erased? %>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="author">
|
||||
<%= t("proposals.show.author_deleted") %>
|
||||
</span>
|
||||
<% else %>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="author">
|
||||
<%= proposal.author.name %>
|
||||
</span>
|
||||
<% if proposal.author.display_official_position_badge? %>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="label round level-<%= proposal.author.official_level %>">
|
||||
<%= proposal.author.official_position %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if proposal.author.verified_organization? %>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="label round is-association">
|
||||
<%= t("shared.collective") %>
|
||||
</span>
|
||||
<% end %>
|
||||
|
||||
<% if Geozone.any? %>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="geozone">
|
||||
<%= link_to geozone_name(proposal), legislation_process_proposals_path(proposal.legislation_process_id, search: geozone_name(proposal)) %>
|
||||
</span>
|
||||
<% end %>
|
||||
</p>
|
||||
<div class="proposal-description">
|
||||
<p><%= proposal.summary %></p>
|
||||
<div class="truncate"></div>
|
||||
</div>
|
||||
<%= render "shared/tags", taggable: proposal, limit: 5 %>
|
||||
<span class="label round level-<%= proposal.author.official_level %>">
|
||||
<%= proposal.author.official_position %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="<%= dom_id(proposal) %>_votes" class="small-12 medium-3 column">
|
||||
<%= render Legislation::Proposals::VotesComponent.new(proposal) %>
|
||||
</div>
|
||||
<% if proposal.author.verified_organization? %>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="label round is-association">
|
||||
<%= t("shared.collective") %>
|
||||
</span>
|
||||
<% end %>
|
||||
|
||||
<% if Geozone.any? %>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="geozone">
|
||||
<%= link_to geozone_name(proposal), legislation_process_proposals_path(proposal.legislation_process_id, search: geozone_name(proposal)) %>
|
||||
</span>
|
||||
<% end %>
|
||||
</p>
|
||||
<div class="proposal-description">
|
||||
<p><%= proposal.summary %></p>
|
||||
<div class="truncate"></div>
|
||||
</div>
|
||||
<%= render "shared/tags", taggable: proposal, limit: 5 %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div id="<%= dom_id(proposal) %>_votes">
|
||||
<%= render Legislation::Proposals::VotesComponent.new(proposal) %>
|
||||
</div>
|
||||
</div>
|
||||
</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) %>
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
<%= link_to legislation_process_question_path(@process, @question.next_question_id), class: "quiz-next-link" do %>
|
||||
<div class="quiz-next">
|
||||
<%= t("legislation.questions.show.next_question") %>
|
||||
<span class="icon-angle-right" aria-hidden="true">
|
||||
<span class="icon-angle-right" aria-hidden="true"></span>
|
||||
</div>
|
||||
<% end %>
|
||||
<% elsif @question.first_question_id %>
|
||||
<%= link_to legislation_process_question_path(@process, @question.first_question_id), class: "quiz-next-link" do %>
|
||||
<div class="quiz-next">
|
||||
<%= t("legislation.questions.show.first_question") %>
|
||||
<span class="icon-angle-right" aria-hidden="true">
|
||||
<span class="icon-angle-right" aria-hidden="true"></span>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -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 %>
|
||||
|
||||
@@ -1,94 +1,86 @@
|
||||
<div id="<%= dom_id(proposal) %>"
|
||||
class="proposal clear
|
||||
<%= ("successful" if proposal.total_votes > Proposal.votes_needed_for_success) %>"
|
||||
class="proposal clear <%= ("successful" if proposal.successful?) %>"
|
||||
data-type="proposal">
|
||||
<div class="panel <%= "with-image" if proposal.image.present? %>">
|
||||
<div class="icon-successful"></div>
|
||||
<% if proposal.successful? %>
|
||||
<div class="icon-successful"></div>
|
||||
<% end %>
|
||||
|
||||
<% if proposal.image.present? %>
|
||||
<div class="row">
|
||||
<div class="small-12 medium-3 large-2 column text-center">
|
||||
<%= image_tag proposal.image.variant(:thumb),
|
||||
alt: proposal.image.title.unicode_normalize %>
|
||||
</div>
|
||||
|
||||
<div class="<%= css_for_proposal_info_row(proposal) %>">
|
||||
<% else %>
|
||||
<div class="row">
|
||||
<div class="<%= css_for_proposal_info_row(proposal) %>">
|
||||
<% end %>
|
||||
<div class="proposal-content">
|
||||
<% cache [locale_and_user_status(proposal), "index", proposal, proposal.author] do %>
|
||||
<h3><%= link_to proposal.title, namespaced_proposal_path(proposal) %></h3>
|
||||
<p class="proposal-info">
|
||||
<%= l proposal.created_at.to_date %>
|
||||
<span class="bullet"> • </span>
|
||||
<%= render Shared::CommentsCountComponent.new(
|
||||
proposal.comments_count,
|
||||
url: namespaced_proposal_path(proposal, anchor: "comments")
|
||||
) %>
|
||||
|
||||
<% if proposal.author.hidden? || proposal.author.erased? %>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="author">
|
||||
<%= t("proposals.show.author_deleted") %>
|
||||
</span>
|
||||
<% else %>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="author">
|
||||
<%= proposal.author.name %>
|
||||
</span>
|
||||
<% if proposal.author.display_official_position_badge? %>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="label round level-<%= proposal.author.official_level %>">
|
||||
<%= proposal.author.official_position %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if proposal.author.verified_organization? %>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="label round is-association">
|
||||
<%= t("shared.collective") %>
|
||||
</span>
|
||||
<% end %>
|
||||
|
||||
<% if Geozone.any? %>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="geozone">
|
||||
<%= link_to geozone_name(proposal), proposals_path(search: geozone_name(proposal)) %>
|
||||
</span>
|
||||
<% end %>
|
||||
</p>
|
||||
<div class="proposal-description">
|
||||
<p><%= proposal.summary %></p>
|
||||
<div class="truncate"></div>
|
||||
</div>
|
||||
<%= render "shared/tags", taggable: proposal, limit: 5 %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="panel-image">
|
||||
<%= image_tag proposal.image.variant(:thumb),
|
||||
alt: proposal.image.title.unicode_normalize %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if show_proposal_votes? %>
|
||||
<div id="<%= dom_id(proposal) %>_votes"
|
||||
class="small-12 medium-3 column supports-container">
|
||||
<% if proposal.successful? %>
|
||||
<div class="padding">
|
||||
<div class="supports text-center">
|
||||
<%= render "proposals/supports", proposal: proposal %>
|
||||
</div>
|
||||
</div>
|
||||
<% elsif proposal.archived? %>
|
||||
<div class="padding text-center">
|
||||
<strong><%= t("proposals.proposal.supports", count: proposal.total_votes) %></strong>
|
||||
<p><%= t("proposals.proposal.archived") %></p>
|
||||
</div>
|
||||
<div class="proposal-content">
|
||||
<% cache [locale_and_user_status(proposal), "index", proposal, proposal.author] do %>
|
||||
<h3><%= link_to proposal.title, namespaced_proposal_path(proposal) %></h3>
|
||||
<p class="proposal-info">
|
||||
<%= l proposal.created_at.to_date %>
|
||||
<span class="bullet"> • </span>
|
||||
<%= render Shared::CommentsCountComponent.new(
|
||||
proposal.comments_count,
|
||||
url: namespaced_proposal_path(proposal, anchor: "comments")
|
||||
) %>
|
||||
|
||||
<% if proposal.author.hidden? || proposal.author.erased? %>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="author">
|
||||
<%= t("proposals.show.author_deleted") %>
|
||||
</span>
|
||||
<% else %>
|
||||
<%= render "votes", proposal: proposal %>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="author">
|
||||
<%= proposal.author.name %>
|
||||
</span>
|
||||
<% if proposal.author.display_official_position_badge? %>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="label round level-<%= proposal.author.official_level %>">
|
||||
<%= proposal.author.official_position %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if proposal.author.verified_organization? %>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="label round is-association">
|
||||
<%= t("shared.collective") %>
|
||||
</span>
|
||||
<% end %>
|
||||
|
||||
<% if Geozone.any? %>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="geozone">
|
||||
<%= link_to geozone_name(proposal), proposals_path(search: geozone_name(proposal)) %>
|
||||
</span>
|
||||
<% end %>
|
||||
</p>
|
||||
<div class="proposal-description">
|
||||
<p><%= proposal.summary %></p>
|
||||
<div class="truncate"></div>
|
||||
</div>
|
||||
<%= render "shared/tags", taggable: proposal, limit: 5 %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% if show_proposal_votes? %>
|
||||
<div id="<%= dom_id(proposal) %>_votes" class="supports-container">
|
||||
<% if proposal.successful? %>
|
||||
<div class="padding">
|
||||
<div class="supports">
|
||||
<%= render "proposals/supports", proposal: proposal %>
|
||||
</div>
|
||||
</div>
|
||||
<% elsif proposal.archived? %>
|
||||
<div class="padding">
|
||||
<strong><%= t("proposals.proposal.supports", count: proposal.total_votes) %></strong>
|
||||
<p><%= t("proposals.proposal.archived") %></p>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= render "votes", proposal: proposal %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
<div id="<%= dom_id(proposal) %>" class="proposal minimal clear" data-type="proposal">
|
||||
<div class="panel">
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<div class="proposal-content">
|
||||
<% cache [locale_and_user_status(proposal),
|
||||
"index_minimal", proposal, proposal.author] do %>
|
||||
<h3><%= link_to proposal.title, namespaced_proposal_path(proposal) %></h3>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="proposal-content">
|
||||
<% cache [locale_and_user_status(proposal),
|
||||
"index_minimal", proposal, proposal.author] do %>
|
||||
<h3><%= link_to proposal.title, namespaced_proposal_path(proposal) %></h3>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -8,12 +8,7 @@
|
||||
<%= render "shared/canonical", href: proposals_url %>
|
||||
<% end %>
|
||||
|
||||
<% if [
|
||||
@search_terms,
|
||||
@advanced_search_terms,
|
||||
params[:retired].present?,
|
||||
params[:selected].present?
|
||||
].any? %>
|
||||
<% if [@search_terms, @advanced_search_terms, params[:retired].present?, params[:selected].present?].any? %>
|
||||
<%= render Shared::SearchResultsSummaryComponent.new(
|
||||
results: @proposals,
|
||||
search_terms: @search_terms,
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -17,11 +17,6 @@
|
||||
|
||||
<hr>
|
||||
<%= render "/budgets/investments/investment_detail", investment: @investment, preview: true %>
|
||||
</hr>
|
||||
|
||||
<% if @investment.external_url.present? %>
|
||||
<p><%= sanitize_and_auto_link @investment.external_url %></p>
|
||||
<% end %>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -9,23 +9,23 @@ describe LegislationHelper do
|
||||
|
||||
describe "banner colors presence" do
|
||||
it "background and font color exist" do
|
||||
@process = build(:legislation_process, background_color: "#944949", font_color: "#ffffff")
|
||||
expect(banner_color?).to be true
|
||||
process = build(:legislation_process, background_color: "#944949", font_color: "#ffffff")
|
||||
expect(banner_color?(process)).to be true
|
||||
end
|
||||
|
||||
it "background color exist and font color not exist" do
|
||||
@process = build(:legislation_process, background_color: "#944949", font_color: "")
|
||||
expect(banner_color?).to be false
|
||||
process = build(:legislation_process, background_color: "#944949", font_color: "")
|
||||
expect(banner_color?(process)).to be false
|
||||
end
|
||||
|
||||
it "background color not exist and font color exist" do
|
||||
@process = build(:legislation_process, background_color: "", font_color: "#944949")
|
||||
expect(banner_color?).to be false
|
||||
process = build(:legislation_process, background_color: "", font_color: "#944949")
|
||||
expect(banner_color?(process)).to be false
|
||||
end
|
||||
|
||||
it "background and font color not exist" do
|
||||
@process = build(:legislation_process, background_color: "", font_color: "")
|
||||
expect(banner_color?).to be false
|
||||
process = build(:legislation_process, background_color: "", font_color: "")
|
||||
expect(banner_color?(process)).to be false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user