Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Bertocq
2017-05-23 13:58:18 +02:00
1044 changed files with 40378 additions and 6150 deletions

3
.gitignore vendored
View File

@@ -29,3 +29,6 @@
# Mac finder artifacts # Mac finder artifacts
.DS_Store .DS_Store
.ruby-gemset .ruby-gemset
public/sitemap.xml
public/system/

56
.rubocop.yml Normal file
View File

@@ -0,0 +1,56 @@
inherit_from: .rubocop_todo.yml
AllCops:
Include:
- '**/Rakefile'
- '**/config.ru'
Exclude:
- 'db/**/*'
- 'config/**/*'
- 'script/**/*'
TargetRubyVersion: 2.3
Rails:
Enabled: true
Documentation:
Enabled: false
Metrics/LineLength:
Max: 140
Style/IndentationConsistency:
EnforcedStyle: rails
Style/StringLiterals:
Enabled: false
Style/FrozenStringLiteralComment:
Enabled: false
Style/PercentLiteralDelimiters:
Enabled: false
Style/EmptyLinesAroundClassBody:
Enabled: false
Style/EmptyLinesAroundBlockBody:
Enabled: false
Style/EmptyLinesAroundModuleBody:
Enabled: false
Style/SpaceBeforeBlockBraces:
Enabled: false
Style/SpaceInsideBrackets:
Enabled: false
Style/SpaceInsideHashLiteralBraces:
Enabled: false
Style/SpaceInsideBlockBraces:
Enabled: false
Style/TrailingBlankLines:
Enabled: false

838
.rubocop_todo.yml Normal file
View File

@@ -0,0 +1,838 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2016-11-25 13:34:56 +0100 using RuboCop version 0.45.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.
# Offense count: 3
Lint/AmbiguousRegexpLiteral:
Exclude:
- 'app/helpers/verification_helper.rb'
- 'spec/features/verification/residence_spec.rb'
# Offense count: 3
# Configuration parameters: AllowSafeAssignment.
Lint/AssignmentInCondition:
Exclude:
- 'app/controllers/management/sessions_controller.rb'
- 'app/models/notification.rb'
- 'lib/capistrano/template.rb'
# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: AlignWith, SupportedStyles.
# SupportedStyles: either, start_of_block, start_of_line
Lint/BlockAlignment:
Exclude:
- 'spec/features/tracks_spec.rb'
- 'spec/models/proposal_spec.rb'
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: AlignWith, SupportedStyles, AutoCorrect.
# SupportedStyles: start_of_line, def
Lint/DefEndAlignment:
Exclude:
- 'app/controllers/comments_controller.rb'
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: runtime_error, standard_error
Lint/InheritException:
Exclude:
- 'app/controllers/concerns/feature_flags.rb'
# Offense count: 7
Lint/NestedMethodDefinition:
Exclude:
- 'lib/acts_as_paranoid_aliases.rb'
# Offense count: 13
Lint/ParenthesesAsGroupedExpression:
Exclude:
- 'spec/features/admin/organizations_spec.rb'
- 'spec/features/debates_spec.rb'
- 'spec/features/proposals_spec.rb'
- 'spec/models/debate_spec.rb'
# Offense count: 1
Lint/UnderscorePrefixedVariableName:
Exclude:
- 'lib/manager_authenticator.rb'
# Offense count: 4
# Cop supports --auto-correct.
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
Lint/UnusedBlockArgument:
Exclude:
- 'app/controllers/admin/spending_proposals_controller.rb'
- 'app/models/ahoy/data_source.rb'
- 'spec/spec_helper.rb'
# Offense count: 5
# Cop supports --auto-correct.
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
Lint/UnusedMethodArgument:
Exclude:
- 'app/controllers/organizations/registrations_controller.rb'
- 'app/controllers/users/omniauth_callbacks_controller.rb'
- 'app/controllers/users/registrations_controller.rb'
- 'app/models/abilities/everyone.rb'
- 'app/models/abilities/valuator.rb'
# Offense count: 135
Lint/UselessAssignment:
Enabled: false
# Offense count: 41
Metrics/AbcSize:
Max: 44
# Offense count: 4
# Configuration parameters: CountComments.
Metrics/ClassLength:
Max: 205
# Offense count: 5
Metrics/CyclomaticComplexity:
Max: 8
# Offense count: 52
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives.
# URISchemes: http, https
Metrics/LineLength:
Max: 307
# Offense count: 28
# Configuration parameters: CountComments.
Metrics/MethodLength:
Max: 38
# Offense count: 2
# Configuration parameters: CountComments.
Metrics/ModuleLength:
Max: 193
# Offense count: 3
Metrics/PerceivedComplexity:
Max: 11
# Offense count: 1
# Cop supports --auto-correct.
Performance/RedundantBlockCall:
Exclude:
- 'app/mailers/mailer.rb'
# Offense count: 4
# Cop supports --auto-correct.
Performance/RedundantMatch:
Exclude:
- 'app/controllers/valuation/spending_proposals_controller.rb'
- 'app/helpers/embed_videos_helper.rb'
# Offense count: 2
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: strict, flexible
Rails/Date:
Exclude:
- 'app/controllers/concerns/commentable_actions.rb'
- 'app/models/direct_message.rb'
# Offense count: 4
# Cop supports --auto-correct.
# Configuration parameters: Whitelist.
# Whitelist: find_by_sql
Rails/DynamicFindBy:
Exclude:
- 'app/controllers/users/confirmations_controller.rb'
- 'app/controllers/users/registrations_controller.rb'
- 'spec/features/management/users_spec.rb'
# Offense count: 4
# Cop supports --auto-correct.
# Configuration parameters: Include.
# Include: app/models/**/*.rb
Rails/FindBy:
Exclude:
- 'app/models/setting.rb'
- 'app/models/verification/email.rb'
- 'app/models/verification/management/email.rb'
- 'app/models/verification/residence.rb'
# Offense count: 24
# Cop supports --auto-correct.
# Configuration parameters: Include.
# Include: spec/**/*, test/**/*
Rails/HttpPositionalArguments:
Exclude:
- 'spec/controllers/admin/api/stats_controller_spec.rb'
- 'spec/controllers/concerns/has_filters_spec.rb'
- 'spec/controllers/concerns/has_orders_spec.rb'
- 'spec/controllers/debates_controller_spec.rb'
- 'spec/controllers/management/sessions_controller_spec.rb'
- 'spec/controllers/pages_controller_spec.rb'
- 'spec/controllers/users/registrations_controller_spec.rb'
# Offense count: 12
Rails/OutputSafety:
Exclude:
- 'app/controllers/spending_proposals_controller.rb'
- 'app/helpers/application_helper.rb'
- 'app/helpers/text_with_links_helper.rb'
- 'app/helpers/users_helper.rb'
- 'app/helpers/valuation_helper.rb'
# Offense count: 6
# Cop supports --auto-correct.
Rails/PluralizationGrammar:
Exclude:
- 'spec/features/admin/banners_spec.rb'
- 'spec/features/debates_spec.rb'
- 'spec/features/proposals_spec.rb'
- 'spec/models/residence_spec.rb'
# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: referer, referrer
Rails/RequestReferer:
Exclude:
- 'app/controllers/users/sessions_controller.rb'
# Offense count: 11
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: strict, flexible
Rails/TimeZone:
Exclude:
- 'lib/score_calculator.rb'
- 'spec/controllers/admin/api/stats_controller_spec.rb'
- 'spec/models/ahoy/data_source_spec.rb'
# Offense count: 7
# Cop supports --auto-correct.
# Configuration parameters: Include.
# Include: app/models/**/*.rb
Rails/Validation:
Exclude:
- 'app/models/comment.rb'
- 'app/models/spending_proposal.rb'
- 'app/models/verification/residence.rb'
- 'app/models/verification/sms.rb'
# Offense count: 9
Style/AccessorMethodName:
Exclude:
- 'app/controllers/application_controller.rb'
- 'app/controllers/concerns/commentable_actions.rb'
- 'app/controllers/management/proposals_controller.rb'
- 'app/controllers/management/spending_proposals_controller.rb'
- 'app/controllers/proposals_controller.rb'
# Offense count: 30
# Cop supports --auto-correct.
# Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle, SupportedLastArgumentHashStyles.
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
Style/AlignHash:
Exclude:
- 'spec/features/admin/banners_spec.rb'
# Offense count: 21
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
# SupportedStyles: with_first_parameter, with_fixed_indentation
Style/AlignParameters:
Exclude:
- 'app/helpers/search_helper.rb'
- 'app/models/verification/management/email.rb'
- 'bin/rspec'
- 'bin/spring'
- 'spec/features/admin/spending_proposals_spec.rb'
- 'spec/features/spending_proposals_spec.rb'
- 'spec/features/valuation/spending_proposals_spec.rb'
- 'spec/features/verification/verified_user_spec.rb'
- 'spec/i18n_spec.rb'
- 'spec/models/user_spec.rb'
- 'spec/rails_helper.rb'
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: always, conditionals
Style/AndOr:
Exclude:
- 'app/helpers/embed_videos_helper.rb'
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods.
# SupportedStyles: line_count_based, semantic, braces_for_chaining
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
# FunctionalMethods: let, let!, subject, watch
# IgnoredMethods: lambda, proc, it
Style/BlockDelimiters:
Exclude:
- 'spec/features/users_auth_spec.rb'
# Offense count: 2
# Cop supports --auto-correct.
Style/BlockEndNewline:
Exclude:
- 'app/models/banner.rb'
- 'spec/features/users_auth_spec.rb'
# Offense count: 19
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: braces, no_braces, context_dependent
Style/BracesAroundHashParameters:
Exclude:
- 'app/controllers/valuation/spending_proposals_controller.rb'
- 'app/models/concerns/searchable.rb'
- 'app/models/verification/residence.rb'
- 'lib/manager_authenticator.rb'
- 'spec/controllers/management/users_controller_spec.rb'
- 'spec/features/admin/spending_proposals_spec.rb'
- 'spec/lib/manager_authenticator_spec.rb'
- 'spec/models/residence_spec.rb'
- 'spec/models/user_spec.rb'
# Offense count: 57
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: nested, compact
Style/ClassAndModuleChildren:
Enabled: false
# Offense count: 5
Style/ClassVars:
Exclude:
- 'app/models/concerns/measurable.rb'
- 'app/models/organization.rb'
- 'app/models/user.rb'
# Offense count: 1
# Cop supports --auto-correct.
Style/ClosingParenthesisIndentation:
Exclude:
- 'spec/rails_helper.rb'
# Offense count: 4
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, SingleLineConditionsOnly.
# SupportedStyles: assign_to_condition, assign_inside_condition
Style/ConditionalAssignment:
Exclude:
- 'app/controllers/comments_controller.rb'
- 'app/controllers/management/spending_proposals_controller.rb'
- 'app/controllers/spending_proposals_controller.rb'
- 'app/controllers/verification/sms_controller.rb'
# Offense count: 6
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: leading, trailing
Style/DotPosition:
Exclude:
- 'app/models/banner.rb'
- 'app/models/tag_cloud.rb'
- 'app/models/verification/management/managed_user.rb'
# Offense count: 1
Style/DoubleNegation:
Exclude:
- 'app/models/flag.rb'
# Offense count: 1
# Cop supports --auto-correct.
Style/EmptyCaseCondition:
Exclude:
- 'app/models/concerns/verification.rb'
# Offense count: 9
# Cop supports --auto-correct.
Style/EmptyLines:
Exclude:
- 'app/models/concerns/search_cache.rb'
- 'app/models/notification.rb'
- 'spec/features/admin/spending_proposals_spec.rb'
- 'spec/features/admin/verifications_spec.rb'
- 'spec/features/debates_spec.rb'
- 'spec/features/registration_form_spec.rb'
- 'spec/features/users_auth_spec.rb'
- 'spec/features/verification/verified_user_spec.rb'
- 'spec/support/verifiable.rb'
# Offense count: 1
# Cop supports --auto-correct.
Style/EmptyLinesAroundAccessModifier:
Exclude:
- 'app/controllers/users_controller.rb'
# Offense count: 29
# Cop supports --auto-correct.
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
Style/ExtraSpacing:
Enabled: false
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
# SupportedStyles: consistent, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
Style/FirstParameterIndentation:
Exclude:
- 'app/controllers/users_controller.rb'
# Offense count: 32
# Configuration parameters: MinBodyLength.
Style/GuardClause:
Enabled: false
# Offense count: 10
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
Style/HashSyntax:
Exclude:
- 'lib/sms_api.rb'
- 'spec/factories.rb'
# Offense count: 6
# Cop supports --auto-correct.
# Configuration parameters: MaxLineLength.
Style/IfUnlessModifier:
Exclude:
- 'app/controllers/annotations_controller.rb'
- 'app/controllers/verification/letter_controller.rb'
- 'app/controllers/welcome_controller.rb'
- 'app/helpers/embed_videos_helper.rb'
- 'app/models/proposal.rb'
- 'app/models/spending_proposal.rb'
# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: SupportedStyles, IndentationWidth.
# SupportedStyles: special_inside_parentheses, consistent, align_brackets
Style/IndentArray:
EnforcedStyle: consistent
# Offense count: 4
# Cop supports --auto-correct.
# Configuration parameters: SupportedStyles, IndentationWidth.
# SupportedStyles: special_inside_parentheses, consistent, align_braces
Style/IndentHash:
EnforcedStyle: consistent
# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: normal, rails
Style/IndentationConsistency:
Exclude:
- 'spec/features/tracks_spec.rb'
- 'spec/models/proposal_spec.rb'
# Offense count: 11
# Cop supports --auto-correct.
# Configuration parameters: Width.
Style/IndentationWidth:
Exclude:
- 'app/controllers/annotations_controller.rb'
- 'app/helpers/flags_helper.rb'
- 'app/mailers/devise_mailer.rb'
- 'app/mailers/mailer.rb'
- 'app/models/ahoy/data_source.rb'
- 'app/models/comment_notifier.rb'
- 'app/models/concerns/search_cache.rb'
- 'spec/features/comments/proposals_spec.rb'
- 'spec/features/moderation/users_spec.rb'
- 'spec/features/tracks_spec.rb'
- 'spec/features/verification/verified_user_spec.rb'
# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: line_count_dependent, lambda, literal
Style/Lambda:
Exclude:
- 'app/models/banner.rb'
- 'app/models/direct_message.rb'
# Offense count: 1
# Cop supports --auto-correct.
Style/MethodCallParentheses:
Exclude:
- 'app/controllers/management/document_verifications_controller.rb'
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: require_parentheses, require_no_parentheses, require_no_parentheses_except_multiline
Style/MethodDefParentheses:
Exclude:
- 'spec/helpers/comments_helper_spec.rb'
# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: symmetrical, new_line, same_line
Style/MultilineArrayBraceLayout:
Exclude:
- 'app/controllers/valuation/spending_proposals_controller.rb'
- 'app/helpers/search_helper.rb'
# Offense count: 1
Style/MultilineBlockChain:
Exclude:
- 'app/controllers/valuation/spending_proposals_controller.rb'
# Offense count: 2
# Cop supports --auto-correct.
Style/MultilineBlockLayout:
Exclude:
- 'app/models/banner.rb'
- 'spec/features/users_auth_spec.rb'
# Offense count: 6
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: symmetrical, new_line, same_line
Style/MultilineHashBraceLayout:
Exclude:
- 'app/controllers/valuation/spending_proposals_controller.rb'
- 'app/models/debate.rb'
- 'app/models/proposal.rb'
- 'app/models/spending_proposal.rb'
# Offense count: 2
# Cop supports --auto-correct.
Style/MultilineIfThen:
Exclude:
- 'app/controllers/management/users_controller.rb'
- 'lib/census_api.rb'
# Offense count: 6
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: symmetrical, new_line, same_line
Style/MultilineMethodCallBraceLayout:
Exclude:
- 'app/controllers/users_controller.rb'
- 'app/models/comment.rb'
- 'app/models/organization.rb'
- 'app/models/user.rb'
- 'spec/rails_helper.rb'
# Offense count: 33
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
# SupportedStyles: aligned, indented, indented_relative_to_receiver
Style/MultilineMethodCallIndentation:
Exclude:
- 'app/models/banner.rb'
- 'app/models/tag_cloud.rb'
- 'app/models/verification/management/managed_user.rb'
- 'spec/models/comment_spec.rb'
- 'spec/models/debate_spec.rb'
- 'spec/models/proposal_spec.rb'
- 'spec/models/user_spec.rb'
# Offense count: 5
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
# SupportedStyles: aligned, indented
Style/MultilineOperationIndentation:
Exclude:
- 'app/helpers/users_helper.rb'
- 'app/helpers/valuation_helper.rb'
- 'app/models/verification/letter.rb'
# Offense count: 5
# Cop supports --auto-correct.
Style/MutableConstant:
Exclude:
- 'app/models/activity.rb'
- 'app/models/proposal.rb'
- 'lib/tag_sanitizer.rb'
- 'lib/wysiwyg_sanitizer.rb'
# Offense count: 1
# Cop supports --auto-correct.
Style/NegatedIf:
Exclude:
- 'spec/spec_helper.rb'
# Offense count: 17
# Cop supports --auto-correct.
Style/NestedParenthesizedCalls:
Exclude:
- 'spec/features/debates_spec.rb'
- 'spec/features/valuation/spending_proposals_spec.rb'
- 'spec/helpers/settings_helper_spec.rb'
- 'spec/helpers/verification_helper_spec.rb'
# Offense count: 12
# Cop supports --auto-correct.
Style/NumericLiterals:
MinDigits: 9
# Offense count: 19
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, EnforcedStyle, SupportedStyles.
# SupportedStyles: predicate, comparison
Style/NumericPredicate:
Exclude:
- 'spec/**/*'
- 'app/controllers/users_controller.rb'
- 'app/controllers/valuation/spending_proposals_controller.rb'
- 'app/helpers/banners_helper.rb'
- 'app/helpers/debates_helper.rb'
- 'app/helpers/votes_helper.rb'
- 'app/models/concerns/conflictable.rb'
- 'app/models/concerns/taggable.rb'
- 'app/models/concerns/verification.rb'
- 'app/models/debate.rb'
- 'app/models/lock.rb'
- 'app/models/user.rb'
- 'app/models/verification/management/email.rb'
- 'lib/score_calculator.rb'
# Offense count: 2
# Cop supports --auto-correct.
Style/ParallelAssignment:
Exclude:
- 'lib/active_model/dates.rb'
- 'spec/support/common_actions.rb'
# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: AllowSafeAssignment.
Style/ParenthesesAroundCondition:
Exclude:
- 'app/controllers/proposals_controller.rb'
- 'app/models/debate.rb'
- 'app/models/proposal.rb'
# Offense count: 6
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
# NamePrefix: is_, has_, have_
# NamePrefixBlacklist: is_, has_, have_
# NameWhitelist: is_a?
Style/PredicateName:
Exclude:
- 'spec/**/*'
- 'app/controllers/concerns/has_filters.rb'
- 'app/controllers/concerns/has_orders.rb'
- 'app/helpers/banners_helper.rb'
- 'app/helpers/debates_helper.rb'
- 'app/models/user.rb'
- 'lib/census_api.rb'
# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: compact, exploded
Style/RaiseArgs:
Exclude:
- 'app/controllers/management/base_controller.rb'
- 'app/controllers/users/omniauth_callbacks_controller.rb'
- 'app/controllers/valuation/spending_proposals_controller.rb'
# Offense count: 16
# Cop supports --auto-correct.
Style/RedundantParentheses:
Exclude:
- 'app/controllers/admin/settings_controller.rb'
- 'app/helpers/proposals_helper.rb'
- 'spec/features/admin/organizations_spec.rb'
- 'spec/features/debates_spec.rb'
- 'spec/features/proposals_spec.rb'
- 'spec/models/debate_spec.rb'
# Offense count: 5
# Cop supports --auto-correct.
# Configuration parameters: AllowMultipleReturnValues.
Style/RedundantReturn:
Exclude:
- 'app/models/ahoy/data_source.rb'
- 'app/models/verification/management/document.rb'
- 'lib/capistrano/template.rb'
- 'lib/census_api.rb'
# Offense count: 49
# Cop supports --auto-correct.
Style/RedundantSelf:
Enabled: false
# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes.
# SupportedStyles: slashes, percent_r, mixed
Style/RegexpLiteral:
Exclude:
- 'app/helpers/embed_videos_helper.rb'
- 'spec/customization_engine_spec.rb'
# Offense count: 2
# Cop supports --auto-correct.
Style/RescueModifier:
Exclude:
- 'app/controllers/concerns/commentable_actions.rb'
- 'app/controllers/verification/sms_controller.rb'
# Offense count: 2
# Cop supports --auto-correct.
Style/SpaceAfterColon:
Exclude:
- 'spec/models/user_spec.rb'
# Offense count: 14
# Cop supports --auto-correct.
Style/SpaceAfterComma:
Exclude:
- 'app/models/ahoy/data_source.rb'
- 'app/models/banner.rb'
- 'app/models/concerns/search_cache.rb'
- 'app/models/concerns/taggable.rb'
- 'app/models/spending_proposal.rb'
- 'app/models/user.rb'
- 'spec/features/valuation/spending_proposals_spec.rb'
- 'spec/lib/census_api_spec.rb'
- 'spec/models/abilities/moderator_spec.rb'
- 'spec/models/verification/management/email_spec.rb'
# Offense count: 1
# Cop supports --auto-correct.
Style/SpaceAfterNot:
Exclude:
- 'app/models/flag.rb'
# Offense count: 20
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: space, no_space
Style/SpaceAroundEqualsInParameterDefault:
Exclude:
- 'app/helpers/cache_keys_helper.rb'
- 'app/helpers/proposals_helper.rb'
- 'app/helpers/spending_proposals_helper.rb'
- 'app/helpers/stats_helper.rb'
- 'app/helpers/tracks_helper.rb'
- 'app/helpers/valuation_helper.rb'
- 'app/mailers/devise_mailer.rb'
- 'app/models/comment.rb'
- 'app/models/tag_cloud.rb'
- 'app/models/verification/residence.rb'
- 'lib/acts_as_paranoid_aliases.rb'
- 'lib/capistrano/template.rb'
- 'lib/census_api.rb'
- 'lib/manager_authenticator.rb'
- 'spec/support/common_actions.rb'
# Offense count: 66
# Cop supports --auto-correct.
# Configuration parameters: AllowForAlignment.
Style/SpaceAroundOperators:
Enabled: false
# Offense count: 6
# Cop supports --auto-correct.
Style/SpaceBeforeComma:
Exclude:
- 'app/models/proposal.rb'
- 'spec/controllers/management/sessions_controller_spec.rb'
- 'spec/controllers/management/users_controller_spec.rb'
# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: AllowForAlignment.
Style/SpaceBeforeFirstArg:
Exclude:
- 'spec/factories.rb'
# Offense count: 9
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: require_no_space, require_space
Style/SpaceInLambdaLiteral:
Exclude:
- 'app/models/concerns/filterable.rb'
- 'app/models/spending_proposal.rb'
- 'app/models/user.rb'
- 'app/models/verified_user.rb'
# Offense count: 8
# Cop supports --auto-correct.
Style/SpaceInsideParens:
Exclude:
- 'app/models/user.rb'
- 'lib/manager_authenticator.rb'
- 'spec/features/proposals_spec.rb'
- 'spec/models/abilities/moderator_spec.rb'
# Offense count: 2
# Cop supports --auto-correct.
Style/SpaceInsidePercentLiteralDelimiters:
Exclude:
- 'app/models/activity.rb'
# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: single_quotes, double_quotes
Style/StringLiteralsInInterpolation:
Exclude:
- 'app/controllers/stats_controller.rb'
- 'app/models/proposal.rb'
# Offense count: 9
# Cop supports --auto-correct.
# Configuration parameters: IgnoredMethods.
# IgnoredMethods: respond_to, define_method
Style/SymbolProc:
Exclude:
- 'app/controllers/admin/settings_controller.rb'
- 'app/controllers/notifications_controller.rb'
- 'app/controllers/organizations/registrations_controller.rb'
- 'lib/manager_authenticator.rb'
- 'spec/factories.rb'
# Offense count: 2
# Cop supports --auto-correct.
Style/TrailingWhitespace:
Exclude:
- 'app/controllers/admin/api/stats_controller.rb'
# Offense count: 31
# Cop supports --auto-correct.
Style/UnneededInterpolation:
Exclude:
- 'app/controllers/users/omniauth_callbacks_controller.rb'
- 'spec/factories.rb'
- 'spec/features/campaigns_spec.rb'
- 'spec/features/management/managed_users_spec.rb'
- 'spec/features/management/proposals_spec.rb'
- 'spec/features/management/spending_proposals_spec.rb'
- 'spec/models/residence_spec.rb'
- 'spec/models/spending_proposal_spec.rb'
# Offense count: 13
# Configuration parameters: SupportedStyles.
# SupportedStyles: snake_case, normalcase, non_integer
Style/VariableNumber:
EnforcedStyle: normalcase
# Offense count: 9
# Cop supports --auto-correct.
# Configuration parameters: SupportedStyles, WordRegex.
# SupportedStyles: percent, brackets
Style/WordArray:
EnforcedStyle: percent
MinSize: 3
# Offense count: 1
# Cop supports --auto-correct.
Style/ZeroLengthPredicate:
Exclude:
- 'app/models/concerns/verification.rb'

