pettanr_unknown_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.
@@ -2,7 +2,7 @@ require_dependency "pettanr_unknown_v01_licenses/application_controller"
2
2
 
3
3
  module PettanrUnknownV01Licenses
4
4
  class AttributesController < ApplicationController
5
- layout 'test' if Pettanr::TestLayout
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
 
@@ -1,22 +1,21 @@
1
+ <%= render @resource_picture.credit_template, :picture => @resource_picture %>
1
2
  <div>
2
- <% @sp = SystemPicture.find(@resource_picture.credit_data["system_picture_id"]) %>
3
- <%= content_tag(:a,
4
- tag(:img, :src => @sp.url, :alt => h(@license_group.caption.to_s + '[' + @license.caption.to_s + ']')),
5
- :href => @license.url )
6
- %>
7
- </div>
8
- <%= link_to h(@license_group.caption), @license_group.url %>
9
- <%= link_to h(@license.caption), @license.url %>
10
- <% unless @resource_picture.credit_data['source_url'].blank? %>
11
- <div>
12
- <%= link_to 'base', @resource_picture.credit_data['source_url'] %>
13
- </div>
14
- <% end %>
15
- <% unless @resource_picture.credit_data['note'].blank? %>
16
- <div>
17
- <%= link_to 'note', @resource_picture.credit_data['note'] %>
18
- </div>
19
- <% end %>
20
- <div>
21
- MD5:<%= @resource_picture.original_picture.md5 %>
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>source picture's url</td>
14
+ <td><%= h @resource_picture.credit_data['source_url'] -%></td>
15
+ </tr>
16
+ <tr>
17
+ <td>note</td>
18
+ <td><%= h @resource_picture.credit_data['note'] -%></td>
19
+ </tr>
20
+ </table>
22
21
  </div>
@@ -1,21 +1,27 @@
1
- <div>
2
- <%= content_tag(:a,
3
- tag(:img, :src => picture.license.system_picture.url, :alt => h(picture.license.license_group.caption.to_s + '[' + picture.license.caption.to_s + ']')),
4
- :href => picture.license.url )
5
- %>
6
- </div>
7
- <%= link_to h(picture.license.license_group.caption), picture.license.license_group.url %>
8
- <%= link_to h(picture.license.caption), picture.license.url %>
9
- <% unless picture.credit_data['source_url'].blank? %>
10
- <div>
11
- <%= link_to 'base', picture.credit_data['source_url'] %>
12
- </div>
13
- <% end %>
14
- <% unless picture.credit_data['note'].blank? %>
15
- <div>
16
- <%= link_to 'note', picture.credit_data['note'] %>
17
- </div>
18
- <% end %>
19
- <div>
20
- <%= picture.md5 %>
21
- </div>
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.credit_data['source_url'].blank? %>
11
+ <div class="md5">
12
+ <%= link_to 'Source', picture.credit_data['source_url'] %>
13
+ </div>
14
+ <% end %>
15
+ <% unless picture.credit_data['note'].blank? %>
16
+ <div class="md5">
17
+ <%= h picture.credit_data['note'] %>
18
+ </div>
19
+ <% end %>
20
+ </td>
21
+ </tr>
22
+ <tr>
23
+ <td colspan="2">
24
+ <div class="md5">MD5:<%= picture.md5 %></div>
25
+ </td>
26
+ </tr>
27
+ </table>
@@ -17,19 +17,34 @@
17
17
  </div>
18
18
  <% end %>
19
19
 
20
- <div class="field">
21
- <%= collection_select :unknown_license, :license_id, @license_group.licenses.map {|l| [l.caption, l.id] }, :last, :first %>
22
- <%= text_field_tag 'unknown_license[artist_name]', @unknown_license.artist_name %>
23
- <p>source picture's url</p>
24
- <%= text_field_tag 'unknown_license[source_url]', @unknown_license.source_url %>
25
- <p>note</p>
26
- <%= text_field_tag 'unknown_license[note]', @unknown_license.note %>
27
- </div>
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 :unknown_license, :license_id, @license_group.licenses.map {|l| [l.caption, l.id] }, :last, :first -%></td>
29
+ <td>+</td>
30
+ </tr>
31
+ <tr>
32
+ <td>source picture's url</td>
33
+ <td><%= text_field_tag 'unknown_license[source_url]', @unknown_license.source_url -%></td>
34
+ <td></td>
35
+ </tr>
36
+ <tr>
37
+ <td>note</td>
38
+ <td><%= text_field_tag 'unknown_license[note]', @unknown_license.note -%></td>
39
+ <td></td>
40
+ </tr>
41
+ </table>
42
+ <%= hidden_field_tag 'unknown_license[artist_name]', 'unknown' -%>
28
43
  <%= hidden_field_tag :original_picture_id, @original_picture.id %>
29
44
  <%= hidden_field_tag 'original_picture_license_group[original_picture_id]', @original_picture_license_group.original_picture_id %>
30
45
  <%= hidden_field_tag 'original_picture_license_group[license_group_id]', @original_picture_license_group.license_group_id %>
31
46
 
32
47
  <div class="actions">
33
- <%= submit_tag %>
48
+ <%= submit_tag 'Next' %>
34
49
  </div>
35
50
  <% end %>
@@ -0,0 +1,2 @@
1
+ <h1>Select license (and more info)</h1>
2
+ <img src="<%= @original_picture.url -%>">
@@ -1 +1,2 @@
1
+ <%= render 'pettanr_unknown_v01_licenses/attributes/note' %>
1
2
  <%= render 'pettanr_unknown_v01_licenses/attributes/form' %>
@@ -1,3 +1,3 @@
1
1
  module PettanrUnknownV01Licenses
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pettanr_unknown_v01_licenses
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
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-07 00:00:00.000000000 Z
12
+ date: 2012-10-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &19944744 !ruby/object:Gem::Requirement
16
+ requirement: &22932300 !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: *19944744
24
+ version_requirements: *22932300
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: sqlite3
27
- requirement: &19944444 !ruby/object:Gem::Requirement
27
+ requirement: &22931760 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *19944444
35
+ version_requirements: *22931760
36
36
  description: This software is a license plugin for PettanR
37
37
  email:
38
- - yasu@pen-chan.jp
38
+ - yasusiito@gmail.com
39
39
  executables: []
40
40
  extensions: []
41
41
  extra_rdoc_files: []
@@ -53,6 +53,7 @@ files:
53
53
  - app/views/pettanr_unknown_v01_licenses/attributes/_confirm.html.erb
54
54
  - app/views/pettanr_unknown_v01_licenses/attributes/_credit.html.erb
55
55
  - app/views/pettanr_unknown_v01_licenses/attributes/_form.html.erb
56
+ - app/views/pettanr_unknown_v01_licenses/attributes/_note.html.erb
56
57
  - config/routes.rb
57
58
  - db/migrate/20121007054509_create_pettanr_unknown_v01_licenses_attributes.rb
58
59
  - db/pettanr_unknown_v01_license.json