enju_manifestation_viewer 0.1.0.pre7 → 0.1.0.pre8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9bf3e340a7deb5f418dfb3363b635b3b49fc86b8
4
- data.tar.gz: 45b9c3d3221095fa2bad2908e670fe19bba5250b
3
+ metadata.gz: 09f49b38e7b8b97d988b547ae17fdc4932f6724c
4
+ data.tar.gz: 8147c39e7ef4ea8efce6518a5dcf6cbe2f517edf
5
5
  SHA512:
6
- metadata.gz: b226010e8df057a15244317a2f9b8865e03fb67dcf876f1ee42fedfbf760c023225d42f0c7e23b016b43b33ff3c3a27b5764b2fbf7a9ca7b3039cd44a1f929cd
7
- data.tar.gz: a3c3d48dd0903a09d6b1249a91a847b007826e7f3cf551352e63d9dc11264cf2d6c9fa5df69774ecca194d847a9a68d9f7f124ef9a3be3d9fd6dfc3fc3ed7037
6
+ metadata.gz: 1a93c364817d4003dd84623bd5c970c083c017ad017f2eb0345bf347a6a44b8218020490115b527c113c202339ab655691885002b737b9b285bce5171888087c
7
+ data.tar.gz: ff91809349184decf61dd35efd27abf3818ddfb3c47da452c4e2d87a0ddb0e5f04638e34c2a5b8b85884a34b4e89ad13f423734576ee808f4e8b1d2e56fd420f
@@ -1,4 +1,4 @@
1
- <% if manifestation.isbn? %>
1
+ <% unless manifestation.identifier_contents(:isbn).empty? %>
2
2
  <div id="gbsthumbnail" class="book_jacket"></div>
3
3
  <% else %>
4
4
  <%= image_tag("unknown_resource.png", :size => "150x150", :alt => "*") %>
@@ -38,6 +38,6 @@
38
38
  });
39
39
  }
40
40
  </script>
41
- <% if @manifestation.try(:isbn?) %>
42
- <script src="https://www.googleapis.com/books/v1/volumes?q=isbn:<%= @manifestation.isbn %>&amp;callback=addTheCover"></script>
41
+ <% if @manifestation.identifier_contents(:isbn).first %>
42
+ <script src="https://www.googleapis.com/books/v1/volumes?q=isbn:<%= @manifestation.identifier_contents(:isbn) %>&amp;callback=addTheCover"></script>
43
43
  <% end %>
@@ -1,3 +1,3 @@
1
1
  module EnjuManifestationViewer
2
- VERSION = "0.1.0.pre7"
2
+ VERSION = "0.1.0.pre8"
3
3
  end
Binary file
@@ -19,18 +19,11 @@ class CreateManifestations < ActiveRecord::Migration
19
19
  t.integer :height
20
20
  t.integer :width
21
21
  t.integer :depth
22
- t.string :isbn
23
- t.string :isbn10
24
- t.string :wrong_isbn
25
- t.string :nbn
26
- t.string :lccn
27
- t.string :oclc_number
28
- t.string :issn
29
22
  t.integer :price # TODO: 通貨単位
30
23
  t.text :fulltext
31
- t.string :volume_number_list
32
- t.string :issue_number_list
33
- t.string :serial_number_list
24
+ t.string :volume_number_string
25
+ t.string :issue_number_string
26
+ t.string :serial_number_string
34
27
  t.integer :edition
35
28
  t.text :note
36
29
  t.boolean :repository_content, :default => false, :null => false
@@ -41,16 +34,12 @@ class CreateManifestations < ActiveRecord::Migration
41
34
  t.integer :frequency_id, :default => 1, :null => false
42
35
  t.boolean :subscription_master, :default => false, :null => false
43
36
  end
44
- add_index :manifestations, :carrier_type_id
45
- add_index :manifestations, :required_role_id
46
- add_index :manifestations, :isbn
47
- add_index :manifestations, :nbn
48
- add_index :manifestations, :lccn
49
- add_index :manifestations, :oclc_number
50
- add_index :manifestations, :issn
37
+ #add_index :manifestations, :carrier_type_id
38
+ #add_index :manifestations, :required_role_id
51
39
  add_index :manifestations, :access_address
52
- add_index :manifestations, :frequency_id
40
+ #add_index :manifestations, :frequency_id
53
41
  add_index :manifestations, :manifestation_identifier
