Commit Graph

35 Commits

Author SHA1 Message Date
Javi Martín
a7bbdb1bd0 Simplify rendering a banner
Now the banner component accepts either a banner or a section and loads
the banner if it's a section, so we don't have to add the `@banners`
variable in several controllers.
2021-01-20 17:22:05 +01:00
Javi Martín
db97f9d08c Add and apply rubocop rules for empty lines
We were very inconsistent regarding these rules.

Personally I prefer no empty lines around blocks, clases, etc... as
recommended by the Ruby style guide [1], and they're the default values
in rubocop, so those are the settings I'm applying.

The exception is the `private` access modifier, since we were leaving
empty lines around it most of the time. That's the default rubocop rule
as well. Personally I don't have a strong preference about this one.


[1] https://rubystyle.guide/#empty-lines-around-bodies
2019-10-24 17:11:47 +02:00
Javi Martín
47b2c42a1d Apply IndentationConsistency rubocop rule 2019-09-10 20:02:15 +02:00
taitus
3a154a57cb Fix houncibot offenses: Style/StringLiterals 2019-06-27 09:21:19 +02:00
taitus
aad6491049 Add remote translations to welcome 2019-06-27 09:21:19 +02:00
Julian Herrero
511f0be287 Require logged in user if navigate to /welcome 2019-03-19 14:55:51 +01:00
Julian Nicolas Herrero
af55366e57 Merge pull request #3360 from consul/double_quotes_for_controllers
Change single quotes to double quotes for controllers
2019-03-19 12:13:07 +01:00
Julian Herrero
87be6f302c Add default site customization pages
From now on these static pages:

`/privacy'
`/conditions'
`/accesibility'
`/help/faq'
`/welcome'

have been moved to the DB and can be modified easily by any
administrator in `/admin/site_customization/pages'
2019-03-14 18:35:51 +01:00
Julian Herrero
d24376f6ad Use double quotes in controllers/ 2019-03-13 22:19:49 +01:00
iagirre
0d9da5398b Fix banners in user pages
Banners were not been shown in certain pages; now
they are.

Spec to check if the banner is been shown correctly
added. Before it was in admins specs, now it has it's
own spec out of admins folder.
2018-07-12 10:17:25 -04:00
rgarcia
0e097973cc Add widget feeds to homepage
Note there is some funkiness going on with class loadings
Had to create a `feed` and `widget_feed` table even though in this
first version the Widget::Feed includes only uses ActiveModel instead
of ActiveRecord, otherwise some specs failed

We’ll figure it out and clean up 😌
2018-05-28 18:17:26 +02:00
rgarcia
c7f85c4173 Add widget header to homepage 2018-05-28 18:17:26 +02:00
rgarcia
664e77305c Add widget cards to homepage 2018-05-28 18:17:26 +02:00
taitus
7afacf3a2f Force distinct to recommendations methods. Sort by recommendations on home carousel. 2017-08-02 12:52:55 +02:00
taitus
5f1bdb2f94 Rename recommendeds to recommendations 2017-08-01 16:31:45 +02:00
taitus
fe3bb7a389 Add recommended tab on proposals and debates index. 2017-08-01 16:31:44 +02:00
taitus
ff6471982c Add recommended debates, proposals and investement to Home page. 2017-08-01 15:48:21 +02:00
rgarcia
bb3c4c6399 adds consistency to ruby code style
Keep a blank line before and after private
Keep a blank line before and after protected
Remove extra empty line at class body end
Remove extra blank line
Add final newline
Use 2 (not 3) spaces for indentation
Use 2 (not 4) spaces for indentation
Remove space before comma
Add space after comma
Remove trailing whitespaces
Remove unnecessary spacing
Use snake_case for variable names
Do not use then for multi-line if
Remove unused block argument - i
Use the new Ruby 1.9 hash syntax
Remove unused assignment to variable
Indent when as deep as case
Align attributes
Align end with def
2016-11-15 11:18:43 +01:00
Juanjo Bazán
23c6a04179 removes highlights 2016-03-04 18:46:27 +01:00
kikito
81b5ae7089 Implements /cuentasegura 2016-02-22 13:40:49 +01:00
Juanjo Bazán
e5531aba87 moves highlights and default home page 2015-09-14 19:49:09 +02:00
rgarcia
58357dad2c removes featured debates and proposals 2015-09-14 19:06:16 +02:00
Juanjo Bazán
a661bdccdb moves signed_in_home to highlights 2015-09-14 17:32:19 +02:00
Juanjo Bazán
00f4acc7c2 refactors highlights 2015-09-14 17:00:59 +02:00
Juanjo Bazán
9928f8a85c adds basic activity page as signed_in_home 2015-09-13 14:25:52 +02:00
kikito
2c04cd07d9 Adds independent welcome screen 2015-09-10 17:40:54 +02:00
rgarcia
339e978237 default order confidence_score for home and debate index 2015-09-08 14:47:58 +02:00
kikito
b6699932d1 uses the hot_score in the welcome screen 2015-09-04 14:16:05 +02:00
Alberto Garcia Cabeza
ff6285d114 Improves general styles 2015-08-21 18:57:09 +02:00
Juanjo Bazán
ced2a05063 adds eager loading to avoid N+1 queries 2015-08-18 16:54:49 +02:00
rgarcia
9f2d60c4ce refactors voted debates 2015-08-15 14:57:41 +02:00
Alberto Garcia Cabeza
ea5612c5bd Modifies styles welcome and debates index 2015-08-12 15:27:28 +02:00
rgarcia
4dd7e14ac4 moves featured debates to home page 2015-08-11 17:26:25 +02:00
rgarcia
9cd3d77536 removes placeholder home 2015-07-18 21:38:13 +02:00
rgarcia
223eb06da2 configures capybara [#4] 2015-07-16 17:07:12 +02:00