From 0b7531ffa8f1e5871ff255ad798b06856f9dd984 Mon Sep 17 00:00:00 2001 From: f Date: Fri, 19 Jul 2019 21:33:10 -0300 Subject: [PATCH] elegir licencia --- app/views/sites/_form.haml | 21 +++++++++++++++++++++ config/locales/en.yml | 7 +++++++ config/locales/es.yml | 7 +++++++ db/seeds/licencias.yml | 6 +++--- public/images/by.png | Bin 0 -> 1377 bytes public/images/ppl.png | Bin 0 -> 1933 bytes public/images/sa.png | Bin 0 -> 1704 bytes test/factories/licencia.rb | 2 +- 8 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 public/images/by.png create mode 100644 public/images/ppl.png create mode 100644 public/images/sa.png 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 0000000000000000000000000000000000000000..5ddc7400294d15080396b1b34e43c9a3079bf620 GIT binary patch literal 1377 zcmV-n1)lneP)cL{CFqybw9`tVJ@hc9{+&paIYfSP5bOURgz~p1t z7;HA*Vk<|fVy9TncypvOMA<=^f)9*Arn8v6v}Xe>;q7KXpJRq9Of>fE)LgSiJ6-RV3>cZz*blQiUDl7iS!@gi*(JBXj z#Ugn3t(MV-e77Z#u6-`}+KgjR{VT zrD|9|sJ%!v;_MWw%;YJB>Dy?6)2N{9(@*=)^f33zGwKVa)uhV=r%Q1i(k+a-0limz zxQwc{S_kv2vQjsKj)*X6;`SPlpsS`Ft9aZ~j-!(#*T_QO5#21^ww^A!Sl*~kKJ@aY9Sz!8Nw<#PLs?-RF(A0D+o z3{AaAAjisQ#(2IDa6_&pIj4x zY%#W7V zRT03+7Bz=}c6&=;uyI}$H66eut+*`$INLVtM4$-J1^H=$e`1+^`Yhu&jN_!G0&0 zI7PBH$-!oD{n!iD2PW$;!-$bJl6`ob^|ja0WS7 z)b(T91kMgITuzv9cF4MY+9@Z^@EQYlV%)aIv zBg}5q`@VOKUGNCMcZkx)r_4HapZ3bMwwLu?27*~iR|BGTb3LQYU`p*>&H_vEpE1l7 zuH$}QR{-&_h52$aX~M7Lc{s2noG_m|FiJVRp3`Je!X~95ws9h^|GxMG+PtOy)v13Q>VN96|@&@Sq26 j_y&7XfkI@%qc5ZYQ-jK8yTspcqa{f9rX4}@>Sp01g$8A^1&acT9yYSkPt zCOv9stx;m!r(b%tmMGQD2~&RG)V`KOh6)=l-i{8=|n{f@c$t}DGci}t=JYi>a znR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YXO00000NkvXXu0mjfQ`&-r literal 0 HcmV?d00001 diff --git a/public/images/sa.png b/public/images/sa.png new file mode 100644 index 0000000000000000000000000000000000000000..bb23f8c624d9e064a8c62168f7f7f55e380c3ba3 GIT binary patch literal 1704 zcmV;Z23PrsP)j6nvqMLnTX3~ ztj(t72TG=^VN218WYbJ7L=;UFKVCqt{$TW;^PF>@=XpQuK7Tzg*SXKn=i|Qba~}c! zEEcJlgB2*mUK~d?>QRL<>_!1TL>4BX6aFWA91Bs3CeU`=Ln+?FAcWjMkil4szZ@{E zqY@i1GWaNc@U`O|F^`=X7(A3%e1-Wb2_t`&m7L=%N)Vp47Wo%ivj+^3`LdRX;-H6Th>u;9`0oZdzpZ4V2nR7lW<3M z7RiM?!X~=03g$9S{~o>V8%hY4sBYSDHf!jc-C_(X$EdJ9Hj!ybAm~*MwvujWpK>H*VLDKoE=Oj zoRcR^Wj%vwxeSqk>X2Z9X^TTL%&QE(t+3vq3#MWuOBN2{9hXa7X9cU+;8H!!3ba-S z6Nws8)QuM%+#cq~oX$jc`EO1X2k~A0#Cx{$>X|6xG@y@)vs9FX^H*D!+d14OGj-&0 z-nN;2m3`zH+pI8MaZ40zv2k{p$u9DDS8lLLCKYTWs+%xa##t}A8fgRb3u9fE6sf#x z^fOD=?h|49$>mk4(McJjeX4Or8lzSWu*5vEAHSZ8K%6~AFIKjK6~(PjEDmdUyyn($X* z#Cc9rjOFo`MYTkO6U7@^kL9v1rx~Zj`%|yJtCLc3A+XzfnQU;a1G0x9`zbTN)9O-0%^u*Gn-FLP za)Kd~T)xb2ikjoVCGX`T8}}lRGYpxg;H=c@7KxfmK)v@e-*$l(AU81NI||Nxtu9~G z)VsbrEkN#IEDwPoxWM`DRJ(k4yg=??$T2RXxP*Pe)tBXu4ODOnoxiMoF5-@V7Ny|q z(&|Qtnype)jt?5l6;0UGZXA>m9j2Tv(I{f=M0mVYO9_ICh>LVa0y?~#G2-Pgns9Co83iS zE!t>zp_2_b4NUN3(-*=W27k+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