Merge branch 'master' into fix-2644-split-spec-helpers

This commit is contained in:
Raimond Garcia
2018-06-12 14:26:26 +02:00
committed by GitHub
139 changed files with 1754 additions and 1064 deletions

View File

@@ -1,17 +1,17 @@
References
==========
===================
> Add references to related Issues/Pull Requests/Travis Builds/Rollbar errors/etc...
Objectives
==========
===================
> What are the objectives of this changes? (If there is no related Issue with an explanation)
Visual Changes (if any)
=======================
Visual Changes
===================
> Any visual changes? please attach screenshots (or gifs) showing them.
> If modified views are public (not the admin panel), try them in mobile display (with your browser's developer console) and add screenshots.
Notes
=====================
===================
> Mention rake tasks or actions to be done when deploying this changes to a server (if any).
> Explain any caveats, or important things to notice like deprecations (if any).

View File

@@ -1,8 +1,17 @@
# # Select ubuntu as the base image
FROM coreapps/ruby2.3
FROM ruby:2.3.6
# Install essential Linux packages
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev postgresql-client nodejs imagemagick
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev postgresql-client nodejs imagemagick sudo
# Files created inside the container repect the ownership
RUN adduser --shell /bin/bash --disabled-password --gecos "" consul \
&& adduser consul sudo \
&& echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
RUN echo 'Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bundle/bin"' > /etc/sudoers.d/secure_path
RUN chmod 0440 /etc/sudoers.d/secure_path
COPY scripts/entrypoint.sh /usr/local/bin/entrypoint.sh
# Define where our application will live inside the image
ENV RAILS_ROOT /var/www/consul

View File

@@ -6,6 +6,7 @@ gem 'acts-as-taggable-on', '~> 5.0.0'
gem 'acts_as_votable', '~> 0.11.1'
gem 'ahoy_matey', '~> 1.6.0'
gem 'ancestry', '~> 3.0.1'
gem 'autoprefixer-rails', '~> 8.2.0'
gem 'browser', '~> 2.5.2'
gem 'cancancan', '~> 2.1.2'
gem 'ckeditor', '~> 4.2.3'
@@ -17,7 +18,7 @@ gem 'delayed_job_active_record', '~> 4.1.0'
gem 'devise', '~> 3.5.7'
gem 'devise-async', '~> 0.10.2'
gem 'devise_security_extension', '~> 0.10.0'
gem 'foundation-rails', '~> 6.2.4.0'
gem 'foundation-rails', '~> 6.4.3.0'
gem 'foundation_rails_helper', '~> 2.0.0'
gem 'graphiql-rails', '~> 1.4.1'
gem 'graphql', '~> 1.7.8'

View File

@@ -61,6 +61,8 @@ GEM
activerecord (>= 3.2.0)
arel (6.0.4)
ast (2.4.0)
autoprefixer-rails (8.2.0)
execjs
babel-source (5.8.35)
babel-transpiler (0.7.0)
babel-source (>= 4.0, < 6)
@@ -163,7 +165,7 @@ GEM
faraday (0.12.1)
multipart-post (>= 1.2, < 3)
ffi (1.9.23)
foundation-rails (6.2.4.0)
foundation-rails (6.4.3.0)
railties (>= 3.1.0)
sass (>= 3.3.0, < 3.5)
sprockets-es6 (>= 0.9.0)
@@ -194,7 +196,7 @@ GEM
httpi (2.4.2)
rack
socksify
i18n (0.9.1)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
i18n-tasks (0.9.20)
activesupport (>= 4.0.2)
@@ -261,7 +263,7 @@ GEM
mimemagic (0.3.2)
mini_mime (1.0.0)
mini_portile2 (2.3.0)
minitest (5.11.1)
minitest (5.11.3)
mixlib-cli (1.7.0)
mixlib-config (2.2.4)
multi_json (1.12.2)
@@ -321,7 +323,7 @@ GEM
public_suffix (3.0.1)
quiet_assets (1.1.0)
railties (>= 3.1, < 5.0)
rack (1.6.8)
rack (1.6.9)
rack-accept (0.4.5)
rack (>= 0.4)
rack-attack (5.0.1)
@@ -465,7 +467,7 @@ GEM
rack (>= 1.3, < 3)
rack-accept (~> 0.4)
tilt (>= 1.4, < 3)
tzinfo (1.2.4)
tzinfo (1.2.5)
thread_safe (~> 0.1)
uglifier (4.1.3)
execjs (>= 0.3.0, < 3)
@@ -498,6 +500,8 @@ DEPENDENCIES
acts_as_votable (~> 0.11.1)
ahoy_matey (~> 1.6.0)
ancestry (~> 3.0.1)
animate-rails (~> 1.0.10)
autoprefixer-rails (~> 8.2.0)
browser (~> 2.5.2)
bullet (~> 5.7.0)
byebug (~> 10.0.0)
@@ -521,7 +525,7 @@ DEPENDENCIES
email_spec (~> 2.1.0)
factory_bot_rails (~> 4.8.2)
faker (~> 1.8.7)
foundation-rails (~> 6.2.4.0)
foundation-rails (~> 6.4.3.0)
foundation_rails_helper (~> 2.0.0)
globalize (~> 5.0.0)
globalize-accessors (~> 0.2.1)

View File

@@ -10,7 +10,7 @@
// 1. CONSUL variables
// --------------------
$base-font-size: rem-calc(17);
$base-font-size: 17px;
$base-line: rem-calc(26);
$small-font-size: rem-calc(14);
$line-height: rem-calc(24);
@@ -65,10 +65,47 @@ $alert-bg: #f2dede;
$alert-border: #ebccd1;
$color-alert: #a94442;
// 2. Foundation settings overrides
// ---------------------------------
$black: #222;
$white: #fff;
$body-font-family: 'Source Sans Pro', 'Helvetica', 'Arial', sans-serif !important;
$header-font-family: $body-font-family;
$global-radius: rem-calc(3);
$button-radius: $global-radius;
$font-family-serif: Georgia, 'Times New Roman', Times, serif;
$header-styles: (
small: (
'h1': ('font-size': 34),
'h2': ('font-size': 24),
'h3': ('font-size': 20),
'h4': ('font-size': 18),
'h5': ('font-size': 16),
'h6': ('font-size': 14),
),
medium: (
'h1': ('font-size': 44),
'h2': ('font-size': 34),
'h3': ('font-size': 24),
'h4': ('font-size': 19),
'h5': ('font-size': 16),
'h6': ('font-size': 13),
),
);
$small-font-size: rem-calc(14);
$abbr-underline: none;
$tab-background-active: $white;
$accordion-item-color: foreground($accordion-background, $text);
$accordion-content-color: foreground($accordion-background, $text);
@@ -77,3 +114,5 @@ $tab-item-padding: $line-height / 2 0;
$tab-content-border: $border;
$orbit-bullet-diameter: 0.8rem;
$pagination-radius: $global-radius;

View File

@@ -16,30 +16,49 @@
// 11. Button
// 12. Button Group
// 13. Callout
// 14. Close Button
// 15. Drilldown
// 16. Dropdown
// 17. Dropdown Menu
// 18. Flex Video
// 19. Forms
// 20. Label
// 21. Media Object
// 22. Menu
// 23. Meter
// 24. Off-canvas
// 25. Orbit
// 26. Pagination
// 27. Progress Bar
// 28. Reveal
// 29. Slider
// 30. Switch
// 31. Table
// 32. Tabs
// 33. Thumbnail
// 34. Title Bar
// 35. Tooltip
// 36. Top Bar
// 37. Custom variables
// 14. Card
// 15. Close Button
// 16. Drilldown
// 17. Dropdown
// 18. Dropdown Menu
// 19. Flexbox Utilities
// 20. Forms
// 21. Label
// 22. Media Object
// 23. Menu
// 24. Meter
// 25. Off-canvas
// 26. Orbit
// 27. Pagination
// 28. Progress Bar
// 29. Prototype Arrow
// 30. Prototype Border-Box
// 31. Prototype Border-None
// 32. Prototype Bordered
// 33. Prototype Display
// 34. Prototype Font-Styling
// 35. Prototype List-Style-Type
// 36. Prototype Overflow
// 37. Prototype Position
// 38. Prototype Rounded
// 39. Prototype Separator
// 40. Prototype Shadow
// 41. Prototype Sizing
// 42. Prototype Spacing
// 43. Prototype Text-Decoration
// 44. Prototype Text-Transformation
// 45. Prototype Text-Utilities
// 46. Responsive Embed
// 47. Reveal
// 48. Slider
// 49. Switch
// 50. Table
// 51. Tabs
// 52. Thumbnail
// 53. Title Bar
// 54. Tooltip
// 55. Top Bar
// 56. Xy Grid
@import 'util/util';
@@ -50,28 +69,34 @@ $global-font-size: 100%;
$global-width: rem-calc(1200);
$global-lineheight: 1.5;
$foundation-palette: (
primary: #2199e8,
secondary: #777,
primary: #1779ba,
secondary: #767676,
success: #3adb76,
warning: #ffae00,
alert: #ec5840,
alert: #cc4b37,
);
$light-gray: #e6e6e6;
$medium-gray: #cacaca;
$dark-gray: #8a8a8a;
$black: #222;
$white: #fff;
$black: #0a0a0a;
$white: #fefefe;
$body-background: $white;
$body-font-color: $black;
$body-font-family: 'Source Sans Pro', 'Helvetica', 'Arial', sans-serif !important;
$body-font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;
$body-antialiased: true;
$global-margin: 1rem;
$global-padding: 1rem;
$global-position: 1rem;
$global-weight-normal: normal;
$global-weight-bold: bold;
$global-radius: rem-calc(3);
$global-radius: 0;
$global-menu-padding: 0.7rem 1rem;
$global-menu-nested-margin: 1rem;
$global-text-direction: ltr;
$global-flexbox: false;
$global-flexbox: true;
$global-prototype-breakpoints: false;
$global-button-cursor: auto;
$global-color-pick-contrast-tolerance: 0;
$print-transparent-backgrounds: true;
@include add-foundation-colors;
@@ -83,7 +108,10 @@ $breakpoints: (
small: 0,
medium: 640px,
large: 1024px,
xlarge: 1200px,
xxlarge: 1440px,
);
$print-breakpoint: large;
$breakpoint-classes: (small medium large);
// 3. The Grid
@@ -96,6 +124,7 @@ $grid-column-gutter: (
medium: 30px,
);
$grid-column-align-edge: true;
$grid-column-alias: 'columns';
$block-grid-max: 8;
// 4. Base Typography
@@ -105,30 +134,29 @@ $header-font-family: $body-font-family;
$header-font-weight: $global-weight-normal;
$header-font-style: normal;
$font-family-monospace: Consolas, 'Liberation Mono', Courier, monospace;
$font-family-serif: Georgia, 'Times New Roman', Times, serif;
$header-sizes: (
small: (
'h1': 34,
'h2': 24,
'h3': 20,
'h4': 18,
'h5': 16,
'h6': 14,
),
medium: (
'h1': 44,
'h2': 34,
'h3': 24,
'h4': 19,
'h5': 16,
'h6': 13,
),
);
$header-color: inherit;
$header-lineheight: 1.4;
$header-margin-bottom: 0.5rem;
$header-styles: (
small: (
'h1': ('font-size': 24),
'h2': ('font-size': 20),
'h3': ('font-size': 19),
'h4': ('font-size': 18),
'h5': ('font-size': 17),
'h6': ('font-size': 16),
),
medium: (
'h1': ('font-size': 48),
'h2': ('font-size': 40),
'h3': ('font-size': 31),
'h4': ('font-size': 25),
'h5': ('font-size': 20),
'h6': ('font-size': 16),
),
);
$header-text-rendering: optimizeLegibility;
$small-font-size: rem-calc(14);
$small-font-size: 80%;
$header-small-font-color: $medium-gray;
$paragraph-lineheight: 1.6;
$paragraph-margin-bottom: 1rem;
@@ -160,12 +188,13 @@ $blockquote-padding: rem-calc(9 20 0 19);
$blockquote-border: 1px solid $medium-gray;
$cite-font-size: rem-calc(13);
$cite-color: $dark-gray;
$cite-pseudo-content: '\2014 \0020';
$keystroke-font: $font-family-monospace;
$keystroke-color: $black;
$keystroke-background: $light-gray;
$keystroke-padding: rem-calc(2 4 0);
$keystroke-radius: $global-radius;
$abbr-underline: none;
$abbr-underline: 1px dotted $black;
// 5. Typography Helpers
// ---------------------
@@ -184,9 +213,9 @@ $stat-font-size: 2.5rem;
$abide-inputs: true;
$abide-labels: true;
$input-background-invalid: map-get($foundation-palette, alert);
$form-label-color-invalid: map-get($foundation-palette, alert);
$input-error-color: map-get($foundation-palette, alert);
$input-background-invalid: get-color(alert);
$form-label-color-invalid: get-color(alert);
$input-error-color: get-color(alert);
$input-error-font-size: rem-calc(12);
$input-error-font-weight: $global-weight-bold;
@@ -195,25 +224,38 @@ $input-error-font-weight: $global-weight-bold;
$accordion-background: $white;
$accordion-plusminus: true;
$accordion-item-color: foreground($accordion-background, $primary-color);
$accordion-title-font-size: rem-calc(12);
$accordion-item-color: $primary-color;
$accordion-item-background-hover: $light-gray;
$accordion-item-padding: 1.25rem 1rem;
$accordion-content-background: $white;
$accordion-content-border: 1px solid $light-gray;
$accordion-content-color: foreground($accordion-background, $primary-color);
$accordion-content-color: $body-font-color;
$accordion-content-padding: 1rem;
// 8. Accordion Menu
// -----------------
$accordionmenu-padding: $global-menu-padding;
$accordionmenu-nested-margin: $global-menu-nested-margin;
$accordionmenu-submenu-padding: $accordionmenu-padding;
$accordionmenu-arrows: true;
$accordionmenu-arrow-color: $primary-color;
$accordionmenu-item-background: null;
$accordionmenu-border: null;
$accordionmenu-submenu-toggle-background: null;
$accordion-submenu-toggle-border: $accordionmenu-border;
$accordionmenu-submenu-toggle-width: 40px;
$accordionmenu-submenu-toggle-height: $accordionmenu-submenu-toggle-width;
$accordionmenu-arrow-size: 6px;
// 9. Badge
// --------
$badge-background: $primary-color;
$badge-color: foreground($badge-background);
$badge-color: $white;
$badge-color-alt: $black;
$badge-palette: $foundation-palette;
$badge-padding: 0.3em;
$badge-minwidth: 2.1em;
$badge-font-size: 0.6rem;
@@ -228,11 +270,15 @@ $breadcrumbs-item-color-current: $black;
$breadcrumbs-item-color-disabled: $medium-gray;
$breadcrumbs-item-margin: 0.75rem;
$breadcrumbs-item-uppercase: true;
$breadcrumbs-item-slash: true;
$breadcrumbs-item-separator: true;
$breadcrumbs-item-separator-item: '/';
$breadcrumbs-item-separator-item-rtl: '\\';
$breadcrumbs-item-separator-color: $medium-gray;
// 11. Button
// ----------
$button-font-family: inherit;
$button-padding: 0.85em 1em;
$button-margin: 0 0 $global-margin 0;
$button-fill: solid;
@@ -241,13 +287,18 @@ $button-background-hover: scale-color($button-background, $lightness: -15%);
$button-color: $white;
$button-color-alt: $black;
$button-radius: $global-radius;
$button-hollow-border-width: 1px;
$button-sizes: (
tiny: 0.6rem,
small: 0.75rem,
default: 0.9rem,
large: 1.25rem,
);
$button-palette: $foundation-palette;
$button-opacity-disabled: 0.25;
$button-background-hover-lightness: -20%;
$button-hollow-hover-lightness: -50%;
$button-transition: background-color 0.25s ease-out, color 0.25s ease-out;
// 12. Button Group
// ----------------
@@ -256,6 +307,7 @@ $buttongroup-margin: 1rem;
$buttongroup-spacing: 1px;
$buttongroup-child-selector: '.button';
$buttongroup-expand-max: 6;
$buttongroup-radius-on-each: true;
// 13. Callout
// -----------
@@ -270,29 +322,56 @@ $callout-font-color-alt: $body-background;
$callout-radius: $global-radius;
$callout-link-tint: 30%;
// 14. Close Button
// 14. Card
// --------
$card-background: $white;
$card-font-color: $body-font-color;
$card-divider-background: $light-gray;
$card-border: 1px solid $light-gray;
$card-shadow: none;
$card-border-radius: $global-radius;
$card-padding: $global-padding;
$card-margin-bottom: $global-margin;
// 15. Close Button
// ----------------
$closebutton-position: right top;
$closebutton-offset-horizontal: 1rem;
$closebutton-offset-vertical: 0.5rem;
$closebutton-size: 2em;
$closebutton-offset-horizontal: (
small: 0.66rem,
medium: 1rem,
);
$closebutton-offset-vertical: (
small: 0.33em,
medium: 0.5rem,
);
$closebutton-size: (
small: 1.5em,
medium: 2em,
);
$closebutton-lineheight: 1;
$closebutton-color: $dark-gray;
$closebutton-color-hover: $black;
// 15. Drilldown
// 16. Drilldown
// -------------
$drilldown-transition: transform 0.15s linear;
$drilldown-arrows: true;
$drilldown-arrow-color: $primary-color;
$drilldown-padding: $global-menu-padding;
$drilldown-nested-margin: 0;
$drilldown-background: $white;
$drilldown-submenu-padding: $drilldown-padding;
$drilldown-submenu-background: $white;
$drilldown-arrow-color: $primary-color;
$drilldown-arrow-size: 6px;
// 16. Dropdown
// 17. Dropdown
// ------------
$dropdown-padding: 1rem;
$dropdown-background: $body-background;
$dropdown-border: 1px solid $medium-gray;
$dropdown-font-size: 1rem;
$dropdown-width: 300px;
@@ -303,23 +382,30 @@ $dropdown-sizes: (
large: 400px,
);
// 17. Dropdown Menu
// 18. Dropdown Menu
// -----------------
$dropdownmenu-arrows: true;
$dropdownmenu-arrow-color: $anchor-color;
$dropdownmenu-arrow-size: 6px;
$dropdownmenu-arrow-padding: 1.5rem;
$dropdownmenu-min-width: 200px;
$dropdownmenu-background: $white;
$dropdownmenu-submenu-background: $dropdownmenu-background;
$dropdownmenu-padding: $global-menu-padding;
$dropdownmenu-nested-margin: 0;
$dropdownmenu-submenu-padding: $dropdownmenu-padding;
$dropdownmenu-border: 1px solid $medium-gray;
$dropdown-menu-item-color-active: get-color(primary);
$dropdown-menu-item-background-active: transparent;
// 18. Flex Video
// --------------
// 19. Flexbox Utilities
// ---------------------
$flexvideo-margin-bottom: rem-calc(16);
$flexvideo-ratio: 4 by 3;
$flexvideo-ratio-widescreen: 16 by 9;
$flex-source-ordering-count: 6;
$flexbox-responsive-breakpoints: true;
// 19. Forms
// 20. Forms
// ---------
$fieldset-border: 1px solid $medium-gray;
@@ -345,45 +431,56 @@ $input-color: $black;
$input-placeholder-color: $medium-gray;
$input-font-family: inherit;
$input-font-size: rem-calc(16);
$input-font-weight: $global-weight-normal;
$input-line-height: $global-lineheight;
$input-background: $white;
$input-background-focus: $white;
$input-background-disabled: $light-gray;
$input-border: 1px solid $medium-gray;
$input-border-focus: 1px solid $dark-gray;
$input-padding: $form-spacing / 2;
$input-shadow: inset 0 1px 2px rgba($black, 0.1);
$input-shadow-focus: 0 0 5px $medium-gray;
$input-cursor-disabled: not-allowed;
$input-transition: box-shadow 0.5s, border-color 0.25s ease-in-out;
$input-number-spinners: true;
$input-radius: $global-radius;
$form-button-radius: $global-radius;
// 20. Label
// 21. Label
// ---------
$label-background: $primary-color;
$label-color: foreground($label-background);
$label-color: $white;
$label-color-alt: $black;
$label-palette: $foundation-palette;
$label-font-size: 0.8rem;
$label-padding: 0.33333rem 0.5rem;
$label-radius: $global-radius;
// 21. Media Object
// 22. Media Object
// ----------------
$mediaobject-margin-bottom: $global-margin;
$mediaobject-section-padding: $global-padding;
$mediaobject-image-width-stacked: 100%;
// 22. Menu
// 23. Menu
// --------
$menu-margin: 0;
$menu-margin-nested: 1rem;
$menu-item-padding: 0.7rem 1rem;
$menu-nested-margin: $global-menu-nested-margin;
$menu-items-padding: $global-menu-padding;
$menu-simple-margin: 1rem;
$menu-item-color-active: $white;
$menu-item-background-active: map-get($foundation-palette, primary);
$menu-item-background-active: get-color(primary);
$menu-icon-spacing: 0.25rem;
$menu-item-background-hover: $light-gray;
$menu-state-back-compat: true;
$menu-centered-back-compat: true;
$menu-icons-back-compat: true;
// 23. Meter
// 24. Meter
// ---------
$meter-height: 1rem;
@@ -393,20 +490,30 @@ $meter-fill-good: $success-color;
$meter-fill-medium: $warning-color;
$meter-fill-bad: $alert-color;
// 24. Off-canvas
// 25. Off-canvas
// --------------
$offcanvas-size: 250px;
$offcanvas-sizes: (
small: 250px,
);
$offcanvas-vertical-sizes: (
small: 250px,
);
$offcanvas-background: $light-gray;
$offcanvas-zindex: -1;
$offcanvas-shadow: 0 0 10px rgba($black, 0.7);
$offcanvas-inner-shadow-size: 20px;
$offcanvas-inner-shadow-color: rgba($black, 0.25);
$offcanvas-overlay-zindex: 11;
$offcanvas-push-zindex: 12;
$offcanvas-overlap-zindex: 13;
$offcanvas-reveal-zindex: 12;
$offcanvas-transition-length: 0.5s;
$offcanvas-transition-timing: ease;
$offcanvas-fixed-reveal: true;
$offcanvas-exit-background: rgba($white, 0.25);
$maincontent-class: 'off-canvas-content';
$maincontent-shadow: 0 0 10px rgba($black, 0.5);
// 25. Orbit
// 26. Orbit
// ---------
$orbit-bullet-background: $medium-gray;
@@ -421,7 +528,7 @@ $orbit-control-background-hover: rgba($black, 0.5);
$orbit-control-padding: 1rem;
$orbit-control-zindex: 10;
// 26. Pagination
// 27. Pagination
// --------------
$pagination-font-size: rem-calc(14);
@@ -432,13 +539,14 @@ $pagination-item-spacing: rem-calc(1);
$pagination-radius: $global-radius;
$pagination-item-background-hover: $light-gray;
$pagination-item-background-current: $primary-color;
$pagination-item-color-current: foreground($pagination-item-background-current);
$pagination-item-color-current: $white;
$pagination-item-color-disabled: $medium-gray;
$pagination-ellipsis-color: $black;
$pagination-mobile-items: false;
$pagination-mobile-current-item: false;
$pagination-arrows: true;
// 27. Progress Bar
// 28. Progress Bar
// ----------------
$progress-height: 1rem;
@@ -447,7 +555,177 @@ $progress-margin-bottom: $global-margin;
$progress-meter-background: $primary-color;
$progress-radius: $global-radius;
// 28. Reveal
// 29. Prototype Arrow
// -------------------
$prototype-arrow-directions: (
down,
up,
right,
left
);
$prototype-arrow-size: 0.4375rem;
$prototype-arrow-color: $black;
// 30. Prototype Border-Box
// ------------------------
$prototype-border-box-breakpoints: $global-prototype-breakpoints;
// 31. Prototype Border-None
// -------------------------
$prototype-border-none-breakpoints: $global-prototype-breakpoints;
// 32. Prototype Bordered
// ----------------------
$prototype-bordered-breakpoints: $global-prototype-breakpoints;
$prototype-border-width: rem-calc(1);
$prototype-border-type: solid;
$prototype-border-color: $medium-gray;
// 33. Prototype Display
// ---------------------
$prototype-display-breakpoints: $global-prototype-breakpoints;
$prototype-display: (
inline,
inline-block,
block,
table,
table-cell
);
// 34. Prototype Font-Styling
// --------------------------
$prototype-font-breakpoints: $global-prototype-breakpoints;
$prototype-wide-letter-spacing: rem-calc(4);
$prototype-font-normal: $global-weight-normal;
$prototype-font-bold: $global-weight-bold;
// 35. Prototype List-Style-Type
// -----------------------------
$prototype-list-breakpoints: $global-prototype-breakpoints;
$prototype-style-type-unordered: (
disc,
circle,
square
);
$prototype-style-type-ordered: (
decimal,
lower-alpha,
lower-latin,
lower-roman,
upper-alpha,
upper-latin,
upper-roman
);
// 36. Prototype Overflow
// ----------------------
$prototype-overflow-breakpoints: $global-prototype-breakpoints;
$prototype-overflow: (
visible,
hidden,
scroll
);
// 37. Prototype Position
// ----------------------
$prototype-position-breakpoints: $global-prototype-breakpoints;
$prototype-position: (
static,
relative,
absolute,
fixed
);
$prototype-position-z-index: 975;
// 38. Prototype Rounded
// ---------------------
$prototype-rounded-breakpoints: $global-prototype-breakpoints;
$prototype-border-radius: rem-calc(3);
// 39. Prototype Separator
// -----------------------
$prototype-separator-breakpoints: $global-prototype-breakpoints;
$prototype-separator-align: center;
$prototype-separator-height: rem-calc(2);
$prototype-separator-width: 3rem;
$prototype-separator-background: $primary-color;
$prototype-separator-margin-top: $global-margin;
// 40. Prototype Shadow
// --------------------
$prototype-shadow-breakpoints: $global-prototype-breakpoints;
$prototype-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16),
0 2px 10px 0 rgba(0, 0, 0, 0.12);
// 41. Prototype Sizing
// --------------------
$prototype-sizing-breakpoints: $global-prototype-breakpoints;
$prototype-sizing: (
width,
height
);
$prototype-sizes: (
25: 25%,
50: 50%,
75: 75%,
100: 100%
);
// 42. Prototype Spacing
// ---------------------
$prototype-spacing-breakpoints: $global-prototype-breakpoints;
$prototype-spacers-count: 3;
// 43. Prototype Text-Decoration
// -----------------------------
$prototype-decoration-breakpoints: $global-prototype-breakpoints;
$prototype-text-decoration: (
overline,
underline,
line-through,
);
// 44. Prototype Text-Transformation
// ---------------------------------
$prototype-transformation-breakpoints: $global-prototype-breakpoints;
$prototype-text-transformation: (
lowercase,
uppercase,
capitalize
);
// 45. Prototype Text-Utilities
// ----------------------------
$prototype-utilities-breakpoints: $global-prototype-breakpoints;
$prototype-text-overflow: ellipsis;
// 46. Responsive Embed
// --------------------
$responsive-embed-margin-bottom: rem-calc(16);
$responsive-embed-ratios: (
default: 4 by 3,
widescreen: 16 by 9,
);
// 47. Reveal
// ----------
$reveal-background: $white;
@@ -459,7 +737,7 @@ $reveal-radius: $global-radius;
$reveal-zindex: 1005;
$reveal-overlay-background: rgba($black, 0.45);
// 29. Slider
// 48. Slider
// ----------
$slider-width-vertical: 0.5rem;
@@ -473,7 +751,7 @@ $slider-handle-background: $primary-color;
$slider-opacity-disabled: 0.25;
$slider-radius: $global-radius;
// 30. Switch
// 49. Switch
// ----------
$switch-background: $medium-gray;
@@ -489,7 +767,7 @@ $switch-paddle-offset: 0.25rem;
$switch-paddle-radius: $global-radius;
$switch-paddle-transition: all 0.25s ease-out;
// 31. Table
// 50. Table
// ---------
$table-background: $white;
@@ -499,29 +777,36 @@ $table-padding: rem-calc(8 10 10);
$table-hover-scale: 2%;
$table-row-hover: darken($table-background, $table-hover-scale);
$table-row-stripe-hover: darken($table-background, $table-color-scale + $table-hover-scale);
$table-is-striped: true;
$table-striped-background: smart-scale($table-background, $table-color-scale);
$table-stripe: even;
$table-head-background: smart-scale($table-background, $table-color-scale / 2);
$table-head-row-hover: darken($table-head-background, $table-hover-scale);
$table-foot-background: smart-scale($table-background, $table-color-scale);
$table-foot-row-hover: darken($table-foot-background, $table-hover-scale);
$table-head-font-color: $body-font-color;
$table-foot-font-color: $body-font-color;
$show-header-for-stacked: false;
$table-stack-breakpoint: medium;
// 32. Tabs
// 51. Tabs
// --------
$tab-margin: 0;
$tab-background: $white;
$tab-background-active: $white;
$tab-color: $primary-color;
$tab-background-active: $light-gray;
$tab-active-color: $primary-color;
$tab-item-font-size: rem-calc(12);
$tab-item-background-hover: $white;
$tab-item-padding: 1.25rem 1.5rem;
$tab-expand-max: 6;
$tab-content-background: $white;
$tab-content-border: $light-gray;
$tab-content-color: foreground($tab-background, $primary-color);
$tab-content-color: $body-font-color;
$tab-content-padding: 1rem;
// 33. Thumbnail
// 52. Thumbnail
// -------------
$thumbnail-border: solid 4px $white;
@@ -531,7 +816,7 @@ $thumbnail-shadow-hover: 0 0 6px 1px rgba($primary-color, 0.5);
$thumbnail-transition: box-shadow 200ms ease-out;
$thumbnail-radius: $global-radius;
// 34. Title Bar
// 53. Title Bar
// -------------
$titlebar-background: $black;
@@ -542,25 +827,42 @@ $titlebar-icon-color: $white;
$titlebar-icon-color-hover: $medium-gray;
$titlebar-icon-spacing: 0.25rem;
// 35. Tooltip
// 54. Tooltip
// -----------
$has-tip-cursor: help;
$has-tip-font-weight: $global-weight-bold;
$has-tip-border-bottom: dotted 1px $dark-gray;
$tooltip-background-color: $black;
$tooltip-color: $white;
$tooltip-padding: 0.75rem;
$tooltip-max-width: 10rem;
$tooltip-font-size: $small-font-size;
$tooltip-pip-width: 0.75rem;
$tooltip-pip-height: $tooltip-pip-width * 0.866;
$tooltip-radius: $global-radius;
// 36. Top Bar
// 55. Top Bar
// -----------
$topbar-padding: 0.5rem;
$topbar-background: $light-gray;
$topbar-submenu-background: $topbar-background;
$topbar-title-spacing: 1rem;
$topbar-title-spacing: 0.5rem 1rem 0.5rem 0;
$topbar-input-width: 200px;
$topbar-unstack-breakpoint: medium;
// 56. Xy Grid
// -----------
$xy-grid: true;
$grid-container: $global-width;
$grid-columns: 12;
$grid-margin-gutters: (
small: 20px,
medium: 30px
);
$grid-padding-gutters: $grid-margin-gutters;
$grid-container-padding: $grid-padding-gutters;
$grid-container-max: $global-width;
$xy-block-grid-max: 8;

