pettanr_pettan_public_v01_licenses 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/pettanr_pettan_public_v01_licenses/attributes_controller.rb +2 -1
- data/app/views/pettanr_pettan_public_v01_licenses/attributes/_confirm.html.erb +23 -19
- data/app/views/pettanr_pettan_public_v01_licenses/attributes/_credit.html.erb +32 -20
- data/app/views/pettanr_pettan_public_v01_licenses/attributes/_form.html.erb +29 -10
- data/app/views/pettanr_pettan_public_v01_licenses/attributes/_note.html.erb +2 -0
- data/app/views/pettanr_pettan_public_v01_licenses/attributes/new.html.erb +1 -0
- data/lib/pettanr_pettan_public_v01_licenses/version.rb +1 -1
- metadata +7 -6
@@ -2,7 +2,7 @@ require_dependency "pettanr_pettan_public_v01_licenses/application_controller"
|
|
2
2
|
|
3
3
|
module PettanrPettanPublicV01Licenses
|
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 PettanrPettanPublicV01Licenses
|
|
25
25
|
@license = License.show @pettan_public_license.license_id
|
26
26
|
@resource_picture = @original_picture.resource_picture || ResourcePicture.new
|
27
27
|
@resource_picture.attributes = @pettan_public_license.resource_picture_attributes @original_picture
|
28
|
+
@resource_picture.overwrite @original_picture
|
28
29
|
respond_to do |format|
|
29
30
|
if @pettan_public_license.valid?
|
30
31
|
format.html { render main_app.new_resource_picture_path }
|
@@ -1,21 +1,25 @@
|
|
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
|
-
|
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>source picture's url</td>
|
22
|
+
<td><%= h @resource_picture.credit_data['sources'] -%></td>
|
23
|
+
</tr>
|
24
|
+
</table>
|
21
25
|
</div>
|
@@ -1,20 +1,32 @@
|
|
1
|
-
<
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
<%=
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
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
|
+
<%= h picture.artist_name %>
|
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['sources'].blank? %>
|
21
|
+
<div class="md5">
|
22
|
+
<%= link_to 'Source', picture.credit_data['sources'] %>
|
23
|
+
</div>
|
24
|
+
<% end %>
|
25
|
+
</td>
|
26
|
+
</tr>
|
27
|
+
<tr>
|
28
|
+
<td colspan="2">
|
29
|
+
<div class="md5">MD5:<%= picture.md5 %></div>
|
30
|
+
</td>
|
31
|
+
</tr>
|
32
|
+
</table>
|
@@ -17,20 +17,39 @@
|
|
17
17
|
</div>
|
18
18
|
<% end %>
|
19
19
|
|
20
|
-
<
|
21
|
-
|
22
|
-
|
23
|
-
<
|
24
|
-
<
|
25
|
-
|
26
|
-
<
|
27
|
-
|
28
|
-
|
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 :pettan_public_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 'pettan_public_license[artist_name]', @pettan_public_license.artist_name -%></td>
|
34
|
+
<td>+</td>
|
35
|
+
</tr>
|
36
|
+
<tr>
|
37
|
+
<td>Caption</td>
|
38
|
+
<td><%= text_field_tag 'pettan_public_license[caption]', @pettan_public_license.caption -%></td>
|
39
|
+
<td></td>
|
40
|
+
</tr>
|
41
|
+
<tr>
|
42
|
+
<td>source picture's url</td>
|
43
|
+
<td><%= text_field_tag 'pettan_public_license[sources]', @pettan_public_license.sources -%></td>
|
44
|
+
<td></td>
|
45
|
+
</tr>
|
46
|
+
</table>
|
47
|
+
|
29
48
|
<%= hidden_field_tag :original_picture_id, @original_picture.id %>
|
30
49
|
<%= hidden_field_tag 'original_picture_license_group[original_picture_id]', @original_picture_license_group.original_picture_id %>
|
31
50
|
<%= hidden_field_tag 'original_picture_license_group[license_group_id]', @original_picture_license_group.license_group_id %>
|
32
51
|
|
33
52
|
<div class="actions">
|
34
|
-
<%= submit_tag %>
|
53
|
+
<%= submit_tag 'Next' %>
|
35
54
|
</div>
|
36
55
|
<% end %>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pettanr_pettan_public_v01_licenses
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
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: &21683556 !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: *21683556
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: sqlite3
|
27
|
-
requirement: &
|
27
|
+
requirement: &21683160 !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: *21683160
|
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_pettan_public_v01_licenses/attributes/_confirm.html.erb
|
56
56
|
- app/views/pettanr_pettan_public_v01_licenses/attributes/_credit.html.erb
|
57
57
|
- app/views/pettanr_pettan_public_v01_licenses/attributes/_form.html.erb
|
58
|
+
- app/views/pettanr_pettan_public_v01_licenses/attributes/_note.html.erb
|
58
59
|
- config/routes.rb
|
59
60
|
- db/migrate/20121008012741_create_pettanr_pettan_public_v01_licenses_attributes.rb
|
60
61
|
- db/PetaPublic_BY.png
|