X-Git-Url: https://git.draconx.ca/gitweb/homepage.git/blobdiff_plain/f4a242c7d6f647387767f2a4b3ac2ce215384bd7..86d0dac7b5713b9d312dd8fea8da80132829d6e6:/layouts/copyright.xml
diff --git a/layouts/copyright.xml b/layouts/copyright.xml
new file mode 100644
index 0000000..a3153bb
--- /dev/null
+++ b/layouts/copyright.xml
@@ -0,0 +1,29 @@
+<%
+s = ' ' * (@indent || 2)
+copyyears = {}
+copyauthors = {}
+[@item.fetch(:copyright, [])].flatten.each do |copyright| %>
+<%=s%><%= copyright %><%
+x = expand_copyright(copyright)
+x[:years].each do |y| copyyears[y] = 1 end
+copyauthors[x[:name]] = 1
+end
+copyyears.keys.sort.each do |y| %>
+<%=s%><%= y %><%
+end
+copyauthors.keys.sort.each do |i| %>
+<%=s%><%= i %><%
+end
+ if @item[:license] then
+ licref = @item[:license].split
+ lic = find_license(licref[0]) %>
+<%=s%>
+<%=s%> <%= File::basename(lic.identifier.without_ext) %>
+<%=s%> <%= license_shortname(lic) %>
+<%=s%> <%= [lic[:title], licref[1..-1]].compact.join(" ").strip %>
+<%=s%> <%= item_uri(lic) %>
+<%=s%> <%=
+ lic[:"modification-allowed"] == true ? "yes" : "no"
+ %>
+<%=s%><%
+end %>