Senén Rodero Rodríguez
54843c1e53
Create SDG goal component to render plain tags
2021-01-31 13:33:25 +01:00
taitus
857a6aa228
Add targets component to render all targets in tabs section
2021-01-29 14:15:58 +01:00
Javi Martín
5044c424b6
Merge pull request #4334 from consul/sdg_show_section_header
...
New header section on SDG Goals Index
2021-01-29 14:14:44 +01:00
taitus
7a02ce9c08
Add sdg section header on SDG IndexComponent
...
Co-Authored-By: Javi Martín <javim@elretirao.net >
2021-01-28 20:02:46 +01:00
Javi Martín
5f3279b9db
Extract search form component in SDG Management
...
We're going to add some JavaScript which affect this component, and IMHO
it will be easier to know the JavaScript affects this form if both have
their own separate file.
2021-01-28 13:41:23 +01:00
Javi Martín
3018de2847
Merge pull request #4324 from consul/sdg_target_filter
...
Add SDG target tags and filter
2021-01-27 16:48:12 +01:00
Javi Martín
1fefc910d6
Add list of targets to SDG tag list
...
Co-authored-by: Senén Rodero Rodríguez <senenrodero@gmail.com >
2021-01-27 16:21:40 +01:00
taitus
6c7a8d31b1
Add read more and real less on long description
...
In the spec we added in system/sdg/goals_spec.rb we couldn't use
either click_link or find_link, because the link to show/hide the
long description doesn't have the href attribute.
2021-01-27 15:56:08 +01:00
Javi Martín
b0a6c20bc0
Add long description to goals
2021-01-27 15:49:46 +01:00
Javi Martín
3ec628a63b
Add SDG target filter to advanced search
2021-01-26 19:30:58 +01:00
taitus
7fa594e3e3
Rename sdg_related_list to related_sdg_list
...
To maintain consistency with the current names in the database with fields:
:related_sdg_type and :related_sdg_id
2021-01-26 19:18:11 +01:00
taitus
41ead2b37c
Allow add local targets to RelatedListSelectorComponent
2021-01-26 19:16:57 +01:00
Javi Martín
8542e3e3cf
Merge pull request #4323 from consul/sdg_stats
...
Add SDG stats page to admin section
2021-01-25 15:18:03 +01:00
Senén Rodero Rodríguez
4c2d918bb5
Create component to render goal stats
2021-01-23 12:23:29 +01:00
Javi Martín
e96f45ba39
Merge pull request #4325 from consul/add_related_list_selector
...
Add related list selector component to forms
2021-01-22 16:34:10 +01:00
taitus
189c299a6e
Do not render component when the feature is disabled
2021-01-22 16:03:53 +01:00
Javi Martín
a979a2225d
Merge pull request #4315 from consul/sdg_relation_tags
...
Add SDG goal/target selector
2021-01-20 19:33:32 +01:00
taitus
fce844261a
Add help section
...
In the help section we show the titles of the Goals and Targets that we have added
2021-01-20 19:18:55 +01:00
taitus
c18ab66cc7
Add new suggestion attribute to render custom text on tags
...
Add "display_text" to allow customize the text that we want render on tag.
For Goals we render "SDG1", "SDG2"..
For Targets we render the code "1.1", "1.A"...
2021-01-20 19:18:03 +01:00
taitus
25501c74bb
Add suggestions list with goals and targets
...
This will allow autocomplete for the loaded values in suggestions settings.
We remove commas on tag to allow to jquery.amsify.suggestag.js use comma
as delimiter.
2021-01-20 19:18:02 +01:00
taitus
334d803332
Add related list selector component
...
This component allows you to add Goals and Targets in a single
input to relate it to any resource.
We use the new added library to render them as tags.
2021-01-20 19:18:01 +01:00
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
c3147a1bb6
Simplify conditions to render a banner
2021-01-19 15:35:18 +01:00
Senén Rodero Rodríguez
c6407d82e3
Add filters to SDG relations controller
...
We have three filters: "pending", "all" and "reviewed". Where "pending"
is the default one.
Now we are rendering the `shared/_filter_subnav` partial we need to stub
helper methods defined at the controller and the helper methods that
rely on the request parameters to test the component.
2021-01-19 14:56:30 +01:00
Javi Martín
c66a5a30ef
Allow using table actions in different namespaces
...
This way we can reuse it in sections like SDGManagement and URLs will be
automatically generated as expected.
2021-01-14 17:35:38 +01:00
Javi Martín
2968275a1c
Add empty SDG homepage configuration page
...
Here we'll eventually display links to edit the homepage and the cards
in it.
2021-01-14 17:35:38 +01:00
Javi Martín
e8e920ee50
Rename Widgets components to Widget
...
So naming is consistent with the way Admin::Widget controllers are
named.
2021-01-12 14:50:37 +01:00
Javi Martín
36037bbc55
Merge pull request #4300 from consul/sdg_filters
...
Add SDG filters to advanced search
2021-01-11 13:11:09 +01:00
Javi Martín
cee4613d87
Merge pull request #4305 from consul/sdg_icons_in_index
...
Add SDG icons to related records
2021-01-11 13:07:11 +01:00
Javi Martín
75fc4315ba
Add goal filter to advanced search
2021-01-10 15:54:23 +01:00
Javi Martín
8024c4bb69
Fix goal order in goal select
2021-01-10 15:54:23 +01:00
Javi Martín
142f9b300b
Add filters by SDG to processes sidebar
...
It appears on every process where a tag cloud appears: debates,
proposals and budget investments.
2021-01-10 15:52:22 +01:00
Javi Martín
c5a6ee74c4
Fix component specs using "within"
...
These specs were passing because the `within` method does not work in
components specs. We have to use `page.find` instead.
2021-01-09 15:48:12 +01:00
Javi Martín
ceed3c18d3
Display SDG icons alongside tags
...
We're using the translation fallbacks for the icons, just like we do for
texts.
Note we use the `render?` method provided by view_component to make sure
the component will not be rendered when certain features are disabled.
Also note the `find_asset` method works differently in development and
production, and so we use different approaches here.
2021-01-09 14:53:54 +01:00
Javi Martín
53af5749b9
Extract class to check SDG rendering conditions
...
This class provides a method which shows whether a certain process is
enabled.
Even if it uses a helper, this class is inside the models folder because
the helper it uses actually only uses model methods. We might eventually
remove/simplify this helper and cache inside the model, like we did with
I18n content translations in commit 41dba842a .
2021-01-09 14:19:00 +01:00
Javi Martín
83400b9ed4
Display a message when feeds have no items
...
This is a scenario which will likely take place for at least some of the
goals.
2020-12-27 21:42:42 +01:00
Javi Martín
cc9ab70fbb
Add processes to goal view
...
Note the link to see all processes does not filter by goal because the
legislation section does not have any search filters.
2020-12-27 21:42:42 +01:00
Javi Martín
2bb0a2dfaf
Make "see all" links filter per goal
2020-12-27 21:42:42 +01:00
Javi Martín
ee06dcc05a
Disable SDG sections when settings are disabled
2020-12-21 18:04:48 +01:00
Senén Rodero Rodríguez
e9d52b5e11
Add subnavigation component to targets and goals
...
Add a new SDG component to make easier to create subnavigation menus.
Co-Authored-By: Javi Martín <35156+javierm@users.noreply.github.com >
2020-12-04 15:15:32 +01:00
Javi Martín
7cb0a4135b
Extract component for admin officers table
...
This way we can remove duplication and simplify the code in the view.
Note we're not using the "within" method in the tests to access a row,
because it doesn't seem to work in components tests when passing the
`text:` option.
2020-10-21 13:19:52 +02:00
Javi Martín
08c2bfc255
Extract component to add/remove admin/mod/manager
...
We remove some duplication by doing so.
2020-10-21 13:19:52 +02:00
Javi Martín
02e27e13dc
Extract component for budget actions
...
We can omit passing a parameter to the helper method thanks to that, and
we group related code together.
2020-10-21 13:19:52 +02:00
Javi Martín
1537f25739
Extract component for organization actions
...
We remove duplication by doing so, and now we only need to add the call
do render Admin::TableActionsComponent once.
2020-10-21 13:19:52 +02:00
Javi Martín
eb3f2bc2ca
Extract component for restore and hide actions
...
By doing so, we remove a lot of duplication.
2020-10-21 13:19:52 +02:00
Javi Martín
fb23df2e5b
Allow additional links in table actions component
...
This way we'll be able to make these links consistent.
2020-10-21 13:19:49 +02:00
Javi Martín
e3753b1ad9
Allow custom options in links to actions
...
Some links were using options like `remote: true`.
2020-10-19 18:56:02 +02:00
Javi Martín
497963817c
Allow different confirmation texts in destroy link
2020-10-19 18:56:02 +02:00
Javi Martín
b1f9ca4ad5
Allow custom URLs in links to actions
...
There were a couple of cases where these links didn't point to the
default actions.
2020-10-19 18:56:02 +02:00
Javi Martín
738646a565
Allow different texts in links to actions
...
The texts were different for a few models, so the component needs to be
updated.
2020-10-19 18:56:02 +02:00