Skip to content
Snippets Groups Projects
Commit db035f24 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

initial draft

parent 5a9c7da9
No related branches found
No related tags found
No related merge requests found
app/assets/images/communication/blocks/templates/license.jpg

25.9 KiB

......@@ -80,14 +80,15 @@ class Communication::Block < ApplicationRecord
posts: 500,
pages: 600,
contact: 57,
programs: 58
programs: 58,
license: 4040
}
CATEGORIES = {
basic: [:chapter, :image, :video, :sound, :datatable],
storytelling: [:key_figures, :features, :gallery, :call_to_action, :testimonials, :timeline],
references: [:pages, :posts, :organization_chart, :partners, :programs],
utilities: [:files, :definitions, :contact, :embed]
utilities: [:files, :definitions, :contact, :license, :embed]
}
scope :published, -> { where(published: true) }
......
class Communication::Block::Component::Hash < Communication::Block::Component::Base
def default_data
{}
end
end
class Communication::Block::Template::License < Communication::Block::Template::Base
has_component :kind, :option, options: [:creative_commons]
has_component :creative_commons, :hash
end
<%= block_component_edit block, :kind %>
<div v-show="data.kind == 'creative_commons'">
<div class="mb-5">
<%= t('admin.communication.blocks.templates.license.creative_commons.about_html') %>
</div>
<div class="row pure__row--small">
<% t('admin.communication.blocks.templates.license.creative_commons.questions').each do |question| %>
<div class="col-lg-6 mb-5">
<p><%= question[:label] %></p>
<% question[:answers].each do |answer| %>
<div class="form-check">
<input class="form-check-input"
type="radio"
name="question-<%= question[:key] %>"
v-model="data.creative_commons.<%= question[:key] %>"
value="<%= answer[:key] %>"
id="question-<%= question[:key] %>-<%= answer[:key] %>">
<label for="question-<%= question[:key] %>-<%= answer[:key] %>">
<%= answer[:label] %>
</label>
</div>
<% end %>
</div>
<% end %>
</div>
</div>
......@@ -470,6 +470,41 @@ fr:
description:
label: Description
placeholder: Entrer la description
license:
description: Une licence juridique de type Creative Commons, avec son explication.
creative_commons:
about_html: Utilisez les licences <a href="https://creativecommons.org" target="_blank" rel="noreferrer">Creative Commons</a> pour partager votre travail. Le sélecteur de licence est basé sur <a href="https://chooser-beta.creativecommons.org"target="_blank" rel="noreferrer">chooser-beta.creativecommons.org.org</a>
questions:
- key: attribution
label: Do you want attribution for your work?
answers:
- key: yes
label: Yes. Anyone using my work must include proper attribution.
- key: no
label: No. Anyone can use my work, even without giving me attribution.
- key: commercial_use
label: Do you want to allow others to use your work commercially?
answers:
- key: yes
label: Yes. Others can use my work, even for commercial purposes.
- key: no
label: No. Others can not use my work for commercial purposes.
- key: derivatives
label: Do you want to allow others to remix, adapt, or build upon your work?
answers:
- key: yes
label: Yes. Others can remix, adapt, or build upon my work.
- key: no
label: No. Others may only use my work in unadapted form.
- key: sharing
label: Do you want to allow others to share adaptations of your work under any terms?
answers:
- key: yes
label: Yes. Others can share adaptations of my work under any terms.
- key: no
label: No. Others must use the same CC license if they adapt my work.
edit:
organization_chart:
description: Une liste de personnes, avec photo, fonction et lien vers la page de la personne.
edit:
......@@ -813,6 +848,7 @@ fr:
gallery: Galerie
image: Image
key_figures: Chiffres-clés
license: Licence
organization_chart: Personnes
pages: Pages
partners: Organisations
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment