Skip to content

Commit

Permalink
show custom_field license at front office
Browse files Browse the repository at this point in the history
  • Loading branch information
stbnrivas committed Apr 15, 2021
1 parent 19c9aec commit 21b0dfd
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 1 deletion.
12 changes: 12 additions & 0 deletions app/javascript/gobierto_data/webapp/components/commons/Info.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
:label="labelSubject"
:text="categoryDataset"
/>
<InfoBlockText
v-if="sourceDataset"
icon="link"
opacity=".25"
:label="labelSource"
:text="sourceDataset"
/>
</div>
<div class="pure-u-1-2">
<div
Expand Down Expand Up @@ -79,6 +86,10 @@ export default {
type: String,
default: ''
},
sourceDataset: {
type: String,
default: ''
},
categoryDataset: {
type: String,
default: ''
Expand All @@ -102,6 +113,7 @@ export default {
labelFrequency: I18n.t("gobierto_data.projects.frequency") || '',
labelSubject: I18n.t("gobierto_data.projects.subject") || '',
labelDownloadData: I18n.t("gobierto_data.projects.downloadData") || '',
labelSource: I18n.t("gobierto_data.projects.license") || '',
seeMore: I18n.t("gobierto_common.vue_components.read_more.more") || '',
seeLess: I18n.t("gobierto_common.vue_components.read_more.less") || '',
truncateIsActive: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
:description-dataset="description"
:category-dataset="category | translate"
:frequency-dataset="frequency | translate"
:source-dataset="license"
:date-updated="dateUpdated"
:array-formats="arrayFormats"
/>
Expand Down Expand Up @@ -245,6 +246,7 @@ export default {
category: {},
frequency: {},
dateUpdated: null,
license: null,
showYourQueries: true,
showYourVizs: true,
labelQueries: I18n.t("gobierto_data.projects.queries") || "",
Expand All @@ -269,8 +271,9 @@ export default {
data_updated_at: this.dateUpdated,
category: [{ name_translations: this.category } = {}] = [],
frequency: [{ name_translations: this.frequency } = {}] = [],
source_license: this.license,
description: this.description
} = this.datasetAttributes) // Ouh yes, destructuring FTW 😎
}
};
</script>
</script>
1 change: 1 addition & 0 deletions config/locales/gobierto_data/views/ca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ ca:
favs: Favorites
frequency: Freqüència
guide: Guia per utilitzar l'editor SQL
license: Llicència
link: Enllaç
modifiedQuery: Consulta modificada
modifiedVisualization: Visualització modificada
Expand Down
1 change: 1 addition & 0 deletions config/locales/gobierto_data/views/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ en:
favs: Favorites
frequency: Frequency
guide: Guide to using the SQL editor
license: License
link: Link
modifiedQuery: Modified Query
modifiedVisualization: Modified visualization
Expand Down
1 change: 1 addition & 0 deletions config/locales/gobierto_data/views/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ es:
favs: Favoritas
frequency: Frecuencia
guide: Guía para usar el editor SQL
license: Licencia
link: Enlace
modifiedQuery: Consulta modificada
modifiedVisualization: Visualización modificada
Expand Down

0 comments on commit 21b0dfd

Please sign in to comment.