54
42
  add_index :manifestations, :updated_at
43
+ add_index :manifestations, :date_of_publication
55
44
  end
56
45
  end
@@ -0,0 +1,9 @@
1
+ class AddPubDateToManifestation < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :manifestations, :pub_date, :string
4
+ end
5
+
6
+ def self.down
7
+ remove_column :manifestations, :pub_date
8
+ end
9
+ end
@@ -0,0 +1,5 @@
1
+ class AddPeriodicalToManifestation < ActiveRecord::Migration
2
+ def change
3
+ add_column :manifestations, :periodical, :boolean
4
+ end
5
+ end
@@ -0,0 +1,12 @@
1
+ class CreateIdentifierTypes < ActiveRecord::Migration
2
+ def change
3
+ create_table :identifier_types do |t|
4
+ t.string :name
5
+ t.text :display_name
6
+ t.text :note
7
+ t.integer :position
8
+
9
+ t.timestamps
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,14 @@
1
+ class CreateIdentifiers < ActiveRecord::Migration
2
+ def change
3
+ create_table :identifiers do |t|
4
+ t.string :body, :null => false
5
+ t.integer :identifier_type_id, :null => false
6
+ t.integer :manifestation_id
7
+ t.boolean :primary
8
+ t.integer :position
9
+
10
+ t.timestamps
11
+ end
12
+ add_index :identifiers, [:body, :identifier_type_id]
13
+ end
14
+ end
@@ -11,7 +11,28 @@
11
11
  #
12
12
  # It's strongly recommended to check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(:version => 20110916091020) do
14
+ ActiveRecord::Schema.define(:version => 20130506175834) do
15
+
16
+ create_table "identifier_types", :force => true do |t|
17
+ t.string "name"
18
+ t.text "display_name"
19
+ t.text "note"
20
+ t.integer "position"
21
+ t.datetime "created_at", :null => false
22
+ t.datetime "updated_at", :null => false
23
+ end
24
+
25
+ create_table "identifiers", :force => true do |t|
26
+ t.string "body", :null => false
27
+ t.integer "identifier_type_id", :null => false
28
+ t.integer "manifestation_id"
29
+ t.boolean "primary"
30
+ t.integer "position"
31
+ t.datetime "created_at", :null => false
32
+ t.datetime "updated_at", :null => false
33
+ end
34
+
35
+ add_index "identifiers", ["body", "identifier_type_id"], :name => "index_identifiers_on_body_and_identifier_type_id"
15
36
 
16
37
  create_table "manifestations", :force => true do |t|
17
38
  t.text "original_title", :null => false
@@ -33,13 +54,6 @@ ActiveRecord::Schema.define(:version => 20110916091020) do
33
54
  t.integer "height"
34
55
  t.integer "width"
35
56
  t.integer "depth"
36
- t.string "isbn"
37
- t.string "isbn10"
38
- t.string "wrong_isbn"
39
- t.string "nbn"
40
- t.string "lccn"
41
- t.string "oclc_number"
42
- t.string "issn"
43
57
  t.integer "price"
44
58
  t.text "fulltext"
45
59
  t.string "volume_number_string"
@@ -57,18 +71,13 @@ ActiveRecord::Schema.define(:version => 20110916091020) do
57
71
  t.integer "volume_number"
58
72
  t.integer "issue_number"
59
73
  t.integer "serial_number"
74
+ t.string "pub_date"
75
+ t.boolean "periodical"
60
76
  end
61
77
 
62
78
  add_index "manifestations", ["access_address"], :name => "index_manifestations_on_access_address"
63
- add_index "manifestations", ["carrier_type_id"], :name => "index_manifestations_on_carrier_type_id"
64
- add_index "manifestations", ["frequency_id"], :name => "index_manifestations_on_frequency_id"
65
- add_index "manifestations", ["isbn"], :name => "index_manifestations_on_isbn"
66
- add_index "manifestations", ["issn"], :name => "index_manifestations_on_issn"
67
- add_index "manifestations", ["lccn"], :name => "index_manifestations_on_lccn"
79
+ add_index "manifestations", ["date_of_publication"], :name => "index_manifestations_on_date_of_publication"
68
80
  add_index "manifestations", ["manifestation_identifier"], :name => "index_manifestations_on_manifestation_identifier"
