diff --git a/app/views/sites/_form.haml b/app/views/sites/_form.haml index 927cd2e..db9808c 100644 --- a/app/views/sites/_form.haml +++ b/app/views/sites/_form.haml @@ -25,5 +25,26 @@ - if design.license = link_to t('.design.license'), design.license, target: '_blank', class: 'btn btn-info' + .form-group + %h2= t('.licencia.title') + %p.lead= t('.help.licencia') + - Licencia.all.each do |licencia| + .row + .col + %h3 + = f.radio_button :licencia_id, licencia.id, + checked: licencia.id == site.licencia_id + = f.label "licencia_id_#{licencia.id}" do + = image_tag licencia.icons, alt: licencia.name + = licencia.name + = sanitize_markdown licencia.description, + tags: %w[p a strong em ul ol li h1 h2 h3 h4 h5 h6] + + .btn-group{ role: 'group', 'aria-label': t('.licencia.actions') } + = link_to t('.licencia.url'), licencia.url, + target: '_blank', class: 'btn btn-info' + + %hr/ + .form-group = f.submit submit, class: 'btn btn-success' diff --git a/config/locales/en.yml b/config/locales/en.yml index cdb5a45..f081e82 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -162,11 +162,18 @@ en: help: name: "Your site's name. It can only contain numbers and letters." design: 'Select the design for your site. You can change it later. We add more designs from time to time.' + licencia: 'Everything we publish has automatic copyright. This + means nobody can use our works without explicit permission. By + using licenses, we stablish conditions by which we want to share + them.' design: title: 'Design' actions: 'Information about this design' url: 'Preview' licencia: 'Read the license' + licencia: + title: 'License for the site and everything in it' + url: 'Read the license' fetch: title: 'Upgrade the site' help: diff --git a/config/locales/es.yml b/config/locales/es.yml index 5cf84bd..fd5a8c2 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -167,11 +167,18 @@ es: help: name: 'El nombre de tu sitio. Solo puede contener letras y números.' design: 'Elegí el diseño que va a tener tu sitio aquí. Podés cambiarlo luego. De tanto en tanto vamos sumando diseños nuevos.' + licencia: 'Todo lo que publicamos posee automáticamente derechos + de autore. Esto significa que nadie puede hacer uso de nuestras + obras sin permiso explícito. Con las licencias establecemos + condiciones bajo las que queremos compartir.' design: title: 'Diseño' actions: 'Información sobre este diseño' url: 'Vista previa' licencia: 'Leer la licencia' + licencia: + title: 'Licencia del sitio y todo lo que se publique' + url: 'Leer la licencia' fetch: title: 'Actualizar el sitio' help: diff --git a/db/seeds/licencias.yml b/db/seeds/licencias.yml index 6995ab0..7e04067 100644 --- a/db/seeds/licencias.yml +++ b/db/seeds/licencias.yml @@ -1,7 +1,7 @@ --- - name_en: 'Peer Production License' name_es: 'Licencia de Producción de Pares' - icons: "/public/ppl.png" + icons: "/images/ppl.png" url_en: 'https://wiki.p2pfoundation.net/Peer_Production_License' url_es: 'https://endefensadelsl.org/ppl_es.html' description_en: 'The Peer Production License is a license that allows use for any purpose under the same terms, except for commercial purposes, which are only allowed for collectives, cooperatives and other worker-owned "enterprises". We recommend this license if you are inclined towards non-profit terms, since it allows the development of more ethical economies while fending off capitalistic for-profit uses. If you want to know more about it, we invite you to read [The Telekommunist Manifesto](http://networkcultures.org/blog/publication/no-03-the-telekommunist-manifesto-dmytri-kleiner/)' @@ -100,7 +100,7 @@ claro los términos de la licencia de esta obra. La mejor forma de hacerlo es enlazar a esta página. -- icons: "/public/by.png" +- icons: "/images/by.png" name_en: 'Attribution 4.0 International (CC BY 4.0)' description_en: "This license gives everyone the freedom to use, adapt, and redistribute the contents of your site by requiring @@ -190,7 +190,7 @@ necesita para el uso que tenga previsto. Por ejemplo, otros derechos como publicidad, privacidad, o derechos morales pueden limitar la forma en que utilice el material. -- icons: "/public/bysa.png" +- icons: "/images/sa.png" name_en: "Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)" name_es: "Atribución-CompartirIgual 4.0 Internacional (CC BY-SA 4.0)" url_en: 'https://creativecommons.org/licenses/by-sa/4.0/' diff --git a/public/images/by.png b/public/images/by.png new file mode 100644 index 0000000..5ddc740 Binary files /dev/null and b/public/images/by.png differ diff --git a/public/images/ppl.png b/public/images/ppl.png new file mode 100644 index 0000000..d2e949c Binary files /dev/null and b/public/images/ppl.png differ diff --git a/public/images/sa.png b/public/images/sa.png new file mode 100644 index 0000000..bb23f8c Binary files /dev/null and b/public/images/sa.png differ diff --git a/test/factories/licencia.rb b/test/factories/licencia.rb index e221e61..67434bb 100644 --- a/test/factories/licencia.rb +++ b/test/factories/licencia.rb @@ -6,6 +6,6 @@ FactoryBot.define do description { SecureRandom.hex } url { SecureRandom.hex } deed { SecureRandom.hex } - icons { SecureRandom.hex } + icons { '/images/by.png' } end end