-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3032 gobierto data add custom field license for dataset #3821
3032 gobierto data add custom field license for dataset #3821
Conversation
21b0dfd
to
e52ada2
Compare
7afe511
to
3be2115
Compare
@@ -22,6 +22,27 @@ | |||
:label="labelSubject" | |||
:text="categoryDataset" | |||
/> | |||
<InfoBlockText |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Crashillo @stbnrivas it would be good to show both source text and url as a link (with target blank), and not in two separated fields, don't you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to do so, you should either create a new component or parametrize the current one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, could you help @stbnrivas ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we already create a new component to show as a link . Also I opened a new issue with another way to do it.
if vocabulary.new_record? | ||
vocabulary.name_translations = { ca: "Llicència", en: "License", es: "Licencia" } | ||
vocabulary.save | ||
vocabulary.terms.create(name_translations: { ca: "Open Data (ODbl)", en: "Open Data (ODbl)", es: "Open Data (ODbl)" }, position: 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd add an option for not known (maybe the first option or default)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can I name as:
ca: "Llicència desconeguda"
en: "Unknown license"
es: "Licencia desconocida"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to allow to not select a value, and if so, don't show the field.
dataset_source_url.save | ||
end | ||
|
||
licenses = site.custom_fields.vocabulary_options.where(class_name: "GobiertoData::Dataset").find_or_initialize_by(uid: 'dataset-license') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why plural name in the variable?
@@ -15,7 +15,7 @@ ca: | |||
- dv | |||
- ds | |||
abbr_month_names: | |||
- | |||
- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ferblape is it possible that this always happen due to the missing tabulator char? Perhaps, should it be??
abbr_month_names:
- gen
- feb
Just asking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if the guilty is:
husky > pre-commit (node v14.16.1)
✔ Preparing...
❯ Running tasks...
↓ No staged files match app/javascript//*.{js,vue} [SKIPPED]
↓ No staged files match app//.{css,scss} [SKIPPED]
❯ Running tasks for config/locales/**/.yml
⠇ npm run check_i18n
◼ Applying modifications...
◼ Cleaning up...
Another guilty is my Atom default configuration because. Atom is removing all withespaces at end of line every time that save the file.
- I will disable (auto delete end whitespaces)
https://flight-manual.atom.io/using-atom/sections/editing-and-deleting-text/#whitespace - I will enable highlights spaces like this
https://atom.io/packages/trailing-spaces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, no, we know the check_i18n
script is the reason to set/unset the tabulation. But it's a recurrent issue that I cannot figure out how it happens, sometimes there's empty row, sometimes there isn't :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not an empty row but an empty space in the row, I don't know what causes it, probably an editor linter?
sourceDataset: Font | ||
sourceDatasetUrl: Font url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sourceDataset: Font | |
sourceDatasetUrl: Font url | |
sourceDataset: Source | |
sourceDatasetUrl: Source url |
@@ -68,6 +69,8 @@ es: | |||
sets: Conjuntos | |||
showAll: Ver todo | |||
showLess: Ver menos | |||
sourceDataset: Fuente | |||
sourceDatasetUrl: Link Fuente |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep the consistency between translations, use Fuente url
instead
7774f61
to
69d8fbc
Compare
@@ -26,6 +27,7 @@ def site | |||
|
|||
def test_seed_a_site_with_that_module | |||
@subject.seed("GobiertoPeople", site) | |||
byebug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Careful
69d8fbc
to
c36caa3
Compare
c36caa3
to
2ba5088
Compare
✌️ What does this PR do?
Closes #3032
add to module GobiertoData (for every dataset)
license
: Open Data (ODbl), Open Data (ODC-By), Open Data (PDDL)source
(source of data were obtained )source-url
(url to the font)refactor zeitwerk compliance remove dirs db/seeds/modules to db/seeds/gobierto_seeds/
🔍 How should this be manually tested?
for Gobierto installation with existing sites which module GobiertoData are enabled, new custom fields should be enable after apply
for Gobierto installation without existing sites, you should run a feed from console, to enable new custom fields
👀 Screenshots
Before this PR
After this PR