69
- add_index "manifestations", ["nbn"], :name => "index_manifestations_on_nbn"
70
- add_index "manifestations", ["oclc_number"], :name => "index_manifestations_on_oclc_number"
71
- add_index "manifestations", ["required_role_id"], :name => "index_manifestations_on_required_role_id"
72
81
  add_index "manifestations", ["updated_at"], :name => "index_manifestations_on_updated_at"
73
82
 
74
83
  end
Binary file
@@ -0,0 +1,29 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2
+
3
+ one:
4
+ name: isbn
5
+ display_name: ISBN
6
+ note:
7
+ position: 1
8
+ id: 1
9
+
10
+ two:
11
+ name: issn
12
+ display_name: ISSN
13
+ note:
14
+ position: 2
15
+ id: 2
16
+
17
+ # == Schema Information
18
+ #
19
+ # Table name: identifier_types
20
+ #
21
+ # id :integer not null, primary key
22
+ # name :string(255)
23
+ # display_name :text
24
+ # note :text
25
+ # position :integer
26
+ # created_at :datetime not null
27
+ # updated_at :datetime not null
28
+ #
29
+
@@ -0,0 +1,113 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2
+
3
+ one:
4
+ body: 12345678
5
+ manifestation_id: 1
6
+ identifier_type_id: 1
7
+ primary: false
8
+
9
+ two:
10
+ body: 99999999
11
+ manifestation_id: 2
12
+ identifier_type_id: 2
13
+ primary: false
14
+
15
+ identifier_00001:
16
+ manifestation_id: 1
17
+ identifier_type_id: 1
18
+ body: "4798002062"
19
+
20
+ identifier_00002:
21
+ manifestation_id: 2
22
+ identifier_type_id: 1
23
+ body: "4915724824"
24
+
25
+ identifier_00003:
26
+ manifestation_id: 3
27
+ identifier_type_id: 1
28
+ body: "4897063590"
29
+
30
+ identifier_00004:
31
+ manifestation_id: 4
32
+ identifier_type_id: 1
33
+ body: 0471412791
34
+
35
+ identifier_00005:
36
+ manifestation_id: 7
37
+ identifier_type_id: 1
38
+ body: 0470844701
39
+
40
+ identifier_00006:
41
+ manifestation_id: 8
42
+ identifier_type_id: 1
43
+ body: "4798101028"
44
+
45
+ identifier_00007:
46
+ manifestation_id: 9
47
+ identifier_type_id: 1
48
+ body: "4641143331"
49
+
50
+ identifier_00008:
51
+ manifestation_id: 10
52
+ identifier_type_id: 1
53
+ body: "9784774127804"
54
+
55
+ identifier_00009:
56
+ manifestation_id: 21
57
+ identifier_type_id: 1
58
+ body: "4822281167"
59
+
60
+ identifier_00114:
61
+ manifestation_id: 114
62
+ identifier_type_id: 1
63
+ body: "9784756137470"
64
+
65
+ identifier_00116:
66
+ manifestation_id: 116
67
+ identifier_type_id: 1
68
+ body: "9784756100917"
69
+
70
+ identifier_00120:
71
+ manifestation_id: 120
72
+ identifier_type_id: 1
73
+ body: "9784274063855"
74
+
75
+ identifier_00192:
76
+ manifestation_id: 192
77
+ identifier_type_id: 1
78
+ body: "9784873113241"
79
+
80
+ identifier_00193_1:
81
+ manifestation_id: 193
82
+ identifier_type_id: 1
83
+ body: "9784797340044"
84
+
85
+ identifier_00193_2:
86
+ manifestation_id: 193
87
+ identifier_type_id: 1
88
+ body: "4797340045"
89
+
90
+ identifier_00196:
91
+ manifestation_id: 196
92
+ identifier_type_id: 1
93
+ body: "9784797336610"
94
+
95
+ identifier_00201:
96
+ manifestation_id: 201
97
+ identifier_type_id: 2
98
+ body: "09130000"
99
+
100
+ # == Schema Information
101
+ #
102
+ # Table name: identifiers
103
+ #
104
+ # id :integer not null, primary key
105
+ # body :string(255) not null
106
+ # identifier_type_id :integer not null
107
+ # manifestation_id :integer
108
+ # primary :boolean
109
+ # position :integer
110
+ # created_at :datetime not null
111
+ # updated_at :datetime not null
112
+ #
113
+