mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 13:41:41 +00:00
feat: agregar una descripción corta a la licencia
que es lo que usan las plantillas como aviso de licencia
This commit is contained in:
parent
d01f4ae5e2
commit
42b2549f09
3 changed files with 23 additions and 1 deletions
|
@ -113,7 +113,7 @@ SiteService = Struct.new(:site, :usuarie, :params, keyword_init: true) do
|
||||||
slug: Jekyll::Utils.slugify(I18n.t('activerecord.models.licencia')),
|
slug: Jekyll::Utils.slugify(I18n.t('activerecord.models.licencia')),
|
||||||
lang: lang,
|
lang: lang,
|
||||||
title: site.licencia.name,
|
title: site.licencia.name,
|
||||||
description: site.licencia.description,
|
description: site.licencia.short_description,
|
||||||
content: CommonMarker.render_html(site.licencia.deed)
|
content: CommonMarker.render_html(site.licencia.deed)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
# Agrega descripciones cortas a las licencias
|
||||||
|
class AddShortDescriptionToLicencias < ActiveRecord::Migration[6.1]
|
||||||
|
def up
|
||||||
|
add_column :licencias, :short_description, :string
|
||||||
|
|
||||||
|
YAML.safe_load_file('db/seeds/licencias.yml').each do |licencia|
|
||||||
|
Licencia.find_by_icons(licencia['icons']).update licencia
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
remove_column :licencias, :short_description
|
||||||
|
end
|
||||||
|
end
|
|
@ -1,6 +1,8 @@
|
||||||
---
|
---
|
||||||
- name_en: 'Peer Production License'
|
- name_en: 'Peer Production License'
|
||||||
name_es: 'Licencia de Producción de Pares'
|
name_es: 'Licencia de Producción de Pares'
|
||||||
|
short_description_en: "This work is licensed under a Peer Production License"
|
||||||
|
short_description_es: "Esta obra está bajo una Licencia de Producción de Pares"
|
||||||
icons: "/images/ppl.png"
|
icons: "/images/ppl.png"
|
||||||
url_en: 'https://wiki.p2pfoundation.net/Peer_Production_License'
|
url_en: 'https://wiki.p2pfoundation.net/Peer_Production_License'
|
||||||
url_es: 'https://endefensadelsl.org/ppl_es.html'
|
url_es: 'https://endefensadelsl.org/ppl_es.html'
|
||||||
|
@ -100,6 +102,8 @@
|
||||||
hacerlo es enlazar a esta página.
|
hacerlo es enlazar a esta página.
|
||||||
|
|
||||||
- icons: "/images/by.png"
|
- icons: "/images/by.png"
|
||||||
|
short_description_en: "This work is licensed under a Creative Commons Attribution 4.0 International License."
|
||||||
|
short_description_es: "Esta obra está bajo una Licencia Creative Commons Atribución 4.0 Internacional."
|
||||||
name_en: 'Creative Commons Attribution 4.0 International (CC BY 4.0)'
|
name_en: 'Creative Commons Attribution 4.0 International (CC BY 4.0)'
|
||||||
description_en: "This license gives everyone the freedom to use,
|
description_en: "This license gives everyone the freedom to use,
|
||||||
adapt, and redistribute the contents of your site by requiring
|
adapt, and redistribute the contents of your site by requiring
|
||||||
|
@ -194,6 +198,8 @@
|
||||||
- icons: "/images/sa.png"
|
- icons: "/images/sa.png"
|
||||||
name_en: "Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)"
|
name_en: "Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)"
|
||||||
name_es: "Creative Commons Atribución-CompartirIgual 4.0 Internacional (CC BY-SA 4.0)"
|
name_es: "Creative Commons Atribución-CompartirIgual 4.0 Internacional (CC BY-SA 4.0)"
|
||||||
|
short_description_en: "This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License."
|
||||||
|
short_description_es: "Esta obra está bajo una Licencia Creative Commons Atribución-CompartirIgual 4.0 Internacional."
|
||||||
url_en: 'https://creativecommons.org/licenses/by-sa/4.0/'
|
url_en: 'https://creativecommons.org/licenses/by-sa/4.0/'
|
||||||
url_es: 'https://creativecommons.org/licenses/by-sa/4.0/deed.es'
|
url_es: 'https://creativecommons.org/licenses/by-sa/4.0/deed.es'
|
||||||
description_en: "This license is the same as the CC-BY 4.0 but it adds
|
description_en: "This license is the same as the CC-BY 4.0 but it adds
|
||||||
|
|
Loading…
Reference in a new issue