Merge pull request #5399 from consuldemocracy/dependabot/bundler/view_component-3.11.0
Bump view_component from 3.6.0 to 3.11.0
This commit is contained in:
2
Gemfile
2
Gemfile
@@ -59,7 +59,7 @@ gem "turbolinks", "~> 5.2.1"
|
|||||||
gem "turnout", "~> 2.5.0"
|
gem "turnout", "~> 2.5.0"
|
||||||
gem "uglifier", "~> 4.2.0"
|
gem "uglifier", "~> 4.2.0"
|
||||||
gem "uuidtools", "~> 2.2.0"
|
gem "uuidtools", "~> 2.2.0"
|
||||||
gem "view_component", "~> 3.6.0"
|
gem "view_component", "~> 3.11.0"
|
||||||
gem "whenever", "~> 1.0.0", require: false
|
gem "whenever", "~> 1.0.0", require: false
|
||||||
gem "wicked_pdf", "~> 2.7.0"
|
gem "wicked_pdf", "~> 2.7.0"
|
||||||
gem "wkhtmltopdf-binary", "~> 0.12.6"
|
gem "wkhtmltopdf-binary", "~> 0.12.6"
|
||||||
|
|||||||
@@ -656,7 +656,7 @@ GEM
|
|||||||
uniform_notifier (1.16.0)
|
uniform_notifier (1.16.0)
|
||||||
uuidtools (2.2.0)
|
uuidtools (2.2.0)
|
||||||
version_gem (1.1.3)
|
version_gem (1.1.3)
|
||||||
view_component (3.6.0)
|
view_component (3.11.0)
|
||||||
activesupport (>= 5.2.0, < 8.0)
|
activesupport (>= 5.2.0, < 8.0)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
method_source (~> 1.0)
|
method_source (~> 1.0)
|
||||||
@@ -787,7 +787,7 @@ DEPENDENCIES
|
|||||||
turnout (~> 2.5.0)
|
turnout (~> 2.5.0)
|
||||||
uglifier (~> 4.2.0)
|
uglifier (~> 4.2.0)
|
||||||
uuidtools (~> 2.2.0)
|
uuidtools (~> 2.2.0)
|
||||||
view_component (~> 3.6.0)
|
view_component (~> 3.11.0)
|
||||||
web-console (~> 4.2.1)
|
web-console (~> 4.2.1)
|
||||||
whenever (~> 1.0.0)
|
whenever (~> 1.0.0)
|
||||||
wicked_pdf (~> 2.7.0)
|
wicked_pdf (~> 2.7.0)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Admin::AllowedTableActionsComponent < ApplicationComponent
|
class Admin::AllowedTableActionsComponent < ApplicationComponent
|
||||||
attr_reader :record, :options
|
attr_reader :record, :options
|
||||||
delegate :can?, to: :helpers
|
use_helpers :can?
|
||||||
delegate :action, to: :table_actions_component
|
delegate :action, to: :table_actions_component
|
||||||
|
|
||||||
def initialize(record, **options)
|
def initialize(record, **options)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Admin::Budgets::CalculateWinnersButtonComponent < ApplicationComponent
|
class Admin::Budgets::CalculateWinnersButtonComponent < ApplicationComponent
|
||||||
attr_reader :budget, :from_investments
|
attr_reader :budget, :from_investments
|
||||||
delegate :can?, to: :helpers
|
use_helpers :can?
|
||||||
|
|
||||||
def initialize(budget, from_investments: false)
|
def initialize(budget, from_investments: false)
|
||||||
@budget = budget
|
@budget = budget
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
class Admin::Budgets::DraftingComponent < ApplicationComponent
|
class Admin::Budgets::DraftingComponent < ApplicationComponent
|
||||||
delegate :can?, to: :controller
|
use_helpers :can?
|
||||||
attr_reader :budget
|
attr_reader :budget
|
||||||
|
|
||||||
def initialize(budget)
|
def initialize(budget)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Admin::Budgets::LinksComponent < ApplicationComponent
|
class Admin::Budgets::LinksComponent < ApplicationComponent
|
||||||
attr_reader :budget
|
attr_reader :budget
|
||||||
delegate :can?, to: :helpers
|
use_helpers :can?
|
||||||
|
|
||||||
def initialize(budget)
|
def initialize(budget)
|
||||||
@budget = budget
|
@budget = budget
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
class Admin::BudgetsWizard::BaseComponent < ApplicationComponent
|
class Admin::BudgetsWizard::BaseComponent < ApplicationComponent
|
||||||
delegate :single_heading?, :url_params, to: :helpers
|
use_helpers :single_heading?, :url_params
|
||||||
|
|
||||||
def budget_mode
|
def budget_mode
|
||||||
helpers.budget_mode || "multiple"
|
helpers.budget_mode || "multiple"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
class Admin::BudgetsWizard::Budgets::NewComponent < ApplicationComponent
|
class Admin::BudgetsWizard::Budgets::NewComponent < ApplicationComponent
|
||||||
include Header
|
include Header
|
||||||
attr_reader :budget
|
attr_reader :budget
|
||||||
delegate :single_heading?, to: :helpers
|
use_helpers :single_heading?
|
||||||
|
|
||||||
def initialize(budget)
|
def initialize(budget)
|
||||||
@budget = budget
|
@budget = budget
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Admin::MenuComponent < ApplicationComponent
|
class Admin::MenuComponent < ApplicationComponent
|
||||||
include LinkListHelper
|
include LinkListHelper
|
||||||
delegate :can?, to: :helpers
|
use_helpers :can?
|
||||||
|
|
||||||
def links
|
def links
|
||||||
[
|
[
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
class Admin::Organizations::TableActionsComponent < ApplicationComponent
|
class Admin::Organizations::TableActionsComponent < ApplicationComponent
|
||||||
delegate :can?, to: :controller
|
use_helpers :can?
|
||||||
attr_reader :organization
|
attr_reader :organization
|
||||||
|
|
||||||
def initialize(organization)
|
def initialize(organization)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Admin::Poll::Questions::Answers::Documents::IndexComponent < ApplicationComponent
|
class Admin::Poll::Questions::Answers::Documents::IndexComponent < ApplicationComponent
|
||||||
attr_reader :answer
|
attr_reader :answer
|
||||||
delegate :can?, to: :helpers
|
use_helpers :can?
|
||||||
|
|
||||||
def initialize(answer)
|
def initialize(answer)
|
||||||
@answer = answer
|
@answer = answer
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Admin::Poll::Questions::FilterComponent < ApplicationComponent
|
class Admin::Poll::Questions::FilterComponent < ApplicationComponent
|
||||||
attr_reader :polls
|
attr_reader :polls
|
||||||
delegate :current_path_with_query_params, to: :helpers
|
use_helpers :current_path_with_query_params
|
||||||
|
|
||||||
def initialize(polls)
|
def initialize(polls)
|
||||||
@polls = polls
|
@polls = polls
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ class Admin::Poll::Questions::FormComponent < ApplicationComponent
|
|||||||
include TranslatableFormHelper
|
include TranslatableFormHelper
|
||||||
include GlobalizeHelper
|
include GlobalizeHelper
|
||||||
attr_reader :question, :url
|
attr_reader :question, :url
|
||||||
delegate :can?, to: :helpers
|
use_helpers :can?
|
||||||
|
|
||||||
def initialize(question, url:)
|
def initialize(question, url:)
|
||||||
@question = question
|
@question = question
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Admin::Settings::ContentTypesFormComponent < ApplicationComponent
|
class Admin::Settings::ContentTypesFormComponent < ApplicationComponent
|
||||||
attr_reader :setting, :tab
|
attr_reader :setting, :tab
|
||||||
delegate :dom_id, to: :helpers
|
use_helpers :dom_id
|
||||||
|
|
||||||
def initialize(setting, tab: nil)
|
def initialize(setting, tab: nil)
|
||||||
@setting = setting
|
@setting = setting
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Admin::Settings::RowComponent < ApplicationComponent
|
class Admin::Settings::RowComponent < ApplicationComponent
|
||||||
attr_reader :key, :tab, :type
|
attr_reader :key, :tab, :type
|
||||||
delegate :dom_id, to: :helpers
|
use_helpers :dom_id
|
||||||
|
|
||||||
def initialize(key, type: :text, tab: nil)
|
def initialize(key, type: :text, tab: nil)
|
||||||
@key = key
|
@key = key
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Admin::Settings::TextFormComponent < ApplicationComponent
|
class Admin::Settings::TextFormComponent < ApplicationComponent
|
||||||
attr_reader :setting, :tab
|
attr_reader :setting, :tab
|
||||||
delegate :dom_id, to: :helpers
|
use_helpers :dom_id
|
||||||
|
|
||||||
def initialize(setting, tab: nil)
|
def initialize(setting, tab: nil)
|
||||||
@setting = setting
|
@setting = setting
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Admin::SiteCustomization::InformationTexts::FormFieldComponent < ApplicationComponent
|
class Admin::SiteCustomization::InformationTexts::FormFieldComponent < ApplicationComponent
|
||||||
attr_reader :i18n_content, :locale
|
attr_reader :i18n_content, :locale
|
||||||
delegate :globalize, :site_customization_display_translation_style, to: :helpers
|
use_helpers :globalize, :site_customization_display_translation_style
|
||||||
|
|
||||||
def initialize(i18n_content, locale:)
|
def initialize(i18n_content, locale:)
|
||||||
@i18n_content = i18n_content
|
@i18n_content = i18n_content
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
class Admin::Tenants::NewComponent < ApplicationComponent
|
class Admin::Tenants::NewComponent < ApplicationComponent
|
||||||
include Header
|
include Header
|
||||||
attr_reader :tenant
|
attr_reader :tenant
|
||||||
delegate :current_user, to: :helpers
|
use_helpers :current_user
|
||||||
|
|
||||||
def initialize(tenant)
|
def initialize(tenant)
|
||||||
@tenant = tenant
|
@tenant = tenant
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
class ApplicationComponent < ViewComponent::Base
|
class ApplicationComponent < ViewComponent::Base
|
||||||
include SettingsHelper
|
include SettingsHelper
|
||||||
delegate :back_link_to, :t, to: :helpers
|
use_helpers :back_link_to, :t
|
||||||
delegate :default_form_builder, to: :controller
|
delegate :default_form_builder, to: :controller
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Attachable::FieldsComponent < ApplicationComponent
|
class Attachable::FieldsComponent < ApplicationComponent
|
||||||
attr_reader :f, :resource_type, :resource_id, :relation_name
|
attr_reader :f, :resource_type, :resource_id, :relation_name
|
||||||
delegate :current_user, :render_image, to: :helpers
|
use_helpers :current_user, :render_image
|
||||||
|
|
||||||
def initialize(f, resource_type:, resource_id:, relation_name:)
|
def initialize(f, resource_type:, resource_id:, relation_name:)
|
||||||
@f = f
|
@f = f
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Budgets::BudgetComponent < ApplicationComponent
|
class Budgets::BudgetComponent < ApplicationComponent
|
||||||
attr_reader :budget
|
attr_reader :budget
|
||||||
delegate :attached_background_css, to: :helpers
|
use_helpers :attached_background_css
|
||||||
|
|
||||||
def initialize(budget)
|
def initialize(budget)
|
||||||
@budget = budget
|
@budget = budget
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Budgets::Executions::ImageComponent < ApplicationComponent
|
class Budgets::Executions::ImageComponent < ApplicationComponent
|
||||||
attr_reader :investment
|
attr_reader :investment
|
||||||
delegate :image_path_for, to: :helpers
|
use_helpers :image_path_for
|
||||||
|
|
||||||
def initialize(investment)
|
def initialize(investment)
|
||||||
@investment = investment
|
@investment = investment
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
class Budgets::InvestmentComponent < ApplicationComponent
|
class Budgets::InvestmentComponent < ApplicationComponent
|
||||||
delegate :locale_and_user_status, :namespaced_budget_investment_path, :image_path_for, to: :helpers
|
use_helpers :locale_and_user_status, :namespaced_budget_investment_path, :image_path_for
|
||||||
attr_reader :investment
|
attr_reader :investment
|
||||||
|
|
||||||
def initialize(investment)
|
def initialize(investment)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Budgets::Investments::BallotComponent < ApplicationComponent
|
class Budgets::Investments::BallotComponent < ApplicationComponent
|
||||||
attr_reader :investment, :investment_ids, :ballot
|
attr_reader :investment, :investment_ids, :ballot
|
||||||
delegate :current_user, :heading_link, :link_to_verify_account, to: :helpers
|
use_helpers :current_user, :heading_link, :link_to_verify_account
|
||||||
|
|
||||||
def initialize(investment:, investment_ids:, ballot:)
|
def initialize(investment:, investment_ids:, ballot:)
|
||||||
@investment = investment
|
@investment = investment
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
class Budgets::Investments::FiltersComponent < ApplicationComponent
|
class Budgets::Investments::FiltersComponent < ApplicationComponent
|
||||||
delegate :valid_filters, :current_filter, :link_list, :current_path_with_query_params, to: :helpers
|
use_helpers :valid_filters, :current_filter, :link_list, :current_path_with_query_params
|
||||||
|
|
||||||
def render?
|
def render?
|
||||||
valid_filters&.any?
|
valid_filters&.any?
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ class Budgets::Investments::FormComponent < ApplicationComponent
|
|||||||
include TranslatableFormHelper
|
include TranslatableFormHelper
|
||||||
include GlobalizeHelper
|
include GlobalizeHelper
|
||||||
attr_reader :investment, :url
|
attr_reader :investment, :url
|
||||||
delegate :current_user, :budget_heading_select_options, :suggest_data, to: :helpers
|
use_helpers :current_user, :budget_heading_select_options, :suggest_data
|
||||||
|
|
||||||
def initialize(investment, url:)
|
def initialize(investment, url:)
|
||||||
@investment = investment
|
@investment = investment
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Budgets::Investments::MapComponent < ApplicationComponent
|
class Budgets::Investments::MapComponent < ApplicationComponent
|
||||||
attr_reader :heading, :investments
|
attr_reader :heading, :investments
|
||||||
delegate :render_map, to: :helpers
|
use_helpers :render_map
|
||||||
|
|
||||||
def initialize(investments, heading:)
|
def initialize(investments, heading:)
|
||||||
@investments = investments
|
@investments = investments
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Budgets::Investments::MyBallotComponent < ApplicationComponent
|
class Budgets::Investments::MyBallotComponent < ApplicationComponent
|
||||||
attr_reader :ballot, :heading, :investment_ids, :assigned_heading
|
attr_reader :ballot, :heading, :investment_ids, :assigned_heading
|
||||||
delegate :can?, :heading_link, to: :helpers
|
use_helpers :can?, :heading_link
|
||||||
|
|
||||||
def initialize(ballot:, heading:, investment_ids:, assigned_heading: nil)
|
def initialize(ballot:, heading:, investment_ids:, assigned_heading: nil)
|
||||||
@ballot = ballot
|
@ballot = ballot
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Budgets::Investments::VotesComponent < ApplicationComponent
|
class Budgets::Investments::VotesComponent < ApplicationComponent
|
||||||
attr_reader :investment
|
attr_reader :investment
|
||||||
delegate :namespace, :current_user, :image_absolute_url, :link_to_verify_account, to: :helpers
|
use_helpers :namespace, :current_user, :image_absolute_url, :link_to_verify_account
|
||||||
|
|
||||||
def initialize(investment)
|
def initialize(investment)
|
||||||
@investment = investment
|
@investment = investment
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
class Budgets::MapComponent < ApplicationComponent
|
class Budgets::MapComponent < ApplicationComponent
|
||||||
delegate :render_map, to: :helpers
|
use_helpers :render_map
|
||||||
attr_reader :budget
|
attr_reader :budget
|
||||||
|
|
||||||
def initialize(budget)
|
def initialize(budget)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
class Budgets::PhasesComponent < ApplicationComponent
|
class Budgets::PhasesComponent < ApplicationComponent
|
||||||
delegate :wysiwyg, :auto_link_already_sanitized_html, to: :helpers
|
use_helpers :wysiwyg, :auto_link_already_sanitized_html
|
||||||
attr_reader :budget
|
attr_reader :budget
|
||||||
|
|
||||||
def initialize(budget)
|
def initialize(budget)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
class Budgets::SubheaderComponent < ApplicationComponent
|
class Budgets::SubheaderComponent < ApplicationComponent
|
||||||
delegate :current_user, :link_to_signin, :link_to_signup, :link_to_verify_account, :can?, to: :helpers
|
use_helpers :current_user, :link_to_signin, :link_to_signup, :link_to_verify_account, :can?
|
||||||
attr_reader :budget
|
attr_reader :budget
|
||||||
|
|
||||||
def initialize(budget)
|
def initialize(budget)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
class Budgets::SupportsInfoComponent < ApplicationComponent
|
class Budgets::SupportsInfoComponent < ApplicationComponent
|
||||||
delegate :current_user, to: :helpers
|
use_helpers :current_user
|
||||||
attr_reader :budget
|
attr_reader :budget
|
||||||
|
|
||||||
def initialize(budget)
|
def initialize(budget)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ class Debates::FormComponent < ApplicationComponent
|
|||||||
include TranslatableFormHelper
|
include TranslatableFormHelper
|
||||||
include GlobalizeHelper
|
include GlobalizeHelper
|
||||||
attr_reader :debate
|
attr_reader :debate
|
||||||
delegate :suggest_data, to: :helpers
|
use_helpers :suggest_data
|
||||||
|
|
||||||
def initialize(debate)
|
def initialize(debate)
|
||||||
@debate = debate
|
@debate = debate
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
class Debates::NewComponent < ApplicationComponent
|
class Debates::NewComponent < ApplicationComponent
|
||||||
include Header
|
include Header
|
||||||
attr_reader :debate
|
attr_reader :debate
|
||||||
delegate :new_window_link_to, to: :helpers
|
use_helpers :new_window_link_to
|
||||||
|
|
||||||
def initialize(debate)
|
def initialize(debate)
|
||||||
@debate = debate
|
@debate = debate
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Debates::VotesComponent < ApplicationComponent
|
class Debates::VotesComponent < ApplicationComponent
|
||||||
attr_reader :debate
|
attr_reader :debate
|
||||||
delegate :current_user, :link_to_verify_account, to: :helpers
|
use_helpers :current_user, :link_to_verify_account
|
||||||
|
|
||||||
def initialize(debate)
|
def initialize(debate)
|
||||||
@debate = debate
|
@debate = debate
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
class Documents::DocumentComponent < ApplicationComponent
|
class Documents::DocumentComponent < ApplicationComponent
|
||||||
attr_reader :document, :show_destroy_link
|
attr_reader :document, :show_destroy_link
|
||||||
alias_method :show_destroy_link?, :show_destroy_link
|
alias_method :show_destroy_link?, :show_destroy_link
|
||||||
delegate :can?, to: :helpers
|
use_helpers :can?
|
||||||
|
|
||||||
def initialize(document, show_destroy_link: false)
|
def initialize(document, show_destroy_link: false)
|
||||||
@document = document
|
@document = document
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Layout::AdminHeaderComponent < ApplicationComponent
|
class Layout::AdminHeaderComponent < ApplicationComponent
|
||||||
attr_reader :user
|
attr_reader :user
|
||||||
delegate :namespace, :namespaced_root_path, :show_admin_menu?, to: :helpers
|
use_helpers :namespace, :namespaced_root_path, :show_admin_menu?
|
||||||
|
|
||||||
def initialize(user)
|
def initialize(user)
|
||||||
@user = user
|
@user = user
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Layout::AdminLoginItemsComponent < ApplicationComponent
|
class Layout::AdminLoginItemsComponent < ApplicationComponent
|
||||||
attr_reader :user
|
attr_reader :user
|
||||||
delegate :link_list, :show_admin_menu?, to: :helpers
|
use_helpers :link_list, :show_admin_menu?
|
||||||
|
|
||||||
def initialize(user)
|
def initialize(user)
|
||||||
@user = user
|
@user = user
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
class Layout::CommonHTMLAttributesComponent < ApplicationComponent
|
class Layout::CommonHTMLAttributesComponent < ApplicationComponent
|
||||||
delegate :rtl?, to: :helpers
|
use_helpers :rtl?
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
class Layout::FooterComponent < ApplicationComponent
|
class Layout::FooterComponent < ApplicationComponent
|
||||||
delegate :content_block, to: :helpers
|
use_helpers :content_block
|
||||||
|
|
||||||
def footer_legal_content_block
|
def footer_legal_content_block
|
||||||
content_block("footer_legal")
|
content_block("footer_legal")
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
class Layout::LocaleSwitcherComponent < ApplicationComponent
|
class Layout::LocaleSwitcherComponent < ApplicationComponent
|
||||||
delegate :name_for_locale, :link_list, :current_path_with_query_params, :rtl?, to: :helpers
|
use_helpers :name_for_locale, :link_list, :current_path_with_query_params, :rtl?
|
||||||
|
|
||||||
def render?
|
def render?
|
||||||
locales.size > 1
|
locales.size > 1
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Layout::LoginItemsComponent < ApplicationComponent
|
class Layout::LoginItemsComponent < ApplicationComponent
|
||||||
attr_reader :user
|
attr_reader :user
|
||||||
delegate :layout_menu_link_to, to: :helpers
|
use_helpers :layout_menu_link_to
|
||||||
|
|
||||||
def initialize(user)
|
def initialize(user)
|
||||||
@user = user
|
@user = user
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
class Layout::SocialComponent < ApplicationComponent
|
class Layout::SocialComponent < ApplicationComponent
|
||||||
delegate :content_block, to: :helpers
|
use_helpers :content_block
|
||||||
|
|
||||||
def render?
|
def render?
|
||||||
sites.any? || footer_content_block.present?
|
sites.any? || footer_content_block.present?
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
class Layout::SubnavigationComponent < ApplicationComponent
|
class Layout::SubnavigationComponent < ApplicationComponent
|
||||||
delegate :content_block, :layout_menu_link_to, to: :helpers
|
use_helpers :content_block, :layout_menu_link_to
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
class Layout::TopLinksComponent < ApplicationComponent
|
class Layout::TopLinksComponent < ApplicationComponent
|
||||||
delegate :content_block, to: :helpers
|
use_helpers :content_block
|
||||||
|
|
||||||
def render?
|
def render?
|
||||||
top_links_content_block.present?
|
top_links_content_block.present?
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Legislation::Proposals::VotesComponent < ApplicationComponent
|
class Legislation::Proposals::VotesComponent < ApplicationComponent
|
||||||
attr_reader :proposal
|
attr_reader :proposal
|
||||||
delegate :current_user, :link_to_verify_account, :can?, to: :helpers
|
use_helpers :current_user, :link_to_verify_account, :can?
|
||||||
|
|
||||||
def initialize(proposal)
|
def initialize(proposal)
|
||||||
@proposal = proposal
|
@proposal = proposal
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
class MachineLearning::InfoComponent < ApplicationComponent
|
class MachineLearning::InfoComponent < ApplicationComponent
|
||||||
delegate :current_user, to: :helpers
|
use_helpers :current_user
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Management::Budgets::PrintInvestments::TableComponent < ApplicationComponent
|
class Management::Budgets::PrintInvestments::TableComponent < ApplicationComponent
|
||||||
attr_reader :budgets
|
attr_reader :budgets
|
||||||
delegate :paginate, to: :helpers
|
use_helpers :paginate
|
||||||
|
|
||||||
def initialize(budgets)
|
def initialize(budgets)
|
||||||
@budgets = budgets
|
@budgets = budgets
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Polls::Questions::AnswersComponent < ApplicationComponent
|
class Polls::Questions::AnswersComponent < ApplicationComponent
|
||||||
attr_reader :question
|
attr_reader :question
|
||||||
delegate :can?, :current_user, :user_signed_in?, to: :helpers
|
use_helpers :can?, :current_user, :user_signed_in?
|
||||||
|
|
||||||
def initialize(question)
|
def initialize(question)
|
||||||
@question = question
|
@question = question
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
class Polls::Questions::ReadMoreComponent < ApplicationComponent
|
class Polls::Questions::ReadMoreComponent < ApplicationComponent
|
||||||
with_collection_parameter :question
|
with_collection_parameter :question
|
||||||
attr_reader :question
|
attr_reader :question
|
||||||
delegate :wysiwyg, to: :helpers
|
use_helpers :wysiwyg
|
||||||
|
|
||||||
def initialize(question:)
|
def initialize(question:)
|
||||||
@question = question
|
@question = question
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ class Proposals::FormComponent < ApplicationComponent
|
|||||||
include TranslatableFormHelper
|
include TranslatableFormHelper
|
||||||
include GlobalizeHelper
|
include GlobalizeHelper
|
||||||
attr_reader :proposal, :url
|
attr_reader :proposal, :url
|
||||||
delegate :current_user, :suggest_data, :geozone_select_options, to: :helpers
|
use_helpers :current_user, :suggest_data, :geozone_select_options
|
||||||
|
|
||||||
def initialize(proposal, url:)
|
def initialize(proposal, url:)
|
||||||
@proposal = proposal
|
@proposal = proposal
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
class Proposals::GeozonesComponent < ApplicationComponent
|
class Proposals::GeozonesComponent < ApplicationComponent
|
||||||
delegate :image_path_for, to: :helpers
|
use_helpers :image_path_for
|
||||||
|
|
||||||
def render?
|
def render?
|
||||||
Geozone.any?
|
Geozone.any?
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
class Proposals::NewComponent < ApplicationComponent
|
class Proposals::NewComponent < ApplicationComponent
|
||||||
include Header
|
include Header
|
||||||
attr_reader :proposal
|
attr_reader :proposal
|
||||||
delegate :new_window_link_to, to: :helpers
|
use_helpers :new_window_link_to
|
||||||
|
|
||||||
def initialize(proposal)
|
def initialize(proposal)
|
||||||
@proposal = proposal
|
@proposal = proposal
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Proposals::VotesComponent < ApplicationComponent
|
class Proposals::VotesComponent < ApplicationComponent
|
||||||
attr_reader :proposal
|
attr_reader :proposal
|
||||||
delegate :current_user, :link_to_verify_account, to: :helpers
|
use_helpers :current_user, :link_to_verify_account
|
||||||
|
|
||||||
def initialize(proposal, vote_url: nil)
|
def initialize(proposal, vote_url: nil)
|
||||||
@proposal = proposal
|
@proposal = proposal
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Relationable::RelatedListComponent < ApplicationComponent
|
class Relationable::RelatedListComponent < ApplicationComponent
|
||||||
attr_reader :relationable
|
attr_reader :relationable
|
||||||
delegate :current_user, to: :helpers
|
use_helpers :current_user
|
||||||
|
|
||||||
def initialize(relationable)
|
def initialize(relationable)
|
||||||
@relationable = relationable
|
@relationable = relationable
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class SDG::FilterLinksComponent < ApplicationComponent
|
class SDG::FilterLinksComponent < ApplicationComponent
|
||||||
attr_reader :records, :related_model, :see_more_link
|
attr_reader :records, :related_model, :see_more_link
|
||||||
delegate :link_list, to: :helpers
|
use_helpers :link_list
|
||||||
|
|
||||||
def initialize(records, related_model, see_more_link: nil)
|
def initialize(records, related_model, see_more_link: nil)
|
||||||
@records = records
|
@records = records
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class SDG::Goals::IndexComponent < ApplicationComponent
|
class SDG::Goals::IndexComponent < ApplicationComponent
|
||||||
attr_reader :goals, :header, :phases
|
attr_reader :goals, :header, :phases
|
||||||
delegate :link_list, to: :helpers
|
use_helpers :link_list
|
||||||
|
|
||||||
def initialize(goals, header:, phases:)
|
def initialize(goals, header:, phases:)
|
||||||
@goals = goals
|
@goals = goals
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class SDG::RelatedListSelectorComponent < ApplicationComponent
|
class SDG::RelatedListSelectorComponent < ApplicationComponent
|
||||||
attr_reader :f
|
attr_reader :f
|
||||||
delegate :new_window_link_to, to: :helpers
|
use_helpers :new_window_link_to
|
||||||
|
|
||||||
def initialize(form)
|
def initialize(form)
|
||||||
@f = form
|
@f = form
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Shared::AgreeWithTermsOfServiceFieldComponent < ApplicationComponent
|
class Shared::AgreeWithTermsOfServiceFieldComponent < ApplicationComponent
|
||||||
attr_reader :form
|
attr_reader :form
|
||||||
delegate :new_window_link_to, to: :helpers
|
use_helpers :new_window_link_to
|
||||||
|
|
||||||
def initialize(form)
|
def initialize(form)
|
||||||
@form = form
|
@form = form
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Shared::AvatarComponent < ApplicationComponent
|
class Shared::AvatarComponent < ApplicationComponent
|
||||||
attr_reader :record, :given_options
|
attr_reader :record, :given_options
|
||||||
delegate :avatar_image, to: :helpers
|
use_helpers :avatar_image
|
||||||
|
|
||||||
def initialize(record, **given_options)
|
def initialize(record, **given_options)
|
||||||
@record = record
|
@record = record
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Shared::CommentsComponent < ApplicationComponent
|
class Shared::CommentsComponent < ApplicationComponent
|
||||||
attr_reader :record, :comment_tree
|
attr_reader :record, :comment_tree
|
||||||
delegate :current_user, :current_order, :locale_and_user_status, :commentable_cache_key, to: :helpers
|
use_helpers :current_user, :current_order, :locale_and_user_status, :commentable_cache_key
|
||||||
|
|
||||||
def initialize(record, comment_tree)
|
def initialize(record, comment_tree)
|
||||||
@record = record
|
@record = record
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Shared::GeozoneLinkComponent < ApplicationComponent
|
class Shared::GeozoneLinkComponent < ApplicationComponent
|
||||||
attr_reader :geozonable, :link
|
attr_reader :geozonable, :link
|
||||||
delegate :geozone_name, to: :helpers
|
use_helpers :geozone_name
|
||||||
|
|
||||||
def initialize(geozonable, link)
|
def initialize(geozonable, link)
|
||||||
@geozonable = geozonable
|
@geozonable = geozonable
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Shared::InFavorAgainstComponent < ApplicationComponent
|
class Shared::InFavorAgainstComponent < ApplicationComponent
|
||||||
attr_reader :votable
|
attr_reader :votable
|
||||||
delegate :votes_percentage, to: :helpers
|
use_helpers :votes_percentage
|
||||||
|
|
||||||
def initialize(votable)
|
def initialize(votable)
|
||||||
@votable = votable
|
@votable = votable
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Shared::ModerationActionsComponent < ApplicationComponent
|
class Shared::ModerationActionsComponent < ApplicationComponent
|
||||||
attr_reader :record
|
attr_reader :record
|
||||||
delegate :can?, to: :helpers
|
use_helpers :can?
|
||||||
|
|
||||||
def initialize(record)
|
def initialize(record)
|
||||||
@record = record
|
@record = record
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Shared::OrderLinksComponent < ApplicationComponent
|
class Shared::OrderLinksComponent < ApplicationComponent
|
||||||
attr_reader :i18n_namespace, :anchor
|
attr_reader :i18n_namespace, :anchor
|
||||||
delegate :current_path_with_query_params, :current_order, :valid_orders, to: :helpers
|
use_helpers :current_path_with_query_params, :current_order, :valid_orders
|
||||||
|
|
||||||
def initialize(i18n_namespace, anchor: nil)
|
def initialize(i18n_namespace, anchor: nil)
|
||||||
@i18n_namespace = i18n_namespace
|
@i18n_namespace = i18n_namespace
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Shared::ParticipationNotAllowedComponent < ApplicationComponent
|
class Shared::ParticipationNotAllowedComponent < ApplicationComponent
|
||||||
attr_reader :votable, :cannot_vote_text
|
attr_reader :votable, :cannot_vote_text
|
||||||
delegate :current_user, :link_to_signin, :link_to_signup, to: :helpers
|
use_helpers :current_user, :link_to_signin, :link_to_signup
|
||||||
|
|
||||||
def initialize(votable, cannot_vote_text:)
|
def initialize(votable, cannot_vote_text:)
|
||||||
@votable = votable
|
@votable = votable
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Shared::TagListComponent < ApplicationComponent
|
class Shared::TagListComponent < ApplicationComponent
|
||||||
attr_reader :taggable, :limit
|
attr_reader :taggable, :limit
|
||||||
delegate :link_list, to: :helpers
|
use_helpers :link_list
|
||||||
|
|
||||||
def initialize(taggable, limit:)
|
def initialize(taggable, limit:)
|
||||||
@taggable = taggable
|
@taggable = taggable
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Shared::VoteButtonComponent < ApplicationComponent
|
class Shared::VoteButtonComponent < ApplicationComponent
|
||||||
attr_reader :votable, :value, :options
|
attr_reader :votable, :value, :options
|
||||||
delegate :current_user, :can?, to: :helpers
|
use_helpers :current_user, :can?
|
||||||
|
|
||||||
def initialize(votable, value:, **options)
|
def initialize(votable, value:, **options)
|
||||||
@votable = votable
|
@votable = votable
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Users::PublicActivityComponent < ApplicationComponent
|
class Users::PublicActivityComponent < ApplicationComponent
|
||||||
attr_reader :user
|
attr_reader :user
|
||||||
delegate :current_user, :valid_interests_access?, :current_path_with_query_params, to: :helpers
|
use_helpers :current_user, :valid_interests_access?, :current_path_with_query_params
|
||||||
|
|
||||||
def initialize(user)
|
def initialize(user)
|
||||||
@user = user
|
@user = user
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ class Valuation::Budgets::RowComponent < ApplicationComponent
|
|||||||
attr_reader :budget
|
attr_reader :budget
|
||||||
with_collection_parameter :budget
|
with_collection_parameter :budget
|
||||||
|
|
||||||
delegate :current_user, to: :helpers
|
use_helpers :current_user
|
||||||
|
|
||||||
def initialize(budget:)
|
def initialize(budget:)
|
||||||
@budget = budget
|
@budget = budget
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
class Widget::Feeds::ProcessComponent < ApplicationComponent
|
class Widget::Feeds::ProcessComponent < ApplicationComponent
|
||||||
delegate :image_path_for, to: :helpers
|
use_helpers :image_path_for
|
||||||
attr_reader :process
|
attr_reader :process
|
||||||
|
|
||||||
def initialize(process)
|
def initialize(process)
|
||||||
|
|||||||
Reference in New Issue
Block a user