New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Icon large rights statement under download button #464

Merged
merged 1 commit into from Apr 13, 2017
Jump to file or symbol
Failed to load files and symbols.
+89 −0
Diff settings

Always

Just for now

@@ -0,0 +1 @@
<svg id="FINAL" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 104.76 104.76"><defs><style>.cls-1{fill:#414042;}</style></defs><title>InC.Solo.dark</title><path class="cls-1" d="M1125.8,1605.88a52.38,52.38,0,0,0-52.38,52.38v52.38h52.38a52.38,52.38,0,0,0,52.38-52.38v-52.38H1125.8Zm0,95.21a42.81,42.81,0,1,1,42.81-42.81A42.82,42.82,0,0,1,1125.8,1701.09Z" transform="translate(-1073.42 -1605.88)"/><path class="cls-1" d="M1114.22,1670.95a15.3,15.3,0,0,0,11.24,4.64,18.09,18.09,0,0,0,14.77-7.15l7.86,8.09q-9.35,10.53-22,10.53t-20.9-8q-8.21-8-8.21-20.23a27.34,27.34,0,0,1,8.37-20.39,28.19,28.19,0,0,1,20.47-8.17,29,29,0,0,1,22.63,10.29l-7.62,8.64q-5.82-7.23-14.46-7.23a16.85,16.85,0,0,0-11.83,4.52q-4.91,4.52-4.91,12.18T1114.22,1670.95Z" transform="translate(-1073.42 -1605.88)"/></svg>
@@ -0,0 +1 @@
<svg id="FINAL" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 104.76 104.76"><defs><style>.cls-1{fill:#414042;}</style></defs><title>NoC.Solo.dark</title><path class="cls-1" d="M1321.8,1606.1v52.38a52.38,52.38,0,0,1-52.38,52.38H1217v-52.38a52.38,52.38,0,0,1,52.38-52.38h52.38ZM1240.58,1659a27.47,27.47,0,0,1,8.35-20.4,28.25,28.25,0,0,1,20.49-8.14,28.75,28.75,0,0,1,15.31,4.11l10.35-10.35a42.77,42.77,0,0,0-59.89,59.89l9.67-9.67A27.52,27.52,0,0,1,1240.58,1659Zm62.56-26.89-41.73,41.73a15.19,15.19,0,0,0,7.68,2,18.14,18.14,0,0,0,14.8-7.17l7.85,8.1q-9.35,10.5-22.05,10.52a29.77,29.77,0,0,1-16.92-4.75l-9.67,9.67a42.37,42.37,0,0,0,26.34,9.12A42.78,42.78,0,0,0,1303.14,1632.1Zm-49.92,26.72a19.59,19.59,0,0,0,.93,6.32l21.93-21.93a17.11,17.11,0,0,0-6.11-1.06,16.82,16.82,0,0,0-11.83,4.5C1254.87,1649.66,1253.22,1653.73,1253.22,1658.82Z" transform="translate(-1217.04 -1606.1)"/></svg>
@@ -0,0 +1 @@
<svg id="FINAL" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 104.76 104.76"><defs><style>.cls-1{fill:#414042;}</style></defs><title>Other.Solo.dark</title><path class="cls-1" d="M1465.42,1606.12v52.38a52.38,52.38,0,0,1-52.38,52.38h-52.38V1658.5a52.38,52.38,0,0,1,52.38-52.38h52.38Zm-95.19,52.36a42.81,42.81,0,1,0,42.81-42.81A42.82,42.82,0,0,0,1370.23,1658.48Z" transform="translate(-1360.66 -1606.12)"/><path class="cls-1" d="M1430.26,1645.86a10.64,10.64,0,0,1-.81,4.75c-0.51,1-.89,1.74-1.1,2.21a11,11,0,0,1-1.44,2c-0.81.89-1.32,1.48-1.57,1.74-1.27,1.27-2.46,2.46-3.6,3.56a11.53,11.53,0,0,0-2.25,2.71,7.1,7.1,0,0,0-.55,3.22v4.75h-12.09v-5.94a11.17,11.17,0,0,1,.85-4.88,22.46,22.46,0,0,1,3.52-4.41l5.39-5.56a5.4,5.4,0,0,0,1.19-3.65,5.57,5.57,0,0,0-1.27-3.77,4,4,0,0,0-3.31-1.53,4.17,4.17,0,0,0-3.44,1.78,8.71,8.71,0,0,0-1.7,4.75h-12.64c0.59-5.3,2.5-9.46,5.81-12.47a17.49,17.49,0,0,1,12.3-4.54q7.44,0,12.09,4.07C1428.74,1637.37,1430.26,1641.11,1430.26,1645.86Z" transform="translate(-1360.66 -1606.12)"/><path class="cls-1" d="M1418,1676.05a7,7,0,1,0,0,9.88A7,7,0,0,0,1418,1676.05Z" transform="translate(-1360.66 -1606.12)"/></svg>
@@ -7,3 +7,23 @@
@extend h4;
}
}
.large-rights-statement {
margin-top: 15px;
@include clearfix;
.rights-statement-logo {
width: 40px;
float: left;
margin-right: 0.5em;
}
.rights-statement-label {
font-size: 18px;
line-height: 1;
text-transform: uppercase;
font-weight: bold;
line-height: 1
}
}
@@ -11,5 +11,32 @@ class GenericWorkShowPresenter < Sufia::WorkShowPresenter
:inscription, :date_of_work, :engraver, :printer_of_plates,
:additional_title,
to: :solr_document
def rights_icon(identifier = rights.first)
# schema allows multiple rights, we only use one.
# we have added our own metadata to the liceneses.yml that the CC
# class doens't really have accessors for, we'll kinda hack it.
case CurationConcerns::LicenseService.new.authority.find(identifier).fetch("category", nil)
when "in_copyright"
"rightsstatements-InC.Icon-Only.dark.svg"
when "no_copyright"
"rightsstatements-NoC.Icon-Only.dark.svg"
else
"rightsstatements-Other.Icon-Only.dark.svg"
end
end
def rights_url(identifier = rights.first)
# we use resolvable urls already
identifier
end
def rights_icon_label(identifier = rights.first)
# we have added our own metadata to the liceneses.yml that the CC
# class doens't really have accessors for, we'll kinda hack it.
CurationConcerns::LicenseService.new.authority.find(identifier).fetch("short_label_html", "").html_safe
end
end
end
@@ -0,0 +1,6 @@
<div class="large-rights-statement">
<%= link_to presenter.rights_url, class: "rights-statement-link" do %>
<%= image_tag(presenter.rights_icon, class: "rights-statement-logo") %>
<span class="rights-statement-label"><%= presenter.rights_icon_label %></span>
<% end %>
</div>
@@ -22,6 +22,7 @@
<%= render "show_actions", presenter: @presenter %>
<%= t('.last_modified', value: @presenter.date_modified) %>
<%= render 'representative_media', presenter: @presenter %>
<%= render 'large_rights_statement', presenter: @presenter %>
<%= render 'social_media' %>
<%= render 'citations', presenter: @presenter %>
</div>
@@ -2,33 +2,65 @@ terms:
- id: http://rightsstatements.org/vocab/InC/1.0/
term: In Copyright
active: true
category: in_copyright
short_label_html: In<br>Copyright
- id: http://rightsstatements.org/vocab/InC-OW-EU/1.0/
term: In Copyright - EU Orphan Work
active: true
category: in_copyright
short_label_html: EU Orphan<br>Work
- id: http://rightsstatements.org/vocab/InC-EDU/1.0/
term: In Copyright - Educational Use Permitted
active: true
category: in_copyright
short_label_html: Educational<br>Use Permitted
- id: http://rightsstatements.org/vocab/InC-NC/1.0/
term: In Copyright - Non-Commercial Use Permitted
active: true
category: in_copyright
short_label_html: Non-Commercial<br>Use Permitted
- id: http://rightsstatements.org/vocab/InC-RUU/1.0/
term: In Copyright - Rights-holder(s) Unlocatable or Unidentifiable
active: true
category: in_copyright
short_label_html: Unknown<br>Rightsholder
- id: http://rightsstatements.org/vocab/NoC-CR/1.0/
term: No Copyright - Contractual Restrictions
active: true
category: no_copyright
short_label_html: Contractual<br>Restrictions
- id: http://rightsstatements.org/vocab/NoC-NC/1.0/
term: No Copyright - Non-Commercial Use Only
active: true
category: no_copyright
short_label_html: Non-Commercial<br>Use Only
- id: http://rightsstatements.org/vocab/NoC-OKLR/1.0/
term: No Copyright - Other Known Legal Restrictions
active: true
category: no_copyright
short_label_html: Other Legal<br>Restrictions
- id: http://rightsstatements.org/vocab/NoC-US/1.0/
term: No Copyright - United States
active: true
category: no_copyright
short_label_html: In the<br>United States
- id: http://rightsstatements.org/vocab/NKC/1.0/
term: No Known Copyright
active: true
category: other
short_label_html: No Known<br>Copyright
- id: http://creativecommons.org/publicdomain/mark/1.0/
term: Public Domain Mark 1.0
active: true
category: no_copyright
short_label_html: Public<br>Domain
ProTip! Use n and p to navigate between commits in a pull request.