View File

@@ -1 +1 @@
2.2.3 2.3.2

View File

@@ -2,9 +2,16 @@ language: ruby
addons: addons:
postgresql: "9.4" postgresql: "9.4"
rvm: rvm:
- "2.2.3" - "2.3.2"
cache: bundler cache: bundler
before_script: before_script:
- "for i in config/*.example; do cp \"$i\" \"${i/.example}\"; done" - "for i in config/*.example; do cp \"$i\" \"${i/.example}\"; done"
- bundle exec rake db:setup - bundle exec rake db:setup
script: bundle exec rake script:
- "bundle exec rake knapsack:rspec"
env:
global:
- CI_NODE_TOTAL=2
matrix:
- CI_NODE_INDEX=0
- CI_NODE_INDEX=1

View File

@@ -34,6 +34,16 @@ If you want to contribute code to solve an issue:
* Follow these [best practices](https://github.com/styleguide/ruby) * Follow these [best practices](https://github.com/styleguide/ruby)
* Open a *pull request* to the main repository describing what issue you are addressing. * Open a *pull request* to the main repository describing what issue you are addressing.
## Cleaning up
In the rush of time sometimes things get messy, you can help us cleaning things up:
* implement [pending specs](https://travis-ci.org/consul/consul)
* increase [code coverage](https://coveralls.io/github/consul/consul?branch=master)
* improve [code quality](https://codeclimate.com/github/consul/consul)
* update [dependencies](https://gemnasium.com/consul/consul)
* make [code consistent](https://github.com/bbatsov/rubocop)
## Other ways of contributing without coding ## Other ways of contributing without coding
* If you think there's a feature missing, or find a bug, create an issue (make sure it has not already been reported). * If you think there's a feature missing, or find a bug, create an issue (make sure it has not already been reported).

View File

@@ -34,6 +34,16 @@ Cuando quieras resolver una incidencia mediante código:
* Sigue estas [buenas prácticas](https://github.com/styleguide/ruby) * Sigue estas [buenas prácticas](https://github.com/styleguide/ruby)
* Envía una *pull request* al repositorio principal indicando la incidencia que se está arreglando * Envía una *pull request* al repositorio principal indicando la incidencia que se está arreglando
## Limpiar
En la urgencia del momento, las cosas a veces se ensucian, puedes ayudarnos a limpiar la casa:
* implementando [tests pendientes](https://travis-ci.org/consul/consul)
* incrementando la [cobertura de tests](https://coveralls.io/github/consul/consul?branch=master)
* mejorando la [calidad del código](https://codeclimate.com/github/consul/consul)
* actualizando [dependecias](https://gemnasium.com/consul/consul)
* haciendo el [código consistente](https://github.com/bbatsov/rubocop)
## Otras formas de contribuir sin código ## Otras formas de contribuir sin código
* Si crees que hay una funcionalidad que hace falta, o descubres un problema, abre una incidencia (asegúrate de que * Si crees que hay una funcionalidad que hace falta, o descubres un problema, abre una incidencia (asegúrate de que

221
CUSTOMIZE_ES.md Normal file
View File

@@ -0,0 +1,221 @@
# Personalización
Puedes modificar consul y ponerle tu propia imagen, para esto debes primero hacer un fork de [https://github.com/consul/consul](https://github.com/consul/consul) creando un repositorio nuevo en Github. Puedes usar otro servicio como Gitlab, pero no te olvides de poner el enlace en el footer a tu repositorio en cumplimiento con la licencia de este proyecto (GPL Affero 3).
Hemos creado una estructura específica donde puedes sobreescribir y personalizar la aplicación para que puedas actualizar sin que tengas problemas al hacer merge y se sobreescriban por error tus cambios. Intentamos que Consul sea una aplicación Ruby on Rails lo más plain vanilla posible para facilitar el acceso de nuevas desarrolladoras.
## Ficheros y directorios especiales
Para adaptarlo puedes hacerlo a través de los directorios que están en custom dentro de:
* `config/locales/custom/`
* `app/assets/images/custom/`
* `app/views/custom/`
* `app/controllers/custom/`
* `app/models/custom/`
Aparte de estos directorios también cuentas con ciertos ficheros para:
* `app/assets/stylesheets/custom.css`
* `app/assets/stylesheets/_custom_settings.css`
* `app/assets/javascripts/custom.js`
* `Gemfile_custom`
* `config/application.custom.rb`
### Internacionalización
Si quieres modificar algún texto de la web deberías encontrarlos en los ficheros formato YML disponibles en `config/locales/`. Puedes leer la [guía de internacionalización](http://guides.rubyonrails.org/i18n.html) de Ruby on Rails sobre como funciona este sistema.
Las adaptaciones los debes poner en el directorio `config/locales/custom/`, recomendamos poner solo los textos que quieras personalizar. Por ejemplo si quieres personalizar el texto de "Ayuntamiento de Madrid, 2016" que se encuentra en el footer en todas las páginas, primero debemos ubicar en que plantilla se encuentra (`app/views/layouts/_footer.html.erb`), vemos que en el código pone lo siguiente:
```ruby
<%= t("layouts.footer.copyright", year: Time.current.year) %>
```
Y que en el fichero `config/locales/es.yml` sigue esta estructura (solo ponemos lo relevante para este caso):
```yml
es:
layouts:
footer:
copyright: Ayuntamiento de Madrid, %{year}
```
Si creamos el fichero `config/locales/custom/es.yml` y modificamos "Ayuntamiento de Madrid" por el nombre de la organización que se este haciendo la modificación. Recomendamos directamente copiar los ficheros `config/locales/` e ir revisando y corrigiendo las que querramos, borrando las líneas que no querramos traducir.
### Imágenes
Si quieres sobreescribir alguna imagen debes primero fijarte el nombre que tiene, por defecto se encuentran en `app/assets/images`. Por ejemplo si quieres modificar `app/assets/images/logo_header.png` debes poner otra con ese mismo nombre en el directorio `app/assets/images/custom`. Los iconos que seguramente quieras modificar son:
* apple-touch-icon-200.png
* icon_home.png
* logo_email.png
* logo_header.png
* map.jpg
* social-media-icon.png
### Vistas (HTML)
Si quieres modificar el HTML de alguna página puedes hacerlo copiando el HTML de `app/views` y poniendolo en `app/views/custom` respetando los subdirectorios que encuentres ahí. Por ejemplo si quieres modificar `app/views/pages/conditions.html` debes copiarlo y modificarla en `app/views/custom/pages/conditions.html.erb`
### CSS
Si quieres cambiar algun selector CSS (de las hojas de estilo) puedes hacerlo en el fichero `app/assets/stylesheets/custom.scss`. Por ejemplo si quieres cambiar el color del header (`.top-links`) puedes hacerlo agregando:
```css
.top-links {
background: red;
}
```
Si quieres cambiar alguna variable de foundation puedes hacerlo en el fichero `app/assets/stylesheets/_custom_settings.scss`. Por ejemplo para cambiar el color general de la aplicación puedes hacerlo agregando:
```css
$brand: #446336;
```
Usamos un preprocesador de CSS, [SASS, con la sintaxis SCSS](http://sass-lang.com/guide).
### Javascript
Si quieres agregar código Javascript puedes hacerlo en el fichero `app/assets/javascripts/custom.js`. Por ejemplo si quieres que salga una alerta puedes poner lo siguiente:
```js
$(function(){
alert('foobar');
});
```
### Modelos
Si quieres agregar modelos nuevos, o modificar o agregar métodos a uno ya existente puedes hacerlo en `app/models/custom`. En el caso de los modelos antiguos debes primero hacer un require de la dependencia.
Por ejemplo en el caso del Ayuntamiento de Madrid se requiere comprobar que el código postal durante la verificación sigue un cierto formato (empieza con 280). Esto se realiza creando este fichero en `app/models/custom/verification/residence.rb`:
```ruby
require_dependency Rails.root.join('app', 'models', 'verification', 'residence').to_s
class Verification::Residence
validate :postal_code_in_madrid
validate :residence_in_madrid
def postal_code_in_madrid
errors.add(:postal_code, I18n.t('verification.residence.new.error_not_allowed_postal_code')) unless valid_postal_code?
end
def residence_in_madrid
return if errors.any?
unless residency_valid?
errors.add(:residence_in_madrid, false)
store_failed_attempt
Lock.increase_tries(user)
end
end
private
def valid_postal_code?
postal_code =~ /^280/
end
end
```
No olvides poner los tests relevantes en `spec/models/custom`, siguiendo con el ejemplo pondriamos lo siguiente en `spec/models/custom/residence_spec.rb`:
```ruby
require 'rails_helper'
describe Verification::Residence do
let(:residence) { build(:verification_residence, document_number: "12345678Z") }
describe "verification" do
describe "postal code" do
it "should be valid with postal codes starting with 280" do
residence.postal_code = "28012"
residence.valid?
expect(residence.errors[:postal_code].size).to eq(0)
residence.postal_code = "28023"
residence.valid?
expect(residence.errors[:postal_code].size).to eq(0)
end
it "should not be valid with postal codes not starting with 280" do
residence.postal_code = "12345"
residence.valid?
expect(residence.errors[:postal_code].size).to eq(1)
residence.postal_code = "13280"
residence.valid?
expect(residence.errors[:postal_code].size).to eq(1)
expect(residence.errors[:postal_code]).to include("In order to be verified, you must be registered in the municipality of Madrid.")
end
end
end
end
```
### Controladores
TODO
### Gemfile
Para agregar librerías (gems) nuevas puedes hacerlo en el fichero `Gemfile_custom`. Por ejemplo si quieres agregar la gema [rails-footnotes](https://github.com/josevalim/rails-footnotes) debes hacerlo agregandole
```ruby
gem 'rails-footnotes', '~> 4.0'
```
Y siguiendo el flujo clásico en Ruby on Rails (`bundle install` y seguir con los pasos específicos de la gema en la documentación)
### application.rb
Cuando necesites extender o modificar el `config/application.rb` puedes hacerlo a través del fichero `config/application_custom.rb`. Por ejemplo si quieres modificar el idioma por defecto al inglés pondrías lo siguiente:
```ruby
module Consul
class Application < Rails::Application
config.i18n.default_locale = :en
config.i18n.available_locales = [:en, :es]
end
end
```
Recuerda que para ver reflejado estos cambios debes reiniciar el servidor de desarrollo.
### lib/
TODO
### public/
TODO
### Seeds
TODO
## Actualizar
Te recomendamos que agregues el remote de consul para facilitar este proceso de merge:
```
$ git remote add consul https://github.com/consul/consul
```
Con esto puedes actualizarte con
```
git checkout -b consul_update
git pull consul master
```

10
Capfile
View File

@@ -4,13 +4,17 @@ require 'capistrano/setup'
# Include default deployment tasks # Include default deployment tasks
require 'capistrano/deploy' require 'capistrano/deploy'
require 'capistrano/rvm' require "capistrano/bundler"
require 'capistrano/bundler'
require 'capistrano/rails/assets' require 'capistrano/rails/assets'
require 'capistrano/rails/migrations' require 'capistrano/rails/migrations'
#require 'capistrano/passenger' #require 'capistrano/passenger'
require 'capistrano/delayed-job' require 'capistrano/delayed_job'
require 'whenever/capistrano' require 'whenever/capistrano'
require 'rvm1/capistrano3'
#SCM: Git
require "capistrano/scm/git"
install_plugin Capistrano::SCM::Git
# Load custom tasks from `lib/capistrano/tasks` if you have any defined # Load custom tasks from `lib/capistrano/tasks` if you have any defined
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r } Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }

95
Gemfile
View File

@@ -1,64 +1,71 @@
source 'https://rubygems.org' source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.6' gem 'rails', '4.2.8'
# Use PostgreSQL # Use PostgreSQL
gem 'pg' gem 'pg', '~> 0.20.0'
# Use SCSS for stylesheets # Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0', '>= 5.0.4' gem 'sass-rails', '~> 5.0', '>= 5.0.4'
# Use Uglifier as compressor for JavaScript assets # Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0' gem 'uglifier', '~> 3.2.0'
# Use CoffeeScript for .coffee assets and views # Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0' gem 'coffee-rails', '~> 4.2.1'
# See https://github.com/rails/execjs#readme for more supported runtimes # See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby # gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library # Use jquery as the JavaScript library
gem 'jquery-rails' gem 'jquery-rails', '~> 4.3.1'
gem 'jquery-ui-rails' gem 'jquery-ui-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks' gem 'turbolinks'
gem 'devise', '~> 3.5.6' # Fix sprockets on the
gem 'sprockets', '~> 3.7.1'
gem 'devise', '~> 3.5.7'
gem 'devise_security_extension'
# Use ActiveModel has_secure_password # Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7' # gem 'bcrypt', '~> 3.1.7'
gem 'omniauth' gem 'omniauth'
gem 'omniauth-twitter' gem 'omniauth-twitter'
gem 'omniauth-facebook', '~> 3.0.0' gem 'omniauth-facebook', '~> 4.0.0'
gem 'omniauth-google-oauth2', '~> 0.4.0' gem 'omniauth-google-oauth2', '~> 0.4.0'
gem 'kaminari' gem 'kaminari', '~> 1.0.1'
gem 'ancestry' gem 'ancestry', '~> 2.2.2'
gem 'acts-as-taggable-on' gem 'acts-as-taggable-on'
gem 'responders' gem 'responders', '~> 2.4.0'
gem 'foundation-rails' gem 'foundation-rails', '~> 6.2.4.0'
gem 'foundation_rails_helper' gem 'foundation_rails_helper', '~> 2.0.0'
gem 'acts_as_votable' gem 'acts_as_votable'
gem 'simple_captcha2', require: 'simple_captcha' gem 'ckeditor', '~> 4.2.3'
gem 'ckeditor', '~> 4.1.5' gem 'invisible_captcha', '~> 0.9.2'
gem 'cancancan' gem 'cancancan', '~> 1.16.0'
gem 'social-share-button', git: 'https://github.com/huacnlee/social-share-button.git', ref: 'e46a6a3e82b86023bc' gem 'social-share-button', '~> 0.10'
gem 'initialjs-rails', '0.2.0.1' gem 'initialjs-rails', '0.2.0.4'
gem 'unicorn', '~> 5.1.0' gem 'unicorn', '~> 5.3.0'
gem 'paranoia' gem 'paranoia', '~> 2.3.1'
gem 'rinku', require: 'rails_rinku' gem 'rinku', '~> 2.0.2', require: 'rails_rinku'
gem 'savon' gem 'savon'
gem 'dalli' gem 'dalli'
gem 'rollbar', '~> 2.8.0' gem 'rollbar', '~> 2.14.1'
gem 'delayed_job_active_record', '~> 4.1.0' gem 'delayed_job_active_record', '~> 4.1.0'
gem 'daemons' gem 'daemons'
gem 'devise-async' gem 'devise-async'
gem 'newrelic_rpm', '~> 3.14' gem 'newrelic_rpm', '~> 4.1.0.333'
gem 'whenever', require: false gem 'whenever', require: false
gem 'pg_search' gem 'pg_search'
gem 'sitemap_generator', '~> 5.3.1'
gem 'ahoy_matey', '~> 1.2.1' gem 'ahoy_matey', '~> 1.6.0'
gem 'groupdate' # group temporary data gem 'groupdate', '~> 3.2.0' # group temporary data
gem 'tolk' # Web interface for translations gem 'tolk', '~> 2.0.0' # Web interface for translations
gem 'browser' gem 'browser'
gem 'turnout' gem 'turnout', '~> 2.4.0'
gem 'redcarpet' gem 'redcarpet', '~> 3.4.0'
gem 'paperclip'
group :development, :test do group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console # Call 'byebug' anywhere in the code to stop execution and get a debugger console
@@ -66,31 +73,35 @@ group :development, :test do
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring' gem 'spring'
gem 'spring-commands-rspec' gem 'spring-commands-rspec'
gem 'rspec-rails', '~> 3.3' gem 'rspec-rails', '~> 3.6'
gem 'capybara' gem 'capybara', '~> 2.14.0'
gem 'factory_girl_rails' gem 'factory_girl_rails', '~> 4.8.0'
gem 'fuubar' gem 'fuubar'
gem 'launchy' gem 'launchy'
gem 'quiet_assets' gem 'quiet_assets'
gem 'letter_opener_web', '~> 1.3.0' gem 'letter_opener_web', '~> 1.3.1'
gem 'i18n-tasks' gem 'i18n-tasks', '~> 0.9.15'
gem 'capistrano', '3.4.0', require: false gem 'capistrano', '~> 3.8.1', require: false
gem "capistrano-bundler", '1.1.4', require: false gem 'capistrano-bundler', '~> 1.2', require: false
gem "capistrano-rails", '1.1.6', require: false gem "capistrano-rails", '~> 1.2.3', require: false
gem "capistrano-rvm", require: false gem 'rvm1-capistrano3', require: false
gem 'capistrano3-delayed-job', '~> 1.0' gem 'capistrano3-delayed-job', '~> 1.7.3'
gem "bullet" gem "bullet", '~> 5.5.1'
gem "faker" gem "faker", '~> 1.7.3'
gem 'rubocop', '~> 0.48.1', require: false
gem 'knapsack'
end end
group :test do group :test do
gem 'database_cleaner' gem 'database_cleaner'
gem 'poltergeist' gem 'poltergeist', '~> 1.15.0'
gem 'coveralls', require: false gem 'coveralls', '~> 0.8.21', require: false
gem 'email_spec' gem 'email_spec'
end end
group :development do group :development do
# Access an IRB console on exception pages or by using <%= console %> in views # Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 3.0' gem 'web-console', '3.3.0'
end end
eval_gemfile './Gemfile_custom'

View File

@@ -1,99 +1,92 @@
GIT
remote: https://github.com/huacnlee/social-share-button.git
revision: e46a6a3e82b86023bc43b72c9379d3c6afe36b6b
ref: e46a6a3e82b86023bc
specs:
social-share-button (0.1.9)
coffee-rails
sass-rails
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
actionmailer (4.2.6) actionmailer (4.2.8)
actionpack (= 4.2.6) actionpack (= 4.2.8)
actionview (= 4.2.6) actionview (= 4.2.8)
activejob (= 4.2.6) activejob (= 4.2.8)
mail (~> 2.5, >= 2.5.4) mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5) rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.6) actionpack (4.2.8)
actionview (= 4.2.6) actionview (= 4.2.8)
activesupport (= 4.2.6) activesupport (= 4.2.8)
rack (~> 1.6) rack (~> 1.6)
rack-test (~> 0.6.2) rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5) rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2) rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (4.2.6) actionview (4.2.8)
activesupport (= 4.2.6) activesupport (= 4.2.8)
builder (~> 3.1) builder (~> 3.1)
erubis (~> 2.7.0) erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5) rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2) rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (4.2.6) activejob (4.2.8)
activesupport (= 4.2.6) activesupport (= 4.2.8)
globalid (>= 0.3.0) globalid (>= 0.3.0)
activemodel (4.2.6) activemodel (4.2.8)
activesupport (= 4.2.6) activesupport (= 4.2.8)
builder (~> 3.1) builder (~> 3.1)
activerecord (4.2.6) activerecord (4.2.8)
activemodel (= 4.2.6) activemodel (= 4.2.8)
activesupport (= 4.2.6) activesupport (= 4.2.8)
arel (~> 6.0) arel (~> 6.0)
activesupport (4.2.6) activesupport (4.2.8)
i18n (~> 0.7) i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1) minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4) thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1) tzinfo (~> 1.1)
acts-as-taggable-on (3.5.0) acts-as-taggable-on (4.0.0)
activerecord (>= 3.2, < 5) activerecord (>= 4.0)
acts_as_votable (0.10.0) acts_as_votable (0.10.0)
addressable (2.4.0) addressable (2.5.1)
ahoy_matey (1.2.1) public_suffix (~> 2.0, >= 2.0.2)
ahoy_matey (1.6.0)
addressable addressable
browser (>= 0.4.0) browser (~> 2.0)
errbase
geocoder geocoder
rails rack-attack (< 6)
railties
referer-parser (>= 0.3.0) referer-parser (>= 0.3.0)
request_store request_store
safely_block (>= 0.1.1)
user_agent_parser user_agent_parser
uuidtools uuidtools
airbrussh (1.2.0)
sshkit (>= 1.6.1, != 1.7.0)
akami (1.3.1) akami (1.3.1)
gyoku (>= 0.4.0) gyoku (>= 0.4.0)
nokogiri nokogiri
ancestry (2.1.0) ancestry (2.2.2)
activerecord (>= 3.0.0) activerecord (>= 3.0.0)
arel (6.0.3) arel (6.0.4)
ast (2.2.0) ast (2.3.0)
babel-source (5.8.35) babel-source (5.8.35)
babel-transpiler (0.7.0) babel-transpiler (0.7.0)
babel-source (>= 4.0, < 6) babel-source (>= 4.0, < 6)
execjs (~> 2.0) execjs (~> 2.0)
bcrypt (3.1.10) bcrypt (3.1.11)
browser (1.1.0) browser (2.3.0)
builder (3.2.2) builder (3.2.3)
bullet (5.0.0) bullet (5.5.1)
activesupport (>= 3.0.0) activesupport (>= 3.0.0)
uniform_notifier (~> 1.9.0) uniform_notifier (~> 1.10.0)
byebug (8.2.2) byebug (9.0.6)
cancancan (1.13.1) cancancan (1.16.0)
capistrano (3.4.0) capistrano (3.8.1)
airbrussh (>= 1.0.0)
i18n i18n
rake (>= 10.0.0) rake (>= 10.0.0)
sshkit (~> 1.3) sshkit (>= 1.9.0)
capistrano-bundler (1.1.4) capistrano-bundler (1.2.0)
capistrano (~> 3.1) capistrano (~> 3.1)
sshkit (~> 1.2) sshkit (~> 1.2)
capistrano-rails (1.1.6) capistrano-rails (1.2.3)
capistrano (~> 3.1) capistrano (~> 3.1)
capistrano-bundler (~> 1.1) capistrano-bundler (~> 1.1)
capistrano-rvm (0.1.2) capistrano3-delayed-job (1.7.3)
capistrano (~> 3.0) capistrano (~> 3.0, >= 3.0.0)
sshkit (~> 1.2) daemons (~> 1.2.4)
capistrano3-delayed-job (1.6.0) capybara (2.14.0)
capistrano (>= 3.0.0)
capybara (2.6.2)
addressable addressable
mime-types (>= 1.16) mime-types (>= 1.16)
nokogiri (>= 1.3.3) nokogiri (>= 1.3.3)
@@ -101,95 +94,97 @@ GEM
rack-test (>= 0.5.4) rack-test (>= 0.5.4)
xpath (~> 2.0) xpath (~> 2.0)
chronic (0.10.2) chronic (0.10.2)
ckeditor (4.1.6) ckeditor (4.2.3)
cocaine cocaine
orm_adapter (~> 0.5.0) orm_adapter (~> 0.5.0)
climate_control (0.0.3) climate_control (0.1.0)
activesupport (>= 3.0)
cliver (0.3.2) cliver (0.3.2)
cocaine (0.5.8) cocaine (0.5.8)
climate_control (>= 0.0.3, < 1.0) climate_control (>= 0.0.3, < 1.0)
coffee-rails (4.1.1) coffee-rails (4.2.1)
coffee-script (>= 2.2.0) coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.1.x) railties (>= 4.0.0, < 5.2.x)
coffee-script (2.4.1) coffee-script (2.4.1)
coffee-script-source coffee-script-source
execjs execjs
coffee-script-source (1.10.0) coffee-script-source (1.12.2)
concurrent-ruby (1.0.1) concurrent-ruby (1.0.5)
coveralls (0.8.13) coveralls (0.8.21)
json (~> 1.8) json (>= 1.8, < 3)
simplecov (~> 0.11.0) simplecov (~> 0.14.1)
term-ansicolor (~> 1.3) term-ansicolor (~> 1.3)
thor (~> 0.19.1) thor (~> 0.19.4)
tins (~> 1.6.0) tins (~> 1.6)
daemons (1.2.3) daemons (1.2.4)
dalli (2.7.6) dalli (2.7.6)
database_cleaner (1.5.1) database_cleaner (1.5.3)
debug_inspector (0.0.2) debug_inspector (0.0.2)
delayed_job (4.1.1) delayed_job (4.1.2)
activesupport (>= 3.0, < 5.0) activesupport (>= 3.0, < 5.1)
delayed_job_active_record (4.1.0) delayed_job_active_record (4.1.1)
activerecord (>= 3.0, < 5) activerecord (>= 3.0, < 5.1)
delayed_job (>= 3.0, < 5) delayed_job (>= 3.0, < 5)
devise (3.5.6) devise (3.5.10)
bcrypt (~> 3.0) bcrypt (~> 3.0)
orm_adapter (~> 0.1) orm_adapter (~> 0.1)
railties (>= 3.2.6, < 5) railties (>= 3.2.6, < 5)
responders responders
thread_safe (~> 0.1) thread_safe (~> 0.1)
warden (~> 1.2.3) warden (~> 1.2.3)
devise-async (0.10.1) devise-async (0.10.2)
devise (~> 3.2) devise (>= 3.2, < 4.0)
diff-lcs (1.2.5) devise_security_extension (0.10.0)
devise (>= 3.0.0, < 4.0)
railties (>= 3.2.6, < 5.0)
diff-lcs (1.3)
docile (1.1.5) docile (1.1.5)
easy_translate (0.5.0) easy_translate (0.5.0)
json json
thread thread
thread_safe thread_safe
email_spec (2.0.0) email_spec (2.1.0)
htmlentities (~> 4.3.3) htmlentities (~> 4.3.3)
launchy (~> 2.1) launchy (~> 2.1)
mail (~> 2.6.3) mail (~> 2.6.3)
errbase (0.0.3) errbase (0.0.3)
erubis (2.7.0) erubis (2.7.0)
execjs (2.6.0) execjs (2.7.0)
factory_girl (4.5.0) factory_girl (4.8.0)
activesupport (>= 3.0.0) activesupport (>= 3.0.0)
factory_girl_rails (4.6.0) factory_girl_rails (4.8.0)
factory_girl (~> 4.5.0) factory_girl (~> 4.8.0)
railties (>= 3.0.0) railties (>= 3.0.0)
faker (1.6.3) faker (1.7.3)
i18n (~> 0.5) i18n (~> 0.5)
faraday (0.9.2) faraday (0.11.0)
multipart-post (>= 1.2, < 3) multipart-post (>= 1.2, < 3)
foundation-rails (6.2.0.1) foundation-rails (6.2.4.0)
railties (>= 3.1.0) railties (>= 3.1.0)
sass (>= 3.3.0, < 3.5) sass (>= 3.3.0, < 3.5)
sprockets-es6 (>= 0.9.0) sprockets-es6 (>= 0.9.0)
foundation_rails_helper (1.1.0) foundation_rails_helper (2.0.0)
actionpack (~> 4.1) actionpack (>= 4.1)
activemodel (~> 4.1) activemodel (>= 4.1)
activesupport (~> 4.1) activesupport (>= 4.1)
railties (~> 4.1) railties (>= 4.1)
tzinfo (~> 1.2, >= 1.2.2) tzinfo (~> 1.2, >= 1.2.2)
fuubar (2.0.0) fuubar (2.2.0)
rspec (~> 3.0) rspec-core (~> 3.0)
ruby-progressbar (~> 1.4) ruby-progressbar (~> 1.4)
geocoder (1.3.1) geocoder (1.4.3)
globalid (0.3.6) globalid (0.3.7)
activesupport (>= 4.1.0) activesupport (>= 4.1.0)
groupdate (2.5.2) groupdate (3.2.0)
activesupport (>= 3) activesupport (>= 3)
gyoku (1.3.1) gyoku (1.3.1)
builder (>= 2.1.2) builder (>= 2.1.2)
hashie (3.4.3) hashie (3.5.5)
highline (1.7.8) highline (1.7.8)
htmlentities (4.3.4) htmlentities (4.3.4)
httpi (2.4.1) httpi (2.4.1)
rack rack
i18n (0.7.0) i18n (0.8.1)
i18n-tasks (0.9.5) i18n-tasks (0.9.15)
activesupport (>= 4.0.2) activesupport (>= 4.0.2)
ast (>= 2.1.0) ast (>= 2.1.0)
easy_translate (>= 0.5.0) easy_translate (>= 0.5.0)
@@ -197,58 +192,75 @@ GEM
highline (>= 1.7.3) highline (>= 1.7.3)
i18n i18n
parser (>= 2.2.3.0) parser (>= 2.2.3.0)
term-ansicolor (>= 1.3.2) rainbow (~> 2.2)
terminal-table (>= 1.5.1) terminal-table (>= 1.5.1)
initialjs-rails (0.2.0.1) initialjs-rails (0.2.0.4)
railties (>= 3.1, < 5.0) railties (>= 3.1, < 6.0)
jquery-rails (4.1.1) invisible_captcha (0.9.2)
rails (>= 3.2.0)
jquery-rails (4.3.1)
rails-dom-testing (>= 1, < 3) rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0) railties (>= 4.2.0)
thor (>= 0.14, < 2.0) thor (>= 0.14, < 2.0)
jquery-ui-rails (5.0.5) jquery-ui-rails (6.0.1)
railties (>= 3.2.16) railties (>= 3.2.16)
json (1.8.3) json (2.1.0)
jwt (1.5.4) jwt (1.5.6)
kaminari (0.16.3) kaminari (1.0.1)
actionpack (>= 3.0.0) activesupport (>= 4.1.0)
activesupport (>= 3.0.0) kaminari-actionview (= 1.0.1)
kgio (2.10.0) kaminari-activerecord (= 1.0.1)
kaminari-core (= 1.0.1)
kaminari-actionview (1.0.1)
actionview
kaminari-core (= 1.0.1)
kaminari-activerecord (1.0.1)
activerecord
kaminari-core (= 1.0.1)
kaminari-core (1.0.1)
kgio (2.11.0)
knapsack (1.13.3)
rake
timecop (>= 0.1.0)
launchy (2.4.3) launchy (2.4.3)
addressable (~> 2.3) addressable (~> 2.3)
letter_opener (1.4.1) letter_opener (1.4.1)
launchy (~> 2.2) launchy (~> 2.2)
letter_opener_web (1.3.0) letter_opener_web (1.3.1)
actionmailer (>= 3.2) actionmailer (>= 3.2)
letter_opener (~> 1.0) letter_opener (~> 1.0)
railties (>= 3.2) railties (>= 3.2)
loofah (2.0.3) loofah (2.0.3)
nokogiri (>= 1.5.9) nokogiri (>= 1.5.9)
mail (2.6.3) mail (2.6.5)
mime-types (>= 1.16, < 3) mime-types (>= 1.16, < 4)
mime-types (2.99.1) mime-types (3.1)
mini_portile2 (2.0.0) mime-types-data (~> 3.2015)
minitest (5.8.4) mime-types-data (3.2016.0521)
multi_json (1.11.2) mimemagic (0.3.2)
multi_xml (0.5.5) mini_portile2 (2.1.0)
minitest (5.10.1)
multi_json (1.12.1)
multi_xml (0.6.0)
multipart-post (2.0.0) multipart-post (2.0.0)
net-scp (1.2.1) net-scp (1.2.1)
net-ssh (>= 2.6.5) net-ssh (>= 2.6.5)
net-ssh (3.0.2) net-ssh (4.1.0)
newrelic_rpm (3.15.1.316) newrelic_rpm (4.1.0.333)
nokogiri (1.6.7.2) nokogiri (1.7.2)
mini_portile2 (~> 2.0.0.rc2) mini_portile2 (~> 2.1.0)
nori (2.6.0) nori (2.6.0)
oauth (0.5.0) oauth (0.5.1)
oauth2 (1.0.0) oauth2 (1.3.1)
faraday (>= 0.8, < 0.10) faraday (>= 0.8, < 0.12)
jwt (~> 1.0) jwt (~> 1.0)
multi_json (~> 1.3) multi_json (~> 1.3)
multi_xml (~> 0.5) multi_xml (~> 0.5)
rack (~> 1.2) rack (>= 1.2, < 3)
omniauth (1.3.1) omniauth (1.6.1)
hashie (>= 1.2, < 4) hashie (>= 3.4.6, < 3.6.0)
rack (>= 1.0, < 3) rack (>= 1.6.2, < 3)
omniauth-facebook (3.0.0) omniauth-facebook (4.0.0)
omniauth-oauth2 (~> 1.2) omniauth-oauth2 (~> 1.2)
omniauth-google-oauth2 (0.4.1) omniauth-google-oauth2 (0.4.1)
jwt (~> 1.5.2) jwt (~> 1.5.2)
@@ -261,91 +273,110 @@ GEM
omniauth-oauth2 (1.4.0) omniauth-oauth2 (1.4.0)
oauth2 (~> 1.0) oauth2 (~> 1.0)
omniauth (~> 1.2) omniauth (~> 1.2)
omniauth-twitter (1.2.1) omniauth-twitter (1.4.0)
json (~> 1.3)
omniauth-oauth (~> 1.1) omniauth-oauth (~> 1.1)
rack
orm_adapter (0.5.0) orm_adapter (0.5.0)
paranoia (2.1.5) paperclip (5.1.0)
activerecord (~> 4.0) activemodel (>= 4.2.0)
parser (2.3.0.6) activesupport (>= 4.2.0)
cocaine (~> 0.5.5)
mime-types
mimemagic (~> 0.3.0)
paranoia (2.3.1)
activerecord (>= 4.0, < 5.2)
parser (2.4.0.0)
ast (~> 2.2) ast (~> 2.2)
pg (0.18.4) pg (0.20.0)
pg_search (1.0.5) pg_search (2.0.1)
activerecord (>= 3.1) activerecord (>= 4.2)
activesupport (>= 3.1) activesupport (>= 4.2)
arel arel (>= 6)
poltergeist (1.9.0) poltergeist (1.15.0)
capybara (~> 2.1) capybara (~> 2.1)
cliver (~> 0.3.1) cliver (~> 0.3.1)
multi_json (~> 1.0)
websocket-driver (>= 0.2.0) websocket-driver (>= 0.2.0)
powerpack (0.1.1)
public_suffix (2.0.5)
quiet_assets (1.1.0) quiet_assets (1.1.0)
railties (>= 3.1, < 5.0) railties (>= 3.1, < 5.0)
rack (1.6.4) rack (1.6.5)
rack-accept (0.4.5) rack-accept (0.4.5)
rack (>= 0.4) rack (>= 0.4)
rack-attack (5.0.1)
rack
rack-test (0.6.3) rack-test (0.6.3)
rack (>= 1.0) rack (>= 1.0)
rails (4.2.6) rails (4.2.8)
actionmailer (= 4.2.6) actionmailer (= 4.2.8)
actionpack (= 4.2.6) actionpack (= 4.2.8)
actionview (= 4.2.6) actionview (= 4.2.8)
activejob (= 4.2.6) activejob (= 4.2.8)
activemodel (= 4.2.6) activemodel (= 4.2.8)
activerecord (= 4.2.6) activerecord (= 4.2.8)
activesupport (= 4.2.6) activesupport (= 4.2.8)
bundler (>= 1.3.0, < 2.0) bundler (>= 1.3.0, < 2.0)
railties (= 4.2.6) railties (= 4.2.8)
sprockets-rails sprockets-rails
rails-deprecated_sanitizer (1.0.3) rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha) activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.7) rails-dom-testing (1.0.8)
activesupport (>= 4.2.0.beta, < 5.0) activesupport (>= 4.2.0.beta, < 5.0)
nokogiri (~> 1.6.0) nokogiri (~> 1.6)
rails-deprecated_sanitizer (>= 1.0.1) rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.3) rails-html-sanitizer (1.0.3)
loofah (~> 2.0) loofah (~> 2.0)
railties (4.2.6) railties (4.2.8)
actionpack (= 4.2.6) actionpack (= 4.2.8)
activesupport (= 4.2.6) activesupport (= 4.2.8)
rake (>= 0.8.7) rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0) thor (>= 0.18.1, < 2.0)
raindrops (0.16.0) rainbow (2.2.2)
rake (11.1.2) rake
redcarpet (3.3.4) raindrops (0.18.0)
rake (12.0.0)
redcarpet (3.4.0)
referer-parser (0.3.0) referer-parser (0.3.0)
request_store (1.3.0) request_store (1.3.2)
responders (2.1.2) responders (2.4.0)
railties (>= 4.2.0, < 5.1) actionpack (>= 4.2.0, < 5.3)
rinku (1.7.3) railties (>= 4.2.0, < 5.3)
rollbar (2.8.3) rinku (2.0.2)
rollbar (2.14.1)
multi_json multi_json
rspec (3.4.0) rspec-core (3.6.0)
rspec-core (~> 3.4.0) rspec-support (~> 3.6.0)
rspec-expectations (~> 3.4.0) rspec-expectations (3.6.0)
rspec-mocks (~> 3.4.0)
rspec-core (3.4.4)
rspec-support (~> 3.4.0)
rspec-expectations (3.4.0)
diff-lcs (>= 1.2.0, < 2.0) diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.4.0) rspec-support (~> 3.6.0)
rspec-mocks (3.4.1) rspec-mocks (3.6.0)
diff-lcs (>= 1.2.0, < 2.0) diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.4.0) rspec-support (~> 3.6.0)
rspec-rails (3.4.2) rspec-rails (3.6.0)
actionpack (>= 3.0, < 4.3) actionpack (>= 3.0)
activesupport (>= 3.0, < 4.3) activesupport (>= 3.0)
railties (>= 3.0, < 4.3) railties (>= 3.0)
rspec-core (~> 3.4.0) rspec-core (~> 3.6.0)
rspec-expectations (~> 3.4.0) rspec-expectations (~> 3.6.0)
rspec-mocks (~> 3.4.0) rspec-mocks (~> 3.6.0)
rspec-support (~> 3.4.0) rspec-support (~> 3.6.0)
rspec-support (3.4.1) rspec-support (3.6.0)
ruby-progressbar (1.7.5) rubocop (0.48.1)
parser (>= 2.3.3.1, < 3.0)
powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-progressbar (1.8.1)
rvm1-capistrano3 (1.4.0)
capistrano (~> 3.0)
sshkit (>= 1.2)
safe_yaml (1.0.4) safe_yaml (1.0.4)
sass (3.4.21) safely_block (0.2.0)
sass-rails (5.0.4) errbase
railties (>= 4.0.0, < 5.0) sass (3.4.23)
sass-rails (5.0.6)
railties (>= 4.0.0, < 6)
sass (~> 3.1) sass (~> 3.1)
sprockets (>= 2.8, < 4.0) sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0) sprockets-rails (>= 2.0, < 4.0)
@@ -358,55 +389,62 @@ GEM
nokogiri (>= 1.4.0) nokogiri (>= 1.4.0)
nori (~> 2.4) nori (~> 2.4)
wasabi (~> 3.4) wasabi (~> 3.4)
simple_captcha2 (0.4.0) simplecov (0.14.1)
rails (>= 4.1)
simplecov (0.11.2)
docile (~> 1.1.0) docile (~> 1.1.0)
json (~> 1.8) json (>= 1.8, < 3)
simplecov-html (~> 0.10.0) simplecov-html (~> 0.10.0)
simplecov-html (0.10.0) simplecov-html (0.10.0)
spring (1.6.4) sitemap_generator (5.3.1)
builder (~> 3.0)
social-share-button (0.10.0)
coffee-rails
spring (2.0.1)
activesupport (>= 4.2)
spring-commands-rspec (1.0.4) spring-commands-rspec (1.0.4)
spring (>= 0.9.1) spring (>= 0.9.1)
sprockets (3.5.2) sprockets (3.7.1)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
rack (> 1, < 3) rack (> 1, < 3)
sprockets-es6 (0.9.0) sprockets-es6 (0.9.2)
babel-source (>= 5.8.11) babel-source (>= 5.8.11)
babel-transpiler babel-transpiler
sprockets (>= 3.0.0) sprockets (>= 3.0.0)
sprockets-rails (3.0.4) sprockets-rails (3.2.0)
actionpack (>= 4.0) actionpack (>= 4.0)
activesupport (>= 4.0) activesupport (>= 4.0)
sprockets (>= 3.0.0) sprockets (>= 3.0.0)
sshkit (1.8.1) sshkit (1.13.1)
net-scp (>= 1.1.2) net-scp (>= 1.1.2)
net-ssh (>= 2.8.0) net-ssh (>= 2.8.0)
term-ansicolor (1.3.2) term-ansicolor (1.6.0)
tins (~> 1.0) tins (~> 1.0)
terminal-table (1.5.2) terminal-table (1.7.3)
thor (0.19.1) unicode-display_width (~> 1.1.1)
thor (0.19.4)
thread (0.2.2) thread (0.2.2)
thread_safe (0.3.5) thread_safe (0.3.6)
tilt (2.0.2) tilt (2.0.7)
tins (1.6.0) timecop (0.8.1)
tolk (1.9.3) tins (1.13.2)
rails (>= 4.0, < 4.3) tolk (2.0.0)
rails (>= 4.0)
safe_yaml (>= 0.8.6) safe_yaml (>= 0.8.6)
turbolinks (2.5.3) turbolinks (2.5.3)
coffee-rails coffee-rails
turnout (2.3.0) turnout (2.4.0)
rack (~> 1.3) i18n (~> 0.7)
rack (>= 1.3, < 3)
rack-accept (~> 0.4) rack-accept (~> 0.4)
tilt (>= 1.4, < 3) tilt (>= 1.4, < 3)
tzinfo (1.2.2) tzinfo (1.2.3)
thread_safe (~> 0.1) thread_safe (~> 0.1)
uglifier (3.0.0) uglifier (3.2.0)
execjs (>= 0.3.0, < 3) execjs (>= 0.3.0, < 3)
unicorn (5.1.0) unicode-display_width (1.1.3)
unicorn (5.3.0)
kgio (~> 2.6) kgio (~> 2.6)
raindrops (~> 0.7) raindrops (~> 0.7)
uniform_notifier (1.9.0) uniform_notifier (1.10.0)
user_agent_parser (2.3.0) user_agent_parser (2.3.0)
uuidtools (2.1.5) uuidtools (2.1.5)
warden (1.2.6) warden (1.2.6)
@@ -414,14 +452,14 @@ GEM
wasabi (3.5.0) wasabi (3.5.0)
httpi (~> 2.0) httpi (~> 2.0)
nokogiri (>= 1.4.2) nokogiri (>= 1.4.2)
web-console (3.1.1) web-console (3.3.0)
activemodel (>= 4.2) activemodel (>= 4.2)
debug_inspector debug_inspector
railties (>= 4.2) railties (>= 4.2)
websocket-driver (0.6.3) websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0) websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2) websocket-extensions (0.1.2)
whenever (0.9.4) whenever (0.9.7)
chronic (>= 0.6.3) chronic (>= 0.6.3)
xpath (2.0.0) xpath (2.0.0)
nokogiri (~> 1.3) nokogiri (~> 1.3)
@@ -432,70 +470,76 @@ PLATFORMS
DEPENDENCIES DEPENDENCIES
acts-as-taggable-on acts-as-taggable-on
acts_as_votable acts_as_votable
ahoy_matey (~> 1.2.1) ahoy_matey (~> 1.6.0)
ancestry ancestry (~> 2.2.2)
browser browser
bullet bullet (~> 5.5.1)
byebug byebug
cancancan cancancan (~> 1.16.0)
capistrano (= 3.4.0) capistrano (~> 3.8.1)
capistrano-bundler (= 1.1.4) capistrano-bundler (~> 1.2)
capistrano-rails (= 1.1.6) capistrano-rails (~> 1.2.3)
capistrano-rvm capistrano3-delayed-job (~> 1.7.3)
capistrano3-delayed-job (~> 1.0) capybara (~> 2.14.0)
capybara ckeditor (~> 4.2.3)
ckeditor (~> 4.1.5) coffee-rails (~> 4.2.1)
coffee-rails (~> 4.1.0) coveralls (~> 0.8.21)
coveralls
daemons daemons
dalli dalli
database_cleaner database_cleaner
delayed_job_active_record (~> 4.1.0) delayed_job_active_record (~> 4.1.0)
devise (~> 3.5.6) devise (~> 3.5.7)
devise-async devise-async
devise_security_extension
email_spec email_spec
factory_girl_rails factory_girl_rails (~> 4.8.0)
faker faker (~> 1.7.3)
foundation-rails foundation-rails (~> 6.2.4.0)
foundation_rails_helper foundation_rails_helper (~> 2.0.0)
fuubar fuubar
groupdate groupdate (~> 3.2.0)
i18n-tasks i18n-tasks (~> 0.9.15)
initialjs-rails (= 0.2.0.1) initialjs-rails (= 0.2.0.4)
jquery-rails invisible_captcha (~> 0.9.2)
jquery-rails (~> 4.3.1)
jquery-ui-rails jquery-ui-rails
kaminari kaminari (~> 1.0.1)
knapsack
launchy launchy
letter_opener_web (~> 1.3.0) letter_opener_web (~> 1.3.1)
newrelic_rpm (~> 3.14) newrelic_rpm (~> 4.1.0.333)
omniauth omniauth
omniauth-facebook (~> 3.0.0) omniauth-facebook (~> 4.0.0)
omniauth-google-oauth2 (~> 0.4.0) omniauth-google-oauth2 (~> 0.4.0)
omniauth-twitter omniauth-twitter
paranoia paperclip
pg paranoia (~> 2.3.1)
pg (~> 0.20.0)
pg_search pg_search
poltergeist poltergeist (~> 1.15.0)
quiet_assets quiet_assets
rails (= 4.2.6) rails (= 4.2.8)
redcarpet redcarpet (~> 3.4.0)
responders responders (~> 2.4.0)
rinku rinku (~> 2.0.2)
rollbar (~> 2.8.0) rollbar (~> 2.14.1)
rspec-rails (~> 3.3) rspec-rails (~> 3.6)
rubocop (~> 0.48.1)
rvm1-capistrano3
sass-rails (~> 5.0, >= 5.0.4) sass-rails (~> 5.0, >= 5.0.4)
savon savon
simple_captcha2 sitemap_generator (~> 5.3.1)
social-share-button! social-share-button (~> 0.10)
spring spring
spring-commands-rspec spring-commands-rspec
tolk sprockets (~> 3.7.1)
tolk (~> 2.0.0)
turbolinks turbolinks
turnout turnout (~> 2.4.0)
uglifier (>= 1.3.0) uglifier (~> 3.2.0)
unicorn (~> 5.1.0) unicorn (~> 5.3.0)
web-console (~> 3.0) web-console (= 3.3.0)
whenever whenever
BUNDLED WITH BUNDLED WITH
1.11.2 1.14.6

