Commit Graph

15 Commits

Author SHA1 Message Date
taitus
f463baf14a Fix removing item twice
Add spec which is fixed with this commit.

In the `sTagsArea` zone there are two elements with the same `data-val`:
the `<span class="amsify-select-tag>` containing the selected tag and
the `<li class="amsify-list-item" data-val="1">` containing the
suggested tag.

This means every time we call `removeTag`, the `removeTagByItem`
function is called twice, and might remove extra items.

Suggested PR:
c8765a6915
2021-01-20 19:18:03 +01:00
taitus
23f72d939a Add list of goals icons to component
- When we click on an icon we add a new tag with the Goal related to the input or
we remove the tag when that label already exists.

- Manage goals icons status when add or remove related targets:
Whenever there is a tag related to Goal, either the Goal itself or a Target, the icon
will be "checked".
When there is no related Goal or Target it will no longer be marked as checked.
2021-01-20 19:18:03 +01:00
taitus
1eb06dfb99 Add AmsifySuggestags settings
With 'whiteList' to true, only can add tags related with suggestions.
Update 'keepLastOnHoverTag' and 'checkSimilar' to improve usability.
2021-01-20 19:18:02 +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
Senén Rodero Rodríguez
739d23fe73 Mark relatable as reviewed when updating its relations
Show a notice only once when the user updates the relatable.
2021-01-19 14:56:30 +01:00
Senén Rodero Rodríguez
3ad14f4acb Send current tab reference when filtering with search form 2021-01-19 14:56:30 +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
74962ef05f Add filter by target 2020-12-21 18:27:27 +01:00
Javi Martín
c9362ffeb4 Add filter by goal 2020-12-21 18:27:27 +01:00
Javi Martín
cb183b6e15 Add search to SDG managed content 2020-12-21 18:27:27 +01:00
Javi Martín
ee06dcc05a Disable SDG sections when settings are disabled 2020-12-21 18:04:48 +01:00
Javi Martín
f76279a4dd Add form to assign targets to a record 2020-12-21 18:04:48 +01:00
Javi Martín
11c3b3db13 Add link to an (empty) edit action 2020-12-21 18:04:48 +01:00
Javi Martín
ed51c5dcd3 Add basic SDG Management content section
Note using `params[:relatable_type].classify` is recognized as a
security risk by some tools. However, it's a false positive, since we've
added constraints to the URL so that paramenter can only have the values
we trust.
2020-12-21 18:04:48 +01:00