pettanr_creative_commons_v30_licenses 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/pettanr_creative_commons_v30_licenses/attributes_controller.rb +2 -1
- data/app/views/pettanr_creative_commons_v30_licenses/attributes/_confirm.html.erb +31 -24
- data/app/views/pettanr_creative_commons_v30_licenses/attributes/_credit.html.erb +37 -25
- data/app/views/pettanr_creative_commons_v30_licenses/attributes/_form.html.erb +39 -14
- data/app/views/pettanr_creative_commons_v30_licenses/attributes/_note.html.erb +2 -0
- data/app/views/pettanr_creative_commons_v30_licenses/attributes/new.html.erb +1 -0
- data/lib/pettanr_creative_commons_v30_licenses/version.rb +1 -1
- metadata +7 -6
@@ -2,7 +2,7 @@ require_dependency "pettanr_creative_commons_v30_licenses/application_controller
|
|
2
2
|
|
3
3
|
module PettanrCreativeCommonsV30Licenses
|
4
4
|
class AttributesController < ApplicationController
|
5
|
-
layout 'test' if
|
5
|
+
layout 'test' if MagicNumber['test_layout']
|
6
6
|
before_filter :authenticate_user!, :only => [:new, :create]
|
7
7
|
before_filter :authenticate_artist, :only => [:new, :create]
|
8
8
|
|
@@ -25,6 +25,7 @@ module PettanrCreativeCommonsV30Licenses
|
|
25
25
|
@license = License.show @creative_commons_license.license_id
|
26
26
|
@resource_picture = @original_picture.resource_picture || ResourcePicture.new
|
27
27
|
@resource_picture.attributes = @creative_commons_license.resource_picture_attributes @original_picture
|
28
|
+
@resource_picture.overwrite @original_picture
|
28
29
|
respond_to do |format|
|
29
30
|
if @creative_commons_license.valid?
|
30
31
|
format.html { render main_app.new_resource_picture_path }
|
@@ -1,26 +1,33 @@
|
|
1
|
+
<%= render @resource_picture.credit_template, :picture => @resource_picture %>
|
1
2
|
<div>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
<
|
25
|
-
|
3
|
+
<table class="no-border">
|
4
|
+
<tr>
|
5
|
+
<td>License Group</td>
|
6
|
+
<td><%= h @license_group.caption -%></td>
|
7
|
+
</tr>
|
8
|
+
<tr>
|
9
|
+
<td>License</td>
|
10
|
+
<td><%= h @license.caption -%></td>
|
11
|
+
</tr>
|
12
|
+
<tr>
|
13
|
+
<td>Artist Name</td>
|
14
|
+
<td><%= h @resource_picture.artist_name -%></td>
|
15
|
+
</tr>
|
16
|
+
<tr>
|
17
|
+
<td>Caption</td>
|
18
|
+
<td><%= h @resource_picture.credit_data['caption'] -%></td>
|
19
|
+
</tr>
|
20
|
+
<tr>
|
21
|
+
<td>your web site's url</td>
|
22
|
+
<td><%= h @resource_picture.credit_data['artist_url'] -%></td>
|
23
|
+
</tr>
|
24
|
+
<tr>
|
25
|
+
<td>source picture's urls</td>
|
26
|
+
<td><%= h @resource_picture.credit_data['source_url'] -%></td>
|
27
|
+
</tr>
|
28
|
+
<tr>
|
29
|
+
<td>more permission url</td>
|
30
|
+
<td><%= h @resource_picture.credit_data['more_permission_url'] -%></td>
|
31
|
+
</tr>
|
32
|
+
</table>
|
26
33
|
</div>
|
@@ -1,25 +1,37 @@
|
|
1
|
-
<
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
<%=
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
1
|
+
<table class="no-border">
|
2
|
+
<tr>
|
3
|
+
<td width="1px">
|
4
|
+
<%= content_tag(:a,
|
5
|
+
tag(:img, :src => picture.license.system_picture.url, :alt => h(picture.license.license_group.caption.to_s + '[' + picture.license.caption.to_s + ']'), :width => picture.license.system_picture.width, :height => picture.license.system_picture.height),
|
6
|
+
:href => picture.license.url )
|
7
|
+
%>
|
8
|
+
</td>
|
9
|
+
<td>
|
10
|
+
<% unless picture.artist_name.blank? %>
|
11
|
+
<div class="md5">
|
12
|
+
<%= link_to_unless picture.credit_data['artist_url'].blank?, h(picture.artist_name), picture.credit_data['artist_url'] %>
|
13
|
+
</div>
|
14
|
+
<% end %>
|
15
|
+
<% unless picture.credit_data['caption'].blank? %>
|
16
|
+
<div class="md5">
|
17
|
+
<%= h picture.credit_data['caption'] %>
|
18
|
+
</div>
|
19
|
+
<% end %>
|
20
|
+
<% unless picture.credit_data['source_url'].blank? %>
|
21
|
+
<div class="md5">
|
22
|
+
<%= h picture.credit_data['source_url'] %>
|
23
|
+
</div>
|
24
|
+
<% end %>
|
25
|
+
<% unless picture.credit_data['more_permission_url'].blank? %>
|
26
|
+
<div class="md5">
|
27
|
+
<%= h picture.credit_data['more_permission_url'] %>
|
28
|
+
</div>
|
29
|
+
<% end %>
|
30
|
+
</td>
|
31
|
+
</tr>
|
32
|
+
<tr>
|
33
|
+
<td colspan="2">
|
34
|
+
<div class="md5">MD5:<%= picture.md5 %></div>
|
35
|
+
</td>
|
36
|
+
</tr>
|
37
|
+
</table>
|
@@ -17,24 +17,49 @@
|
|
17
17
|
</div>
|
18
18
|
<% end %>
|
19
19
|
|
20
|
-
<
|
21
|
-
|
22
|
-
|
23
|
-
<
|
24
|
-
<
|
25
|
-
|
26
|
-
<
|
27
|
-
|
28
|
-
<
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
20
|
+
<table class="no-border">
|
21
|
+
<tr>
|
22
|
+
<td>License Group</td>
|
23
|
+
<td><%= h @license_group.caption -%></td>
|
24
|
+
<td>selected</td>
|
25
|
+
</tr>
|
26
|
+
<tr>
|
27
|
+
<td>License</td>
|
28
|
+
<td><%= collection_select :creative_commons_license, :license_id, @license_group.licenses.map {|l| [l.caption, l.id] }, :last, :first -%></td>
|
29
|
+
<td>+</td>
|
30
|
+
</tr>
|
31
|
+
<tr>
|
32
|
+
<td>Artist Name</td>
|
33
|
+
<td><%= text_field_tag 'creative_commons_license[artist_name]', @creative_commons_license.artist_name -%></td>
|
34
|
+
<td>+</td>
|
35
|
+
</tr>
|
36
|
+
<tr>
|
37
|
+
<td>Caption</td>
|
38
|
+
<td><%= text_field_tag 'creative_commons_license[caption]', @creative_commons_license.caption -%></td>
|
39
|
+
<td></td>
|
40
|
+
</tr>
|
41
|
+
<tr>
|
42
|
+
<td>your web site's url</td>
|
43
|
+
<td><%= text_field_tag 'creative_commons_license[artist_url]', @creative_commons_license.artist_url -%></td>
|
44
|
+
<td></td>
|
45
|
+
</tr>
|
46
|
+
<tr>
|
47
|
+
<td>source picture's urls</td>
|
48
|
+
<td><%= text_field_tag 'creative_commons_license[source_url]', @creative_commons_license.source_url -%></td>
|
49
|
+
<td></td>
|
50
|
+
</tr>
|
51
|
+
<tr>
|
52
|
+
<td>more permission url</td>
|
53
|
+
<td><%= text_field_tag 'creative_commons_license[more_permission_url]', @creative_commons_license.more_permission_url -%></td>
|
54
|
+
<td></td>
|
55
|
+
</tr>
|
56
|
+
</table>
|
57
|
+
|
33
58
|
<%= hidden_field_tag :original_picture_id, @original_picture.id %>
|
34
59
|
<%= hidden_field_tag 'original_picture_license_group[original_picture_id]', @original_picture_license_group.original_picture_id %>
|
35
60
|
<%= hidden_field_tag 'original_picture_license_group[license_group_id]', @original_picture_license_group.license_group_id %>
|
36
61
|
|
37
62
|
<div class="actions">
|
38
|
-
<%= submit_tag %>
|
63
|
+
<%= submit_tag 'Next' %>
|
39
64
|
</div>
|
40
65
|
<% end %>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pettanr_creative_commons_v30_licenses
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
|
-
requirement: &
|
16
|
+
requirement: &21438144 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 3.1.1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *21438144
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: sqlite3
|
27
|
-
requirement: &
|
27
|
+
requirement: &21437760 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *21437760
|
36
36
|
description: This software is a license plugin for PettanR
|
37
37
|
email:
|
38
38
|
- yasusiito@gmail.com
|
@@ -55,6 +55,7 @@ files:
|
|
55
55
|
- app/views/pettanr_creative_commons_v30_licenses/attributes/_confirm.html.erb
|
56
56
|
- app/views/pettanr_creative_commons_v30_licenses/attributes/_credit.html.erb
|
57
57
|
- app/views/pettanr_creative_commons_v30_licenses/attributes/_form.html.erb
|
58
|
+
- app/views/pettanr_creative_commons_v30_licenses/attributes/_note.html.erb
|
58
59
|
- config/routes.rb
|
59
60
|
- db/by-nc-nd.png
|
60
61
|
- db/by-nc-sa.png
|