Javi Martín
89402bdbf6
Use raw instead of html_safe
...
They do the exact same thing; however `html_safe` might confuse
developers into thinking it will make the HTML safe. Using `raw` makes
it clear that we're inserting the text without escaping it.
2019-10-08 19:10:13 +02:00
Javi Martín
61bf9a5c73
Use sanitize instead of html_safe
...
The difference is `html_safe` allows every HTML tag, including the
`<script>` tag, while `sanitize` only allows tags which are considered
safe. In this case, we want to allow a `<span>` tag in a translation,
and links inside flash messages.
2019-10-08 18:46:21 +02:00
Javi Martín
928312e218
Use sanitize in translations with links
...
Sometimes we're interpolating a link inside a translation, and marking
the whole translations as HTML safe.
However, some translations added by admins to the database or through
crowdin are not entirely under our control.
Although AFAIK crowdin checks for potential cross-site scripting
attacks, it's a good practice to sanitize parts of a string potentially
out of our control before marking the string as HTML safe.
2019-10-08 18:46:21 +02:00
Javi Martín
6b12da7654
Fix ERB being used in an HTML comment
...
This was causing erb-lint to issue a warning.
2019-10-08 18:46:20 +02:00
Javi Martín
55a190f44a
Remove unneeded _html suffix in I18n keys
...
This suffix does the same thing as calling `.html_safe` on them. So we
don't need to use it in texts that don't use HTML.
2019-10-08 13:20:22 +02:00
Javi Martín
20ca6beb30
Remove unneeded html_safe and raw calls
...
There's no HTML in these texts, or it has already been escaped by Rails
`link_to` helper method.
2019-10-08 13:20:22 +02:00
Javi Martín
738e9ebc8b
Remove code specific to Internet Explorer 8
...
Internet Explorer 9 was released eight years ago. Besides that, we don't
really support IE8 anyway, since we show a popup to IE8 users saying
we don't support it, we haven't maintained the IE8-specific CSS file for
years, and we don't test our JavaScript against IE8.
2019-09-10 22:43:37 +02:00
Javi Martín
f9ed186909
Add rubocop spacing rules
...
We were following these rules in most places; we just didn't define them
anywhere.
2019-09-10 21:04:56 +02:00
Javi Martín
f74971060b
Apply SpaceInHtmlTag ERB Lint rule
2019-09-10 20:02:15 +02:00
Javi Martín
c62da726b8
Apply SpaceAroundErbTag ERB Lint rule
2019-09-10 20:02:15 +02:00
Javi Martín
71d9ddd849
Apply rule to end files with a newline character
2019-09-10 20:02:15 +02:00
Javi Martín
cf9e36c767
Replace single quotes with double quotes
...
Most of these quotes were in the dashboard branch before we added the
rule for double quotes.
2019-09-10 19:21:03 +02:00
Javi Martín
911fe4e481
Simplify calls to render partial
...
We're also adding a bit of consistency, since most of our calls to
partial rendering omit the `partial` and `locals` keys.
2019-09-04 15:00:36 +02:00
Javi Martín
29da91a082
Fix untranslated texts
...
I've also renamed the key for the settings title so the `<h1>` gets the
`title` key, as done in other sections in the admin.
2019-08-27 17:22:22 +02:00
taitus
72d1893703
Manage the remote translation button display
...
- Add remote_translation_button partial to layout
- Only display button when we have remote_translations and if current
locale is include on available locales from remote translations service.
- Recover available locales from remote translations service.
Use daily_cache to detect every day if remote translation service has
added new available locale.
Co-Authored-By: alessandro <agileontheweb@gmail.com >
2019-06-27 09:21:18 +02:00
Alberto
1c10c22b08
Merge pull request #3509 from consul/menu-users
...
Users menu
2019-05-21 12:54:42 +02:00
decabeza
43dd3d2169
Include mailer header logo on custom images list
2019-05-21 11:22:04 +02:00
decabeza
aee62b9d33
Change header title link on officing namespace
2019-05-17 17:48:54 +02:00
decabeza
2c9d9b5de8
Remove admin shortcuts links to stats and settings
...
These links are already on sidebar and isn't necessary have them on header.
2019-05-17 17:48:49 +02:00
María Checa
d5c7858f6c
Removed officer alert in admin section
2019-05-16 14:45:46 +02:00
Juanjo Bazán
5121c9b6d8
removes booth message from admin interface
2019-05-16 13:37:47 +02:00
decabeza
94b8caffca
Merge branch 'master' into proposal-dashboard
2019-04-04 14:08:30 +02:00
rgarcia
9329e4b6ea
hot fix current booth
2019-03-28 15:50:34 +01:00
rgarcia
4761ac91bd
Displays officing booth in layout
2019-03-28 15:47:52 +01:00
decabeza
2af154d539
Merge branch 'master' into proposal-dashboard
2019-03-28 01:26:04 +01:00
decabeza
eda6ea7f12
Merge branch 'master' into dashboard
2019-03-26 16:45:48 +01:00
Alberto
29a87e2746
Merge branch 'dashboard' into dashboard-polish
2019-03-26 12:19:20 +01:00
Javi Martín
3e4e65ead7
Use double quotes inside ERB
...
We were using single quotes inside ERB code when that code was inside
HTML double quotes.
2019-03-25 14:58:54 +01:00
Javi Martín
4c35df4812
Use double quotes inside string interpolation
2019-03-25 14:58:54 +01:00
taitus
6342d598f7
Update active resources count for proposal
...
Fix: Sum default resources (mail, poster, poll) to actives resources for a proposal.
2019-03-21 12:29:31 +01:00
Julian Herrero
4df9a1a1b4
Move HTML settings to content blocks settings page
...
- Rename html settings keys
- Show html settings next to content blocks page
- Hide html settings from configuration tab
2019-03-19 19:45:34 +01:00
decabeza
e949d4d163
Refactor proposal total counter value
2019-03-19 16:59:57 +01:00
decabeza
9b95870c12
Remove empty div
2019-03-19 16:41:49 +01:00
Julian Herrero
25ed245689
Use double quotes in app/views/layouts
2019-03-19 12:16:50 +01:00
decabeza
ccee843da7
Remove unused settings
...
These settings are customised for Madrid's fork. On CONSUL any user can include new links using site customisation content blocks from admin panel.
2019-02-18 15:40:11 +01:00
Alessandro Cuoghi
36abba15e6
Dashboard proposals stats V.2
...
- Found new solution to show dashboard proposals stats
- Added new class for behaviour change in the medium version
- Moved the progress bar to the bottom
- Moved below by adding counter-label class to the text support
- Added class to support text to push under the counter
2019-02-02 17:33:55 +01:00
Alessandro Cuoghi
e0fa82a533
Change layout dashboard proposals stats
...
Created new layout to avoid text jump support
2019-02-02 17:33:55 +01:00
Julian Herrero
d77183ee09
Improvement - CRUD budgets and content blocks
2019-01-14 12:59:48 +01:00
decabeza
546105d989
Merge branch 'master' into dashboard-master
2018-10-19 01:48:37 +02:00
decabeza
84975143bb
Removes dashboard mailer layout
2018-10-13 12:59:24 +02:00
decabeza
aaaaa00807
Adds styles to dashboard layouts, progress, show and partials
2018-10-05 18:04:30 +02:00
Juan Salvador Pérez García
92c0e34c7a
Fixed error in layout
...
An error was introduced while trying to fix merge conflicts. It is fixed
now.
2018-10-01 10:13:45 +02:00
Juan Salvador Pérez García
488e7e081f
Merge branch 'dashboard' into rebase_consul_master
2018-09-27 09:18:27 +02:00
Juan Salvador Pérez García
42d448248c
Routes have been refactored
...
Dashboard routes have been refactored. Now instead of having resources
for dashboard and routes inside a dashboard namespace the proposal
routes contain a dashboar singleton containing everything related to it.
2018-09-17 15:44:45 +02:00
decabeza
a2bf8a85f4
Fixes logo header on devise layout
2018-07-31 18:08:09 +02:00
decabeza
076f9dd474
Moves back link to root path from dashboard to header
2018-07-31 12:47:51 +02:00
decabeza
e14b7b67fb
Removes custom content on footer
2018-07-30 17:59:33 +02:00
Alberto
65e4435822
Merge pull request #2137 from wairbut-m2c/iagirre-admin-menu-in-management
...
Add admin menu in management view (if user is admin)
2018-07-27 12:35:07 +02:00
Juan Salvador Pérez García
8876b285ce
Fixes #229
...
Adds email feature for proposals dashboard
2018-07-25 13:28:44 +02:00
Juan Salvador Pérez García
e5f9cf6710
Fixed #239
...
Proposals dashboard refactored to dashboard.
Added missing specs for the dashboard.
2018-07-24 15:52:43 +02:00