View File

@@ -44,26 +44,34 @@ $sidebar-active: #f4fcd0;
background: #000;
}
.admin-top-bar {
background: #fff;
}
.top-bar {
background: #fff !important;
border-bottom: 1px solid #eee;
box-shadow: 0 2px 2px #eee;
color: #000;
height: auto;
@include breakpoint(medium) {
box-shadow: 0 2px 2px #eee;
}
[class^="icon-"]:not(.icon-circle) {
font-size: $base-font-size;
}
}
.top-bar-title {
.menu .menu-text {
h1 {
margin-bottom: 0;
margin-top: $line-height / 2;
margin-bottom: 0;
@include breakpoint(medium) {
margin-left: $line-height / 2;
margin-top: 0;
}
small {
@@ -94,12 +102,17 @@ $sidebar-active: #f4fcd0;
}
}
.menu-icon.dark {
.title-bar {
color: #000;
position: absolute;
right: 12px;
}
&::after,
&:hover::after {
background: #000 !important;
box-shadow: 0 7px 0 #000, 0 14px 0 #000 !important;
.menu-icon {
&::after {
background: #000;
box-shadow: 0 7px 0 #000, 0 14px 0 #000;
}
}
@@ -186,7 +199,7 @@ $sidebar-active: #f4fcd0;
margin-bottom: $line-height / 3;
}
.active {
.is-active {
border-bottom: 2px solid $admin-color;
color: $admin-color;
font-weight: bold;
@@ -231,6 +244,7 @@ $sidebar-active: #f4fcd0;
}
.admin-content {
overflow: scroll;
padding: $line-height !important;
}
@@ -321,7 +335,7 @@ $sidebar-active: #f4fcd0;
padding-left: $line-height / 2;
}
&.active a {
&.is-active a {
background: $sidebar-hover;
border-left: 2px solid $sidebar-active;
font-weight: bold;
@@ -371,7 +385,7 @@ $sidebar-active: #f4fcd0;
font-weight: normal;
}
.active {
.is-active {
border-bottom: 0;
}
}
@@ -587,7 +601,7 @@ $sidebar-active: #f4fcd0;
a {
display: block;
&.active {
&.is-active {
color: $brand;
font-weight: bold;
text-decoration: underline;
@@ -681,7 +695,7 @@ table {
}
.legislation-admin {
.menu .active > a {
.menu .is-active > a {
background: none;
}
}
@@ -698,15 +712,6 @@ table {
}
}
.legislation-process-index {
.legislation-process-new {
@include breakpoint(medium) {
text-align: right;
}
}
}
// 08. CMS
// --------------
.cms-page-list {

View File

@@ -0,0 +1,4 @@
last 2 versions
ie >= 9
Android >= 2.3
ios >= 7

View File

@@ -4,31 +4,38 @@
@import 'consul_settings';
@import 'custom_settings';
@import 'foundation';
@import 'motion-ui/motion-ui';
@include foundation-global-styles;
// @include foundation-xy-grid-classes;
@include foundation-grid;
// @include foundation-flex-grid;
// @include foundation-flex-classes;
@include foundation-typography;
@include foundation-button;
@include foundation-forms;
@include foundation-visibility-classes;
@include foundation-float-classes;
@include foundation-button;
@include foundation-accordion;
@include foundation-accordion-menu;
@include foundation-badge;
@include foundation-breadcrumbs;
@include foundation-button-group;
@include foundation-callout;
@include foundation-card;
@include foundation-close-button;
@include foundation-menu;
@include foundation-menu-icon;
@include foundation-drilldown-menu;
@include foundation-dropdown;
@include foundation-dropdown-menu;
@include foundation-flex-video;
@include foundation-responsive-embed;
@include foundation-label;
@include foundation-media-object;
@include foundation-menu;
@include foundation-off-canvas;
@include foundation-orbit;
@include foundation-pagination;
@include foundation-progress-bar;
@include foundation-slider;
@include foundation-sticky;
@include foundation-reveal;
@include foundation-switch;
@@ -36,9 +43,9 @@
@include foundation-tabs;
@include foundation-thumbnail;
@include foundation-title-bar;
@include foundation-tooltip;
@include foundation-top-bar;
@include foundation-menu-icon;
@include foundation-orbit;
@include foundation-visibility-classes;
@include foundation-float-classes;
@include motion-ui-transitions;
@include motion-ui-animations;

View File

@@ -253,12 +253,21 @@ a {
}
}
&.active {
border-bottom: 2px solid $brand;
color: $brand;
+ li {
margin-left: 0;
}
&:not(.active) {
&.is-active {
border-bottom: 2px solid $brand;
color: $brand;
padding-bottom: rem-calc(1);
h2 a {
color: $brand;
}
}
&:not(.is-active) {
margin-bottom: $line-height / 3;
}
}
@@ -279,7 +288,7 @@ a {
color: $text-medium;
padding: 0;
&.active {
&.is-active {
font-weight: bold;
color: $brand;
}
@@ -289,7 +298,7 @@ a {
font-size: $base-font-size;
}
&.active {
&.is-active {
border-bottom: 2px solid $brand;
color: $brand;
}
@@ -404,6 +413,11 @@ a {
text-transform: uppercase;
}
figure img {
height: 100%;
width: 100%;
}
// 02. Header
// ----------
@@ -436,8 +450,6 @@ header {
.top-bar {
background: $brand !important;
color: #fff;
height: $line-height * 2;
line-height: $line-height * 2;
padding-bottom: 0;
padding-top: 0;
@@ -445,30 +457,44 @@ header {
padding: 0;
}
.top-bar-title a {
@include logo;
line-height: rem-calc(80);
@include breakpoint(medium) {
line-height: rem-calc(80);
}
&:hover {
text-decoration: none;
}
}
ul {
background: none;
padding-right: rem-calc(15);
}
.menu .menu-text {
padding: 0;
a {
color: #fff;
display: inline-block;
font-family: 'Lato' !important;
font-size: rem-calc(24);
font-weight: lighter;
line-height: $line-height * 2;
padding: 0;
@include breakpoint(medium) {
line-height: rem-calc(80);
margin-top: 0;
}
img {
@include breakpoint(medium) {
margin-right: $line-height / 2;
margin-top: 0;
}
}
}
}
.menu > li {
display: block;
width: 100%;
@include breakpoint(medium) {
display: table-cell;
height: $line-height * 3.5;
width: auto;
}
a {
@@ -482,6 +508,7 @@ header {
}
.button {
background: none;
text-align: left;
@include breakpoint(medium) {
@@ -492,13 +519,11 @@ header {
}
}
.menu-icon.dark {
height: 20px;
.has-submenu {
&::after,
&:hover::after {
background: #fff;
box-shadow: 0 7px 0 #fff, 0 14px 0 #fff;
&.is-active a {
color: #fff;
font-weight: bold;
}
}
@@ -507,7 +532,7 @@ header {
&.is-dropdown-submenu {
background: #fff;
margin: 0;
margin-top: rem-calc(-24);
margin-top: rem-calc(-12);
padding: 0;
z-index: 9;
}
@@ -524,6 +549,23 @@ header {
}
}
.menu-icon {
&.dark {
&:hover::after,
&::after {
background: #fff;
box-shadow: 0 7px 0 #fff, 0 14px 0 #fff;
}
}
}
.title-bar {
background: none;
float: right;
}
.dropdown.menu > li {
&.is-dropdown-submenu-parent > a::after {
@@ -605,7 +647,7 @@ header {
}
}
&.active {
&.is-active {
color: #fff;
@include breakpoint(medium) {
@@ -652,7 +694,7 @@ header {
.top-bar-right {
.active {
.is-active {
font-weight: bold;
text-decoration: underline;
}
@@ -680,7 +722,7 @@ header {
}
}
.active {
.is-active {
border-bottom: 2px solid $brand;
color: $brand;
@@ -784,7 +826,7 @@ footer {
color: $link;
&:hover,
&.active {
&.is-active {
background: $brand;
color: #fff;
}
@@ -1798,7 +1840,7 @@ table {
}
}
&.active {
&.is-active {
background: #43ac6a;
color: #fff;
}
@@ -2257,6 +2299,11 @@ table {
}
.card {
padding: $line-height / 2;
.card {
border: 0;
}
.card-section {
margin: 0 auto;
@@ -2615,8 +2662,9 @@ table {
&.title {
display: inline-block;
border-top: 4px solid $brand;
margin-bottom: 0;
min-width: rem-calc(240);
padding-top: $line-height / 2;
padding: $line-height / 2 0;
}
}
}
@@ -2627,17 +2675,28 @@ table {
clear: both;
}
.debate {
margin: $line-height 0;
a {
&.see-all {
border-bottom: 1px solid $border;
display: block;
font-size: $small-font-size;
margin: $line-height 0 $line-height / 2;
text-align: right;
width: 100%;
}
}
}
.feed-image {
display: inline-block;
height: rem-calc(120);
margin: $line-height / 2 0;
overflow: hidden;
@include breakpoint(medium) {
height: rem-calc(96);
}
img {
margin-left: rem-calc(-15);
max-width: none;
@@ -2647,25 +2706,19 @@ table {
.feed-description {
@include breakpoint(medium) {
padding-top: $line-height;
}
p {
font-size: $small-font-size;
margin-bottom: 0;
}
}
.feed-content {
border-bottom: 1px solid $border;
display: inline-block;
a {
&.see-all {
font-size: $small-font-size;
margin: $line-height 0 $line-height / 2;
}
.debate,
.proposal {
margin-bottom: 0;
margin-top: 0;
padding: $line-height / 2 0;
}
}

View File

@@ -48,7 +48,7 @@
max-width: 80%;
}
&.active {
&.is-active {
font-weight: 700;
}
}

View File

@@ -99,7 +99,7 @@
}
}
.active {
.is-active {
border-bottom: 2px solid $brand;
}
}
@@ -244,7 +244,7 @@
position: relative;
}
.active {
.is-active {
background: #ccdbe6;
border: 0;
}

View File

@@ -1350,8 +1350,7 @@
text-decoration: none;
}
a,
div {
a {
display: block;
padding: $line-height / 2;
@@ -1536,7 +1535,7 @@
padding: $line-height / 4;
}
.select-district .active a {
.select-district .is-active a {
background: #f9f9f9;
border-radius: rem-calc(3);
color: $budget;
@@ -1629,7 +1628,7 @@
z-index: 99;
}
&.active {
&.is-active {
h3 {
background: $budget;

View File

@@ -60,7 +60,6 @@ class Admin::Legislation::ProcessesController < Admin::Legislation::BaseControll
:draft_publication_enabled,
:result_publication_enabled,
:published,
:proposals_description,
:custom_list,
documents_attributes: [:id, :title, :attachment, :cached_attachment, :user_id, :_destroy]
)

View File

@@ -55,7 +55,7 @@ class Admin::Poll::BoothAssignmentsController < Admin::Poll::BaseController
end
def manage
@booths = ::Poll::Booth.all
@booths = ::Poll::Booth.all.order(name: :asc).page(params[:page]).per(300)
@poll = Poll.find(params[:poll_id])
end

View File

@@ -55,7 +55,7 @@ class Admin::Poll::QuestionsController < Admin::Poll::BaseController
private
def question_params
params.require(:poll_question).permit(:poll_id, :title, :question, :proposal_id, :video_url)
params.require(:poll_question).permit(:poll_id, :title, :question, :proposal_id)
end
def search_params

View File

@@ -12,12 +12,8 @@ module AdminHelper
t("#{namespace}.header.title")
end
def menu_tags?
["tags"].include?(controller_name)
end
def menu_moderated_content?
["proposals", "debates", "comments", "hidden_users"].include?(controller_name) && controller.class.parent != Admin::Legislation
["proposals", "debates", "comments", "hidden_users", "activity"].include?(controller_name) && controller.class.parent != Admin::Legislation
end
def menu_budget?
@@ -29,15 +25,15 @@ module AdminHelper
end
def menu_profiles?
%w[administrators organizations officials moderators valuators managers users activity].include?(controller_name)
%w[administrators organizations officials moderators valuators managers users].include?(controller_name)
end
def menu_banners?
["banners"].include?(controller_name)
def menu_settings?
["settings", "tags", "geozones", "images", "content_blocks"].include?(controller_name)
end
def menu_customization?
["pages", "images", "content_blocks"].include?(controller_name) || menu_homepage?
["pages", "banners"].include?(controller_name) || menu_homepage?
end
def menu_homepage?

View File

@@ -49,7 +49,7 @@ module BudgetsHelper
def css_for_ballot_heading(heading)
return '' if current_ballot.blank?
current_ballot.has_lines_in_heading?(heading) ? 'active' : ''
current_ballot.has_lines_in_heading?(heading) ? 'is-active' : ''
end
def current_ballot
@@ -66,7 +66,13 @@ module BudgetsHelper
def current_budget_map_locations
return unless current_budget.present?
MapLocation.where(investment_id: current_budget.investments).map { |l| l.json_data }
if current_budget.valuating_or_later?
investments = current_budget.investments.selected
else
investments = current_budget.investments
end
MapLocation.where(investment_id: investments).map { |l| l.json_data }
end
def display_calculate_winners_button?(budget)

View File

@@ -3,7 +3,7 @@ module LayoutsHelper
def layout_menu_link_to(text, path, is_active, options)
if is_active
content_tag(:span, t('shared.you_are_in'), class: 'show-for-sr') + ' ' +
link_to(text, path, options.merge(class: "active"))
link_to(text, path, options.merge(class: "is-active"))
else
link_to(text, path, options)
end

View File

@@ -1,6 +1,6 @@
module WelcomeHelper
def active_class(index)
def is_active_class(index)
"is-active is-in" if index.zero?
end

View File

@@ -105,6 +105,10 @@ class Budget < ActiveRecord::Base
Budget::Phase::PUBLISHED_PRICES_PHASES.include?(phase)
end
def valuating_or_later?
valuating? || publishing_prices? || balloting_or_later?
end
def balloting_process?
balloting? || reviewing_ballots?
end

View File

@@ -1,45 +1,61 @@
<div class="admin-sidebar" data-equalizer-watch>
<ul id="admin_menu" data-accordion-menu data-multi-open="false">
<li class="section-title">
<a href="#">
<span class="icon-proposals"></span>
<strong><%= t("admin.menu.title_categories") %></strong>
</a>
<ul <%= "class=is-active" if menu_tags? %>>
<li <%= "class=active" if controller_name == "tags" %>>
<%= link_to t("admin.menu.proposals_topics"), admin_tags_path %>
</li>
</ul>
</li>
<li class="section-title">
<a href="#">
<span class="icon-eye"></span>
<strong><%= t("admin.menu.title_moderated_content") %></strong>
</a>
<ul <%= "class=is-active" if menu_moderated_content? %>>
<% if feature?(:proposals) %>
<li <%= "class=active" if controller_name == "proposals" && controller.class.parent != Admin::Legislation %>>
<%= link_to t("admin.menu.hidden_proposals"), admin_proposals_path %>
<% if feature?(:polls) %>
<li class="section-title">
<a href="#">
<span class="icon-checkmark-circle"></span>
<strong><%= t("admin.menu.title_polls") %></strong>
</a>
<ul id="polls_menu" <%= "class=is-active" if menu_polls? || controller.class.parent == Admin::Poll::Questions::Answers %>>
<li <%= "class=is-active" if controller_name == "polls" && action_name != "booth_assignments" ||
%w(booth_assignments officer_assignments recounts results).include?(controller_name) %>>
<%= link_to t("admin.menu.polls"), admin_polls_path %>
</li>
<% end %>
<% if feature?(:debates) %>
<li <%= "class=active" if controller_name == "debates" %>>
<%= link_to t("admin.menu.hidden_debates"), admin_debates_path %>
<li <%= "class=is-active" if %w(questions answers).include?(controller_name) ||
controller.class.parent == Admin::Poll::Questions::Answers %>>
<%= link_to t("admin.menu.poll_questions"), admin_questions_path %>
</li>
<li <%= "class=is-active" if controller_name == "officers" %>>
<%= link_to t("admin.menu.poll_officers"), admin_officers_path %>
</li>
<li <%= "class=is-active" if controller_name == "booths" &&
action_name != "available" %>>
<%= link_to t("admin.menu.poll_booths"), admin_booths_path %>
</li>
<li <%= "class=is-active" if (controller_name == "polls" && action_name == "booth_assignments") ||
(controller_name == "booth_assignments" && action_name == "manage") %>>
<%= link_to t("admin.menu.poll_booth_assignments"), booth_assignments_admin_polls_path %>
</li>
<li <%= "class=is-active" if %w(shifts booths).include?(controller_name) &&
action_name == "available" %>>
<%= link_to t("admin.menu.poll_shifts"), available_admin_booths_path %>
</li>
</ul>
</li>
<% end %>
<% if feature?(:legislation) %>
<li class="section-title <%= "is-active" if controller.class.parent == Admin::Legislation %>">
<%= link_to admin_legislation_processes_path do %>
<span class="icon-file-text"></span>
<strong><%= t("admin.menu.legislation") %></strong>
<% end %>
</li>
<% end %>
<li <%= "class=active" if controller_name == "comments" %>>
<%= link_to t("admin.menu.hidden_comments"), admin_comments_path %>
</li>
<li <%= "class=active" if controller_name == "hidden_users" %>>
<%= link_to t("admin.menu.hidden_users"), admin_hidden_users_path %>
</li>
</ul>
</li>
<% if feature?(:budgets) %>
<li class="section-title <%= "is-active" if controller_name == "budgets" %>">
<%= link_to admin_budgets_path do %>
<span class="icon-budget"></span>
<strong><%= t("admin.menu.budgets") %></strong>
<% end %>
</li>
<% end %>
<% if feature?(:spending_proposals) %>
<li class="section-title">
@@ -48,114 +64,26 @@
<strong><%= t("admin.menu.title_budgets") %></strong>
</a>
<ul <%= "class=is-active" if menu_budget? %>>
<li <%= "class=active" if controller_name == "spending_proposals" %>>
<li <%= "class=is-active" if controller_name == "spending_proposals" %>>
<%= link_to t("admin.menu.spending_proposals"), admin_spending_proposals_path %>
</li>
</ul>
</li>
<% end %>
<% if feature?(:polls) %>
<li class="section-title">
<a href="#">
<span class="icon-checkmark-circle"></span>
<strong><%= t("admin.menu.title_polls") %></strong>
</a>
<ul id="polls_menu" <%= "class=is-active" if menu_polls? || controller.class.parent == Admin::Poll::Questions::Answers %>>
<li <%= "class=active" if controller_name == "polls" && action_name != "booth_assignments" ||
%w(booth_assignments officer_assignments recounts results).include?(controller_name) %>>
<%= link_to t('admin.menu.polls'), admin_polls_path %>
</li>
<li <%= "class=active" if %w(questions answers).include?(controller_name) ||
controller.class.parent == Admin::Poll::Questions::Answers %>>
<%= link_to t("admin.menu.poll_questions"), admin_questions_path %>
</li>
<li <%= "class=active" if controller_name == "officers" %>>
<%= link_to t('admin.menu.poll_officers'), admin_officers_path %>
</li>
<li <%= "class=active" if controller_name == "booths" &&
action_name != "available" %>>
<%= link_to t('admin.menu.poll_booths'), admin_booths_path %>
</li>
<li <%= "class=active" if (controller_name == "polls" && action_name == "booth_assignments") ||
(controller_name == "booth_assignments" && action_name == "manage") %>>
<%= link_to t('admin.menu.poll_booth_assignments'), booth_assignments_admin_polls_path %>
</li>
<li <%= "class=active" if %w(shifts booths).include?(controller_name) &&
action_name == "available" %>>
<%= link_to t('admin.menu.poll_shifts'), available_admin_booths_path %>
</li>
</ul>
</li>
<% end %>
<% if feature?(:budgets) %>
<li class="section-title <%= "active" if controller_name == "budgets" %>">
<%= link_to admin_budgets_path do %>
<span class="icon-budget"></span>
<strong><%= t("admin.menu.budgets") %></strong>
<% end %>
</li>
<% end %>
<li class="section-title">
<% messages_sections = %w(newsletters emails_download) %>
<% messages_menu_active = messages_sections.include?(controller_name) %>
<li class="section-title" <%= "class=is-active" if messages_menu_active %>>
<a href="#">
<span class="icon-organizations"></span>
<strong><%= t("admin.menu.title_profiles") %></strong>
<span class="icon-zip"></span>
<strong><%= t("admin.menu.emails") %></strong>
</a>
<ul <%= "class=is-active" if menu_profiles? %>>
<li <%= "class=active" if controller_name == "administrators" %>>
<%= link_to t("admin.menu.administrators"), admin_administrators_path %>
<ul <%= "class=is-active" if messages_menu_active %>>
<li <%= "class=is-active" if controller_name == "newsletters" %>>
<%= link_to t("admin.menu.newsletters"), admin_newsletters_path %>
</li>
<li <%= "class=active" if controller_name == "organizations" %>>
<%= link_to t("admin.menu.organizations"), admin_organizations_path %>
</li>
<li <%= "class=active" if controller_name == "officials" %>>
<%= link_to t("admin.menu.officials"), admin_officials_path %>
</li>
<li <%= "class=active" if %w(moderators activity).include?(controller_name) %>>
<%= link_to t('admin.menu.moderators'), admin_moderators_path%>
</li>
<li <%= "class=active" if controller_name == "valuators" %>>
<%= link_to t('admin.menu.valuators'), admin_valuators_path %>
</li>
<li <%= "class=active" if controller_name == "managers" %>>
<%= link_to t('admin.menu.managers'), admin_managers_path %>
</li>
<li <%= 'class=active' if controller_name == 'users' %>>
<%= link_to t('admin.menu.users'), admin_users_path %>
</li>
</ul>
</li>
<% if feature?(:legislation) %>
<li class="section-title <%= "active" if controller.class.parent == Admin::Legislation %>">
<%= link_to admin_legislation_processes_path do %>
<span class="icon-file-text"></span>
<strong><%= t("admin.menu.legislation") %></strong>
<% end %>
</li>
<% end %>
<li class="section-title">
<a href="#">
<span class="icon-banner"></span>
<strong><%= t("admin.menu.title_banners") %></strong>
</a>
<ul <%= "class=is-active" if menu_banners? %>>
<li <%= "class=active" if controller_name == "banners" %>>
<%= link_to t("admin.menu.banner"), admin_banners_path %>
<li <%= "class=is-active" if controller_name == "emails_download" %>>
<%= link_to t("admin.menu.emails_download"), admin_emails_download_index_path %>
</li>
</ul>
</li>
@@ -167,35 +95,23 @@
</a>
<ul <%= "class=is-active" if menu_customization? &&
controller.class.parent != Admin::Poll::Questions::Answers %>>
<li <%= "class=active" if menu_homepage? %>>
<%= link_to t("admin.menu.site_customization.homepage"), admin_homepage_path %>
</li>
<li <%= "class=active" if controller_name == "pages" %>>
<li <%= "class=is-active" if controller_name == "pages" %>>
<%= link_to t("admin.menu.site_customization.pages"), admin_site_customization_pages_path %>
</li>
<li <%= "class=active" if controller_name == "images" &&
controller.class.parent != Admin::Poll::Questions::Answers %>>
<%= link_to t("admin.menu.site_customization.images"), admin_site_customization_images_path %>
<li <%= "class=is-active" if controller_name == "banners" %>>
<%= link_to t("admin.menu.banner"), admin_banners_path %>
</li>
<li <%= "class=active" if controller_name == "content_blocks" %>>
<%= link_to t("admin.menu.site_customization.content_blocks"), admin_site_customization_content_blocks_path%>
</li>
</ul>
</li>
<li class="section-title <%= "active" if controller_name == "geozones" %>">
<%= link_to admin_geozones_path do %>
<span class="icon-map-marker"></span>
<strong><%= t('admin.menu.geozones') %></strong>
<% end %>
</li>
<% if feature?(:signature_sheets) %>
<li class="section-title <%= "active" if controller_name == "signature_sheets" %>">
<li class="section-title <%= "is-active" if controller_name == "signature_sheets" %>">
<%= link_to admin_signature_sheets_path do %>
<span class="icon-file-text-o"></span>
<strong><%= t("admin.menu.signature_sheets") %></strong>
@@ -203,26 +119,108 @@
</li>
<% end %>
<li class="section-title" <%= "class=active" if %w(newsletters emails_download).include?(controller_name) %>>
<li class="section-title">
<a href="#">
<span class="icon-zip"></span>
<strong><%= t("admin.menu.emails") %></strong>
<span class="icon-eye"></span>
<strong><%= t("admin.menu.title_moderated_content") %></strong>
</a>
<ul id="emails_menu" <%= "class=is-active" if %w(newsletters emails_download).include?(controller_name) %>>
<li <%= "class=active" if controller_name == "newsletters" %>>
<%= link_to t("admin.menu.newsletters"), admin_newsletters_path %>
<ul <%= "class=is-active" if menu_moderated_content? %>>
<% if feature?(:proposals) %>
<li <%= "class=is-active" if controller_name == "proposals" && controller.class.parent != Admin::Legislation %>>
<%= link_to t("admin.menu.hidden_proposals"), admin_proposals_path %>
</li>
<% end %>
<% if feature?(:debates) %>
<li <%= "class=is-active" if controller_name == "debates" %>>
<%= link_to t("admin.menu.hidden_debates"), admin_debates_path %>
</li>
<% end %>
<li <%= "class=is-active" if controller_name == "comments" %>>
<%= link_to t("admin.menu.hidden_comments"), admin_comments_path %>
</li>
<li <%= "class=active" if controller_name == "emails_download" %>>
<%= link_to t("admin.menu.emails_download"), admin_emails_download_index_path %>
<li <%= "class=is-active" if controller_name == "hidden_users" %>>
<%= link_to t("admin.menu.hidden_users"), admin_hidden_users_path %>
</li>
<li <%= "class=is-active" if controller_name == "activity" %>>
<%= link_to t("admin.menu.activity"), admin_activity_path %>
</li>
</ul>
</li>
<li class="section-title <%= "active" if controller_name == "settings" %>">
<%= link_to admin_settings_path do %>
<span class="icon-settings"></span>
<strong><%= t("admin.settings.index.title") %></strong>
<li class="section-title">
<a href="#">
<span class="icon-organizations"></span>
<strong><%= t("admin.menu.title_profiles") %></strong>
</a>
<ul <%= "class=is-active" if menu_profiles? %>>
<li <%= "class=is-active" if controller_name == "administrators" %>>
<%= link_to t("admin.menu.administrators"), admin_administrators_path %>
</li>
<li <%= "class=is-active" if controller_name == "organizations" %>>
<%= link_to t("admin.menu.organizations"), admin_organizations_path %>
</li>
<li <%= "class=is-active" if controller_name == "officials" %>>
<%= link_to t("admin.menu.officials"), admin_officials_path %>
</li>
<li <%= "class=is-active" if controller_name == "moderators" %>>
<%= link_to t("admin.menu.moderators"), admin_moderators_path%>
</li>
<li <%= "class=is-active" if controller_name == "valuators" %>>
<%= link_to t("admin.menu.valuators"), admin_valuators_path %>
</li>
<li <%= "class=is-active" if controller_name == "managers" %>>
<%= link_to t("admin.menu.managers"), admin_managers_path %>
</li>
<li <%= "class=is-active" if controller_name == "users" %>>
<%= link_to t("admin.menu.users"), admin_users_path %>
</li>
</ul>
</li>
<li class="section-title" <%= "class=is-active" if controller_name == "stats" %>>
<%= link_to admin_stats_path do %>
<span class="icon-stats"></span><%= t("admin.menu.stats") %>
<% end %>
</li>
<li class="section-title">
<a href="#">
<span class="icon-settings"></span>
<strong><%= t("admin.menu.title_settings") %></strong>
</a>
<ul <%="class=is-active" if menu_settings? %>>
<li <%= "class=is-active" if controller_name == "settings" %>>
<%= link_to t("admin.menu.settings"), admin_settings_path %>
</li>
<li <%= "class=is-active" if controller_name == "tags" %>>
<%= link_to t("admin.menu.proposals_topics"), admin_tags_path %>
</li>
<li <%= "class=is-active" if controller_name == "geozones" %>>
<%= link_to t("admin.menu.geozones"), admin_geozones_path %>
</li>
<li <%= "class=is-active" if controller_name == "images" &&
controller.class.parent != Admin::Poll::Questions::Answers %>>
<%= link_to t("admin.menu.site_customization.images"), admin_site_customization_images_path %>
</li>
<li <%= "class=is-active" if controller_name == "content_blocks" %>>
<%= link_to t("admin.menu.site_customization.content_blocks"), admin_site_customization_content_blocks_path%>
</li>
</ul>
</li>
</ul>
</div>

View File

@@ -36,21 +36,18 @@
<thead>
<tr>
<th><%= t("admin.budget_investments.index.table_id") %></th>
<th><%= t("admin.budget_investments.index.table_title") %></th>
<th class="small-3"><%= t("admin.budget_investments.index.table_title") %></th>
<th><%= t("admin.budget_investments.index.table_supports") %></th>
<th><%= t("admin.budget_investments.index.table_admin") %></th>
<th><%= t("admin.budget_investments.index.table_valuator") %></th>
<th><%= t("admin.budget_investments.index.table_valuation_group") %></th>
<th>
<%= t("admin.budget_investments.index.table_valuation_group") %>
<%= t("admin.budget_investments.index.table_valuator") %>
</th>
<th><%= t("admin.budget_investments.index.table_geozone") %></th>
<th><%= t("admin.budget_investments.index.table_feasibility") %></th>
<th class="text-center"><%= t("admin.budget_investments.index.table_valuation_finished") %></th>
<th class="text-center">
<% if params[:filter] == "under_valuation" %>
<%= t("admin.budget_investments.index.table_evaluation") %>
<% else %>
<%= t("admin.budget_investments.index.table_selection") %>
<% end %>
</th>
<th class="text-center"><%= t("admin.budget_investments.index.table_evaluation") %></th>
<th class="text-center"><%= t("admin.budget_investments.index.table_selection") %></th>
<% if params[:filter] == "selected" %>
<th class="text-center"><%= t("admin.budget_investments.index.table_incompatible") %></th>
<% end %>
@@ -75,20 +72,19 @@
</td>
<td class="small">
<% if investment.administrator.present? %>
<span title="<%= t('admin.budget_investments.index.assigned_admin') %>">
<span title="<%= t("admin.budget_investments.index.assigned_admin") %>">
<%= investment.administrator.name %>
</span>
<% else %>
<%= t("admin.budget_investments.index.no_admin_assigned") %>
<% end %>
</td>
<td class="small">
<% no_valuators_assigned = t("admin.budget_investments.index.no_valuators_assigned") %>
<%= investment.assigned_valuators || no_valuators_assigned %>
</td>
<td class="small">
<% no_valuation_groups = t("admin.budget_investments.index.no_valuation_groups") %>
<%= investment.assigned_valuation_groups || no_valuation_groups %>
<br>
<% no_valuators_assigned = t("admin.budget_investments.index.no_valuators_assigned") %>
<%= investment.assigned_valuators || no_valuators_assigned %>
</td>
<td class="small">
<%= investment.heading.name %>
@@ -100,15 +96,15 @@
<td class="small text-center">
<%= investment.valuation_finished? ? t("shared.yes"): t("shared.no") %>
</td>
<td class="small text-center">
<% if params[:filter] == "under_valuation" %>
<td class="small text-center">
<%= form_for [:admin, investment.budget, investment], remote: true do |f| %>
<%= f.check_box :visible_to_valuators,
label: false,
class: "js-submit-on-change",
id: "budget_investment_visible_to_valuators" %>
<% end %>
<% else %>
</td>
<td class="small text-center">
<% if investment.selected? %>
<%= link_to_unless investment.budget.finished?,
t("admin.budget_investments.index.selected"),
@@ -136,7 +132,6 @@
remote: true,
class: "button small hollow expanded" %>
<% end %>
<% end %>
</td>
<% if params[:filter] == "selected" %>
<td class="small text-center">

View File

@@ -1,3 +1,9 @@
<div class="float-right">
<%= link_to t("admin.budget_investments.index.see_results"),
budget_results_path(current_budget, heading_id: current_budget.headings.first),
class: "button hollow medium", target: "_blank" %>
</div>
<h2 class="inline-block"><%= @budget.name %> - <%= t("admin.budget_investments.index.title") %></h2>
<%= render "search_form" %>

View File

@@ -4,7 +4,7 @@
<div class="row margin-top">
<div class="small-12 medium-9 column">
<%= f.select :phase, budget_phases_select_options %>
<%= f.select :phase, budget_phases_select_options, selected: "drafting" %>
</div>
<div class="small-12 medium-3 column">
<%= f.select :currency_symbol, budget_currency_symbol_select_options %>

View File

@@ -1,16 +1,18 @@
<h3 class="inline-block"><%= t('admin.budgets.show.groups', count: groups.count) %></h3>
<%= link_to t("admin.budgets.form.add_group"), "#", class: "button float-right js-toggle-link", data: { "toggle-selector" => "#new-group-form" } %>
<% if groups.blank? %>
<div class="callout primary">
<div class="callout primary clear">
<%= t("admin.budgets.form.no_groups") %>
<strong><%= link_to t("admin.budgets.form.add_group"), "#",
class: "js-toggle-link",
data: { "toggle-selector" => "#new-group-form" } %></strong>
</div>
<% else %>
<%= link_to t("admin.budgets.form.add_group"), "#", class: "button float-right js-toggle-link", data: { "toggle-selector" => "#new-group-form" } %>
<% end %>
<%= render 'admin/budgets/group_form', budget: @budget, group: Budget::Group.new, id: "new-group-form", button_title: t("admin.budgets.form.create_group"), css_class: '' %>
<%= render 'admin/budgets/group_form',
budget: @budget,
group: Budget::Group.new,
id: "new-group-form",
button_title: t("admin.budgets.form.create_group"),
css_class: '' %>
<% groups.each do |group| %>
<div id="<%= dom_id(group) %>">

View File

@@ -13,9 +13,6 @@
edit_admin_budget_budget_group_budget_heading_path(budget_id: group.budget.id, budget_group_id: group.id, id: heading.id),
class: "button hollow",
remote: true %>
<%= link_to t("admin.budget_investments.index.title"),
admin_budget_budget_investments_path(budget_id: group.budget.id, heading_id: heading.id),
class: "button hollow" %>
<% if heading.can_be_deleted? %>
<%= link_to t('admin.administrators.administrator.delete'),
#admin_budget_budget_group_budget_headings_path(group.budget.id, group.id),

View File

@@ -27,8 +27,10 @@
<td class="small">
<%= t("budgets.phase.#{budget.phase}") %>
</td>
<td class="small">
<%= link_to t("admin.budgets.index.budget_investments"), admin_budget_budget_investments_path(budget_id: budget.id) %>
<td>
<%= link_to t("admin.budgets.index.budget_investments"),
admin_budget_budget_investments_path(budget_id: budget.id),
class: "button hollow medium" %>
</td>
<td class="small">
<%= link_to t("admin.budgets.index.edit_groups"), admin_budget_path(budget) %>

View File

@@ -1,4 +1,5 @@
<h2><%= t("admin.comments.index.title") %></h2>
<p><%= t("admin.shared.moderated_content") %></p>
<%= render 'shared/filter_subnav', i18n_namespace: "admin.comments.index" %>
@@ -7,7 +8,7 @@
<table>
<thead>
<th scope="col" class="small-9"><%= t("admin.shared.description") %></th>
<th scope="col" class="small-8"><%= t("admin.shared.description") %></th>
<th scope="col"><%= t("admin.shared.actions") %></th>
</thead>
<tbody>

View File

@@ -1,4 +1,5 @@
<h2><%= t("admin.debates.index.title") %></h2>
<p><%= t("admin.shared.moderated_content") %></p>
<%= render 'shared/filter_subnav', i18n_namespace: "admin.debates.index" %>
@@ -9,7 +10,7 @@
<thead>
<th scope="col"><%= t("admin.shared.title") %></th>
<th scope="col" class="small-6"><%= t("admin.shared.description") %></th>
<th scope="col" class="small-3"><%= t("admin.shared.actions") %></th>
<th scope="col" class="small-4"><%= t("admin.shared.actions") %></th>
</thead>
<tbody>
<% @debates.each do |debate| %>

View File

@@ -1,4 +1,5 @@
<h2><%= t("admin.hidden_users.index.title") %></h2>
<p><%= t("admin.shared.moderated_content") %></p>
<%= render 'shared/filter_subnav', i18n_namespace: "admin.hidden_users.index" %>
@@ -7,7 +8,7 @@
<table>
<thead>
<th scope="col" class="small-9"><%= t("admin.hidden_users.index.user") %></th>
<th scope="col" class="small-8"><%= t("admin.hidden_users.index.user") %></th>
<th scope="col"><%= t("admin.shared.actions") %></th>
</thead>
<tbody>

View File

@@ -81,39 +81,6 @@
</div>
</div>
<div class="row">
<div class="small-12 medium-4 column">
<label><%= t('admin.legislation.processes.form.allegations_phase') %></label>
</div>
<div class="small-12 medium-1 column legislation-process-start">
<%= t('admin.legislation.processes.form.start') %>
</div>
<div class="small-12 medium-2 column">
<%= f.text_field :allegations_start_date,
label: false,
value: format_date_for_calendar_form(@process.allegations_start_date),
class: "js-calendar-full",
id: "allegations_start_date" %>
</div>
<div class="small-12 medium-1 column legislation-process-end">
<%= t('admin.legislation.processes.form.end') %>
</div>
<div class="small-12 medium-2 column">
<%= f.text_field :allegations_end_date,
label: false,
value: format_date_for_calendar_form(@process.allegations_end_date),
class: "js-calendar-full",
id: "allegations_end_date" %>
</div>
<div class="small-12 medium-2 column">
<%= f.check_box :allegations_phase_enabled, checked: @process.allegations_phase.enabled?, label: t('admin.legislation.processes.form.enabled') %>
</div>
<div class="small-12 column">
<hr>
</div>
</div>
<div class="row">
<div class="small-12 medium-4 column">
<label><%= t('admin.legislation.processes.form.proposals_phase') %></label>
@@ -147,6 +114,39 @@
</div>
</div>
<div class="row">
<div class="small-12 medium-4 column">
<label><%= t('admin.legislation.processes.form.allegations_phase') %></label>
</div>
<div class="small-12 medium-1 column legislation-process-start">
<%= t('admin.legislation.processes.form.start') %>
</div>
<div class="small-12 medium-2 column">
<%= f.text_field :allegations_start_date,
label: false,
value: format_date_for_calendar_form(@process.allegations_start_date),
class: "js-calendar-full",
id: "allegations_start_date" %>
</div>
<div class="small-12 medium-1 column legislation-process-end">
<%= t('admin.legislation.processes.form.end') %>
</div>
<div class="small-12 medium-2 column">
<%= f.text_field :allegations_end_date,
label: false,
value: format_date_for_calendar_form(@process.allegations_end_date),
class: "js-calendar-full",
id: "allegations_end_date" %>
</div>
<div class="small-12 medium-2 column">
<%= f.check_box :allegations_phase_enabled, checked: @process.allegations_phase.enabled?, label: t('admin.legislation.processes.form.enabled') %>
</div>
<div class="small-12 column">
<hr>
</div>
</div>
<div class="row">
<div class="small-12 medium-4 column">
<%= f.label :draft_publication_date %>

View File

@@ -1,6 +1,6 @@
<ul class="menu simple clear">
<% if active == 'info' %>
<li class="active">
<li class="is-active">
<h2><%= t("admin.legislation.processes.subnav.info") %></h2>
</li>
<% else %>
@@ -10,7 +10,7 @@
<% end %>
<% if active == 'questions' %>
<li class="active">
<li class="is-active">
<h2><%= t("admin.legislation.processes.subnav.questions") %></h2>
</li>
<% else %>
@@ -20,7 +20,7 @@
<% end %>
<% if active == 'proposals' %>
<li class="active">
<li class="is-active">
<h2><%= t("admin.legislation.processes.subnav.proposals") %></h2>
</li>
<% else %>
@@ -30,7 +30,7 @@
<% end %>
<% if active == 'draft_versions' %>
<li class="active">
<li class="is-active">
<h2><%= t("admin.legislation.processes.subnav.draft_texts") %></h2>
</li>
<% else %>

View File

@@ -2,32 +2,28 @@
Admin - <%= t("admin.menu.legislation") %> - <%= t("admin.legislation.processes.index.filters.#{@current_filter}") %>
<% end %>
<div class="legislation-admin legislation-process-index">
<div class="row">
<div class="small-12 medium-9 column">
<h2 class="inline-block"><%= t("admin.legislation.processes.index.title") %></h2>
</div>
<div class="small-12 medium-3 column legislation-process-new">
<%= link_to t("admin.legislation.processes.index.create"), new_admin_legislation_process_path, class: "button" %>
</div>
</div>
<h2 class="inline-block"><%= t("admin.legislation.processes.index.title") %></h2>
<%= render 'shared/filter_subnav', i18n_namespace: "admin.legislation.processes.index" %>
<%= link_to t("admin.legislation.processes.index.create"), new_admin_legislation_process_path,
class: "button success float-right" %>
<% if @processes.any? %>
<h3><%= page_entries_info @processes %></h3>
<%= render 'shared/filter_subnav', i18n_namespace: "admin.legislation.processes.index" %>
<table class="stack">
<thead>
<tr>
<th><%= t("admin.legislation.processes.process.title") %></th>
<th><%= t("admin.legislation.processes.process.status") %></th>
<th><%= t("admin.legislation.processes.process.creation_date") %></th>
<th><%= t("admin.legislation.processes.process.comments") %></th>
<th></th>
</tr>
</thead>
<tbody>
<% if @processes.any? %>
<h3><%= page_entries_info @processes %></h3>
<table class="stack">
<thead>
<tr>
<th><%= t("admin.legislation.processes.process.title") %></th>
<th><%= t("admin.legislation.processes.process.status") %></th>
<th><%= t("admin.legislation.processes.process.creation_date") %></th>
<th><%= t("admin.legislation.processes.process.comments") %></th>
<th><%= t("admin.actions.actions") %></th>
</tr>
</thead>
<tbody>
<% @processes.each do |process| %>
<tr id="<%= dom_id(process) %>">
<td class="small-12 medium-8">
@@ -43,14 +39,12 @@
</td>
</tr>
<% end %>
</tbody>
</table>
</tbody>
</table>
<%= paginate @processes %>
<% else %>
<div class="callout primary">
<%= page_entries_info @processes %>
</div>
<% end %>
</div>
<%= paginate @processes %>
<% else %>
<div class="callout primary">
<%= page_entries_info @processes %>
</div>
<% end %>

View File

@@ -15,19 +15,6 @@
<% end %>
<div class="row">
<div class="small-12 medium-4 column">
<%= label_tag t('admin.legislation.proposals.form.header_information') %>
<small><%= t('admin.legislation.proposals.form.header_information_description') %></small>
</div>
<div class="small-12 medium-8 column">
<%= f.text_area :proposals_description,
label: false,
rows: 5,
placeholder: t('admin.legislation.proposals.form.header_information_placeholder') %>
</div>
</div>
<div class="row">
<div class="small-12 medium-4 column">
<%= label_tag t('admin.legislation.proposals.form.custom_categories') %>

View File

@@ -1,40 +1,41 @@
<%= form_for [:admin, @process, @question], url: url, html: {data: {watch_changes: true}} do |f| %>
<% if @question.errors.any? %>
<div id="error_explanation" data-alert class="callout alert" data-closable>
<button class="close-button" aria-label="<%= t("application.close") %>" type="button" data-close>
<span aria-hidden="true">&times;</span>
</button>
<div class="small-12 medium-9 column">
<div id="error_explanation" data-alert class="callout alert" data-closable>
<button class="close-button" aria-label="<%= t("application.close") %>" type="button" data-close>
<span aria-hidden="true">&times;</span>
</button>
<strong>
<%= @question.errors.count %>
<%= t("admin.legislation.questions.errors.form.error", count: @question.errors.count) %>
</strong>
<strong>
<%= @question.errors.count %>
<%= t("admin.legislation.questions.errors.form.error", count: @question.errors.count) %>
</strong>
</div>
</div>
<% end %>
<div class="small-12 medium-4 column">
<%= f.label :title %>
</div>
<div class="small-12 medium-8 column">
<%= f.text_area :title, rows: 5, label: false, placeholder: t('admin.legislation.questions.form.title_placeholder') %>
<div class="small-12 medium-9 column">
<%= f.label :title, t("admin.legislation.questions.form.title") %>
<%= f.text_area :title, rows: 5, label: false, placeholder: t("admin.legislation.questions.form.title_placeholder") %>
</div>
<div class="small-12 medium-4 column">
<%= f.label :question_options %>
<div class="small-12 medium-9 column">
<%= f.label :question_options, t("admin.legislation.questions.form.question_options") %>
</div>
<div class="small-12 medium-8 column">
<div>
<%= f.fields_for :question_options do |ff| %>
<%= render 'question_option_fields', f: ff %>
<% end %>
</div>
<div class="small-12 medium-8 column">
<%= link_to_add_association t('.add_option'), f, :question_options %>
<div class="small-12 medium-9 column margin">
<%= link_to_add_association t("admin.legislation.questions.form.add_option"),
f, :question_options, class: "button hollow medium" %>
</div>
<div class="row">
<div class="actions small-12 medium-3 column legislation-process-save">
<%= f.submit(class: "button expanded", value: t("admin.legislation.questions.#{admin_submit_action(@question)}.submit_button")) %>
</div>
<div class="small-12 medium-6 large-4 column end">
<%= f.submit(class: "button expanded", value: t("admin.legislation.questions.#{admin_submit_action(@question)}.submit_button")) %>
</div>
<% end %>

View File

@@ -1,11 +1,12 @@
<div class="nested-fields">
<div class="field">
<div class="row">
<div class="small-12 medium-9 column">
<%= f.text_field :value, label: false, placeholder: t('admin.legislation.questions.form.value_placeholder') %>
</div>
<div class="small-12 medium-3 column">
<%= link_to_remove_association "<span class=\"icon-x\" aria-hidden=\"true\"></span> <span>#{t('.remove_option')}</span>".html_safe, f %>
<div class="row">
<div class="small-12 medium-9 column">
<%= f.text_field :value, label: false, placeholder: t("admin.legislation.questions.form.value_placeholder") %>
</div>
<div class="small-12 medium-3 column">
<%= link_to_remove_association "<span class=\"icon-x\" aria-hidden=\"true\"></span> <span>#{t(".remove_option")}</span>".html_safe, f %>
</div>
</div>
</div>
</div>

View File

@@ -1,4 +1,4 @@
<%= link_to t('admin.menu.activity'), admin_activity_path, class: "button hollow float-right" %>
<%= link_to t('admin.menu.activity'), admin_activity_path, class: "button float-right" %>
<h2 class="inline-block"><%= t("admin.moderators.index.title") %></h2>

View File

@@ -4,7 +4,8 @@
<%= f.select :segment_recipient, options_for_select(user_segments_options,
@newsletter[:segment_recipient]) %>
<%= f.text_field :subject %>
<%= f.text_field :from %>
<%= f.label :from, t("admin.newsletters.new.from") %>
<%= f.text_field :from, label: false %>
<%= f.cktext_area :body, ckeditor: { language: I18n.locale } %>
<div class="margin-top">

View File

@@ -7,7 +7,7 @@
<div class="small-12 column">
<div class="callout highlight">
<div class="row">
<div class="small-12 medium-4 column">
<div class="small-12 medium-2 column">
<strong><%= t("admin.newsletters.show.sent_at") %></strong><br>
<% if @newsletter.draft? %>
<%= t("admin.newsletters.index.draft") %>
@@ -15,7 +15,7 @@
<%= l @newsletter.sent_at.to_date %>
<% end %>
</div>
<div class="small-12 medium-4 column">
<div class="small-12 medium-6 column">
<strong><%= t("admin.newsletters.show.from") %></strong><br>
<%= @newsletter.from %>
</div>
@@ -24,7 +24,7 @@
<%= @newsletter.subject %>
</div>
</div>
<div class="row">
<div class="row margin-top">
<div class="small-12 column">
<strong><%= t("admin.newsletters.show.segment_recipient") %></strong><br>
<%= segment_name(@newsletter.segment_recipient) %>
@@ -38,7 +38,17 @@
<%= t("admin.newsletters.show.body_help_text") %>
</p>
<div class="newsletter-body-content">
<%= render file: "app/views/mailer/newsletter.html.erb", layout: '/app/views/layouts/mailer.html.erb' %>
<%= render file: "app/views/layouts/_mailer_header.html.erb" %>
<table cellpadding="0" cellspacing="0" border="0" style="background: #fff; margin: 0 auto; max-width: 700px; width:100%;">
<tbody>
<tr>
<%= render file: "app/views/mailer/newsletter.html.erb" %>
</tr>
</tbody>
</table>
<%= render file: "app/views/layouts/_mailer_footer.html.erb" %>
</div>
</div>

View File

@@ -25,4 +25,6 @@
<% end %>
</tbody>
</table>
<%= paginate @booths %>
<% end %>

View File

@@ -12,20 +12,25 @@
</p>
<% end %>
<div class="tabs-content" data-tabs-content="booths-tabs">
<ul class="tabs" data-tabs id="booths-tabs">
<li class="tabs-title">
<%= link_to t("admin.poll_booth_assignments.show.officers"), "#tab-officers" %>
</li>
<li class="tabs-title">
<%= link_to t("admin.poll_booth_assignments.show.recounts"), "#tab-recounts" %>
</li>
<li class="tabs-title is-active">
<%= link_to t("admin.poll_booth_assignments.show.results"), "#tab-results" %>
</li>
</ul>
<ul class="tabs" id="booths_tabs" role="tablist"
data-deep-link="true"
data-update-history="true"
data-deep-link-smudge="true"
data-deep-link-smudge-delay="500"
data-tabs>
<li class="tabs-title">
<%= link_to t("admin.poll_booth_assignments.show.officers"), "#tab-officers" %>
</li>
<li class="tabs-title">
<%= link_to t("admin.poll_booth_assignments.show.recounts"), "#tab-recounts" %>
</li>
<li class="tabs-title is-active">
<%= link_to t("admin.poll_booth_assignments.show.results"), "#tab-results" %>
</li>
</ul>
<div class="tabs-panel" id="tab-officers">
<div class="tabs-content" data-tabs-content="booths_tabs" role="tablist">
<div class="tabs-panel" id="tab-officers" role="tab">
<% if @booth_assignment.officers.empty? %>
<div class="callout primary margin-top">
<%= t("admin.poll_booth_assignments.show.no_officers") %>
@@ -46,7 +51,7 @@
<% end %>
</div>
<div class="tabs-panel" id="tab-recounts">
<div class="tabs-panel" id="tab-recounts" role="tab">
<h3><%= t("admin.poll_booth_assignments.show.recounts_list") %></h3>
<table id="totals">
@@ -86,7 +91,7 @@
</tbody>
</table>
</div>
<div class="tabs-panel is-active" id="tab-results">
<div class="tabs-panel is-active" id="tab-results" role="tab">
<%= render "results" %>
</div>
</div>

View File

@@ -55,17 +55,6 @@
</div>
</div>
<% if controller_name == "polls" && action_name == "edit" %>
<div class="row">
<fieldset class="fieldset">
<legend><%= t('admin.polls.new.show_results_and_stats') %></legend>
<%= f.check_box :results_enabled, checked: @poll.results_enabled?, label: t('admin.polls.new.show_results') %>
<%= f.check_box :stats_enabled, checked: @poll.stats_enabled?, label: t('admin.polls.new.show_stats') %>
<p class="small"><%= t('admin.polls.new.results_and_stats_reminder') %></p>
</fieldset>
</div>
<% end %>
<div class="row">
<div class="small-12 medium-4 column">
<%= f.submit t("admin.polls.#{admin_submit_action(@poll)}.submit_button"),

View File

@@ -1,6 +1,6 @@
<ul class="menu simple clear" id="assigned-resources-tabs">
<% if controller_name == "polls" %>
<li class="active">
<li class="is-active">
<h2>
<%= t("admin.polls.show.questions_tab") %>
(<%= @poll.questions.count %>)
@@ -16,7 +16,7 @@
<% end %>
<% if controller_name == "booth_assignments" %>
<li class="active">
<li class="is-active">
<h2>
<%= t("admin.polls.show.booths_tab") %>
(<%= @poll.booth_assignments.select(:booth_id).distinct.count %>)
@@ -32,7 +32,7 @@
<% end %>
<% if controller_name == "officer_assignments" %>
<li class="active">
<li class="is-active">
<h2>
<%= t("admin.polls.show.officers_tab") %>
(<%= @poll.officer_assignments.select(:officer_id).distinct.count %>)
@@ -48,7 +48,7 @@
<% end %>
<% if controller_name == "recounts" %>
<li class="active">
<li class="is-active">
<h2>
<%= t("admin.polls.show.recounts_tab") %>
</h2>
@@ -60,7 +60,7 @@
<% end %>
<% if controller_name == "results" %>
<li class="active">
<li class="is-active">
<h2>
<%= t("admin.polls.show.results_tab") %>
</h2>

View File

@@ -14,19 +14,6 @@
<%= f.text_field :title %>
<div class="small-12">
<%= f.label :video_url, t("proposals.form.proposal_video_url") %>
<p class="help-text" id="video-url-help-text">
<%= t("proposals.form.proposal_video_url_note") %>
</p>
<%= f.text_field :video_url,
placeholder: t("proposals.form.proposal_video_url"),
label: false,
aria: {describedby: "video-url-help-text"} %>
</div>
<div class="small-12 medium-6 large-4 margin-top">
<%= f.submit(class: "button expanded", value: t("shared.save")) %>
</div>

View File

@@ -7,14 +7,14 @@
<%= render 'search' %>
</div>
<div class="tabs-content" data-tabs-content="questions-tabs">
<div class="tabs-content" data-tabs-content="questions-tabs" role="tablist">
<%= render "filter_subnav" %>
<div class="tabs-panel is-active" id="tab-questions">
<div class="tabs-panel is-active" id="tab-questions" role="tab">
<%= render "questions" %>
</div>
<div class="tabs-panel" id="tab-successful-proposals">
<div class="tabs-panel" id="tab-successful-proposals" role="tab">
<%= render "successful_proposals" %>
</div>
</div>

View File

@@ -0,0 +1,14 @@
<%= form_for [:admin, @poll], action: "update" do |f| %>
<fieldset class="fieldset">
<legend><%= t("admin.polls.new.show_results_and_stats") %></legend>
<%= f.check_box :results_enabled, checked: @poll.results_enabled?, label: t("admin.polls.new.show_results") %>
<%= f.check_box :stats_enabled, checked: @poll.stats_enabled?, label: t("admin.polls.new.show_stats") %>
<p class="small"><%= t("admin.polls.new.results_and_stats_reminder") %></p>
</fieldset>
<div class="small-12 medium-4 large-2">
<%= f.submit t("admin.polls.#{admin_submit_action(@poll)}.submit_button"),
class: "button success expanded" %>
</div>
<% end %>

View File

@@ -1,4 +1,5 @@
<%= render "/admin/poll/polls/poll_header" %>
<div id="poll-resources">
<%= render "/admin/poll/polls/subnav" %>
@@ -12,5 +13,6 @@
<%= render "recount", resource: @poll %>
<%= render "result" %>
<%= render "results_by_booth" %>
<%= render "show_results", resource: @poll %>
<% end %>
</div>

View File

@@ -1,4 +1,5 @@
<h2><%= t("admin.proposals.index.title") %></h2>
<p><%= t("admin.shared.moderated_content") %></p>
<%= render 'shared/filter_subnav', i18n_namespace: "admin.proposals.index" %>
@@ -9,7 +10,7 @@
<thead>
<th scope="col"><%= t("admin.shared.title") %></th>
<th scope="col" class="small-6"><%= t("admin.shared.description") %></th>
<th scope="col" class="small-3"><%= t("admin.shared.actions") %></th>
<th scope="col" class="small-4"><%= t("admin.shared.actions") %></th>
</thead>
<tbody>
<% @proposals.each do |proposal| %>

View File

@@ -34,15 +34,3 @@
</div>
<% end %>
<h3><%= t('.content_blocks_information') %></h3>
<p><%= t('.content_block_about') %></p>
<p><%= t('.content_block_top_links_html') %></p>
<code>&lt;li&gt;&lt;a href=&quot;http://site1.com&quot;&gt;Site 1&lt;/a&gt;&lt;/li&gt;</code><br>
<code>&lt;li&gt;&lt;a href=&quot;http://site2.com&quot;&gt;Site 2&lt;/a&gt;&lt;/li&gt;</code><br>
<code>&lt;li&gt;&lt;a href=&quot;http://site3.com&quot;&gt;Site 3&lt;/a&gt;&lt;/li&gt;</code><br>
<p class="margin-top"><%= t('.content_block_footer_html') %></p>

View File

@@ -6,25 +6,42 @@
<h2 class="inline-block"><%= t("admin.site_customization.content_blocks.index.title") %></h2>
<table class="cms-page-list">
<thead>
<tr>
<th><%= t("admin.site_customization.content_blocks.content_block.name") %></th>
<th><%= t("admin.site_customization.content_blocks.content_block.body") %></th>
<th><%= t("admin.actions.actions") %></th>
</tr>
</thead>
<tbody>
<% @content_blocks.each do |content_block| %>
<tr id="<%= dom_id(content_block) %>">
<td><%= link_to "#{content_block.name} (#{content_block.locale})", edit_admin_site_customization_content_block_path(content_block) %></td>
<td><%= content_block.body.html_safe %></td>
<td>
<%= button_to t("admin.site_customization.content_blocks.index.delete"),
admin_site_customization_content_block_path(content_block),
method: :delete, class: "button hollow alert" %>
</td>
</tr>
<% end %>
</tbody>
</table>
<h3><%= t("admin.site_customization.content_blocks.information") %></h3>
<p><%= t("admin.site_customization.content_blocks.about") %></p>
<p><%= t("admin.site_customization.content_blocks.top_links_html") %></p>
<code>&lt;li&gt;&lt;a href=&quot;http://site1.com&quot;&gt;Site 1&lt;/a&gt;&lt;/li&gt;</code><br>
<code>&lt;li&gt;&lt;a href=&quot;http://site2.com&quot;&gt;Site 2&lt;/a&gt;&lt;/li&gt;</code><br>
<code>&lt;li&gt;&lt;a href=&quot;http://site3.com&quot;&gt;Site 3&lt;/a&gt;&lt;/li&gt;</code><br>
<p class="margin-top"><%= t("admin.site_customization.content_blocks.footer_html") %></p>
<% if @content_blocks.any? %>
<table class="cms-page-list">
<thead>
<tr>
<th><%= t("admin.site_customization.content_blocks.content_block.name") %></th>
<th><%= t("admin.site_customization.content_blocks.content_block.body") %></th>
<th><%= t("admin.actions.actions") %></th>
</tr>
</thead>
<tbody>
<% @content_blocks.each do |content_block| %>
<tr id="<%= dom_id(content_block) %>">
<td><%= link_to "#{content_block.name} (#{content_block.locale})", edit_admin_site_customization_content_block_path(content_block) %></td>
<td><%= content_block.body.html_safe %></td>
<td>
<%= button_to t("admin.site_customization.content_blocks.index.delete"),
admin_site_customization_content_block_path(content_block),
method: :delete, class: "button hollow alert" %>
</td>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<div class="callout primary">
<%= t("admin.site_customization.content_blocks.no_blocks") %>
</div>
<% end %>

View File

@@ -1,4 +1,5 @@
<h2><%= t("admin.tags.index.add_tag") %></h2>
<p><%= t("admin.tags.index.help") %></p>
<%= form_for(@tag, url: admin_tags_path, as: :tag) do |f| %>
<div class="small-12 medium-6">

View File

@@ -1,6 +1,6 @@
<h2 class="inline-block"><%= t("admin.valuators.index.title") %></h2>
<%= link_to t("admin.valuators.index.valuator_groups"), admin_valuator_groups_path, class: "button hollow float-right" %>
<%= link_to t("admin.valuators.index.valuator_groups"), admin_valuator_groups_path, class: "button float-right" %>
<%= render "admin/shared/user_search", url: search_admin_valuators_path %>

View File

@@ -1,6 +1,6 @@
<ul class="no-bullet budget-timeline">
<% current_budget.published_phases.each do |phase| %>
<li class="phase <%= 'active' if phase == current_budget.current_phase %>">
<li class="phase <%= 'is-active' if phase == current_budget.current_phase %>">
<h3><%= t("budgets.phase.#{phase.kind}") %></h3>
<span>
<%= l(phase.starts_at.to_date, format: :long) if phase.starts_at.present? %>

View File

@@ -48,8 +48,7 @@
<% end %>
<% end %>
<% if current_budget.finished? || (current_budget.balloting? && can?(:read_results, current_budget)) %>
<% if current_budget.finished? %>
<%= link_to t("budgets.show.see_results"),
budget_results_path(current_budget, heading_id: current_budget.headings.first),
class: "button margin-top expanded" %>
@@ -65,9 +64,9 @@
<div id="groups_and_headings" class="groups-and-headings">
<% current_budget.groups.each do |group| %>
<h2 id="<%= group.name.parameterize %>"><%= group.name %></h2>
<ul class="no-bullet">
<ul class="no-bullet" data-equalizer data-equalizer-on="medium">
<% group.headings.order_by_group_name.each do |heading| %>
<li class="heading small-12 medium-4 large-2">
<li class="heading small-12 medium-4 large-2" data-equalizer-watch>
<% unless current_budget.informing? %>
<%= link_to budget_investments_path(current_budget.id, heading_id: heading.id) do %>
<%= heading_name_and_price_html(heading, current_budget) %>
@@ -119,7 +118,7 @@
<div class="small-12 medium-9 column">
<ul class="no-bullet submenu">
<li class="inline-block">
<%= link_to "#other_budgets", class: "active" do %>
<%= link_to "#other_budgets", class: "is-active" do %>
<h2>
<%= t("budgets.index.finished_budgets") %>
</h2>
@@ -137,6 +136,7 @@
<h3><%= budget.name %></h3>
</div>
</div>
<div class="small-12 medium-3 column table" data-equalizer-watch>
<div id="budget_<%= budget.id %>_results" class="table-cell align-middle">
<%= link_to t("budgets.index.see_results"),

View File

@@ -5,7 +5,7 @@
<ul id="categories" class="no-bullet categories">
<% @categories.each do |category| %>
<li class="inline-block">
<% css_class = { class: 'active' } if params[:search] == category.name %>
<% css_class = { class: 'is-active' } if params[:search] == category.name %>
<%= link_to category.name, budget_investments_path(@budget, search: category.name), css_class || {} %>
</li>
<% end %>

View File

@@ -1,22 +1,25 @@
<div class="row">
<div class="small-12 column">
<ul class="tabs" data-tabs id="investments-tabs">
<li class="tabs-title is-active">
<%= link_to "#tab-comments" do %>
<h3>
<%= t("budgets.investments.show.comments_tab") %>
<span class="js-comments-count">(<%= @investment.comments_count %>)</span>
</h3>
<% end %>
</li>
<li class="tabs-title">
<%= link_to "#tab-milestones" do %>
<h3>
<%= t("budgets.investments.show.milestones_tab") %>
(<%= @investment.milestones.count %>)
</h3>
<% end %>
</li>
</ul>
</div>
</div>
<ul class="tabs"
id="investments_tabs"
role="tablist"
data-deep-link="true"
data-update-history="true"
data-deep-link-smudge="true"
data-deep-link-smudge-delay="500"
data-tabs>
<li class="tabs-title is-active">
<%= link_to "#tab-comments" do %>
<h3>
<%= t("budgets.investments.show.comments_tab") %>
<span class="js-comments-count">(<%= @investment.comments_count %>)</span>
</h3>
<% end %>
</li>
<li class="tabs-title">
<%= link_to "#tab-milestones" do %>
<h3>
<%= t("budgets.investments.show.milestones_tab") %>
(<%= @investment.milestones.count %>)
</h3>
<% end %>
</li>
</ul>

View File

@@ -146,15 +146,15 @@
<%= t("budgets.investments.show.project_not_selected_html") %>
</div>
<% end %>
<% end %>
<% if investment.should_show_price? %>
<div class="sidebar-divider"></div>
<h2><%= t("budgets.investments.show.price") %></h2>
<div class="supports text-center">
<p class="investment-project-amount">
<%= investment.formatted_price %>
</p>
</div>
<% if investment.should_show_price? %>
<div class="sidebar-divider"></div>
<h2><%= t("budgets.investments.show.price") %></h2>
<div class="supports text-center">
<p class="investment-project-amount">
<%= investment.formatted_price %>
</p>
</div>
<% end %>
<% end %>
<%= render partial: 'shared/social_share', locals: {
share_title: t("budgets.investments.show.share"),

View File

@@ -1,4 +1,4 @@
<div class="tabs-panel tab-milestones" id="tab-milestones">
<div class="tabs-panel tab-milestones" id="tab-milestones" role="tab">
<div class="row">
<div class="small-12 column">
<% if @investment.milestones.blank? %>

View File

@@ -10,13 +10,18 @@
ballot: @ballot
} %>
<div class="tabs-content" data-tabs-content="investments-tabs" role="tablist">
<%= render "budgets/investments/filter_subnav" %>
<%= render "budgets/investments/milestones" %>
<div class="row">
<div class="small-12 column">
<%= render "budgets/investments/filter_subnav" %>
</div>
</div>
<div class="tabs-panel is-active" id="tab-comments">
<div class="tabs-content" data-tabs-content="investments_tabs" role="tablist">
<div class="tabs-panel is-active" id="tab-comments" role="tab">
<%= render partial: '/comments/comment_tree', locals: { comment_tree: @comment_tree,
comment_flags: @comment_flags,
display_comments_count: false } %>
</div>
<%= render "budgets/investments/milestones" %>
</div>

View File

@@ -50,7 +50,7 @@
<li>
<%= link_to heading.name,
budget_results_path(@budget, heading_id: heading.to_param),
class: heading.to_param == @heading.to_param ? 'active' : '' %>
class: heading.to_param == @heading.to_param ? 'is-active' : '' %>
</li>
<% end %>
</ul>

View File

@@ -1,4 +1,4 @@
<% provide :title do %><%= t('debates.index.title') %><% end %>
<% provide :title do %><%= t("debates.index.title") %><% end %>
<% content_for :header_addon do %>
<%= render "shared/search_form",
search_path: debates_path(page: 1),
@@ -54,10 +54,10 @@
<%= render "shared/advanced_search", search_path: debates_path(page: 1) %>
<%= render 'shared/order_links', i18n_namespace: "debates.index" %>
<%= render "shared/order_links", i18n_namespace: "debates.index" %>
<div class="show-for-small-only">
<%= link_to t("debates.index.start_debate"), new_debate_path, class: 'button expanded' %>
<%= link_to t("debates.index.start_debate"), new_debate_path, class: "button expanded" %>
</div>
<% if @debates.any? || current_user.blank? %>
@@ -81,7 +81,7 @@
<p><%= t("debates.index.section_footer.description") %></p>
<p><%= t("debates.index.section_footer.help_text_1") %></p>
<p><%= t("debates.index.section_footer.help_text_2",
org: link_to(setting['org_name'], new_user_registration_path)).html_safe %></p>
org: link_to(setting["org_name"], new_user_registration_path)).html_safe %></p>
<p><%= t("debates.index.section_footer.help_text_3",
proposal: link_to(t("debates.index.section_footer.proposals_link"), proposals_path),
budget: link_to(t("debates.index.section_footer.budget_link"), budgets_path)).html_safe %>
@@ -93,8 +93,8 @@
<div class="small-12 medium-3 column">
<aside class="margin-bottom">
<%= link_to t("debates.index.start_debate"), new_debate_path, class: 'button expanded' %>
<%= render "shared/tag_cloud", taggable: 'debate' %>
<%= link_to t("debates.index.start_debate"), new_debate_path, class: "button expanded" %>
<%= render "shared/tag_cloud", taggable: "debate" %>
</aside>
</div>

View File

@@ -1,7 +1,7 @@
<div class="debate-form row">
<div class="small-12 medium-9 column">
<%= back_link_to %>
<%= back_link_to debates_path %>
<h1><%= t("debates.new.start_new") %></h1>
<div data-alert class="callout primary">

View File

@@ -1,38 +1,39 @@
<header class="header">
<div class="top-links">
<div class="expanded row">
<%= render 'shared/locale_switcher' %>
<%= render "shared/locale_switcher" %>
</div>
</div>
<div class="expanded row">
<div class="expanded row admin-top-bar">
<div class="title-bar" data-responsive-toggle="responsive_menu" data-hide-for="medium">
<button class="menu-icon" type="button" data-toggle="responsive_menu"></button>
<div class="title-bar-title"><%= t("application.menu")%></div>
</div>
<div class="top-bar">
<div class="top-bar-left">
<ul class="menu">
<li class="menu-text">
<h1>
<%= link_to namespaced_root_path do %>
<%= setting["org_name"] %>
<br><small><%= namespaced_header_title %></small>
<% end %>
</h1>
</li>
</ul>
</div>
<span data-responsive-toggle="responsive_menu" data-hide-for="medium" class="float-right">
<span class="menu-icon dark" data-toggle></span>
<%= t("application.menu")%>
</span>
<div class="top-bar-title">
<h1>
<%= link_to admin_root_path do %>
<%= setting['org_name'] %>
<br><small><%= namespaced_header_title %></small>
<% end %>
</h1>
</div>
<div id="responsive_menu">
<div id="responsive_menu">
<div class="top-bar-right">
<ul class="menu" data-responsive-menu="medium-dropdown">
<ul class="dropdown menu" data-dropdown-menu>
<%= render "admin/shared/admin_shortcuts" %>
<%= render "shared/admin_login_items" %>
<%= render "layouts/notification_item" %>
<%= render "devise/menu/login_items" %>
</ul>
</div>
</div>
</div>
</div>

View File

@@ -10,37 +10,53 @@
</div>
<div class="row">
<div class="title-bar" data-responsive-toggle="responsive_menu" data-hide-for="medium">
<button class="menu-icon" type="button" data-toggle="responsive_menu"></button>
<div class="title-bar-title"><%= t("application.menu")%></div>
</div>
<div class="top-bar">
<%= link_to setting['org_name'], root_path, class: "logo show-for-small-only" %>
<span data-responsive-toggle="responsive_menu" data-hide-for="medium" class="float-right">
<span class="menu-icon dark" data-toggle></span>
<%= t("application.menu")%>
</span>
<div id="responsive_menu">
<div class="top-bar-title">
<%= link_to root_path, class: "hide-for-small-only", accesskey: "0" do %>
<%= image_tag(image_path_for('logo_header.png'), class: 'hide-for-small-only float-left', size: '80x80', alt: t("layouts.header.logo")) %>
<%= setting['org_name'] %>
<ul class="menu show-for-small-only">
<li class="menu-text">
<%= link_to root_path, accesskey: "0" do %>
<%= image_tag(image_path_for("logo_header.png"),
class: "float-left",
size: "48x48",
alt: t("layouts.header.logo")) %>
<%= setting["org_name"] %>
<% end %>
</div>
</li>
</ul>
</div>
<div class="top-bar-right">
<ul class="menu" data-responsive-menu="medium-dropdown">
<%= render "shared/admin_login_items" %>
<%= render "layouts/notification_item" %>
<%= render "devise/menu/login_items" %>
</ul>
<div class="top-bar" id="responsive_menu">
<div class="top-bar-left">
<ul class="menu">
<li class="menu-text">
<%= link_to root_path, class: "hide-for-small-only", accesskey: "0" do %>
<%= image_tag(image_path_for("logo_header.png"),
class: "hide-for-small-only float-left",
size: "80x80",
alt: t("layouts.header.logo")) %>
<%= setting["org_name"] %>
<% end %>
</li>
</ul>
</div>
<div class="show-for-small-only">
<div class="subnavigation row">
<%= render "shared/subnavigation" %>
<div class="small-12 column">
<%= render "shared/top_links" %>
</div>
</div>
<div class="top-bar-right">
<ul class="dropdown menu" data-dropdown-menu>
<%= render "shared/admin_login_items" %>
<%= render "layouts/notification_item" %>
<%= render "devise/menu/login_items" %>
</ul>
</div>
<div class="show-for-small-only">
<div class="subnavigation row">
<%= render "shared/subnavigation" %>
<div class="small-12 column">
<%= render "shared/top_links" %>
</div>
</div>
</div>

View File

@@ -0,0 +1,13 @@
<table cellpadding="0" cellspacing="0" border="0" style="margin: 0 auto; max-width: 700px; width:100%; margin-bottom: 40px; padding: 0 20px;">
<tbody>
<tr>
<td style="text-align: center; border-top: 1px solid #dadfe1; padding-top: 20px;">
<p style="font-family: 'Open Sans','Helvetica Neue',arial,sans-serif; margin: 0;padding: 0;line-height: 1.5em;color: #797f7f; font-size: 12px;">
<%= setting['org_name'] %></p>
<p style="font-family: 'Open Sans','Helvetica Neue',arial,sans-serif; margin: 0;padding: 0;line-height: 1.5em;color: #222; font-size: 10px; margin-top: 12px;">
<%= t('mailers.no_reply') %></p>
</td>
</tr>
</tbody>
</table>

View File

@@ -0,0 +1,15 @@
<table cellpadding="0" cellspacing="0" border="0" style="background: #fff; margin: 0 auto; max-width: 700px; width:100%;">
<tr>
<td>
<table cellpadding="0" cellspacing="0" border="0" style="width: 100%;">
<tr>
<td style="border-bottom: 1px solid #dadfe1; padding: 20px 0;">
<a href="#" target="_blank">
<%= image_tag('logo_email.png', style: "border: 0; display: block; width: 100%;max-width: 370px", alt: setting['org_name']) %>
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>

View File

@@ -7,38 +7,16 @@
</head>
<body style="background: #fff; font-family:font-family: 'Open Sans','Helvetica Neue',arial,sans-serif !important; margin: 0 10px; padding: 0; text-align: left;">
<%= render "layouts/mailer_header" %>
<table cellpadding="0" cellspacing="0" border="0" style="background: #fff; margin: 0 auto; max-width: 700px; width:100%;">
<tr>
<td>
<table cellpadding="0" cellspacing="0" border="0" style="width: 100%;">
<tr>
<td style="border-bottom: 1px solid #dadfe1; padding: 20px 0;">
<a href="#" target="_blank">
<%= image_tag('logo_email.png', style: "border: 0; display: block; width: 100%;max-width: 370px", alt: setting['org_name']) %>
</a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<%= yield %>
</tr>
</table>
<table cellpadding="0" cellspacing="0" border="0" style="margin: 0 auto; max-width: 700px; width:100%; margin-bottom: 40px; padding: 0 20px;">
<tbody>
<tr>
<td style="text-align: center; border-top: 1px solid #dadfe1; padding-top: 20px;">
<p style="font-family: 'Open Sans','Helvetica Neue',arial,sans-serif; margin: 0;padding: 0;line-height: 1.5em;color: #797f7f; font-size: 12px;">
<%= setting['org_name'] %></p>
<p style="font-family: 'Open Sans','Helvetica Neue',arial,sans-serif; margin: 0;padding: 0;line-height: 1.5em;color: #222; font-size: 10px; margin-top: 12px;">
<%= t('mailers.no_reply') %></p>
</td>
</tr>
<tr>
<%= yield %>
</tr>
</tbody>
</table>
<%= render "layouts/mailer_footer" %>
</body>
</html>

View File

@@ -18,23 +18,23 @@
<header class="header">
<div class="top-links">
<div class="expanded row">
<%= render 'shared/locale_switcher' %>
<%= render "shared/locale_switcher" %>
</div>
</div>
<div class="expanded row">
<div class="expanded row admin-top-bar">
<div class="top-bar">
<%= link_to setting['org_name'], management_root_path, class: "logo show-for-small-only" %>
<div class="top-bar-title">
<h1>
<%= link_to management_root_path do %>
<%= setting['org_name'] %>
<br><small><%= t("management.dashboard.index.title") %></small>
<% end %>
</h1>
</div>
<div class="top-bar-left">
<ul class="menu">
<li class="menu-text">
<h1>
<%= link_to management_root_path do %>
<%= setting["org_name"] %>
<br><small><%= t("management.dashboard.index.title") %></small>
<% end %>
</h1>
</li>
</ul>
</div>
</div>
</div>

View File

@@ -6,7 +6,7 @@
<ul>
<% if process.debate_phase.enabled? %>
<li <%= 'class=active' if phase.to_sym == :debate_phase %>>
<li <%= 'class=is-active' if phase.to_sym == :debate_phase %>>
<%= link_to debate_legislation_process_path(process) do %>
<h4><%= t('legislation.processes.shared.debate_dates') %></h4>
<p><%= format_date(process.debate_start_date) %> - <%= format_date(process.debate_end_date) %></p>
@@ -15,7 +15,7 @@
<% end %>
<% if process.proposals_phase.enabled? %>
<li <%= 'class=active' if phase.to_sym == :proposals_phase %>>
<li <%= 'class=is-active' if phase.to_sym == :proposals_phase %>>
<%= link_to proposals_legislation_process_path(process) do %>
<h4><%= t('legislation.processes.shared.proposals_dates') %></h4>
<p><%= format_date(process.proposals_phase_start_date) %> - <%= format_date(process.proposals_phase_end_date) %></p>
@@ -24,7 +24,7 @@
<% end %>
<% if process.draft_publication.enabled? %>
<li <%= 'class=active' if phase.to_sym == :draft_publication %>>
<li <%= 'class=is-active' if phase.to_sym == :draft_publication %>>
<%= link_to draft_publication_legislation_process_path(process) do %>
<h4><%= t('legislation.processes.shared.draft_publication_date') %></h4>
<p><%= format_date(process.draft_publication_date) %></p>
@@ -33,7 +33,7 @@
<% end %>
<% if process.allegations_phase.enabled? %>
<li <%= 'class=active' if phase.to_sym == :allegations_phase %>>
<li <%= 'class=is-active' if phase.to_sym == :allegations_phase %>>
<%= link_to allegations_legislation_process_path(process) do %>
<h4><%= t('legislation.processes.shared.allegations_dates') %></h4>
<p><%= format_date(process.allegations_start_date) %> - <%= format_date(process.allegations_end_date) %></p>
@@ -42,7 +42,7 @@
<% end %>
<% if process.result_publication.enabled? %>
<li <%= 'class=active' if phase.to_sym == :result_publication %>>
<li <%= 'class=is-active' if phase.to_sym == :result_publication %>>
<%= link_to result_publication_legislation_process_path(process) do %>
<h4><%= t('legislation.processes.shared.result_publication_date') %></h4>
<p><%= format_date(process.result_publication_date) %></p>

View File

@@ -5,7 +5,7 @@
<ul id="categories" class="no-bullet categories">
<% @process.tag_list_on(:customs).each do |tag| %>
<li class="inline-block">
<% css_class = { class: 'active' } if params[:search] == tag %>
<% css_class = { class: 'is-active' } if params[:search] == tag %>
<%= link_to tag,
legislation_process_proposals_path(process_id: @process, search: tag),
css_class || {} %>

View File

@@ -1,14 +1,17 @@
<div class="row">
<div class="small-12 column">
<ul class="tabs" data-tabs id="proposals-tabs">
<li class="tabs-title is-active">
<%= link_to "#tab-comments" do %>
<h3>
<%= t("proposals.show.comments_tab") %>
<span class="js-comments-count">(<%= @proposal.comments_count %>)</span>
</h3>
<% end %>
</li>
</ul>
</div>
</div>
<ul class="tabs"
id="legislation_proposals_tabs"
role="tablist"
data-deep-link="true"
data-update-history="true"
data-deep-link-smudge="true"
data-deep-link-smudge-delay="500"
data-tabs>
<li class="tabs-title is-active">
<%= link_to "#tab-comments" do %>
<h3>
<%= t("proposals.show.comments_tab") %>
<span class="js-comments-count">(<%= @proposal.comments_count %>)</span>
</h3>
<% end %>
</li>
</ul>

View File

@@ -1,4 +1,4 @@
<div class="tabs-panel" id="tab-notifications">
<div class="tabs-panel" id="tab-notifications" role="tab">
<div class="row">
<div class="small-12 column">
<% if @notifications.blank? %>

View File

@@ -113,10 +113,14 @@
</div>
<% end %>
<div class="tabs-content" data-tabs-content="proposals-tabs" role="tablist">
<%= render "legislation/proposals/filter_subnav" %>
<div class="row">
<div class="small-12 column">
<%= render "legislation/proposals/filter_subnav" %>
</div>
</div>
<div class="tabs-panel is-active" id="tab-comments">
<div class="tabs-content" data-tabs-content="legislation_proposals_tabs" role="tablist">
<div class="tabs-panel is-active" id="tab-comments" role="tab">
<%= render "legislation/proposals/comments" %>
</div>
</div>

View File

@@ -3,7 +3,7 @@
<%= form_for answer, url: legislation_process_question_answers_path(process, question, answer), remote: true , html: { class: "controls-stacked"} do |f| %>
<% question.question_options.each do |question_option| %>
<label class="control radio <%= 'active' if @answer.legislation_question_option_id == question_option.id %>">
<label class="control radio <%= 'is-active' if @answer.legislation_question_option_id == question_option.id %>">
<%= f.radio_button :legislation_question_option_id, question_option.id, label: false %>
<span class="control-indicator"></span>
<%= question_option.value %>
@@ -16,7 +16,7 @@
<form class="controls-stacked disabled">
<% question.question_options.each do |question_option| %>
<label class="control radio <%= 'active' if answer.persisted? && (answer.legislation_question_option_id == question_option.id) %>">
<label class="control radio <%= 'is-active' if answer.persisted? && (answer.legislation_question_option_id == question_option.id) %>">
<input id="quiz-1" name="radio" type="radio" disabled="true">
<span class="control-indicator"></span>
<%= question_option.value %>

View File

@@ -1,6 +1,6 @@
<div class="admin-sidebar">
<ul id="admin_menu" data-accordion-menu data-multi-open="false">
<li <%= "class=active" if controller_name == "document_verifications" ||
<li <%= "class=is-active" if controller_name == "document_verifications" ||
controller_name == "email_verifications" ||
controller_name == "users" %>>
<%= link_to management_document_verifications_path do %>
@@ -26,28 +26,28 @@
</ul>
</li>
<li <%= "class=active" if controller_name == "proposals" && action_name == "new" %>>
<li <%= "class=is-active" if controller_name == "proposals" && action_name == "new" %>>
<%= link_to new_management_proposal_path do %>
<span class="icon-proposals"></span>
<%= t("management.menu.create_proposal") %>
<% end %>
</li>
<li <%= "class=active" if controller_name == "proposals" && action_name == "index" %>>
<li <%= "class=is-active" if controller_name == "proposals" && action_name == "index" %>>
<%= link_to management_proposals_path do %>
<span class="icon-like"></span>
<%= t("management.menu.support_proposals") %>
<% end %>
</li>
<li <%= "class=active" if controller_name == "spending_proposals" && action_name == "new" %>>
<li <%= "class=is-active" if controller_name == "spending_proposals" && action_name == "new" %>>
<%= link_to new_management_spending_proposal_path do %>
<span class="icon-budget"></span>
<%= t("management.menu.create_spending_proposal") %>
<% end %>
</li>
<li <%= "class=active" if controller_name == "spending_proposals" && action_name == "index" %>>
<li <%= "class=is-active" if controller_name == "spending_proposals" && action_name == "index" %>>
<%= link_to management_spending_proposals_path do %>
<span class="icon-like"></span>
<%= t("management.menu.support_spending_proposals") %>
@@ -55,7 +55,7 @@
</li>
<% if Setting['feature.budgets'] %>
<li <%= "class=active" if (controller_name == "budget_investments" && action_name == "new") ||
<li <%= "class=is-active" if (controller_name == "budget_investments" && action_name == "new") ||
(controller_name == "budget" && action_name == 'create_investments') %>>
<%= link_to create_investments_management_budgets_path do %>
<span class="icon-budget"></span>
@@ -63,7 +63,7 @@
<% end %>
</li>
<li <%= "class=active" if (controller_name == "budget_investments" && action_name == "index") ||
<li <%= "class=is-active" if (controller_name == "budget_investments" && action_name == "index") ||
(controller_name == "budget" && action_name == "support_investments")%>>
<%= link_to support_investments_management_budgets_path do %>
<span class="icon-like"></span>
@@ -71,7 +71,7 @@
<% end %>
</li>
<li <%= "class=active" if (controller_name == "budget_investments" && action_name == "print") ||
<li <%= "class=is-active" if (controller_name == "budget_investments" && action_name == "print") ||
(controller_name == "budgets" && action_name == "print_investments") %>>
<%= link_to print_investments_management_budgets_path do %>
<span class="icon-print"></span>
@@ -80,14 +80,14 @@
</li>
<% end %>
<li <%= "class=active" if controller_name == "proposals" && action_name == "print" %>>
<li <%= "class=is-active" if controller_name == "proposals" && action_name == "print" %>>
<%= link_to print_management_proposals_path do %>
<span class="icon-print"></span>
<%= t("management.menu.print_proposals") %>
<% end %>
</li>
<li <%= "class=active" if controller_name == "spending_proposals" && action_name == "print" %>>
<li <%= "class=is-active" if controller_name == "spending_proposals" && action_name == "print" %>>
<%= link_to print_management_spending_proposals_path do %>
<span class="icon-print"></span>
<%= t("management.menu.print_spending_proposals") %>

View File

@@ -5,7 +5,7 @@
</li>
<% if feature?(:proposals) %>
<li <%= "class=active" if controller_name == "proposals" %>>
<li <%= "class=is-active" if controller_name == "proposals" %>>
<%= link_to moderation_proposals_path do %>
<span class="icon-proposals"></span>
<%= t("moderation.menu.proposals") %>
@@ -14,7 +14,7 @@
<% end %>
<% if feature?(:debates) %>
<li <%= "class=active" if controller_name == "debates" %>>
<li <%= "class=is-active" if controller_name == "debates" %>>
<%= link_to moderation_debates_path do %>
<span class="icon-debates"></span>
<%= t('moderation.menu.flagged_debates') %>
@@ -22,14 +22,14 @@
</li>
<% end %>
<li <%= "class=active" if controller_name == "comments" %>>
<li <%= "class=is-active" if controller_name == "comments" %>>
<%= link_to moderation_comments_path do %>
<span class="icon-comments"></span>
<%= t("moderation.menu.flagged_comments") %>
<% end %>
</li>
<li <%= "class=active" if controller_name == "users" %>>
<li <%= "class=is-active" if controller_name == "users" %>>
<%= link_to moderation_users_path do %>
<span class="icon-user"></span>
<%= t("moderation.menu.users") %>

View File

@@ -1,42 +1,3 @@
<%= link_to t("admin.dashboard.index.back", org: setting['org_name']), root_path, class: "button float-right" %>
<h2 class="inline-block"><%= t("moderation.dashboard.index.title") %></h2>
<p>Desde aquí puedes moderar el sistema, a través de las siguientes acciones:<p>
<div class="small-12 medium-9">
<ul class="accordion" data-accordion data-multi-expand="true" data-allow-all-closed="true">
<li class="accordion-item" data-accordion-item>
<a href="#" class="accordion-title">Propuestas / Debates / Comentarios</a>
<div class="accordion-content" data-tab-content>
<p>Cuando un usuario marca en una Propuesta/Debate/Comentario la opción de "denunciar como inapropiado", aparecerá en esta lista. Respecto a cada uno aparecerá el <em>título, fecha, número de denuncias</em> (cuántos usuarios diferentes han marcado la opción de denuncia) y el <em>texto de la Propuesta/Debate/Comentario</em>.</p>
<p>A la derecha de cada elemento aparece una caja que podemos marcar para seleccionar todos los que queramos de la lista. Una vez seleccionados uno o varios, encontramos al final de la página <strong>tres botones para realizar acciones</strong> sobre ellos:</p>
<ul>
<li><strong>Ocultar</strong>: hará que esos elementos dejen de mostrarse en la web.</li>
<li><strong>Bloquear autores</strong>: hará que el autor de ese elemento deje de poder acceder a la web, y que además todos las Propuestas/Debates/Comentarios de ese usuario dejen de mostrarse en la web.</li>
<li><strong>Marcar como revisados</strong> cuando consideramos que esos elementos no deben ser moderados, que su contenido es correcto, y que por lo tanto deben dejar de ser mostrados en esta lista de elementos inapropiados.</li>
</ul>
<p>Para facilitar la gestión, arriba encontramos un <strong>filtro</strong> con las secciones:</p>
<ul>
<li><strong>Pendientes</strong>: las Propuestas/Debates/Comentarios sobre los que todavía no se ha pulsado "ocultar", "bloquear" o "marcar como revisados", y que por lo tanto deberían ser revisados todavía</li>
<li><strong>Todos</strong>: mostrando todos las Propuestas/Debates/Comentarios de la web, y no sólo los marcados como inapropiados.</li>
<li><strong>Marcados como revisados</strong>: los que algún moderador ha marcado como revisados y por lo tanto parecen correctos.</li>
</ul>
<p><em>Es recomendable revisar regularmente la sección "pendientes".</em></p>
</div>
</li>
<li class="accordion-item" data-accordion-item>
<a href="#" class="accordion-title">Bloquear usuarios</a>
<div class="accordion-content" data-tab-content>
<p>Un buscador nos permite encontrar cualquier usuario introduciendo su <em>nombre de usuario o correo electrónico</em>, y bloquearlo una vez encontrado. Al bloquearlo, <strong>el usuario no podrá volver a acceder a la web</strong>, y todas sus Propuestas/Debates/Comentarios serán ocultados y dejarán de ser visibles en la web.</p>
</div>
</li>
</ul>
</div>

View File

@@ -10,7 +10,7 @@
class: "button hollow float-right-medium" %>
<ul class="menu simple clear">
<li class="active">
<li class="is-active">
<h2><%= link_to t("notifications.index.unread"), notifications_path %></h2>
</li>
<li>

View File

@@ -7,7 +7,7 @@
<li>
<%= link_to t("notifications.index.unread"), notifications_path %>
</li>
<li class="active">
<li class="is-active">
<h2><%= link_to t("notifications.index.read"), read_notifications_path %></h2>
</li>
</ul>

View File

@@ -1,14 +1,14 @@
<div class="admin-sidebar" data-equalizer-watch>
<ul id="officing_menu">
<li <%= "class=active" if controller_name == "voters" %>>
<li <%= "class=is-active" if controller_name == "voters" %>>
<%= link_to new_officing_residence_path do %>
<span class="icon-user"></span>
<%= t("officing.menu.voters") %>
<% end %>
</li>
<li <%= "class=active" if ["results"].include?(controller_name) || (controller_name == "polls" && action_name == "final") %>>
<li <%= "class=is-active" if ["results"].include?(controller_name) || (controller_name == "polls" && action_name == "final") %>>
<%= link_to final_officing_polls_path do %>
<span class="icon-user"></span>
<%= t("officing.menu.total_recounts") %>

View File

@@ -17,7 +17,7 @@
</li>
<% answer.images.reverse.each_with_index do |image, index| %>
<li class="orbit-slide <%= active_class(index) %>">
<li class="orbit-slide <%= is_active_class(index) %>">
<%= link_to image.attachment.url(:original), target: "_blank" do %>
<%= image_tag image.attachment.url(:original),
class: "orbit-image",
@@ -31,7 +31,7 @@
<nav class="orbit-bullets">
<% answer.images.each_with_index do |image, index| %>
<button class="<%= active_class(index) %>" data-slide="<%= index %>">
<button class="<%= is_active_class(index) %>" data-slide="<%= index %>">
<span class="show-for-sr"><%= image.title.unicode_normalize %></span>
</button>
<% end %>

View File

@@ -5,7 +5,7 @@
<ul class="menu simple clear">
<% if current_user && current_user.administrator? || @poll.results_enabled? %>
<% if controller_name == "polls" && action_name == "results" %>
<li class="active">
<li class="is-active">
<h2><%= t("polls.show.results_menu") %></h2>
</li>
<% else %>
@@ -15,7 +15,7 @@
<% if current_user && current_user.administrator? || @poll.stats_enabled? %>
<% if controller_name == "polls" && action_name == "stats" %>
<li class="active">
<li class="is-active">
<h2><%= t("polls.show.stats_menu") %></h2>
</li>
<% else %>
@@ -24,7 +24,7 @@
<% end %>
<% if controller_name == "polls" && action_name == "show" %>
<li class="active">
<li class="is-active">
<h2><%= t("polls.show.info_menu") %></h2>
</li>
<% else %>

View File

@@ -127,7 +127,7 @@
<div class="tabs-content" data-tabs-content="polls_tabs" role="tablist">
<%= render "filter_subnav" %>
<div class="tabs-panel is-active" id="tab-comments">
<div class="tabs-panel is-active" id="tab-comments" role="tab">
<%= render "comments" %>
</div>
</div>

View File

@@ -5,7 +5,7 @@
<ul id="categories" class="no-bullet categories">
<% @categories.each do |category| %>
<li class="inline-block">
<% css_class = { class: 'active' } if params[:search] == category.name %>
<% css_class = { class: 'is-active' } if params[:search] == category.name %>
<%= link_to category.name, proposals_path(search: category.name), css_class || {} %>
</li>
<% end %>

View File

@@ -1,22 +1,25 @@
<div class="row">
<div class="small-12 column">
<ul class="tabs" data-tabs id="proposals-tabs">
<li class="tabs-title is-active">
<%= link_to "#tab-comments" do %>
<h3>
<%= t("proposals.show.comments_tab") %>
<span class="js-comments-count">(<%= @proposal.comments_count %>)</span>
</h3>
<% end %>
</li>
<li class="tabs-title">
<%= link_to "#tab-notifications" do %>
<h3>
<%= t("proposals.show.notifications_tab") %>
(<%= @notifications.count %>)
</h3>
<% end %>
</li>
</ul>
</div>
</div>
<ul class="tabs"
id="proposals_tabs"
role="tablist"
data-deep-link="true"
data-update-history="true"
data-deep-link-smudge="true"
data-deep-link-smudge-delay="500"
data-tabs>
<li class="tabs-title is-active">
<%= link_to "#tab-comments" do %>
<h3>
<%= t("proposals.show.comments_tab") %>
<span class="js-comments-count">(<%= @proposal.comments_count %>)</span>
</h3>
<% end %>
</li>
<li class="tabs-title">
<%= link_to "#tab-notifications" do %>
<h3>
<%= t("proposals.show.notifications_tab") %>
(<%= @notifications.count %>)
</h3>
<% end %>
</li>
</ul>

View File

@@ -1,4 +1,4 @@
<div class="tabs-panel" id="tab-notifications">
<div class="tabs-panel" id="tab-notifications" role="tab">
<div class="row">
<div class="small-12 column">
<% if @notifications.blank? %>

View File

@@ -1,18 +1,22 @@
<% provide :title do %><%= @proposal.title %><% end %>
<% content_for :meta_description do %><%= @proposal.summary %><% end %>
<% provide :social_media_meta_tags do %>
<%= render "shared/social_media_meta_tags",
social_url: proposal_url(@proposal),
social_title: @proposal.title,
social_description: @proposal.summary,
twitter_image_url: (@proposal.image.present? ? @proposal.image_url(:thumb) : nil),
og_image_url: (@proposal.image.present? ? @proposal.image_url(:thumb) : nil) %>
<%= render "shared/social_media_meta_tags",
social_url: proposal_url(@proposal),
social_title: @proposal.title,
social_description: @proposal.summary,
twitter_image_url: (@proposal.image.present? ? @proposal.image_url(:thumb) : nil),
og_image_url: (@proposal.image.present? ? @proposal.image_url(:thumb) : nil) %>
<% end %>
<% content_for :canonical do %>
<%= render "shared/canonical", href: proposal_url(@proposal) %>
<% end %>
<% cache [locale_and_user_status(@proposal), @proposal, @proposal.author, Flag.flagged?(current_user, @proposal), @proposal_votes] do %>
<% cache [locale_and_user_status(@proposal),
@proposal,
@proposal.author,
Flag.flagged?(current_user, @proposal),
@proposal_votes] do %>
<div class="proposal-show">
<div id="<%= dom_id(@proposal) %>" class="row">
<div class="small-12 medium-9 column">
@@ -23,7 +27,8 @@
<div data-alert class="callout alert margin-top proposal-retired">
<strong>
<%= t("proposals.show.retired_warning") %><br>
<%= link_to t("proposals.show.retired_warning_link_to_explanation"), "#retired_explanation" %>
<%= link_to t("proposals.show.retired_warning_link_to_explanation"),
"#retired_explanation" %>
</strong>
</div>
<% elsif @proposal.conflictive? %>
@@ -101,7 +106,10 @@
<% if @proposal.retired? %>
<div id="retired_explanation" class="callout">
<h2><%= t('proposals.show.retired') %>: <%= t("proposals.retire_options.#{@proposal.retired_reason}") unless @proposal.retired_reason == 'other' %></h2>
<h2>
<%= t("proposals.show.retired") %>:
<%= t("proposals.retire_options.#{@proposal.retired_reason}") unless @proposal.retired_reason == 'other' %>
</h2>
<%= simple_format text_with_links(@proposal.retired_explanation), {}, sanitize: false %>
</div>
<% end %>
@@ -206,11 +214,20 @@
</div>
<% end %>
<div class="tabs-content" data-tabs-content="proposals-tabs" role="tablist">
<%= render "proposals/filter_subnav" %>
<%= render "proposals/notifications" %>
<div class="tabs-panel is-active" id="tab-comments">
<%= render "proposals/comments" %>
<div class="additional-content">
<div class="filter-subnav">
<div class="row">
<div class="small-12 column">
<%= render "proposals/filter_subnav" %>
</div>
</div>
</div>
</div>
<div class="tabs-content" data-tabs-content="proposals_tabs" role="tablist">
<div class="tabs-panel is-active" id="tab-comments" role="tab">
<%= render "proposals/comments" %>
</div>
<%= render "proposals/notifications" %>
</div>

View File

@@ -1,7 +1,7 @@
<% if show_admin_menu? %>
<li>
<li class="has-submenu">
<%= link_to t("layouts.header.administration_menu"), "#", rel: "nofollow", class: "hide-for-small-only" %>
<ul class="menu">
<ul class="submenu menu vertical" data-submenu>
<% if current_user.administrator? %>
<li>
<%= link_to t("layouts.header.administration"), admin_root_path %>

View File

@@ -3,7 +3,7 @@
<% @valid_filters.each do |filter| %>
<% if @current_filter == filter %>
<li class="active"><h2><%= t("#{i18n_namespace}.filters.#{filter}") %></h2></li>
<li class="is-active"><h2><%= t("#{i18n_namespace}.filters.#{filter}") %></h2></li>
<% else %>
<li><%= link_to t("#{i18n_namespace}.filters.#{filter}"),
current_path_with_query_params(filter: filter, page: 1) %></li>

View File

@@ -3,7 +3,7 @@
<% @valid_filters.each do |filter| %>
<% if @current_filter == filter %>
<li class="active">
<li class="is-active">
<h2><%= t("#{i18n_namespace}.filters.#{filter}") %></h2>
</li>
<% else %>

View File

@@ -1,7 +1,7 @@
<ul class="no-bullet submenu">
<% @valid_orders.each do |order| %>
<li class="inline-block">
<%= link_to current_path_with_query_params(order: order, page: 1), class: order == @current_order ? 'active' : '' do %>
<%= link_to current_path_with_query_params(order: order, page: 1), class: order == @current_order ? 'is-active' : '' do %>
<%= content_tag(order == @current_order ? :h2 : :span) do %>
<%= t("#{i18n_namespace}.orders.#{order}") %>
<% end %>

View File

@@ -32,7 +32,7 @@
<%= layout_menu_link_to t("layouts.header.collaborative_legislation"),
legislation_processes_path,
controller.class.parent == Legislation,
accesskey: "l" %>
accesskey: "4" %>
</li>
<% end %>
<% if feature?(:spending_proposals) %>
@@ -48,15 +48,15 @@
<%= layout_menu_link_to t("layouts.header.budgets"),
budgets_path,
controller_name == "budgets" || controller_name == "investments",
accesskey: "4",
accesskey: "5",
title: t("shared.go_to_page") + t("layouts.header.budgets") %>
</li>
<% end %>
<li>
<%= link_to t("layouts.header.help"),
help_path,
accesskey: "5",
class: ("active" if current_page?(help_path)),
accesskey: "6",
class: ("is-active" if current_page?(help_path)),
title: t("shared.go_to_page") + t("layouts.header.help") %>
</li>
</ul>

View File

@@ -40,7 +40,7 @@
<div class="tabs-content" data-tabs-content="topics-tabs" role="tablist">
<%= render "topics/filter_subnav" %>
<div class="tabs-panel is-active" id="tab-comments">
<div class="tabs-panel is-active" id="tab-comments" role="tab">
<%= render "topics/comments" %>
</div>
</div>

View File

@@ -27,7 +27,7 @@
<% @valid_filters.each do |filter| %>
<% if @activity_counts[filter] > 0 %>
<% if @current_filter == filter %>
<li class="active">
<li class="is-active">
<h2><%= t("users.show.filters.#{filter}", count: @activity_counts[filter]) %></h2>
</li>
<% else %>

View File

@@ -5,7 +5,7 @@
</li>
<% if feature?(:spending_proposals) %>
<li <%= "class=active" if controller_name == "spending_proposals" %>>
<li <%= "class=is-active" if controller_name == "spending_proposals" %>>
<%= link_to valuation_spending_proposals_path do %>
<span class="icon-budget"></span>
<%= t("valuation.menu.spending_proposals") %>
@@ -14,7 +14,7 @@
<% end %>
<% if feature?(:budgets) %>
<li <%= "class=active" if controller_name == "budget_investments" %>>
<li <%= "class=is-active" if controller_name == "budget_investments" %>>
<%= link_to valuation_budgets_path do %>
<span class="icon-budget"></span>
<%= t("valuation.menu.budgets") %>

View File

@@ -8,7 +8,7 @@
<div class="small-12 medium-4 column select-heading">
<% slice.each do |filter| %>
<%= link_to valuation_budget_budget_investments_path(budget_id: @budget.id, heading_id: filter[:id]),
class: "#{'active' if params[:heading_id].to_s == filter[:id].to_s}" do %>
class: "#{'is-active' if params[:heading_id].to_s == filter[:id].to_s}" do %>
<%= filter[:name] %> (<%= filter[:count] %>)
<% end %>
<% end %>

View File

@@ -5,7 +5,7 @@
<div class="small-12 medium-4 column select-geozone">
<% slice.each do |filter| %>
<%= link_to valuation_spending_proposals_path(geozone_id: filter[:id]),
class: "#{'active' if params[:geozone_id].to_s == filter[:id].to_s}" do %>
class: "#{'is-active' if params[:geozone_id].to_s == filter[:id].to_s}" do %>
<%= filter[:name] %>&nbsp;(<%= filter[:pending_count] %>)
<% end %>
<% end %>

View File

@@ -9,7 +9,7 @@
<div class="small-4 column verification-step completed">
<span class="number">2</span> <%= t("verification.step_2") %>
</div>
<div class="small-4 column verification-step active">
<div class="small-4 column verification-step is-active">
<span class="number">3</span> <%= t("verification.step_3") %>
</div>

View File

@@ -3,7 +3,7 @@
<div class="small-12 column">
<div class="text-center">
<div class="small-4 column verification-step active">
<div class="small-4 column verification-step is-active">
<span class="number">1</span> <%= t("verification.step_1") %>
</div>
<div class="small-4 column verification-step">

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