Juan Salvador Pérez García
2ca9a38915
Dashboard navigation enhancements
...
Dashboard links that bring the user outside the dashboard will be open
in a separate tab
2018-09-14 16:45:02 +02:00
Juan Salvador Pérez García
c763ca2f99
Fixed bug in x axis labels in dashboard
...
Dashboard progress graph was not showing all labels in x axis when there
were less than 12 samples.
2018-09-14 16:43:42 +02:00
Juan Salvador Pérez García
4d0359f334
Changed defaults for new proposed action/resource.
...
Previously, action as requesting some action from administrators by
default. Now this flag is false by default when a new proposed
action/resource is created.
2018-09-14 16:36:47 +02:00
Juan Salvador Pérez García
826ce8af25
Enhancements in proposal progress graph
...
x axis legend now show less labels in order to improve its readability.
2018-09-14 16:28:20 +02:00
Juan Salvador Pérez García
7143e10201
Graph enhancements
...
Y axis have received the following enhancement:
It won't show labels for each value in order to improve its readability.
Maximum value will be set according to the maximum number of supports
received for the current proposal.
In case no supports are received it will use the number of supports
required for a successful proposal.
2018-09-14 12:20:03 +02:00
Juan Salvador Pérez García
38472cb670
Fixed colours in the progress graphic
...
progress graph will be shown in blue
successful graph will be shown in orange
2018-09-14 11:54:57 +02:00
Juan Salvador Pérez García
0bd381aa5e
Enhancements and bugfixing
...
FIxed issue in last commit: supports controller were not correctly
filling the holes without data.
Fixed duplication in supports and successful supports controller using a
concer.
Successfull supports controller will fill the holes without data in the
same way that supports controller does.
2018-09-14 11:30:59 +02:00
Juan Salvador Pérez García
3590657777
Enhancements on supports controller
...
Supports controller now fill the holes in the results: When there are no
supports collected for one interval it takes the accumulated value from the
previous one.
Data starts in the publication date.
2018-09-14 10:49:29 +02:00
Papaya Labs
357b3406ed
Hide Featured section on Home Page if there are no cards
2018-09-13 15:33:24 -05:00
Juan Salvador Pérez García
f875ded0be
Bugfixing and enhancements
...
* Fixed common ability: Retired draft proposal can't be published.
* Fixed proposal dashboard view: progress graph is not available for
draft proposals.
2018-09-13 18:22:59 +02:00
Javi Martín
f917f5eed9
Filter image tags everywhere except in custom pages
...
Allowing image tags everywhere makes us vulnerable to CSRF attacks.
2018-09-12 12:35:28 +02:00
Javi Martín
5faeefab2c
Show the image button only if editing admin pages
...
That's the only place where we need to attach images so far.
2018-09-12 12:35:28 +02:00
Javi Martín
43e83889ff
Simplify CKEditor authorization
...
We can use the `config.authorize_with` option, so we don't need to copy
the controller in order to load and authorize resource.
Besides, only administrators can upload images, so we don't need to
track the image's user id.
2018-09-12 12:35:28 +02:00
Javi Martín
531750cf6f
Restore commented lines
...
Not sure if they were supposed to be removed. For now I'll assume they
were commented accidentally.
2018-09-12 12:35:28 +02:00
Javi Martín
9705360d98
Enable only a few headings in CKEditor
...
Allowing every format is way more than what we initially intended.
I've only added h2 and h3 because h1 is set somewhere else in the page
(like the title), and h4, h5 and h6 are usually not necessary.
2018-09-12 12:35:28 +02:00
Javi Martín
b6855b7140
Restore allowedContent line
...
We're not sure why it was removed, and we're using server-side
sanitizers to remove dangerous HTML.
2018-09-12 12:35:28 +02:00
Javi Martín
471061f475
Allow only admins to attach CKEditor images
...
Right now allowing regular users to attach images would make us
vulnerable to CSRF attacks.
2018-09-12 12:35:28 +02:00
Raúl Fuentes
d574657b77
Fixes for the review made by @javierm
...
this commit will be merged with the others when the chages
are accepted
2018-09-12 12:35:28 +02:00
Raúl Fuentes
88f0f14eab
Modify the configuration of ckeditor 4
...
add links, headers and images
2018-09-12 12:35:28 +02:00
Raúl Fuentes
8e68f4bbd0
Update abilities for ckeditor4 images
...
Add the image controller to use the obsolete load_and_authorize_resource
and authorize_resource methods in the gem
2018-09-12 12:35:28 +02:00
Raúl Fuentes
424535c1ae
Add models needed to include images on ckeditor4
2018-09-12 12:35:28 +02:00
Marko Lovic
c7fcdd9b0e
Use standard locale names for Globalize
...
It turns out it is not necessary to downcase and underscore
locale names to use the globalize-accessor gem. The gem
will automatically underscore the locale name when defining and
calling the accessor methods.
2018-09-11 18:48:14 +02:00
Marko Lovic
6fe7dc22bc
Fix translatable field labels to not include locale
...
Label for field :title should be "Title", not "Title en"
2018-09-11 18:48:09 +02:00
Marko Lovic
ca5f8719a8
Fix helper to merge style option correctly
2018-09-11 18:48:05 +02:00
Marko Lovic
1fb1437886
Fix merging_translatable_field_options helper
2018-09-11 18:48:01 +02:00
Marko Lovic
5ad3bf03cd
Nest TranslatableFormBuilder in helper module
...
To avoid having multiple top-level classes per file
2018-09-11 18:47:57 +02:00
Marko Lovic
e26500179a
Add missing blank line between methods
2018-09-11 18:47:52 +02:00
Marko Lovic
38e6c394e7
Change string manipulation to use interpolation for readability
2018-09-11 18:47:48 +02:00
Marko Lovic
b9f3ea2a33
Change variable name to reflect possibility of being array
2018-09-11 18:47:43 +02:00
Marko Lovic
a1567058b6
Fix type of field for Milestone form
2018-09-11 18:47:38 +02:00
Marko Lovic
7b0aa1e104
Extract merge_translatable_field_options helper method
2018-09-11 18:47:34 +02:00
Marko Lovic
61e3b3b406
Incorporate label into translatabel field
...
Suggested by @javierm so that we can take advantage of certain browser
features that rely on a <label> tag being associated with an <input> tag.
2018-09-11 18:47:28 +02:00
Marko Lovic
3f277c5cdf
Avoid duplicating list of locales
2018-09-11 18:46:58 +02:00
Marko Lovic
2cb3e4b111
Extract translatable field logic to FormBuilder
2018-09-11 18:46:50 +02:00
Angel Perez
303b96553a
Replace .all.each with .find_each when rendering cards
2018-09-10 11:38:32 -04:00
Marko Lovic
96b798865a
Refactor Translatable#translation_params to improve readability
...
Code by Javier Martín
2018-09-10 17:34:28 +02:00
Marko Lovic
54d0068134
Remove unused code
...
This method has never been used as far as I've
been able to tell from the git history.
2018-09-10 17:33:50 +02:00
Marko Lovic
3c4f221e04
Change Translatable interface
2018-09-10 17:32:49 +02:00
Marko Lovic
4603a30f95
Change Translatable impl to keep track of enabled locales
2018-09-10 17:18:01 +02:00
Marko Lovic
cb716e07d7
Extract translation helper from translatable form views
...
So that individual form partials don't depend on the implementation
of how translations are deleted.
2018-09-10 17:17:47 +02:00
Marko Lovic
3aa53449c8
Fix Translatable when field values are changed to blank
...
If we ignore all params that are blank, there is no way to
"remove" an attribute (i.e. change its value to blank)
On the other hand, we don't want to create new translations
where all fields are empty, so the new code keeps only the
blank fields which belong to existing translations.
2018-09-10 17:16:42 +02:00
Raimond Garcia
4f2ed27f8c
Merge pull request #2865 from consul/backport_1585-make_banners_translatable
...
[Backport] Make banners translatable
2018-09-10 16:41:33 +02:00
Angel Perez
9029acd440
Fix Rubocop warnings for Admin controllers [ci skip]
2018-09-07 13:59:07 -04:00
Raimond Garcia
778b10d181
Merge pull request #2835 from wairbut-m2c/backport/fix-proposals-menu
...
Fix navigation menu under Legislation::Proposal show view
2018-09-07 18:44:31 +02:00
Raimond Garcia
7014686b15
Merge pull request #2813 from javierv/2812-fix_admin_menu_not_showing
...
Fix admin menu not showing for high IDs
2018-09-07 15:52:02 +02:00
Raimond Garcia
09482aad09
Merge pull request #2785 from ziyan-junaideen/feature/1-nav-content-blocks
...
Configurable Top Right and Main Navigation Menus
2018-09-05 19:50:59 +02:00
Alberto
21f36e6be5
Merge branch 'master' into feature/1-nav-content-blocks
2018-09-05 12:41:07 +02:00
Tiago P. Zini
416f00aafd
Fixing bug in facebook share link
2018-09-03 23:41:02 -04:00
Marko Lovic
0fa4b60f39
Make Banners translatable
2018-08-30 16:29:29 +02:00
Marko Lovic
bfd9032e9d
Extract translation partial to be shared within admin
...
Refactor: behaviour should be 100% the same
2018-08-27 18:24:24 +02:00