5
Gemfile_custom Normal file
View File

@@ -0,0 +1,5 @@
# Overrides and adds customized gems in this file
# Read more on documentation:
# * English: https://github.com/consul/consul/blob/master/CUSTOMIZE_EN.md#gemfile
# * Spanish: https://github.com/consul/consul/blob/master/CUSTOMIZE_ES.md#gemfile
#

View File

@@ -1,5 +1,4 @@
![Logo of Consul] ![Logo of Consul](https://raw.githubusercontent.com/consul/consul/master/public/consul_logo.png)
(https://raw.githubusercontent.com/consul/consul/master/public/consul_logo.png)
# Consul # Consul
@@ -8,17 +7,19 @@ Citizen Participation and Open Government Application
[![Build Status](https://travis-ci.org/consul/consul.svg?branch=master)](https://travis-ci.org/consul/consul) [![Build Status](https://travis-ci.org/consul/consul.svg?branch=master)](https://travis-ci.org/consul/consul)
[![Code Climate](https://codeclimate.com/github/consul/consul/badges/gpa.svg)](https://codeclimate.com/github/consul/consul) [![Code Climate](https://codeclimate.com/github/consul/consul/badges/gpa.svg)](https://codeclimate.com/github/consul/consul)
[![Dependency Status](https://gemnasium.com/consul/consul.svg)](https://gemnasium.com/consul/consul) [![Dependency Status](https://gemnasium.com/consul/consul.svg)](https://gemnasium.com/consul/consul)
[![Coverage Status](https://coveralls.io/repos/consul/consul/badge.svg?branch=master&service=github)](https://coveralls.io/github/consul/consul?branch=master) [![Coverage Status](https://coveralls.io/repos/github/consul/consul/badge.svg?branch=master)](https://coveralls.io/github/consul/consul?branch=master)
[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](http://www.gnu.org/licenses/agpl-3.0)
[![Accessibility conformance](https://img.shields.io/badge/accessibility-WAI:AA-green.svg)](https://www.w3.org/WAI/eval/Overview)
[![A11y issues checked with Rocket Validator](https://rocketvalidator.com/badges/checked_with_rocket_validator.svg?url=https://rocketvalidator.com)](https://rocketvalidator.com/opensource)
[![Join the chat at https://gitter.im/consul/consul](https://badges.gitter.im/consul/consul.svg)](https://gitter.im/consul/consul?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
This is the opensource code repository of the eParticipation website originally developed for the Madrid City government eParticipation website This is the opensource code repository of the eParticipation website originally developed for the Madrid City government eParticipation website
## Current state ## Current state
Development started on [2015 July 15th](https://github.com/consul/consul/commit/8db36308379accd44b5de4f680a54c41a0cc6fc6). Code was deployed to production on 2015 september 7th to [decide.madrid.es](https://decide.madrid.es). Since then new features are added often. You can take a look at a roadmap and future features in the [open issues list](https://github.com/consul/consul/issues). Development started on [2015 July 15th](https://github.com/consul/consul/commit/8db36308379accd44b5de4f680a54c41a0cc6fc6). Code was deployed to production on 2015 september 7th to [decide.madrid.es](https://decide.madrid.es). Since then new features are added often. You can take a look at the current features in the [docs](https://github.com/consul/consul/tree/master/doc) and future features in the [open issues list](https://github.com/consul/consul/issues).
## Roadmap
See [ROADMAP_ES.md](ROADMAP_ES.md)
## Tech stack ## Tech stack
@@ -28,7 +29,9 @@ Frontend tools used include [SCSS](http://sass-lang.com/) over [Foundation](http
## Configuration for development and test environments ## Configuration for development and test environments
Prerequisites: install git, ImageMagick, Ruby 2.2.3, bundler gem, ghostscript and PostgreSQL (>=9.4). **NOTE**: For more detailed instructions check the [docs](https://github.com/consul/consul/tree/master/doc/en/dev_test_setup.md)
Prerequisites: install git, Ruby 2.3.2, bundler gem, ghostscript and PostgreSQL (>=9.4).
``` ```
git clone https://github.com/consul/consul.git git clone https://github.com/consul/consul.git
@@ -36,10 +39,9 @@ cd consul
bundle install bundle install
cp config/database.yml.example config/database.yml cp config/database.yml.example config/database.yml
cp config/secrets.yml.example config/secrets.yml cp config/secrets.yml.example config/secrets.yml
rake db:create
bin/rake db:setup bin/rake db:setup
bin/rake db:dev_seed bin/rake db:dev_seed
RAILS_ENV=test bin/rake db:setup RAILS_ENV=test rake db:setup
``` ```
Run the app locally: Run the app locally:
@@ -48,7 +50,7 @@ bin/rails s
``` ```
Prerequisites for testing: install PhantomJS >= 2.0 Prerequisites for testing: install PhantomJS >= 1.9.8
Run the tests with: Run the tests with:
@@ -56,7 +58,27 @@ Run the tests with:
bin/rspec bin/rspec
``` ```
## Licence You can use the default admin user from the seeds file:
**user:** admin@consul.dev
**pass:** 12345678
But for some actions like voting, you will need a verified user, the seeds file also includes one:
**user:** verified@consul.dev
**pass:** 12345678
### Customization
See [CUSTOMIZE_ES.md](CUSTOMIZE_ES.md)
### OAuth
To test authentication services with external OAuth suppliers - right now Twitter, Facebook and Google - you'll need to create an "application" in each of the supported platforms and set the *key* and *secret* provided in your *secrets.yml*
In the case of Google, verify that the APIs *Contacts API* and *Google+ API* are enabled for the application.
## License
Code published under AFFERO GPL v3 (see [LICENSE-AGPLv3.txt](LICENSE-AGPLv3.txt)) Code published under AFFERO GPL v3 (see [LICENSE-AGPLv3.txt](LICENSE-AGPLv3.txt))

View File

@@ -1,5 +1,4 @@
![Logotipo de Consul] ![Logotipo de Consul](https://raw.githubusercontent.com/consul/consul/master/public/consul_logo.png)
(https://raw.githubusercontent.com/consul/consul/master/public/consul_logo.png)
# Consul # Consul
@@ -8,17 +7,20 @@ Aplicación de Participación Ciudadana y Gobierno Abierto
[![Build Status](https://travis-ci.org/consul/consul.svg?branch=master)](https://travis-ci.org/consul/consul) [![Build Status](https://travis-ci.org/consul/consul.svg?branch=master)](https://travis-ci.org/consul/consul)
[![Code Climate](https://codeclimate.com/github/consul/consul/badges/gpa.svg)](https://codeclimate.com/github/consul/consul) [![Code Climate](https://codeclimate.com/github/consul/consul/badges/gpa.svg)](https://codeclimate.com/github/consul/consul)
[![Dependency Status](https://gemnasium.com/consul/consul.svg)](https://gemnasium.com/consul/consul) [![Dependency Status](https://gemnasium.com/consul/consul.svg)](https://gemnasium.com/consul/consul)
[![Coverage Status](https://coveralls.io/repos/consul/consul/badge.svg?branch=master&service=github)](https://coveralls.io/github/consul/consul?branch=master) [![Coverage Status](https://coveralls.io/repos/github/consul/consul/badge.svg?branch=master)](https://coveralls.io/github/consul/consul?branch=master)
[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](http://www.gnu.org/licenses/agpl-3.0)
[![Accessibility conformance](https://img.shields.io/badge/accessibility-WAI:AA-green.svg)](https://www.w3.org/WAI/eval/Overview)
[![A11y issues checked with Rocket Validator](https://rocketvalidator.com/badges/checked_with_rocket_validator.svg?url=https://rocketvalidator.com)](https://rocketvalidator.com/opensource)
[![Join the chat at https://gitter.im/consul/consul](https://badges.gitter.im/consul/consul.svg)](https://gitter.im/consul/consul?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Este es el repositorio de código abierto de la Aplicación de Participación Ciudadana Consul, creada originariamente por el Ayuntamiento de Madrid. Este es el repositorio de código abierto de la Aplicación de Participación Ciudadana Consul, creada originariamente por el Ayuntamiento de Madrid.
## Estado del proyecto ## Estado del proyecto
El desarrollo de esta aplicación comenzó el [15 de Julio de 2015](https://github.com/consul/consul/commit/8db36308379accd44b5de4f680a54c41a0cc6fc6) y el código fue puesto en producción el día 7 de Septiembre de 2015 en [decide.madrid.es](https://decide.madrid.es). Desde entonces se le añaden mejoras y funcionalidades constantemente. La evolución y futura lista de funcionalidades a implementar se pueden consultar en la lista de [tareas por hacer](https://github.com/consul/consul/issues). El desarrollo de esta aplicación comenzó el [15 de Julio de 2015](https://github.com/consul/consul/commit/8db36308379accd44b5de4f680a54c41a0cc6fc6) y el código fue puesto en producción el día 7 de Septiembre de 2015 en [decide.madrid.es](https://decide.madrid.es). Desde entonces se le añaden mejoras y funcionalidades constantemente. Las funcionalidades actuales se pueden consultar en la [documentación](https://github.com/consul/consul/tree/master/doc) y las siguientes funcionaliades en la lista de [tareas por hacer](https://github.com/consul/consul/issues).
## Hoja de ruta
Ver fichero [ROADMAP_ES.md](ROADMAP_ES.md)
## Tecnología ## Tecnología
@@ -27,7 +29,9 @@ Las herramientas utilizadas para el frontend no están cerradas aún. Los estilo
## Configuración para desarrollo y tests ## Configuración para desarrollo y tests
Prerequisitos: tener instalado git, ImageMagick, Ruby 2.2.3, la gema `bundler`, ghostscript y PostgreSQL (9.4 o superior). **NOTA**: para unas instrucciones más detalladas consulta la [documentación](https://github.com/consul/consul/tree/master/doc/es/dev_test_setup.md)
Prerequisitos: tener instalado git, Ruby 2.3.2, la gema `bundler`, ghostscript y PostgreSQL (9.4 o superior).
``` ```
@@ -36,10 +40,9 @@ cd consul
bundle install bundle install
cp config/database.yml.example config/database.yml cp config/database.yml.example config/database.yml
cp config/secrets.yml.example config/secrets.yml cp config/secrets.yml.example config/secrets.yml
rake db:create
bin/rake db:setup bin/rake db:setup
bin/rake db:dev_seed bin/rake db:dev_seed
RAILS_ENV=test bin/rake db:setup RAILS_ENV=test rake db:setup
``` ```
Para ejecutar la aplicación en local: Para ejecutar la aplicación en local:
@@ -47,7 +50,7 @@ Para ejecutar la aplicación en local:
bin/rails s bin/rails s
``` ```
Prerequisitos para los tests: tener instalado PhantomJS >= 2.0 Prerequisitos para los tests: tener instalado PhantomJS >= 1.9.8
Para ejecutar los tests: Para ejecutar los tests:
@@ -55,6 +58,20 @@ Para ejecutar los tests:
bin/rspec bin/rspec
``` ```
Puedes usar el usuario administrador por defecto del fichero seeds:
**user:** admin@consul.dev
**pass:** 12345678
Pero para ciertas acciones, como apoyar, necesitarás un usuario verificado, el fichero seeds proporciona uno:
**user:** verified@consul.dev
**pass:** 12345678
### Customización
Ver fichero [CUSTOMIZE_ES.md](CUSTOMIZE_ES.md)
### OAuth ### OAuth
Para probar los servicios de autenticación mediante proveedores externos OAuth — en este momento Twitter, Facebook y Google —, necesitas crear una "aplicación" en cada una de las plataformas soportadas y configurar la *key* y el *secret* proporcionados en tu *secrets.yml* Para probar los servicios de autenticación mediante proveedores externos OAuth — en este momento Twitter, Facebook y Google —, necesitas crear una "aplicación" en cada una de las plataformas soportadas y configurar la *key* y el *secret* proporcionados en tu *secrets.yml*

View File

@@ -1,26 +0,0 @@
## Hoja de ruta
Las necesidades y líneas de desarrollo de Consul a corto plazo se actualizan continuamente, y son añadidas como Issues https://github.com/consul/consul/issues La hoja de ruta de desarrollo a medio plazo comprende lo siguiente:
## Debates y propuestas
Entre las mejoras a desarrollar destacamos las siguientes:
- Búsquedas avanzadas
- Notificaciones de usuarios
- Listas de correo informativas para los usuarios
- Clasificaciones temáticas y locales
- Mejora del sistema de etiquetado
- Sistema de identificación de propuestas similares
- Mejora de algoritmos de ordenación
- Ampliación de licencias de contenidos
- Añadido de idiomas disponibles
- Universalización del código, y facilitación de adaptación a diferentes sistemas locales
- Creación de sección de procesos participativos ad-hoc
## Presupuestos participativos
Este espacio permitirá que una cierta cantidad de dinero se distribuya por decisión ciudadana. Para ello permitirá: recibir propuestas para este fin; que dichas propuestas sean tasadas y evaluadas por un cierto perfil de usuarios mostrando dicho trabajo junto a las mismas; mostrar las propuestas de tal forma que los usuarios verificados puedan votar un conjunto de ellas acorde con la cantidad de dinero reservada. El mecanismo contemplará mecanismos de pre-selección y selección, además de categorizaciones geográficas o temáticas de las propuestas.
## Legislación colaborativa
Este módulo permitirá la participación ciudadana en todas las fases de un desarrollo legislativo. Desde la propuesta y selección de los redactores y expertos de la legislación, pasando por la fase de debate y propuesta asociada a la misma (que a su vez se dividirá en espacios de debate libre y mecanismos de pregunta-respuesta), hasta la redacción colaborativa y la revisión detallada del texto creado. El módulo permitirá activar independientemente las diferentes fases del proceso, de tal forma que su uso pueda extenderse mucho más allá del caso de la redacción colaborativa.

View File

@@ -4,3 +4,4 @@
require File.expand_path('../config/application', __FILE__) require File.expand_path('../config/application', __FILE__)
Rails.application.load_tasks Rails.application.load_tasks
Knapsack.load_tasks if defined?(Knapsack)

Binary file not shown.

View File

@@ -49,4 +49,17 @@
<glyph glyph-name="notification" unicode="&#110;" d="M256 48c23 0 41 19 41 42l-82 0c0-23 18-42 41-42z m135 125l0 114c0 64-45 118-104 131l0 15c0 17-13 31-31 31-18 0-31-14-31-31l0-15c-59-13-104-67-104-131l0-114-41-42 0-21 352 0 0 21z"/> <glyph glyph-name="notification" unicode="&#110;" d="M256 48c23 0 41 19 41 42l-82 0c0-23 18-42 41-42z m135 125l0 114c0 64-45 118-104 131l0 15c0 17-13 31-31 31-18 0-31-14-31-31l0-15c-59-13-104-67-104-131l0-114-41-42 0-21 352 0 0 21z"/>
<glyph glyph-name="no-notification" unicode="&#120;" d="M257 392c7 0 24-5 24-5 46-10 78-52 78-100l0-127 9-10 8-8-240 0 8 8 9 10 0 127c0 48 33 90 78 100 0 0 18 5 24 5m1 72c-18 0-31-14-31-31l0-15c-59-13-104-67-104-131l0-114-41-42 0-21 352 0 0 21-41 42 0 114c0 64-45 118-104 131l0 15c0 17-13 31-31 31z m41-374l-82 0c0-23 18-42 41-42 23 0 41 19 41 42z"/> <glyph glyph-name="no-notification" unicode="&#120;" d="M257 392c7 0 24-5 24-5 46-10 78-52 78-100l0-127 9-10 8-8-240 0 8 8 9 10 0 127c0 48 33 90 78 100 0 0 18 5 24 5m1 72c-18 0-31-14-31-31l0-15c-59-13-104-67-104-131l0-114-41-42 0-21 352 0 0 21-41 42 0 114c0 64-45 118-104 131l0 15c0 17-13 31-31 31z m41-374l-82 0c0-23 18-42 41-42 23 0 41 19 41 42z"/>
<glyph glyph-name="whatsapp" unicode="&#80;" d="M318 234c2 0 12-4 28-13 16-8 24-13 25-15 1-1 1-2 1-4 0-7-2-14-5-22-3-7-10-14-20-19-11-5-20-7-29-7-11 0-29 6-55 17-18 9-34 20-48 34-14 14-28 32-42 53-14 20-21 39-21 55l0 3c1 17 8 32 21 45 5 4 10 6 15 6 1 0 3 0 5 0 3-1 5-1 6-1 3 0 6 0 7-2 2-1 3-3 5-7 1-4 5-13 9-26 5-13 7-20 7-21 0-4-3-9-9-16-7-7-10-12-10-14 0-1 0-2 1-4 7-14 16-27 29-39 11-10 25-20 43-29 3-1 5-2 7-2 3 0 8 5 15 14 8 9 13 14 15 14z m-58-152c24 0 47 5 70 15 22 9 41 22 57 38 16 16 29 35 38 57 10 22 14 46 14 70 0 24-4 47-14 69-9 22-22 42-38 58-16 16-35 28-57 38-23 9-46 14-70 14-24 0-47-5-70-14-22-10-41-22-57-38-16-16-29-36-38-58-10-22-14-45-14-69 0-39 11-74 34-105l-23-67 69 22c31-20 63-30 99-30z m0 395c29 0 57-6 84-17 26-11 49-27 68-46 20-19 35-42 46-69 12-26 17-54 17-83 0-29-5-57-17-84-11-26-26-49-46-69-19-19-42-34-68-46-27-11-55-17-84-17-37 0-72 9-104 27l-119-38 38 116c-20 33-30 71-30 111 0 29 5 57 17 83 11 27 26 50 46 69 19 19 42 35 68 46 27 11 55 17 84 17z"/> <glyph glyph-name="whatsapp" unicode="&#80;" d="M318 234c2 0 12-4 28-13 16-8 24-13 25-15 1-1 1-2 1-4 0-7-2-14-5-22-3-7-10-14-20-19-11-5-20-7-29-7-11 0-29 6-55 17-18 9-34 20-48 34-14 14-28 32-42 53-14 20-21 39-21 55l0 3c1 17 8 32 21 45 5 4 10 6 15 6 1 0 3 0 5 0 3-1 5-1 6-1 3 0 6 0 7-2 2-1 3-3 5-7 1-4 5-13 9-26 5-13 7-20 7-21 0-4-3-9-9-16-7-7-10-12-10-14 0-1 0-2 1-4 7-14 16-27 29-39 11-10 25-20 43-29 3-1 5-2 7-2 3 0 8 5 15 14 8 9 13 14 15 14z m-58-152c24 0 47 5 70 15 22 9 41 22 57 38 16 16 29 35 38 57 10 22 14 46 14 70 0 24-4 47-14 69-9 22-22 42-38 58-16 16-35 28-57 38-23 9-46 14-70 14-24 0-47-5-70-14-22-10-41-22-57-38-16-16-29-36-38-58-10-22-14-45-14-69 0-39 11-74 34-105l-23-67 69 22c31-20 63-30 99-30z m0 395c29 0 57-6 84-17 26-11 49-27 68-46 20-19 35-42 46-69 12-26 17-54 17-83 0-29-5-57-17-84-11-26-26-49-46-69-19-19-42-34-68-46-27-11-55-17-84-17-37 0-72 9-104 27l-119-38 38 116c-20 33-30 71-30 111 0 29 5 57 17 83 11 27 26 50 46 69 19 19 42 35 68 46 27 11 55 17 84 17z"/>
<glyph glyph-name="zip" unicode="&#79;" d="M192 160l128 0 0-128-128 0z m96 32l-32 0 0 32 32 0z m0 96l0-32-32 0 0-32-32 0 0 32 32 0 0 32z m32 147l96-96 0-275-64 0 0 128-32 0z m-224 13l96 0 0-256-32 0 0-128-64 0z m128 0l32 0 0-32 32 0 0-32-32 0 0-32 32 0 0-32-32 0 0-32-32 0 0 32 32 0 0 32-32 0 0 32 32 0 0 32-32 0z m-192 64l0-512 448 0 0 365-147 147z m192-384l64 0 0-32-64 0z"/>
<glyph glyph-name="banner" unicode="&#81;" d="M146 155l0-54c0-8-2-15-8-20-5-5-12-8-19-8l-92 0c-7 0-14 3-19 8-5 5-8 12-8 20l0 54c0 8 3 15 8 20 5 5 12 8 19 8l92 0c7 0 14-3 19-8 6-5 8-12 8-20z m0 147l0-55c0-8-2-14-8-20-5-5-12-8-19-8l-92 0c-7 0-14 3-19 8-5 6-8 12-8 20l0 55c0 7 3 14 8 19 5 5 12 8 19 8l92 0c7 0 14-3 19-8 6-5 8-12 8-19z m366-147l0-54c0-8-3-15-8-20-5-5-12-8-19-8l-275 0c-7 0-14 3-19 8-5 5-8 12-8 20l0 54c0 8 3 15 8 20 5 5 12 8 19 8l275 0c7 0 14-3 19-8 5-5 8-12 8-20z m-366 293l0-55c0-7-2-14-8-19-5-6-12-8-19-8l-92 0c-7 0-14 2-19 8-5 5-8 12-8 19l0 55c0 8 3 14 8 19 5 6 12 8 19 8l92 0c7 0 14-2 19-8 6-5 8-11 8-19z m366-146l0-55c0-8-3-14-8-20-5-5-12-8-19-8l-275 0c-7 0-14 3-19 8-5 6-8 12-8 20l0 55c0 7 3 14 8 19 5 5 12 8 19 8l275 0c7 0 14-3 19-8 5-5 8-12 8-19z m0 146l0-55c0-7-3-14-8-19-5-6-12-8-19-8l-275 0c-7 0-14 2-19 8-5 5-8 12-8 19l0 55c0 8 3 14 8 19 5 6 12 8 19 8l275 0c7 0 14-2 19-8 5-5 8-11 8-19z"/>
<glyph glyph-name="arrow-down" unicode="&#82;" d="M402 311c0-5-2-9-5-13l-128-128c-4-4-8-5-13-5-5 0-9 1-13 5l-128 128c-3 4-5 8-5 13 0 5 2 9 5 13 4 3 8 5 13 5l256 0c5 0 9-2 13-5 3-4 5-8 5-13z"/>
<glyph glyph-name="arrow-left" unicode="&#84;" d="M347 384l0-256c0-5-1-9-5-13-4-3-8-5-13-5-5 0-9 2-13 5l-128 128c-3 4-5 8-5 13 0 5 2 9 5 13l128 128c4 3 8 5 13 5 5 0 9-2 13-5 4-4 5-8 5-13z"/>
<glyph glyph-name="arrow-right" unicode="&#85;" d="M329 256c0-5-2-9-5-13l-128-128c-4-3-8-5-13-5-5 0-9 2-13 5-4 4-5 8-5 13l0 256c0 5 1 9 5 13 4 3 8 5 13 5 5 0 9-2 13-5l128-128c3-4 5-8 5-13z"/>
<glyph glyph-name="check-circle" unicode="&#86;" d="M256 480c-124 0-224-100-224-224 0-124 100-224 224-224 124 0 224 100 224 224 0 124-100 224-224 224z m115-149l-139-179c-1-1-3-3-5-3-3 0-4 1-5 3-2 1-79 76-79 76l-2 1c0 1-1 2-1 3 0 2 1 3 1 4 1 0 1 0 1 1 8 8 24 24 25 25 1 2 2 3 4 3 3 0 5-2 6-3 1-1 45-43 45-43l111 143c1 0 2 1 4 1 1 0 2 0 3-1l31-24c0-1 1-3 1-4 0-1 0-2-1-3z"/>
<glyph glyph-name="arrow-top" unicode="&#87;" d="M402 165c0-5-2-10-5-13-4-4-8-6-13-6l-256 0c-5 0-9 2-13 6-3 3-5 8-5 13 0 5 2 9 5 12l128 128c4 4 8 6 13 6 5 0 9-2 13-6l128-128c3-3 5-7 5-12z"/>
<glyph glyph-name="checkmark-circle" unicode="&#89;" d="M171 296l-29-30 93-93 208 208-29 29-179-178z m251-40c0-92-74-166-166-166-92 0-166 74-166 166 0 92 74 166 166 166 16 0 31-2 46-6l32 32c-24 11-50 16-78 16-114 0-208-94-208-208 0-114 94-208 208-208 114 0 208 94 208 208z"/>
<glyph glyph-name="minus-square" unicode="&#88;" d="M357 402c17 0 32-6 45-18 12-13 19-28 19-46l0-201c0-17-7-32-19-45-13-13-28-19-45-19l-202 0c-17 0-32 6-45 19-12 13-19 28-19 45l0 201c0 18 7 33 19 46 13 12 28 18 45 18z m27-265l0 201c0 8-3 14-8 20-5 5-12 8-19 8l-202 0c-7 0-14-3-19-8-5-6-8-12-8-20l0-201c0-7 3-14 8-19 5-6 12-8 19-8l202 0c7 0 14 2 19 8 5 5 8 12 8 19z m-46 119c3 0 5-1 7-3 2-1 2-3 2-6l0-18c0-3 0-5-2-7-2-2-4-3-7-3l-164 0c-3 0-5 1-7 3-2 2-2 4-2 7l0 18c0 3 0 5 2 6 2 2 4 3 7 3z"/>
<glyph glyph-name="plus-square" unicode="&#90;" d="M347 247l0-18c0-3 0-5-2-7-2-2-4-3-7-3l-64 0 0-64c0-2-1-4-2-6-2-2-4-3-7-3l-18 0c-3 0-5 1-7 3-1 2-2 4-2 6l0 64-64 0c-3 0-5 1-7 3-2 2-2 4-2 7l0 18c0 3 0 5 2 6 2 2 4 3 7 3l64 0 0 64c0 3 1 5 2 7 2 1 4 2 7 2l18 0c3 0 5-1 7-2 1-2 2-4 2-7l0-64 64 0c3 0 5-1 7-3 2-1 2-3 2-6z m37-110l0 201c0 8-3 14-8 20-5 5-12 8-19 8l-202 0c-7 0-14-3-19-8-5-6-8-12-8-20l0-201c0-7 3-14 8-19 5-6 12-8 19-8l202 0c7 0 14 2 19 8 5 5 8 12 8 19z m37 201l0-201c0-17-7-32-19-45-13-13-28-19-45-19l-202 0c-17 0-32 6-45 19-12 13-19 28-19 45l0 201c0 18 7 33 19 46 13 12 28 18 45 18l202 0c17 0 32-6 45-18 12-13 19-28 19-46z"/>
<glyph glyph-name="expand" unicode="&#48;" d="M26 168l-26-158c0-2 1-5 3-7 0 0 0 0 0 0 2-2 5-3 7-3l158 27c3 0 6 3 7 6 1 3 0 7-3 9l-30 31 82 82c4 4 4 9 0 13l-57 57c-3 3-9 3-12 0l-83-83-31 31c-2 2-5 3-9 2-3-1-5-4-6-7z m460 176l26 158c0 2-1 5-3 7 0 0 0 0 0 0-2 2-5 3-7 3l-158-27c-3 0-6-3-7-6-1-3 0-7 3-9l30-31-82-82c-4-4-4-9 0-13l57-57c3-3 9-3 12 0l83 83 31-31c2-2 5-3 9-2 3 1 5 4 6 7z"/>
<glyph glyph-name="telegram" unicode="&#49;" d="M504 509c6-5 9-11 8-18l-73-439c-1-6-4-10-10-13-2-2-5-2-8-2-3 0-5 0-7 1l-130 53-69-84c-3-5-8-7-14-7-2 0-4 0-6 1-4 1-7 4-9 7-2 3-3 6-3 10l0 100 247 303-306-265-113 47c-7 2-10 7-11 15 0 8 3 14 9 17l476 274c2 2 5 3 9 3 4 0 7-1 10-3z"/>
<glyph glyph-name="instagram" unicode="&#50;" d="M426 105l0 185-39 0c4-12 6-25 6-38 0-24-6-46-18-66-13-20-29-36-50-48-21-12-44-18-69-18-37 0-69 13-96 39-27 26-40 57-40 93 0 13 2 26 6 38l-41 0 0-185c0-5 2-10 5-13 4-3 8-5 13-5l305 0c5 0 9 2 13 5 3 3 5 8 5 13z m-81 152c0 23-9 44-26 60-18 17-38 25-63 25-24 0-45-8-62-25-17-16-26-37-26-60 0-24 9-44 26-61 17-16 38-25 62-25 25 0 45 9 63 25 17 17 26 37 26 61z m81 103l0 47c0 5-2 10-6 14-4 4-8 6-14 6l-50 0c-5 0-10-2-14-6-4-4-5-9-5-14l0-47c0-6 1-10 5-14 4-4 9-6 14-6l50 0c6 0 10 2 14 6 4 4 6 8 6 14z m49 59l0-326c0-16-5-29-16-40-11-11-24-16-40-16l-326 0c-16 0-29 5-40 16-11 11-16 24-16 40l0 326c0 16 5 29 16 40 11 11 24 16 40 16l326 0c16 0 29-5 40-16 11-11 16-24 16-40z"/>
</font></defs></svg> </font></defs></svg>

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -23,6 +23,8 @@ App.AdvancedSearch =
$('.js-calendar').datepicker $('.js-calendar').datepicker
regional: locale regional: locale
maxDate: "+0d" maxDate: "+0d"
$('.js-calendar-full').datepicker
regional: locale
initialize: -> initialize: ->
App.AdvancedSearch.init_calendar() App.AdvancedSearch.init_calendar()

View File

@@ -0,0 +1,12 @@
App.AllowParticipation =
initialize: ->
$(document).on {
'mouseenter focus': ->
$(this).find(".js-participation-not-allowed").show();
$(this).find(".js-participation-allowed").hide();
mouseleave: ->
$(this).find(".js-participation-not-allowed").hide();
$(this).find(".js-participation-allowed").show();
}, ".js-participation"
false

View File

@@ -12,11 +12,11 @@
// //
//= require jquery //= require jquery
//= require jquery_ujs //= require jquery_ujs
//= require jquery-ui/datepicker //= require jquery-ui/widgets/datepicker
//= require jquery-ui/datepicker-es //= require jquery-ui/i18n/datepicker-es
//= require foundation //= require foundation
//= require turbolinks //= require turbolinks
//= require ckeditor/init //= require ckeditor/loader
//= require_directory ./ckeditor //= require_directory ./ckeditor
//= require social-share-button //= require social-share-button
//= require initial //= require initial
@@ -36,18 +36,27 @@
//= require tags //= require tags
//= require users //= require users
//= require votes //= require votes
//= require allow_participation
//= require annotatable //= require annotatable
//= require advanced_search //= require advanced_search
//= require registration_form //= require registration_form
//= require suggest //= require suggest
//= require forms //= require forms
//= require tracks
//= require valuation_budget_investment_form
//= require valuation_spending_proposal_form //= require valuation_spending_proposal_form
//= require embed_video //= require embed_video
//= require fixed_bar
//= require banners
//= require social_share
//= require checkbox_toggle
//= require custom
var initialize_modules = function() { var initialize_modules = function() {
App.Comments.initialize(); App.Comments.initialize();
App.Users.initialize(); App.Users.initialize();
App.Votes.initialize(); App.Votes.initialize();
App.AllowParticipation.initialize();
App.Tags.initialize(); App.Tags.initialize();
App.Dropdown.initialize(); App.Dropdown.initialize();
App.LocationChanger.initialize(); App.LocationChanger.initialize();
@@ -59,8 +68,14 @@ var initialize_modules = function() {
App.RegistrationForm.initialize(); App.RegistrationForm.initialize();
App.Suggest.initialize(); App.Suggest.initialize();
App.Forms.initialize(); App.Forms.initialize();
App.Tracks.initialize();
App.ValuationBudgetInvestmentForm.initialize();
App.ValuationSpendingProposalForm.initialize(); App.ValuationSpendingProposalForm.initialize();
App.EmbedVideo.initialize(); App.EmbedVideo.initialize();
App.FixedBar.initialize();
App.Banners.initialize();
App.SocialShare.initialize();
App.CheckboxToggle.initialize();
}; };
$(function(){ $(function(){

View File

@@ -0,0 +1,25 @@
App.Banners =
update_banner: (selector, text) ->
$(selector).html(text)
update_style: (selector, style) ->
$(selector).removeClass($(selector).attr("class"), true)
.addClass(style, true)
initialize: ->
$('[data-js-banner-title]').on
change: ->
App.Banners.update_banner("#js-banner-title", $(this).val())
$('[data-js-banner-description]').on
change: ->
App.Banners.update_banner("#js-banner-description", $(this).val())
$("#banner_style").on
change: ->
App.Banners.update_style("#js-banner-style", $(this).val())
$("#banner_image").on
change: ->
App.Banners.update_style("#js-banner-image", $(this).val())

View File

@@ -0,0 +1,12 @@
App.CheckboxToggle =
initialize: ->
$('[data-checkbox-toggle]').on 'change', ->
$this = $(this)
$target = $($this.data('checkbox-toggle'))
if $this.is(':checked')
$target.show()
else
$target.hide()

View File

@@ -0,0 +1,3 @@
//= require ckeditor/init
CKEDITOR.config.customConfig = '<%= javascript_path 'ckeditor/config.js' %>';

View File

@@ -30,11 +30,11 @@ App.Comments =
$("#js-comment-form-#{id}").toggle() $("#js-comment-form-#{id}").toggle()
toggle_arrow: (id) -> toggle_arrow: (id) ->
arrow = "i##{id}_arrow" arrow = "span##{id}_arrow"
if $(arrow).hasClass("icon-angle-right") if $(arrow).hasClass("icon-arrow-right")
$(arrow).removeClass("icon-angle-right").addClass("icon-angle-down") $(arrow).removeClass("icon-arrow-right").addClass("icon-arrow-down")
else else
$(arrow).removeClass("icon-angle-down").addClass("icon-angle-right") $(arrow).removeClass("icon-arrow-down").addClass("icon-arrow-right")
initialize: -> initialize: ->
$('body .js-add-comment-link').each -> $('body .js-add-comment-link').each ->
@@ -52,5 +52,6 @@ App.Comments =
children_container_id = "#{$(this).data().id}_children" children_container_id = "#{$(this).data().id}_children"
$("##{children_container_id}").toggle('slow') $("##{children_container_id}").toggle('slow')
App.Comments.toggle_arrow(children_container_id) App.Comments.toggle_arrow(children_container_id)
$(this).children('.js-child-toggle').toggle()
false false
) )

View File

@@ -0,0 +1,7 @@
// Overrides and adds customized javascripts in this file
// Read more on documentation:
// * English: https://github.com/consul/consul/blob/master/CUSTOMIZE_EN.md#javascript
// * Spanish: https://github.com/consul/consul/blob/master/CUSTOMIZE_ES.md#javascript
//
//

View File

@@ -0,0 +1,13 @@
App.FixedBar =
initialize: ->
$('[data-fixed-bar]').each ->
$this = $(this)
fixedBarTopPosition = $this.offset().top
$(window).on 'scroll', ->
if $(window).scrollTop() > fixedBarTopPosition
$this.addClass('is-fixed')
$("#check-ballot").css({ 'display': "inline-block" });
else
$this.removeClass('is-fixed')
$("#check-ballot").hide()

View File

@@ -0,0 +1,7 @@
App.SocialShare =
initialize: ->
$(".social-share-button a").each ->
element = $(this)
site = element.data('site')
element.append("<span class='sr-only'>#{site}</span>")

View File

@@ -0,0 +1,28 @@
App.Tracks =
tracking_enabled: ->
_paq?
set_custom_var: (id, name, value, scope) ->
_paq.push(['setCustomVariable', id, name, value, scope])
_paq.push(['trackPageView'])
track_event: ($this) ->
category = $this.data('track-event-category')
action = $this.data('track-event-action')
_paq.push(['trackEvent', category, action])
initialize: ->
if App.Tracks.tracking_enabled()
$('[data-track-usertype]').each ->
$this = $(this)
usertype = $this.data('track-usertype')
App.Tracks.set_custom_var(1, "usertype", usertype, "visit")
$('[data-track-event-category]').each ->
$this = $(this)
App.Tracks.track_event($this)
$('[data-track-click]').on 'click', ->
$this = $(this)
App.Tracks.track_event($this)

View File

@@ -0,0 +1,32 @@
App.ValuationBudgetInvestmentForm =
showFeasibleFields: ->
$('#valuation_budget_investment_edit_form #unfeasible_fields').hide('down')
$('#valuation_budget_investment_edit_form #feasible_fields').show()
showNotFeasibleFields: ->
$('#valuation_budget_investment_edit_form #feasible_fields').hide('down')
$('#valuation_budget_investment_edit_form #unfeasible_fields').show()
showAllFields: ->
$('#valuation_budget_investment_edit_form #feasible_fields').show('down')
$('#valuation_budget_investment_edit_form #unfeasible_fields').show('down')
showFeasibilityFields: ->
feasibility = $("#valuation_budget_investment_edit_form input[type=radio][name='budget_investment[feasibility]']:checked").val()
if feasibility == 'feasible'
App.ValuationBudgetInvestmentForm.showFeasibleFields()
else if feasibility == 'unfeasible'
App.ValuationBudgetInvestmentForm.showNotFeasibleFields()
showFeasibilityFieldsOnChange: ->
$("#valuation_budget_investment_edit_form input[type=radio][name='budget_investment[feasibility]']").change ->
App.ValuationBudgetInvestmentForm.showAllFields()
App.ValuationBudgetInvestmentForm.showFeasibilityFields()
initialize: ->
App.ValuationBudgetInvestmentForm.showFeasibilityFields()
App.ValuationBudgetInvestmentForm.showFeasibilityFieldsOnChange()
false

View File

@@ -1,18 +1,16 @@
App.Votes = App.Votes =
hoverize: (votes) -> hoverize: (votes) ->
$(votes).hover -> $(document).on {
$("div.anonymous-votes", votes).show(); 'mouseenter focus': ->
$("div.organizations-votes", votes).show(); $("div.participation-not-allowed", this).show();
$("div.not-logged", votes).show(); $("div.participation-allowed", this).hide();
$("div.logged", votes).hide(); mouseleave: ->
, -> $("div.participation-not-allowed", this).hide();
$("div.anonymous-votes", votes).hide(); $("div.participation-allowed", this).show();
$("div.organizations-votes", votes).hide(); }, votes
$("div.not-logged", votes).hide();
$("div.logged", votes).show();
initialize: -> initialize: ->
App.Votes.hoverize votes for votes in $("div.votes") App.Votes.hoverize "div.votes"
App.Votes.hoverize votes for votes in $("div.supports") App.Votes.hoverize "div.supports"
false false

View File

@@ -0,0 +1,5 @@
// Overrides and adds customized foundation settings in this file
// Read more on documentation:
// * English: https://github.com/consul/consul/blob/master/CUSTOMIZE_EN.md#css
// * Spanish: https://github.com/consul/consul/blob/master/CUSTOMIZE_ES.md#css
//

View File

@@ -3,6 +3,7 @@
// //
// Table of Contents: // Table of Contents:
// //
// 0. Custom variables
// 1. Global // 1. Global
// 2. Breakpoints // 2. Breakpoints
// 3. The Grid // 3. The Grid
@@ -25,48 +26,114 @@
// 20. Label // 20. Label
// 21. Media Object // 21. Media Object
// 22. Menu // 22. Menu
// 23. Off-canvas // 23. Meter
// 24. Orbit // 24. Off-canvas
// 25. Pagination // 25. Orbit
// 26. Progress Bar // 26. Pagination
// 27. Reveal // 27. Progress Bar
// 28. Slider // 28. Reveal
// 29. Switch // 29. Slider
// 30. Table // 30. Switch
// 31. Tabs // 31. Table
// 32. Thumbnail // 32. Tabs
// 33. Title Bar // 33. Thumbnail
// 34. Tooltip // 34. Title Bar
// 35. Top Bar // 35. Tooltip
// 36. Top Bar
// 37. Custom variables
@import 'util/util'; @import 'util/util';
// 0. Custom variables
// --------------------
$base-font-size: rem-calc(17);
$base-line: rem-calc(26);
$small-font-size: rem-calc(14);
$line-height: rem-calc(24);
$tiny-font-size: rem-calc(12);
$brand: #004A83;
$dark: darken($brand, 10%);
$text: #222222;
$text-medium: #515151;
$text-light: #BFBFBF;
$border: #DEE0E3;
$link: $brand;
$link-hover: darken($link, 20%);
$debates: $brand;
$like: #7BD2A8;
$unlike: #EF8585;
$delete: #F04124;
$check: #46DB91;
$proposals: #FFA42D;
$proposals-dark: #794500;
$budget: #7E328A;
$budget-hover: #7571BF;
$highlight: #E7F2FC;
$light: #F5F7FA;
$featured: #FFDC5C;
$footer-border: #BFC1C3;
$success-bg: #DFF0D8;
$success-border: #D6E9C6;
$color-success: #3C763D;
$info-bg: #D9EDF7;
$info-border: #BCE8F1;
$color-info: #31708F;
$warning-bg: #FCF8E3;
$warning-border: #FAEBCC;
$color-warning: #8A6D3B;
$alert-bg: #F2DEDE;
$alert-border: #EBCCD1;
$color-alert: #A94442;
// 1. Global // 1. Global
// --------- // ---------
$global-font-size: 100%; $global-font-size: 100%;
$global-width: rem-calc(1200); $global-width: rem-calc(1200);
$global-lineheight: 1.5; $global-lineheight: 1.5;
$primary-color: #2199e8; $foundation-palette: (
$secondary-color: #777; primary: #2199e8,
$success-color: #43ac6a; secondary: #777,
$warning-color: #ffae00; success: #3adb76,
$alert-color: #ec5840; warning: #ffae00,
alert: #ec5840,
);
$light-gray: #e6e6e6; $light-gray: #e6e6e6;
$medium-gray: #cacaca; $medium-gray: #cacaca;
$dark-gray: #8a8a8a; $dark-gray: #8a8a8a;
$black: #0a0a0a; $black: #222222;
$white: #fefefe; $white: #ffffff;
$body-background: $white; $body-background: $white;
$body-font-color: $black; $body-font-color: $black;
$body-font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; $body-font-family: 'Source Sans Pro', 'Helvetica', 'Arial', sans-serif !important;
$body-antialiased: true; $body-antialiased: true;
$global-margin: 1rem; $global-margin: 1rem;
$global-padding: 1rem; $global-padding: 1rem;
$global-weight-normal: normal; $global-weight-normal: normal;
$global-weight-bold: bold; $global-weight-bold: bold;
$global-radius: 3px; $global-radius: rem-calc(3);
$global-text-direction: ltr; $global-text-direction: ltr;
$global-flexbox: false;
$print-transparent-backgrounds: true;
@include add-foundation-colors;
// 2. Breakpoints // 2. Breakpoints
// -------------- // --------------
@@ -75,8 +142,6 @@ $breakpoints: (
small: 0, small: 0,
medium: 640px, medium: 640px,
large: 1024px, large: 1024px,
xlarge: 1200px,
xxlarge: 1440px,
); );
$breakpoint-classes: (small medium large); $breakpoint-classes: (small medium large);
@@ -85,7 +150,7 @@ $breakpoint-classes: (small medium large);
$grid-row-width: $global-width; $grid-row-width: $global-width;
$grid-column-count: 12; $grid-column-count: 12;
$grid-column-responsive-gutter: ( $grid-column-gutter: (
small: 20px, small: 20px,
medium: 30px, medium: 30px,
); );
@@ -101,27 +166,27 @@ $header-font-style: normal;
$font-family-monospace: Consolas, 'Liberation Mono', Courier, monospace; $font-family-monospace: Consolas, 'Liberation Mono', Courier, monospace;
$header-sizes: ( $header-sizes: (
small: ( small: (
'h1': 24, 'h1': 34,
'h2': 20, 'h2': 24,
'h3': 19, 'h3': 20,
'h4': 18, 'h4': 18,
'h5': 17, 'h5': 16,
'h6': 16, 'h6': 14,
), ),
medium: ( medium: (
'h1': 48, 'h1': 44,
'h2': 40, 'h2': 34,
'h3': 31, 'h3': 24,
'h4': 25, 'h4': 19,
'h5': 20, 'h5': 16,
'h6': 16, 'h6': 13,
), ),
); );
$header-color: inherit; $header-color: inherit;
$header-lineheight: 1.4; $header-lineheight: 1.4;
$header-margin-bottom: 0.5rem; $header-margin-bottom: 0.5rem;
$header-text-rendering: optimizeLegibility; $header-text-rendering: optimizeLegibility;
$small-font-size: 80%; $small-font-size: rem-calc(14);
$header-small-font-color: $medium-gray; $header-small-font-color: $medium-gray;
$paragraph-lineheight: 1.6; $paragraph-lineheight: 1.6;
$paragraph-margin-bottom: 1rem; $paragraph-margin-bottom: 1rem;
@@ -177,9 +242,9 @@ $stat-font-size: 2.5rem;
$abide-inputs: true; $abide-inputs: true;
$abide-labels: true; $abide-labels: true;
$input-background-invalid: $alert-color; $input-background-invalid: map-get($foundation-palette, alert);
$form-label-color-invalid: $alert-color; $form-label-color-invalid: map-get($foundation-palette, alert);
$input-error-color: $alert-color; $input-error-color: map-get($foundation-palette, alert);
$input-error-font-size: rem-calc(12); $input-error-font-size: rem-calc(12);
$input-error-font-weight: $global-weight-bold; $input-error-font-weight: $global-weight-bold;
@@ -188,12 +253,12 @@ $input-error-font-weight: $global-weight-bold;
$accordion-background: $white; $accordion-background: $white;
$accordion-plusminus: true; $accordion-plusminus: true;
$accordion-item-color: foreground($accordion-background, $primary-color); $accordion-item-color: foreground($accordion-background, $text);
$accordion-item-background-hover: $light-gray; $accordion-item-background-hover: $light-gray;
$accordion-item-padding: 1.25rem 1rem; $accordion-item-padding: 1.25rem 1rem;
$accordion-content-background: $white; $accordion-content-background: $white;
$accordion-content-border: 1px solid $light-gray; $accordion-content-border: 1px solid $light-gray;
$accordion-content-color: foreground($accordion-background, $primary-color); $accordion-content-color: foreground($accordion-background, $text);
$accordion-content-padding: 1rem; $accordion-content-padding: 1rem;
// 8. Accordion Menu // 8. Accordion Menu
@@ -231,11 +296,11 @@ $button-margin: 0 0 $global-margin 0;
$button-fill: solid; $button-fill: solid;
$button-background: $primary-color; $button-background: $primary-color;
$button-background-hover: scale-color($button-background, $lightness: -15%); $button-background-hover: scale-color($button-background, $lightness: -15%);
$button-color: #fff; $button-color: $white;
$button-color-alt: #000; $button-color-alt: $black;
$button-radius: $global-radius; $button-radius: $global-radius;
$button-sizes: ( $button-sizes: (
tiny: $small-font-size, tiny: 0.6rem,
small: 0.75rem, small: 0.75rem,
default: 0.9rem, default: 0.9rem,
large: 1.25rem, large: 1.25rem,
@@ -320,7 +385,7 @@ $fieldset-padding: rem-calc(20);
$fieldset-margin: rem-calc(18 0); $fieldset-margin: rem-calc(18 0);
$legend-padding: rem-calc(0 3); $legend-padding: rem-calc(0 3);
$form-spacing: rem-calc(16); $form-spacing: rem-calc(16);
$helptext-color: #333; $helptext-color: $black;
$helptext-font-size: rem-calc(13); $helptext-font-size: rem-calc(13);
$helptext-font-style: italic; $helptext-font-style: italic;
$input-prefix-color: $black; $input-prefix-color: $black;
@@ -332,9 +397,10 @@ $form-label-font-size: rem-calc(14);
$form-label-font-weight: $global-weight-normal; $form-label-font-weight: $global-weight-normal;
$form-label-line-height: 1.8; $form-label-line-height: 1.8;
$select-background: $white; $select-background: $white;
$select-triangle-color: #333; $select-triangle-color: $dark-gray;
$select-radius: $global-radius; $select-radius: $global-radius;
$input-color: $black; $input-color: $black;
$input-placeholder-color: $medium-gray;
$input-font-family: inherit; $input-font-family: inherit;
$input-font-size: rem-calc(16); $input-font-size: rem-calc(16);
$input-background: $white; $input-background: $white;
@@ -344,7 +410,7 @@ $input-border: 1px solid $medium-gray;
$input-border-focus: 1px solid $dark-gray; $input-border-focus: 1px solid $dark-gray;
$input-shadow: inset 0 1px 2px rgba($black, 0.1); $input-shadow: inset 0 1px 2px rgba($black, 0.1);
$input-shadow-focus: 0 0 5px $medium-gray; $input-shadow-focus: 0 0 5px $medium-gray;
$input-cursor-disabled: default; $input-cursor-disabled: not-allowed;
$input-transition: box-shadow 0.5s, border-color 0.25s ease-in-out; $input-transition: box-shadow 0.5s, border-color 0.25s ease-in-out;
$input-number-spinners: true; $input-number-spinners: true;
$input-radius: $global-radius; $input-radius: $global-radius;
@@ -356,7 +422,7 @@ $label-background: $primary-color;
$label-color: foreground($label-background); $label-color: foreground($label-background);
$label-font-size: 0.8rem; $label-font-size: 0.8rem;
$label-padding: 0.33333rem 0.5rem; $label-padding: 0.33333rem 0.5rem;
$label-radius: $global-radius*10; $label-radius: $global-radius;
// 21. Media Object // 21. Media Object
// ---------------- // ----------------
@@ -371,10 +437,21 @@ $mediaobject-image-width-stacked: 100%;
$menu-margin: 0; $menu-margin: 0;
$menu-margin-nested: 1rem; $menu-margin-nested: 1rem;
$menu-item-padding: 0.7rem 1rem; $menu-item-padding: 0.7rem 1rem;
$menu-item-color-active: $white;
$menu-item-background-active: map-get($foundation-palette, primary);
$menu-icon-spacing: 0.25rem; $menu-icon-spacing: 0.25rem;
$menu-expand-max: 6;
// 23. Off-canvas // 23. Meter
// ---------
$meter-height: 1rem;
$meter-radius: $global-radius;
$meter-background: $medium-gray;
$meter-fill-good: $success-color;
$meter-fill-medium: $warning-color;
$meter-fill-bad: $alert-color;
// 24. Off-canvas
// -------------- // --------------
$offcanvas-size: 250px; $offcanvas-size: 250px;
@@ -387,7 +464,7 @@ $offcanvas-exit-background: rgba($white, 0.25);
$maincontent-class: 'off-canvas-content'; $maincontent-class: 'off-canvas-content';
$maincontent-shadow: 0 0 10px rgba($black, 0.5); $maincontent-shadow: 0 0 10px rgba($black, 0.5);
// 24. Orbit // 25. Orbit
// --------- // ---------
$orbit-bullet-background: $medium-gray; $orbit-bullet-background: $medium-gray;
@@ -402,7 +479,7 @@ $orbit-control-background-hover: rgba($black, 0.5);
$orbit-control-padding: 1rem; $orbit-control-padding: 1rem;
$orbit-control-zindex: 10; $orbit-control-zindex: 10;
// 25. Pagination // 26. Pagination
// -------------- // --------------
$pagination-font-size: rem-calc(14); $pagination-font-size: rem-calc(14);
@@ -416,10 +493,10 @@ $pagination-item-background-current: $primary-color;
$pagination-item-color-current: foreground($pagination-item-background-current); $pagination-item-color-current: foreground($pagination-item-background-current);
$pagination-item-color-disabled: $medium-gray; $pagination-item-color-disabled: $medium-gray;
$pagination-ellipsis-color: $black; $pagination-ellipsis-color: $black;
$pagination-mobile-items: true; $pagination-mobile-items: false;
$pagination-arrows: true; $pagination-arrows: true;
// 26. Progress Bar // 27. Progress Bar
// ---------------- // ----------------
$progress-height: 1rem; $progress-height: 1rem;
@@ -428,24 +505,24 @@ $progress-margin-bottom: $global-margin;
$progress-meter-background: $primary-color; $progress-meter-background: $primary-color;
$progress-radius: $global-radius; $progress-radius: $global-radius;
// 27. Reveal // 28. Reveal
// ---------- // ----------
$reveal-background: $white; $reveal-background: $white;
$reveal-width: 600px; $reveal-width: 600px;
$reveal-max-width: $global-width; $reveal-max-width: $global-width;
$reveal-offset: rem-calc(100);
$reveal-padding: $global-padding; $reveal-padding: $global-padding;
$reveal-border: 1px solid $medium-gray; $reveal-border: 1px solid $medium-gray;
$reveal-radius: $global-radius; $reveal-radius: $global-radius;
$reveal-zindex: 1005; $reveal-zindex: 1005;
$reveal-overlay-background: rgba($black, 0.45); $reveal-overlay-background: rgba($black, 0.45);
// 28. Slider // 29. Slider
// ---------- // ----------
$slider-width-vertical: 0.5rem;
$slider-transition: all 0.2s ease-in-out;
$slider-height: 0.5rem; $slider-height: 0.5rem;
$slider-width-vertical: $slider-height;
$slider-background: $light-gray; $slider-background: $light-gray;
$slider-fill-background: $medium-gray; $slider-fill-background: $medium-gray;
$slider-handle-height: 1.4rem; $slider-handle-height: 1.4rem;
@@ -453,9 +530,8 @@ $slider-handle-width: 1.4rem;
$slider-handle-background: $primary-color; $slider-handle-background: $primary-color;
$slider-opacity-disabled: 0.25; $slider-opacity-disabled: 0.25;
$slider-radius: $global-radius; $slider-radius: $global-radius;
$slider-transition: all 0.2s ease-in-out;
// 29. Switch // 30. Switch
// ---------- // ----------
$switch-background: $medium-gray; $switch-background: $medium-gray;
@@ -471,7 +547,7 @@ $switch-paddle-offset: 0.25rem;
$switch-paddle-radius: $global-radius; $switch-paddle-radius: $global-radius;
$switch-paddle-transition: all 0.25s ease-out; $switch-paddle-transition: all 0.25s ease-out;
// 30. Table // 31. Table
// --------- // ---------
$table-background: $white; $table-background: $white;
@@ -488,23 +564,22 @@ $table-foot-background: smart-scale($table-background, $table-color-scale);
$table-head-font-color: $body-font-color; $table-head-font-color: $body-font-color;
$show-header-for-stacked: false; $show-header-for-stacked: false;
// 31. Tabs // 32. Tabs
// -------- // --------
$tab-margin: 0; $tab-margin: 0;
$tab-background: $white; $tab-background: $white;
$tab-background-active: $light-gray; $tab-background-active: $white;
$tab-border: $light-gray; $tab-item-font-size: $base-font-size;
$tab-item-color: foreground($tab-background, $primary-color);
$tab-item-background-hover: $white; $tab-item-background-hover: $white;
$tab-item-padding: 1.25rem 1.5rem; $tab-item-padding: $line-height/2 0;
$tab-expand-max: 6; $tab-expand-max: 6;
$tab-content-background: $white; $tab-content-background: $white;
$tab-content-border: $light-gray; $tab-content-border: $border;
$tab-content-color: foreground($tab-background, $primary-color); $tab-content-color: foreground($tab-background, $primary-color);
$tab-content-padding: 1rem; $tab-content-padding: 1rem;
// 32. Thumbnail // 33. Thumbnail
// ------------- // -------------
$thumbnail-border: solid 4px $white; $thumbnail-border: solid 4px $white;
@@ -514,7 +589,7 @@ $thumbnail-shadow-hover: 0 0 6px 1px rgba($primary-color, 0.5);
$thumbnail-transition: box-shadow 200ms ease-out; $thumbnail-transition: box-shadow 200ms ease-out;
$thumbnail-radius: $global-radius; $thumbnail-radius: $global-radius;
// 33. Title Bar // 34. Title Bar
// ------------- // -------------
$titlebar-background: $black; $titlebar-background: $black;
@@ -525,7 +600,7 @@ $titlebar-icon-color: $white;
$titlebar-icon-color-hover: $medium-gray; $titlebar-icon-color-hover: $medium-gray;
$titlebar-icon-spacing: 0.25rem; $titlebar-icon-spacing: 0.25rem;
// 34. Tooltip // 35. Tooltip
// ----------- // -----------
$has-tip-font-weight: $global-weight-bold; $has-tip-font-weight: $global-weight-bold;
@@ -536,13 +611,14 @@ $tooltip-padding: 0.75rem;
$tooltip-font-size: $small-font-size; $tooltip-font-size: $small-font-size;
$tooltip-pip-width: 0.75rem; $tooltip-pip-width: 0.75rem;
$tooltip-pip-height: $tooltip-pip-width * 0.866; $tooltip-pip-height: $tooltip-pip-width * 0.866;
$tooltip-pip-offset: 1.25rem;
$tooltip-radius: $global-radius; $tooltip-radius: $global-radius;
// 35. Top Bar // 36. Top Bar
// ----------- // -----------
$topbar-padding: 0.5rem; $topbar-padding: 0.5rem;
$topbar-background: $light-gray; $topbar-background: $light-gray;
$topbar-submenu-background: $topbar-background;
$topbar-title-spacing: 1rem; $topbar-title-spacing: 1rem;
$topbar-input-width: 200px; $topbar-input-width: 200px;
$topbar-unstack-breakpoint: medium;

View File

@@ -5,70 +5,133 @@
// 03. List elements // 03. List elements
// 04. Stats // 04. Stats
// 05. Management // 05. Management
// 06. Polls
// //
// 01. Global styles // 01. Global styles
// - - - - - - - - - - - - - - - - - - - - - - - - - // -----------------
$admin-color: #CF3638;
body.admin { body.admin {
header {
border: 0;
.top-links {
background: darken($admin-color, 15%);
}
.back-web {
padding-top: $line-height/4;
text-decoration: underline;
}
}
.top-bar {
background: $admin-color !important;
height: auto;
}
.top-bar-title {
h1 {
margin-bottom: 0;
}
}
form { form {
.button { .button {
margin-top: 0; margin-top: 0;
&.margin-top {
margin-top: $line-height;
}
} }
input[type="text"], textarea { input[type="text"], textarea {
height: 48px\9;
line-height: 48px\9;
margin-bottom: 24px\9;
width: 100%; width: 100%;
} }
.fieldset {
select {
height: $line-height*2;
}
.input-group input[type="text"] {
border-radius: 0;
margin-bottom: 0 !important;
}
}
} }
table { table {
th {
text-align: left;
&.text-center {
text-align: center;
}
&.text-right {
padding-right: $line-height;
text-align: right;
}
&.with-button {
line-height: $line-height*2;
}
}
tr { tr {
background: #f4f4f4;
&:nth-child(odd) {
background: white; background: white;
} border: 1px solid $border;
&:nth-child(even) { &:hover {
background: #f0f0f0; background: #f3f6f7;
} }
} }
td.small { &.fixed {
font-size: $small-font-size; table-layout: fixed;
} }
input[type="submit"] ~ a, a ~ a {
margin-left: 0;
margin-right: 0;
margin-top: $line-height/2;
@include breakpoint(medium) {
margin-left: $line-height/2;
margin-right: $line-height/2;
margin-top: 0;
}
}
}
hr {
max-width: none;
}
.menu.simple li.active {
border-bottom: 2px solid $admin-color;
color: $admin-color;
}
.tabs-panel {
padding-left: 0;
padding-right: 0;
} }
#proposals { #proposals {
width: 100% !important; width: 100% !important;
} }
.dashboard { .accordion-title {
margin-bottom: rem-calc(48); font-size: $base-font-size;
ul, ol {
margin-left: rem-calc(12);
li {
font-size: rem-calc(15);
line-height: rem-calc(30);
margin-bottom: rem-calc(12);
}
}
p {
font-size: rem-calc(15);
line-height: rem-calc(30);
}
h3 {
font-weight: bold;
}
} }
.button.secondary { .button.secondary {
@@ -77,7 +140,7 @@ body.admin {
.admin-content { .admin-content {
.proposal-new, .proposal-edit { .proposal-form {
padding-top: 0; padding-top: 0;
} }
@@ -99,104 +162,144 @@ body.admin {
display: none; display: none;
} }
.admin-content {
padding: $line-height !important;
}
@include breakpoint(medium) {
tr {
.on-hover-block {
display: none;
}
&:hover .on-hover-block {
display: block;
margin: 0;
margin-top: $line-height/2;
width: 100%;
}
}
}
@include breakpoint(medium) {
tr {
.on-hover {
display: none;
}
&:hover .on-hover {
display: inline;
}
}
}
.input-group {
.input-group-button {
padding-bottom: rem-calc(16);
}
}
// 02. Sidebar // 02. Sidebar
// - - - - - - - - - - - - - - - - - - - - - - - - - // -----------
.admin-sidebar { .admin-sidebar {
border-right: 1px solid $border;
a { @include breakpoint(medium) {
color: white\9 !important; min-height: rem-calc(1100);
} }
ul { ul {
list-style-type: none; list-style-type: none;
margin-bottom: 0;
margin-left: 0; margin-left: 0;
padding: 0; padding: 0;
[class^="icon-"] { [class^="icon-"] {
color: $admin-color;
display: inline-block; display: inline-block;
font-size: rem-calc(24); font-size: rem-calc(24);
padding-right: rem-calc(24); line-height: $line-height;
padding-top: rem-calc(4); padding: $line-height/2 $line-height/4;
padding-left: 12px\9 !important; padding-left: 0;
padding-right: 12px\9 !important; vertical-align: middle;
} }
li { li {
background: #2E343F; background: white;
border-bottom: 1px solid #292f39;
border-top: 1px solid #353c49;
margin: 0; margin: 0;
outline: 0; outline: 0;
&:first-child { ul {
margin-left: $line-height/1.5;
border-left: 1px solid $border;
padding-left: $line-height/2;
}
&.section-title {
border-bottom: 1px solid $border;
}
&.active a {
background: #f3f6f7;
border-radius: rem-calc(6);
-moz-border-radius: rem-calc(6);
-webkit-border-radius: rem-calc(6);
color: $admin-color;
font-weight: bold; font-weight: bold;
text-transform: uppercase;
}
&.active{
background: #373D47;
a:not(.button) {
color: white;
}
} }
} }
li a:not(.button) { li a {
color: rgba(255,255,255,0.3); color: $text;
display: block;
line-height: rem-calc(48); line-height: rem-calc(48);
padding-left: rem-calc(12); padding-left: rem-calc(12);
vertical-align: top; vertical-align: top;
&:hover { &:hover {
color: white; background: #f3f6f7;
border-radius: rem-calc(6);
-moz-border-radius: rem-calc(6);
-webkit-border-radius: rem-calc(6);
color: $admin-color;
text-decoration: none;
} }
} }
} }
.is-accordion-submenu-parent {
& > a::after {
border-color: $admin-color transparent transparent;
}
}
.submenu {
border-bottom: 0;
margin-left: $line-height;
li:first-child {
padding-top: $line-height/2;
}
li:last-child {
padding-bottom: $line-height/2;
}
a {
font-weight: normal;
}
}
} }
// 03. List elements // 03. List elements
// - - - - - - - - - - - - - - - - - - - - - - - - - // -----------------
.admin-list {
list-style-type: none;
margin: 0;
margin-bottom: rem-calc(48);
form {
clear: both;
.checkbox {
font-size: $small-font-size;
}
}
li {
border-bottom: 1px solid #E7E9EC;
font-size: rem-calc(14);
min-height: rem-calc(72);
padding: rem-calc(12);
&:first-child {
border-top: 1px solid #E7E9EC;
}
&:nth-child(odd) {
background: #F0F2F6;
}
}
.tag {
float: left;
font-size: rem-calc(18);
padding: 0;
}
.button {
margin: 0;
}
}
.delete { .delete {
border-bottom: 1px dotted #CF2A0E; border-bottom: 1px dotted #CF2A0E;
@@ -209,6 +312,11 @@ body.admin {
} }
} }
[class^="icon-"].delete {
border: 0;
font-size: $base-font-size;
}
.verified { .verified {
color: $check; color: $check;
@@ -239,14 +347,9 @@ body.admin {
font-style: italic; font-style: italic;
} }
.level {
font-size: rem-calc(12);
}
.official { .official {
background-color: #e7e7e7; background-color: #e7e7e7;
border-radius: rem-calc(3); border-radius: rem-calc(3);
font-size: rem-calc(12);
font-weight: normal; font-weight: normal;
padding: rem-calc(6) rem-calc(12); padding: rem-calc(6) rem-calc(12);
} }
@@ -262,13 +365,10 @@ body.admin {
.moderation-description { .moderation-description {
max-height: rem-calc(65); max-height: rem-calc(65);
overflow: hidden; overflow: hidden;
max-width: rem-calc(590); max-width: rem-calc(700);
&:hover { &:hover {
cursor: text;
max-height: rem-calc(1000); max-height: rem-calc(1000);
outline: 3px solid #ffbf47;
padding: rem-calc(12);
transition: max-height 0.9s; transition: max-height 0.9s;
-moz-transition: max-height 0.9s; -moz-transition: max-height 0.9s;
-webkit-transition: max-height 0.9s; -webkit-transition: max-height 0.9s;
@@ -276,7 +376,7 @@ body.admin {
} }
// 04. Stats // 04. Stats
// - - - - - - - - - - - - - - - - - - - - - - - - - // ---------
.stats { .stats {
background: white; background: white;
@@ -304,7 +404,7 @@ body.admin {
} }
// 05. Management // 05. Management
// - - - - - - - - - - - - - - - - - - - - - - - - - // --------------
.user-permissions { .user-permissions {
@@ -337,8 +437,8 @@ body.admin {
border-radius: rem-calc(3); border-radius: rem-calc(3);
font-size: rem-calc(16); font-size: rem-calc(16);
font-weight: normal; font-weight: normal;
margin-bottom: rem-calc(12); margin: $line-height;
padding: rem-calc(6) rem-calc(12); padding: $line-height/2;
strong { strong {
font-size: rem-calc(18); font-size: rem-calc(18);
@@ -349,3 +449,101 @@ body.admin {
margin-bottom: 0; margin-bottom: 0;
} }
body.admin {
.investment-projects-list.medium-9 {
width: 100%;
}
.investment-projects-summary {
th, td {
text-align: center;
&:first-child {
font-weight: bold;
text-align: left;
}
&:last-child {
font-weight: bold;
}
}
tr {
&:nth-child(even) td:last-child {
background: $success-border;
}
&:nth-child(odd) td:last-child {
background: $success-bg;
}
}
}
}
.admin-content .select-geozone, .admin-content .select-heading {
a {
display: block;
&.active {
color: $brand;
font-weight: bold;
text-decoration: underline;
}
}
}
table.investment-projects-summary {
td.total-price {
white-space: nowrap;
}
}
body.admin {
.geozone {
background: #ececec;
border-radius: rem-calc(6);
color: $text;
display: inline-block;
font-size: $small-font-size;
margin-bottom: $line-height/3;
padding: $line-height/4 $line-height/3;
text-decoration: none;
&:hover {
background: #e0e0e0;
}
}
}
// 06. Polls
// -----------------
.count-error {
background: $alert-bg !important;
color: $color-alert;
font-weight: bold;
}
table {
.callout {
height: $line-height*2;
line-height: $line-height*2;
padding: 0 $line-height/2;
}
}
// 07. CMS
// --------------
.cms_page_list {
[class^="icon-"] {
padding-right: $menu-icon-spacing;
vertical-align: middle;
}
}

View File

@@ -24,7 +24,7 @@
border-radius: 0; border-radius: 0;
bottom: $line-height; bottom: $line-height;
box-shadow: 0 0 5px rgba(0,0,0,0.05); box-shadow: 0 0 5px rgba(0,0,0,0.05);
font-family: $font-sans; font-family: $body-font-family;
font-size: $base-font-size; font-size: $base-font-size;
line-height: $line-height; line-height: $line-height;
min-width: $line-height*13; min-width: $line-height*13;
@@ -57,7 +57,7 @@
border: none; border: none;
box-shadow: none; box-shadow: none;
color: $link; color: $link;
font-family: $font-sans; font-family: $body-font-family;
font-size: $base-font-size; font-size: $base-font-size;
font-weight: normal; font-weight: normal;
text-shadow: none; text-shadow: none;

View File

@@ -2,11 +2,12 @@
@import "foundation_and_overrides"; @import "foundation_and_overrides";
@import "fonts"; @import "fonts";
@import "icons"; @import "icons";
@import "variables";
@import "mixins"; @import "mixins";
@import "admin"; @import "admin";
@import "layout"; @import "layout";
@import "participation"; @import "participation";
@import "pages";
@import "custom";
@import "c3"; @import "c3";
@import "annotator.min"; @import "annotator.min";
@import "annotator_overrides"; @import "annotator_overrides";

View File

@@ -0,0 +1,5 @@
// Overrides and adds customized styles in this file
// Read more on documentation:
// * English: https://github.com/consul/consul/blob/master/CUSTOMIZE_EN.md#css
// * Spanish: https://github.com/consul/consul/blob/master/CUSTOMIZE_ES.md#css
//

View File

@@ -51,7 +51,7 @@
border-right: 1px solid $dark; border-right: 1px solid $dark;
tr th { tr th {
color: white; color: $dark;
} }
} }
@@ -85,7 +85,7 @@
background: white; background: white;
.ui-state-default { .ui-state-default {
background: $input-bg; background: #F8F8F8;
color: $text-medium; color: $text-medium;
} }
} }

View File

@@ -1,14 +1,9 @@
@charset 'utf-8'; @charset 'utf-8';
@import 'settings'; @import 'settings';
@import 'custom_settings';
@import 'foundation'; @import 'foundation';
// If you'd like to include motion-ui, you need to install the motion-ui sass package.
//
// @import 'motion-ui/motion-ui';
// We include everything by default. To slim your CSS, remove components you don't use.
@include foundation-global-styles; @include foundation-global-styles;
@include foundation-grid; @include foundation-grid;
@include foundation-typography; @include foundation-typography;
@@ -18,7 +13,6 @@
@include foundation-float-classes; @include foundation-float-classes;
@include foundation-accordion; @include foundation-accordion;
@include foundation-accordion-menu; @include foundation-accordion-menu;
@include foundation-badge;
@include foundation-breadcrumbs; @include foundation-breadcrumbs;
@include foundation-button-group; @include foundation-button-group;
@include foundation-callout; @include foundation-callout;
@@ -31,10 +25,8 @@
@include foundation-media-object; @include foundation-media-object;
@include foundation-menu; @include foundation-menu;
@include foundation-off-canvas; @include foundation-off-canvas;
@include foundation-orbit;
@include foundation-pagination; @include foundation-pagination;
@include foundation-progress-bar; @include foundation-progress-bar;
@include foundation-slider;
@include foundation-sticky; @include foundation-sticky;
@include foundation-reveal; @include foundation-reveal;
@include foundation-switch; @include foundation-switch;
@@ -42,10 +34,5 @@
@include foundation-tabs; @include foundation-tabs;
@include foundation-thumbnail; @include foundation-thumbnail;
@include foundation-title-bar; @include foundation-title-bar;
@include foundation-tooltip;
@include foundation-top-bar; @include foundation-top-bar;
@include foundation-menu-icon;
// If you'd like to include motion-ui, you need to install the motion-ui sass package.
//
// @include motion-ui-transitions;
// @include motion-ui-animations;

View File

@@ -163,3 +163,36 @@
.icon-whatsapp:before { .icon-whatsapp:before {
content: "\50"; content: "\50";
} }
.icon-zip:before {
content: "\4f";
}
.icon-banner:before {
content: "\51";
}
.icon-arrow-down:before {
content: "\52";
}
.icon-arrow-left:before {
content: "\54";
}
.icon-arrow-right:before {
content: "\55";
}
.icon-check-circle:before {
content: "\56";
}
.icon-arrow-top:before {
content: "\57";
}
.icon-help-1:before {
content: "\58";
}
.icon-checkmark-circle:before {
content: "\59";
}
.icon-telegram:before {
content: "\31";
}
.icon-instagram:before {
content: "\32";
}

View File

@@ -0,0 +1,199 @@
// Stylesheet for Internet Explorer
//
// Table of Contents
// 01. Global styles
// 02. Admin
//
// 01. Global styles
// -----------------
*, *:before, *:after {
box-sizing: border-box !important;
}
.show-for-medium-down,
.show-for-medium,
.show-for-small {
display: none !important;
}
.show-for-large-up,
.hide-for-medium-down {
display: block !important;
}
.column, .columns {
display: inline-block !important;
float: none !important;
box-sizing: border-box !important;
}
.small-1, .row .small-1 { width: 7.33333%; }
.small-2, .row .small-2 { width: 15.66667%; }
.small-3, .row .small-3 { width: 24%; }
.small-4, .row .small-4 { width: 32.33333%; }
.small-5, .row .small-5 { width: 40.66667%; }
.small-6, .row .small-6 { width: 49%; }
.small-7, .row .small-7 { width: 57.33333%; }
.small-8, .row .small-8 { width: 65.66667%; }
.small-9, .row .small-9 { width: 74%; }
.small-10, .row .small-10 { width: 82.33333%; }
.small-11, .row .small-11 { width: 90.66667%; }
.small-12, .row .small-12 { width: 99%; }
.medium-1, .row .medium-1 { width: 7.33333%; }
.medium-2, .row .medium-2 { width: 15.66667%; }
.medium-3, .row .medium-3 { width: 24%; }
.medium-4, .row .medium-4 { width: 32.33333%; }
.medium-5, .row .medium-5 { width: 40.66667%; }
.medium-6, .row .medium-6 { width: 49%; }
.medium-7, .row .medium-7 { width: 57.33333%; }
.medium-8, .row .medium-8 { width: 65.66667%; }
.medium-9, .row .medium-9 { width: 74%; }
.medium-10, .row .medium-10 { width: 82.33333%; }
.medium-11, .row .medium-11 { width: 90.66667%; }
.medium-12, .row .medium-12 { width: 99%; }
.large-1, .row .large-1 { width: 7.33333%; }
.large-2, .row .large-2 { width: 15.66667%; }
.large-3, .row .large-3 { width: 24%; }
.large-4, .row .large-4 { width: 32.33333%; }
.large-5, .row .large-5 { width: 40.66667%; }
.large-6, .row .large-6 { width: 49%; }
.large-7, .row .large-7 { width: 57.33333%; }
.large-8, .row .large-8 { width: 65.66667%; }
.large-9, .row .large-9 { width: 74%; }
.large-10, .row .large-10 { width: 82.33333%; }
.large-11, .row .large-11 { width: 90.66667%; }
.large-12, .row .large-12 { width: 99%; }
.row .small-offset-1 { margin-left: 7.33333%; }
.row .small-offset-2 { margin-left: 15.66667%; }
.row .small-offset-3 { margin-left: 24%; }
.row .small-offset-4 { margin-left: 32.33333%; }
.row .small-offset-5 { margin-left: 40.66667%; }
.row .small-offset-6 { margin-left: 49%; }
.row .small-offset-7 { margin-left: 57.33333%; }
.row .small-offset-8 { margin-left: 65.66667%; }
.row .small-offset-9 { margin-left: 74%; }
.row .small-offset-10 { margin-left: 82.33333%; }
.row .small-offset-11 { margin-left: 90.66667%; }
.row .small-offset-12 { margin-left: 99%; }
.row .medium-offset-1 { margin-left: 7.33333%; }
.row .medium-offset-2 { margin-left: 15.66667%; }
.row .medium-offset-3 { margin-left: 24%; }
.row .medium-offset-4 { margin-left: 32.33333%; }
.row .medium-offset-5 { margin-left: 40.66667%; }
.row .medium-offset-6 { margin-left: 49%; }
.row .medium-offset-7 { margin-left: 57.33333%; }
.row .medium-offset-8 { margin-left: 65.66667%; }
.row .medium-offset-9 { margin-left: 74%; }
.row .medium-offset-10 { margin-left: 82.33333%; }
.row .medium-offset-11 { margin-left: 90.66667%; }
.row .medium-offset-12 { margin-left: 99%; }
.row .large-offset-1 { margin-left: 7.33333%; }
.row .large-offset-2 { margin-left: 15.66667%; }
.row .large-offset-3 { margin-left: 24%; }
.row .large-offset-4 { margin-left: 32.33333%; }
.row .large-offset-5 { margin-left: 40.66667%; }
.row .large-offset-6 { margin-left: 49%; }
.row .large-offset-7 { margin-left: 57.33333%; }
.row .large-offset-8 { margin-left: 65.66667%; }
.row .large-offset-9 { margin-left: 74%; }
.row .large-offset-10 { margin-left: 82.33333%; }
.row .large-offset-11 { margin-left: 90.66667%; }
.row .large-offset-12 { margin-left: 99%; }
.top-bar {
clear: both !important;
height: 100px !important;
}
.locale, .external-links {
background: #002d50 !important;
}
.locale {
float: left !important;
}
.external-links {
color: white !important;
float: right !important;
}
.top-bar-title, .top-bar-title a, .top-bar-title a {
display: inline-block !important;
float: none !important;
}
.top-bar-title a {
line-height: 24px !important;
width: 100% !important;
}
.proposal .supports {
display: inline-block !important;
margin: 0 !important;
position: inherit !important;
&:after {
content: none !important;
}
}
form {
input, textarea {
height: 48px !important;
line-height: 48px !important;
margin-bottom: 24px !important;
width: 100% !important;
}
input[type="checkbox"],
input[type="radio"] {
height: auto !important;
line-height: inherit !important;
width: auto !important;
}
input[type="radio"] {
width: 18px !important;
}
}
.subnavigation {
display: block;
height: 60px !important;
width: 100%;
ul li a {
margin-left: 10px !important;
margin-right: 10px !important;
}
}
.truncate {
background: none;
}
// 02. Admin
// ---------
body.admin form {
input[type="text"], textarea {
height: 48px !important;
line-height: 48px !important;
margin-bottom: 24px !important;
}
}
.admin-sidebar ul [class^="icon-"] {
padding-left: 12px !important;
padding-right: 12px !important;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,24 +1,19 @@
// Table of Contents // Table of Contents
// //
// 01. Mixins // 01. Logo
// //
// 01. Mixins // 01. Logo
// - - - - - - - - - - - - - - - - - - - - - - - - - // --------
@mixin back {
clear: both;
color: $text-medium;
float: left;
}
@mixin logo { @mixin logo {
color: white; color: white;
font-family: $font-logo; display: inline-block;
font-size: $h3-font-size; font-family: 'Lato' !important;
font-size: rem-calc(24);
font-weight: lighter; font-weight: lighter;
@media (min-width: $small-breakpoint) { @include breakpoint(medium) {
line-height: $line-height*2; line-height: $line-height*2;
margin-top: 0; margin-top: 0;
} }
@@ -27,7 +22,7 @@
height: 48px; height: 48px;
width: 48px; width: 48px;
@media (min-width: $small-breakpoint) { @include breakpoint(medium) {
height: 80px; height: 80px;
margin-right: $line-height/2; margin-right: $line-height/2;
margin-top: 0; margin-top: 0;
@@ -35,59 +30,3 @@
} }
} }
} }
@mixin h1 {
font-size: $h2-font-size;
line-height: $h2-line-height;
@media (min-width: $small-breakpoint) {
font-size: $h1-font-size;
line-height: $h1-line-height;
}
}
@mixin h2 {
font-size: $h3-font-size;
line-height: $h3-line-height;
@media (min-width: $small-breakpoint) {
font-size: $h2-font-size;
line-height: $h2-line-height;
}
}
@mixin h3 {
font-size: $h4-font-size;
line-height: $h4-line-height;
@media (min-width: $small-breakpoint) {
font-size: $h3-font-size;
line-height: $h3-line-height;
}
}
@mixin h4 {
font-size: $h5-font-size;
line-height: $h5-line-height;
@media (min-width: $small-breakpoint) {
font-size: $h4-font-size;
line-height: $h4-line-height;
}
}
@mixin h5 {
font-size: $h6-font-size;
line-height: $h6-line-height;
@media (min-width: $small-breakpoint) {
font-size: $h5-font-size;
line-height: $h5-line-height;
}
}
@mixin h6 {
font-size: $h6-font-size;
line-height: $h6-line-height;
text-transform: uppercase;
}

View File

@@ -0,0 +1,111 @@
// Table of Contents
//
// 01. Header
// 02. Navigation
// 03. Content
// 04. Sidebar
//
// 01. Header
// ----------------------
.jumbo {
margin-bottom: $line-height;
margin-top: rem-calc(-24);
padding-bottom: $line-height;
padding-top: $line-height;
&.light {
background: #ECF0F1;
}
}
.lead {
font-size: rem-calc(24);
}
// 03. Navigation
// ----------------------
.menu-pages {
list-style-type: none;
margin: 0;
li {
display: block;
@include breakpoint(medium) {
display: inline-block;
margin-right: $line-height/2;
}
}
}
// 03. Content
// ----------------------
.more-info-content {
h3 {
color: $brand;
}
.additional-info {
margin-bottom: $line-height;
}
a:not(.button) {
text-decoration: underline;
}
figure {
margin: 0;
text-align: center;
figcaption {
font-size: $small-font-size;
font-style: italic;
}
}
ul.features {
list-style-type: circle;
margin-left: $line-height;
@include breakpoint(medium) {
margin: $line-height 0 $line-height $line-height*2.5;
}
li {
margin-bottom: $line-height
}
}
.section-content {
border-top: 1px solid $medium-gray;
padding-bottom: $line-height*2;
padding-top: $line-height*2;
&:first-child {
border-top: 0;
padding-top: 0;
}
}
}
// 04. Sidebar
// ----------------------
.more-info-sidebar {
.sidebar-card {
border: 1px solid $border;
margin-bottom: $line-height;
padding: $line-height/2;
&.light {
background: #ECF0F1;
border: 0;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -12,6 +12,8 @@
#print_link { display: none !important; } #print_link { display: none !important; }
#responsive-menu { display: none !important; }
.admin-sidebar { display: none !important; } .admin-sidebar { display: none !important; }
img.left { display: none !important; } img.left { display: none !important; }
@@ -24,8 +26,6 @@ img.left { display: none !important; }
.icon-proposals { display: none !important; } .icon-proposals { display: none !important; }
.captcha { display: none !important; }
li.name { display: none !important; } li.name { display: none !important; }
li.kind { display: none !important; } li.kind { display: none !important; }

View File

@@ -1,136 +0,0 @@
// Table of Contents
//
// 01. Typography
// 02. Colors
// 03. Forms
// 04. Alerts
// 05. Levels
// 06. Responsive
//
// 01. Typography
// - - - - - - - - - - - - - - - - - - - - - - - - -
$font-logo: 'Lato' !important;
$font-sans: 'Source Sans Pro', 'Helvetica', 'Arial', sans-serif !important;
$font-normal: 400;
$font-bold: 700;
$base-font-size: rem-calc(17);
$base-line-height: rem-calc(26);
$h1-font-size: rem-calc(44);
$h1-line-height: rem-calc(57);
$h2-font-size: rem-calc(34);
$h2-line-height: rem-calc(44);
$h3-font-size: rem-calc(24);
$h3-line-height: rem-calc(31);
$h4-font-size: rem-calc(19);
$h4-line-height: rem-calc(25);
$h5-font-size: rem-calc(16);
$h5-line-height: rem-calc(21);
$h6-font-size: rem-calc(13);
$h6-line-height: rem-calc(17);
$small-font-size: rem-calc(14);
$tiny-font-size: rem-calc(10);
$line-height: rem-calc(24);
// 02. Colors
// - - - - - - - - - - - - - - - - - - - - - - - - -
$brand: #004A83;
$body: #E9E9E9;
$background: #EDEFF0;
$border: #DEE0E3;
$dark: darken($brand, 10%);
$text: #222222;
$text-medium: #999999;
$text-light: #CCCCCC;
$link: #2895F1;
$link-hover: #2178BF;
$debates: #008CCF;
$votes-bg: #26AEEE;
$votes-border: #1F94CB;
$votes-like: #7BD2A8;
$votes-like-act: #5D9E7F;
$votes-unlike: #EF8585;
$votes-unlike-act: #BD6A6A;
$delete: #F04124;
$check: #46DB91;
$proposals: #FFA42D;
$proposals-border: #CC8425;
$budget: #454372;
$budget-hover: #7571BF;
$highlight: #E7F2FC;
$featured: #FED900;
$footer-bg: #DEE0E2;
$footer-color: #171819;
$footer-link: #454A4C;
$footer-border: #BFC1C3;
// 03. Forms
// - - - - - - - - - - - - - - - - - - - - - - - - -
$input-bg: #F8F8F8;
// 04. Alerts
// - - - - - - - - - - - - - - - - - - - - - - - - -
$success-bg: #DFF0D8;
$success-border: #D6E9C6;
$success-color: #3C763D;
$info-bg: #D9EDF7;
$info-border: #BCE8F1;
$info-color: #31708F;
$warning-bg: #FCF8E3;
$warning-border: #FAEBCC;
$warning-color: #8A6D3B;
$alert-bg: #F2DEDE;
$alert-border: #EBCCD1;
$alert-color: #A94442;
// 05. Levels
// - - - - - - - - - - - - - - - - - - - - - - - - -
$level-1: #1ABC9C;
$level-2: #43AC6A;
$level-3: #43AC6A;
$level-4: #43AC6A;
$level-5: #F08A24;
$author: #008CCF;
$association: #C0392B;
$deleted: #E7E7E7;
$comment-author: rgba(45,144,248,.15);
$comment-level-5: rgba(255,241,204,1);
$comment-admin: rgba(45,144,248,.15);
$comment-official: rgba(70,219,145,.3);
// 06. Responsive
// - - - - - - - - - - - - - - - - - - - - - - - - -
$small: rem-calc(480);
$small-breakpoint: rem-calc(640);
$medium-breakpoint: rem-calc(1024);
$large-breakpoint: rem-calc(1440);
$xlarge-breakpoint: rem-calc(1920);

View File

@@ -25,7 +25,7 @@ class AccountController < ApplicationController
if @account.organization? if @account.organization?
params.require(:account).permit(:phone_number, :email_on_comment, :email_on_comment_reply, :newsletter, organization_attributes: [:name, :responsible_name]) params.require(:account).permit(:phone_number, :email_on_comment, :email_on_comment_reply, :newsletter, organization_attributes: [:name, :responsible_name])
else else
params.require(:account).permit(:username, :public_activity, :email_on_comment, :email_on_comment_reply, :newsletter) params.require(:account).permit(:username, :public_activity, :email_on_comment, :email_on_comment_reply, :email_on_direct_message, :email_digest, :newsletter, :official_position_badge)
end end
end end

View File

@@ -3,7 +3,8 @@ class Admin::Api::StatsController < Admin::Api::BaseController
def show def show
unless params[:events].present? || unless params[:events].present? ||
params[:visits].present? || params[:visits].present? ||
params[:spending_proposals].present? params[:spending_proposals].present? ||
params[:budget_investments].present?
return render json: {}, status: :bad_request return render json: {}, status: :bad_request
end end
@@ -24,6 +25,10 @@ class Admin::Api::StatsController < Admin::Api::BaseController
ds.add "Spending proposals", SpendingProposal.group_by_day(:created_at).count ds.add "Spending proposals", SpendingProposal.group_by_day(:created_at).count
end end
if params[:budget_investments].present?
ds.add "Budget Investments", Budget::Investment.group_by_day(:created_at).count
end
render json: ds.build render json: ds.build
end end
end end

View File

@@ -0,0 +1,52 @@
class Admin::BannersController < Admin::BaseController
has_filters %w{all with_active with_inactive}, only: :index
before_action :banner_styles, only: [:edit, :new, :create, :update]
before_action :banner_imgs, only: [:edit, :new, :create, :update]
respond_to :html, :js
load_and_authorize_resource
def index
@banners = Banner.send(@current_filter).page(params[:page])
end
def create
@banner = Banner.new(banner_params)
if @banner.save
redirect_to admin_banners_path
else
render :new
end
end
def update
if @banner.update(banner_params)
redirect_to admin_banners_path
else
render :edit
end
end
def destroy
@banner.destroy
redirect_to admin_banners_path
end
private
def banner_params
params.require(:banner).permit(:title, :description, :target_url, :style, :image, :post_started_at, :post_ended_at)
end
def banner_styles
@banner_styles = Setting.all.banner_style.map { |banner_style| [banner_style.value, banner_style.key.split('.')[1]] }
end
def banner_imgs
@banner_imgs = Setting.all.banner_img.map { |banner_img| [banner_img.value, banner_img.key.split('.')[1]] }
end
end

View File

@@ -0,0 +1,17 @@
class Admin::BudgetGroupsController < Admin::BaseController
include FeatureFlags
feature_flag :budgets
def create
@budget = Budget.find params[:budget_id]
@budget.groups.create(budget_group_params)
@groups = @budget.groups.includes(:headings)
end
private
def budget_group_params
params.require(:budget_group).permit(:name)
end
end

View File

@@ -0,0 +1,18 @@
class Admin::BudgetHeadingsController < Admin::BaseController
include FeatureFlags
feature_flag :budgets
def create
@budget = Budget.find params[:budget_id]
@budget_group = @budget.groups.find params[:budget_group_id]
@budget_group.headings.create(budget_heading_params)
@headings = @budget_group.headings
end
private
def budget_heading_params
params.require(:budget_heading).permit(:name, :price, :geozone_id)
end
end

View File

@@ -0,0 +1,86 @@
class Admin::BudgetInvestmentsController < Admin::BaseController
include FeatureFlags
feature_flag :budgets
has_filters(%w{valuation_open without_admin managed valuating valuation_finished
valuation_finished_feasible selected all},
only: [:index, :toggle_selection])
before_action :load_budget
before_action :load_investment, only: [:show, :edit, :update, :toggle_selection]
before_action :load_ballot, only: [:show, :index]
before_action :load_investments, only: [:index, :toggle_selection]
def index
end
def show
end
def edit
load_admins
load_valuators
load_tags
end
def update
set_valuation_tags
if @investment.update(budget_investment_params)
redirect_to admin_budget_budget_investment_path(@budget, @investment, Budget::Investment.filter_params(params)),
notice: t("flash.actions.update.budget_investment")
else
load_admins
load_valuators
load_tags
render :edit
end
end
def toggle_selection
@investment.toggle :selected
@investment.save
end
private
def load_investments
@investments = Budget::Investment.scoped_filter(params, @current_filter)
.order(cached_votes_up: :desc, created_at: :desc)
.page(params[:page])
end
def budget_investment_params
params.require(:budget_investment)
.permit(:title, :description, :external_url, :heading_id, :administrator_id, :valuation_tag_list, valuator_ids: [])
end
def load_budget
@budget = Budget.includes(:groups).find params[:budget_id]
end
def load_investment
@investment = Budget::Investment.where(budget_id: @budget.id).find params[:id]
end
def load_admins
@admins = Administrator.includes(:user).all
end
def load_valuators
@valuators = Valuator.includes(:user).all.order("description ASC").order("users.email ASC")
end
def load_tags
@tags = Budget::Investment.tags_on(:valuation).order(:name).uniq
end
def load_ballot
query = Budget::Ballot.where(user: current_user, budget: @budget)
@ballot = @budget.balloting? ? query.first_or_create : query.first_or_initialize
end
def set_valuation_tags
@investment.set_tag_list_on(:valuation, budget_investment_params[:valuation_tag_list])
params[:budget_investment] = params[:budget_investment].except(:valuation_tag_list)
end
end

View File

@@ -0,0 +1,48 @@
class Admin::BudgetsController < Admin::BaseController
include FeatureFlags
feature_flag :budgets
has_filters %w{current finished}, only: :index
load_and_authorize_resource
def index
@budgets = Budget.send(@current_filter).order(created_at: :desc).page(params[:page])
end
def show
@budget = Budget.includes(groups: :headings).find(params[:id])
end
def new
end
def edit
end
def update
if @budget.update(budget_params)
redirect_to admin_budget_path(@budget), notice: t('admin.budgets.update.notice')
else
render :edit
end
end
def create
@budget = Budget.new(budget_params)
if @budget.save
redirect_to admin_budget_path(@budget), notice: t('admin.budgets.create.notice')
else
render :new
end
end
private
def budget_params
descriptions = Budget::PHASES.map{|p| "description_#{p}"}.map(&:to_sym)
valid_attributes = [:name, :phase, :currency_symbol] + descriptions
params.require(:budget).permit(*valid_attributes)
end
end

View File

@@ -20,6 +20,7 @@ class Admin::CommentsController < Admin::BaseController
end end
private private
def load_comment def load_comment
@comment = Comment.with_hidden.find(params[:id]) @comment = Comment.with_hidden.find(params[:id])
end end

View File

@@ -0,0 +1,49 @@
class Admin::GeozonesController < Admin::BaseController
respond_to :html
load_and_authorize_resource
def index
@geozones = Geozone.all.order("LOWER(name)")
end
def new
end
def edit
end
def create
@geozone = Geozone.new(geozone_params)
if @geozone.save
redirect_to admin_geozones_path
else
render :new
end
end
def update
if @geozone.update(geozone_params)
redirect_to admin_geozones_path
else
render :edit
end
end
def destroy
if @geozone.safe_to_destroy?
@geozone.destroy
redirect_to admin_geozones_path, notice: t('admin.geozones.delete.success')
else
redirect_to admin_geozones_path, flash: { error: t('admin.geozones.delete.error') }
end
end
private
def geozone_params
params.require(:geozone).permit(:name, :external_code, :census_code, :html_map_coordinates)
end
end

View File

@@ -0,0 +1,32 @@
class Admin::ManagersController < Admin::BaseController
load_and_authorize_resource
def index
@managers = @managers.page(params[:page])
end
def search
@user = User.find_by(email: params[:email])
respond_to do |format|
if @user
@manager = Manager.find_or_initialize_by(user: @user)
format.js
else
format.js { render "user_not_found" }
end
end
end
def create
@manager.user_id = params[:user_id]
@manager.save
redirect_to admin_managers_path
end
def destroy
@manager.destroy
redirect_to admin_managers_path
end
end

View File

@@ -18,15 +18,15 @@ class Admin::ModeratorsController < Admin::BaseController
end end
end end
def destroy
@moderator.destroy
redirect_to admin_moderators_path
end
def create def create
@moderator.user_id = params[:user_id] @moderator.user_id = params[:user_id]
@moderator.save @moderator.save
redirect_to admin_moderators_path redirect_to admin_moderators_path
end end
def destroy
@moderator.destroy
redirect_to admin_moderators_path
end
end end

View File

@@ -25,6 +25,7 @@ class Admin::OfficialsController < Admin::BaseController
end end
private private
def user_params def user_params
params.require(:user).permit(:official_position, :official_level) params.require(:user).permit(:official_position, :official_level)
end end

View File

@@ -0,0 +1,66 @@
class Admin::Poll::BoothAssignmentsController < Admin::BaseController
before_action :load_poll, except: [:create, :destroy]
def index
@booth_assignments = @poll.booth_assignments.includes(:booth).order('poll_booths.name').page(params[:page]).per(50)
end
def search_booths
load_search
@booths = ::Poll::Booth.search(@search)
respond_to do |format|
format.js
end
end
def show
@booth_assignment = @poll.booth_assignments.includes(:recounts, :final_recounts, :voters, officer_assignments: [officer: [:user]]).find(params[:id])
@voters_by_date = @booth_assignment.voters.group_by {|v| v.created_at.to_date}
end
def create
@booth_assignment = ::Poll::BoothAssignment.new(poll_id: booth_assignment_params[:poll_id], booth_id: booth_assignment_params[:booth_id])
if @booth_assignment.save
notice = t("admin.poll_booth_assignments.flash.create")
else
notice = t("admin.poll_booth_assignments.flash.error_create")
end
redirect_to admin_poll_booth_assignments_path(@booth_assignment.poll_id), notice: notice
end
def destroy
@booth_assignment = ::Poll::BoothAssignment.find(params[:id])
if @booth_assignment.destroy
notice = t("admin.poll_booth_assignments.flash.destroy")
else
notice = t("admin.poll_booth_assignments.flash.error_destroy")
end
redirect_to admin_poll_booth_assignments_path(@booth_assignment.poll_id), notice: notice
end
private
def load_booth_assignment
@booth_assignment = ::Poll::BoothAssignment.find(params[:id])
end
def booth_assignment_params
params.permit(:booth_id, :poll_id)
end
def load_poll
@poll = ::Poll.find(params[:poll_id])
end
def search_params
params.permit(:poll_id, :search)
end
def load_search
@search = search_params[:search]
end
end

View File

@@ -0,0 +1,39 @@
class Admin::Poll::BoothsController < Admin::BaseController
load_and_authorize_resource class: 'Poll::Booth'
def index
@booths = @booths.order(name: :asc).page(params[:page])
end
def show
end
def new
end
def create
if @booth.save
redirect_to admin_booths_path, notice: t("flash.actions.create.poll_booth")
else
render :new
end
end
def edit
end
def update
if @booth.update(booth_params)
redirect_to admin_booth_path(@booth), notice: t("flash.actions.update.poll_booth")
else
render :edit
end
end
private
def booth_params
params.require(:poll_booth).permit(:name, :location)
end
end

View File

@@ -0,0 +1,92 @@
class Admin::Poll::OfficerAssignmentsController < Admin::BaseController
before_action :load_poll
before_action :redirect_if_blank_required_params, only: [:by_officer]
before_action :load_booth_assignment, only: [:create]
def index
@officers = ::Poll::Officer.
includes(:user).
order('users.username').
where(
id: @poll.officer_assignments.select(:officer_id).distinct.map(&:officer_id)
).page(params[:page]).per(50)
end
def by_officer
@poll = ::Poll.includes(:booths).find(params[:poll_id])
@officer = ::Poll::Officer.includes(:user).find(officer_assignment_params[:officer_id])
@officer_assignments = ::Poll::OfficerAssignment.
joins(:booth_assignment).
includes(:recount, :final_recounts, booth_assignment: :booth).
where("officer_id = ? AND poll_booth_assignments.poll_id = ?", @officer.id, @poll.id).
order(:date)
end
def search_officers
load_search
@officers = User.joins(:poll_officer).search(@search).order(username: :asc)
respond_to do |format|
format.js
end
end
def create
@officer_assignment = ::Poll::OfficerAssignment.new(booth_assignment: @booth_assignment,
officer_id: create_params[:officer_id],
date: create_params[:date])
@officer_assignment.final = true if @officer_assignment.date > @booth_assignment.poll.ends_at.to_date
if @officer_assignment.save
notice = t("admin.poll_officer_assignments.flash.create")
else
notice = t("admin.poll_officer_assignments.flash.error_create")
end
redirect_to by_officer_admin_poll_officer_assignments_path(poll_id: create_params[:poll_id], officer_id: create_params[:officer_id]), notice: notice
end
def destroy
@officer_assignment = ::Poll::OfficerAssignment.includes(:booth_assignment).find(params[:id])
if @officer_assignment.destroy
notice = t("admin.poll_officer_assignments.flash.destroy")
else
notice = t("admin.poll_officer_assignments.flash.error_destroy")
end
redirect_to by_officer_admin_poll_officer_assignments_path(poll_id: @officer_assignment.poll_id, officer_id: @officer_assignment.officer_id), notice: notice
end
private
def officer_assignment_params
params.permit(:officer_id)
end
def create_params
params.permit(:poll_id, :booth_id, :date, :officer_id)
end
def load_booth_assignment
@booth_assignment = ::Poll::BoothAssignment.includes(:poll).find_by(poll_id: create_params[:poll_id], booth_id: create_params[:booth_id])
end
def load_poll
@poll = ::Poll.find(params[:poll_id])
end
def redirect_if_blank_required_params
if officer_assignment_params[:officer_id].blank?
redirect_to admin_poll_path(@poll)
end
end
def search_params
params.permit(:poll_id, :search)
end
def load_search
@search = search_params[:search]
end
end

View File

@@ -0,0 +1,39 @@
class Admin::Poll::OfficersController < Admin::BaseController
load_and_authorize_resource :officer, class: "Poll::Officer", except: [:edit, :show]
def index
@officers = @officers.page(params[:page])
end
def search
@user = User.find_by(email: params[:email])
respond_to do |format|
if @user
@officer = Poll::Officer.find_or_initialize_by(user: @user)
format.js
else
format.js { render "user_not_found" }
end
end
end
def create
@officer.user_id = params[:user_id]
@officer.save
redirect_to admin_officers_path
end
def destroy
@officer.destroy
redirect_to admin_officers_path
end
def show
end
def edit
end
end

View File

@@ -0,0 +1,86 @@
class Admin::Poll::PollsController < Admin::BaseController
load_and_authorize_resource
before_action :load_search, only: [:search_booths, :search_questions, :search_officers]
before_action :load_geozones, only: [:new, :create, :edit, :update]
def index
end
def show
@poll = Poll.includes(:questions).
order('poll_questions.title').
find(params[:id])
end
def new
end
def create
if @poll.save
redirect_to [:admin, @poll], notice: t("flash.actions.create.poll")
else
render :new
end
end
def edit
end
def update
if @poll.update(poll_params)
redirect_to [:admin, @poll], notice: t("flash.actions.update.poll")
else
render :edit
end
end
def add_question
question = ::Poll::Question.find(params[:question_id])
if question.present?
@poll.questions << question
notice = t("admin.polls.flash.question_added")
else
notice = t("admin.polls.flash.error_on_question_added")
end
redirect_to admin_poll_path(@poll), notice: notice
end
def remove_question
question = ::Poll::Question.find(params[:question_id])
if @poll.questions.include? question
@poll.questions.delete(question)
notice = t("admin.polls.flash.question_removed")
else
notice = t("admin.polls.flash.error_on_question_removed")
end
redirect_to admin_poll_path(@poll), notice: notice
end
def search_questions
@questions = ::Poll::Question.where("poll_id IS ? OR poll_id != ?", nil, @poll.id).search({search: @search}).order(title: :asc)
respond_to do |format|
format.js
end
end
private
def load_geozones
@geozones = Geozone.all.order(:name)
end
def poll_params
params.require(:poll).permit(:name, :starts_at, :ends_at, :geozone_restricted, geozone_ids: [])
end
def search_params
params.permit(:poll_id, :search)
end
def load_search
@search = search_params[:search]
end
end

View File

@@ -0,0 +1,64 @@
class Admin::Poll::QuestionsController < Admin::BaseController
load_and_authorize_resource :poll
load_and_authorize_resource :question, class: 'Poll::Question'
def index
@polls = Poll.all
@search = search_params[:search]
@questions = @questions.search(search_params).page(params[:page]).order("created_at DESC")
@proposals = Proposal.successful.sort_by_confidence_score
end
def new
@polls = Poll.all
@question.valid_answers = I18n.t('poll_questions.default_valid_answers')
proposal = Proposal.find(params[:proposal_id]) if params[:proposal_id].present?
@question.copy_attributes_from_proposal(proposal)
end
def create
@question.author = @question.proposal.try(:author) || current_user
if @question.save
redirect_to admin_question_path(@question)
else
render :new
end
end
def show
end
def edit
end
def update
if @question.update(question_params)
redirect_to admin_question_path(@question), notice: t("flash.actions.save_changes.notice")
else
render :edit
end
end
def destroy
if @question.destroy
notice = "Question destroyed succesfully"
else
notice = t("flash.actions.destroy.error")
end
redirect_to admin_questions_path, notice: notice
end
private
def question_params
params.require(:poll_question).permit(:poll_id, :title, :question, :description, :proposal_id, :valid_answers)
end
def search_params
params.permit(:poll_id, :search)
end
end

View File

@@ -0,0 +1,16 @@
class Admin::Poll::RecountsController < Admin::BaseController
before_action :load_poll
def index
@booth_assignments = @poll.booth_assignments.
includes(:booth, :recounts, :final_recounts, :voters).
order("poll_booths.name").
page(params[:page]).per(50)
end
private
def load_poll
@poll = ::Poll.find(params[:poll_id])
end
end

View File

@@ -0,0 +1,13 @@
class Admin::Poll::ResultsController < Admin::BaseController
before_action :load_poll
def index
@partial_results = @poll.partial_results
end
private
def load_poll
@poll = ::Poll.includes(:questions).find(params[:poll_id])
end
end

Some files were not shown because too many files have changed in this diff Show More