enju_resource_merge 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (154) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +3 -0
  3. data/Rakefile +36 -0
  4. data/app/controllers/patron_merge_lists_controller.rb +93 -0
  5. data/app/controllers/patron_merges_controller.rb +89 -0
  6. data/app/controllers/series_statement_merge_lists_controller.rb +93 -0
  7. data/app/controllers/series_statement_merges_controller.rb +94 -0
  8. data/app/models/patron_merge.rb +22 -0
  9. data/app/models/patron_merge_list.rb +31 -0
  10. data/app/models/series_statement_merge.rb +22 -0
  11. data/app/models/series_statement_merge_list.rb +26 -0
  12. data/app/views/patron_merge_lists/_form.html.erb +11 -0
  13. data/app/views/patron_merge_lists/edit.html.erb +13 -0
  14. data/app/views/patron_merge_lists/index.html.erb +33 -0
  15. data/app/views/patron_merge_lists/new.html.erb +12 -0
  16. data/app/views/patron_merge_lists/show.html.erb +31 -0
  17. data/app/views/patron_merges/edit.html.erb +31 -0
  18. data/app/views/patron_merges/index.html.erb +32 -0
  19. data/app/views/patron_merges/new.html.erb +39 -0
  20. data/app/views/patron_merges/show.html.erb +25 -0
  21. data/app/views/series_statement_merge_lists/_form.html.erb +11 -0
  22. data/app/views/series_statement_merge_lists/edit.html.erb +13 -0
  23. data/app/views/series_statement_merge_lists/index.html.erb +33 -0
  24. data/app/views/series_statement_merge_lists/new.html.erb +12 -0
  25. data/app/views/series_statement_merge_lists/show.html.erb +31 -0
  26. data/app/views/series_statement_merges/_form.html.erb +12 -0
  27. data/app/views/series_statement_merges/edit.html.erb +31 -0
  28. data/app/views/series_statement_merges/index.html.erb +32 -0
  29. data/app/views/series_statement_merges/new.html.erb +39 -0
  30. data/app/views/series_statement_merges/show.html.erb +27 -0
  31. data/config/routes.rb +21 -0
  32. data/db/migrate/133_create_patron_merges.rb +15 -0
  33. data/db/migrate/134_create_patron_merge_lists.rb +13 -0
  34. data/db/migrate/20110627034940_create_series_statement_merge_lists.rb +13 -0
  35. data/db/migrate/20110627035057_create_series_statement_merges.rb +16 -0
  36. data/lib/enju_resource_merge.rb +5 -0
  37. data/lib/enju_resource_merge/engine.rb +12 -0
  38. data/lib/enju_resource_merge/version.rb +3 -0
  39. data/lib/tasks/enju_resource_merge_tasks.rake +4 -0
  40. data/spec/controllers/patron_merge_lists_controller_spec.rb +456 -0
  41. data/spec/controllers/patron_merges_controller_spec.rb +437 -0
  42. data/spec/controllers/series_statement_merge_lists_controller_spec.rb +439 -0
  43. data/spec/controllers/series_statement_merges_controller_spec.rb +437 -0
  44. data/spec/dummy/Rakefile +7 -0
  45. data/spec/dummy/app/assets/javascripts/application.js +9 -0
  46. data/spec/dummy/app/assets/stylesheets/application.css +7 -0
  47. data/spec/dummy/app/controllers/application_controller.rb +75 -0
  48. data/spec/dummy/app/helpers/application_helper.rb +13 -0
  49. data/spec/dummy/app/models/ability.rb +22 -0
  50. data/spec/dummy/app/models/create.rb +4 -0
  51. data/spec/dummy/app/models/donate.rb +10 -0
  52. data/spec/dummy/app/models/item.rb +20 -0
  53. data/spec/dummy/app/models/manifestation.rb +416 -0
  54. data/spec/dummy/app/models/own.rb +22 -0
  55. data/spec/dummy/app/models/patron.rb +14 -0
  56. data/spec/dummy/app/models/produce.rb +4 -0
  57. data/spec/dummy/app/models/realize.rb +4 -0
  58. data/spec/dummy/app/models/role.rb +5 -0
  59. data/spec/dummy/app/models/series_has_manifestation.rb +35 -0
  60. data/spec/dummy/app/models/series_statement.rb +88 -0
  61. data/spec/dummy/app/models/user.rb +28 -0
  62. data/spec/dummy/app/models/user_has_role.rb +4 -0
  63. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  64. data/spec/dummy/app/views/page/403.html.erb +9 -0
  65. data/spec/dummy/app/views/page/403.mobile.erb +5 -0
  66. data/spec/dummy/app/views/page/403.xml.erb +4 -0
  67. data/spec/dummy/app/views/page/404.html.erb +9 -0
  68. data/spec/dummy/app/views/page/404.mobile.erb +5 -0
  69. data/spec/dummy/app/views/page/404.xml.erb +4 -0
  70. data/spec/dummy/config.ru +4 -0
  71. data/spec/dummy/config/application.rb +46 -0
  72. data/spec/dummy/config/boot.rb +10 -0
  73. data/spec/dummy/config/database.yml +25 -0
  74. data/spec/dummy/config/environment.rb +5 -0
  75. data/spec/dummy/config/environments/development.rb +30 -0
  76. data/spec/dummy/config/environments/production.rb +60 -0
  77. data/spec/dummy/config/environments/test.rb +39 -0
  78. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  79. data/spec/dummy/config/initializers/devise.rb +209 -0
  80. data/spec/dummy/config/initializers/inflections.rb +10 -0
  81. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  82. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  83. data/spec/dummy/config/initializers/session_store.rb +8 -0
  84. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  85. data/spec/dummy/config/locales/en.yml +5 -0
  86. data/spec/dummy/config/routes.rb +60 -0
  87. data/spec/dummy/db/development.sqlite3 +0 -0
  88. data/spec/dummy/db/migrate/001_create_patrons.rb +62 -0
  89. data/spec/dummy/db/migrate/005_create_manifestations.rb +68 -0
  90. data/spec/dummy/db/migrate/006_create_items.rb +36 -0
  91. data/spec/dummy/db/migrate/125_create_donates.rb +16 -0
  92. data/spec/dummy/db/migrate/20091214131723_create_series_statements.rb +17 -0
  93. data/spec/dummy/db/migrate/20100223121519_rename_sereis_statement_title_to_original_title.rb +13 -0
  94. data/spec/dummy/db/migrate/20100321235924_add_series_statement_identifier_to_series_statement.rb +10 -0
  95. data/spec/dummy/db/migrate/20110425133109_add_issn_to_series_statement.rb +9 -0
  96. data/spec/dummy/db/migrate/20110618091240_add_periodical_to_series_statement.rb +9 -0
  97. data/spec/dummy/db/migrate/20110820131417_create_series_has_manifestations.rb +17 -0
  98. data/spec/dummy/db/migrate/20110916103953_add_manifestaiton_id_to_series_statement.rb +10 -0
  99. data/spec/dummy/db/migrate/20110918162329_add_note_to_series_statement.rb +9 -0
  100. data/spec/dummy/db/migrate/20111201115527_create_creates.rb +10 -0
  101. data/spec/dummy/db/migrate/20111201115540_create_produces.rb +10 -0
  102. data/spec/dummy/db/migrate/20111201121844_create_roles.rb +12 -0
  103. data/spec/dummy/db/migrate/20111201155456_create_users.rb +13 -0
  104. data/spec/dummy/db/migrate/20111201155513_add_devise_to_users.rb +31 -0
  105. data/spec/dummy/db/migrate/20111201163718_create_user_has_roles.rb +10 -0
  106. data/spec/dummy/db/migrate/20120106093356_create_realizes.rb +10 -0
  107. data/spec/dummy/db/migrate/20120106093603_create_owns.rb +10 -0
  108. data/spec/dummy/db/schema.rb +300 -0
  109. data/spec/dummy/db/test.sqlite3 +0 -0
  110. data/spec/dummy/lib/url_validator.rb +10 -0
  111. data/spec/dummy/log/development.log +63 -0
  112. data/spec/dummy/log/test.log +67969 -0
  113. data/spec/dummy/public/404.html +26 -0
  114. data/spec/dummy/public/422.html +26 -0
  115. data/spec/dummy/public/500.html +26 -0
  116. data/spec/dummy/public/favicon.ico +0 -0
  117. data/spec/dummy/script/rails +6 -0
  118. data/spec/enju_resource_merge_test.rb +7 -0
  119. data/spec/factories/patron.rb +10 -0
  120. data/spec/factories/patron_merge.rb +6 -0
  121. data/spec/factories/patron_merge_list.rb +5 -0
  122. data/spec/factories/series_statement.rb +5 -0
  123. data/spec/factories/series_statement_merge.rb +6 -0
  124. data/spec/factories/series_statement_merge_list.rb +5 -0
  125. data/spec/factories/user.rb +31 -0
  126. data/spec/fixtures/manifestations.yml +2017 -0
  127. data/spec/fixtures/patron_merge_lists.yml +27 -0
  128. data/spec/fixtures/patron_merges.yml +31 -0
  129. data/spec/fixtures/patrons.yml +338 -0
  130. data/spec/fixtures/roles.yml +21 -0
  131. data/spec/fixtures/series_has_manifestations.yml +35 -0
  132. data/spec/fixtures/series_statement_merge_lists.yml +27 -0
  133. data/spec/fixtures/series_statement_merges.yml +31 -0
  134. data/spec/fixtures/series_statements.yml +35 -0
  135. data/spec/fixtures/user_has_roles.yml +41 -0
  136. data/spec/fixtures/users.yml +69 -0
  137. data/spec/models/patron_merge_list_spec.rb +18 -0
  138. data/spec/models/patron_merge_spec.rb +19 -0
  139. data/spec/models/series_statement_merge_list_spec.rb +21 -0
  140. data/spec/models/series_statement_merge_spec.rb +17 -0
  141. data/spec/requests/series_statement_merge_lists_spec.rb +11 -0
  142. data/spec/requests/series_statement_merges_spec.rb +11 -0
  143. data/spec/spec_helper.rb +33 -0
  144. data/spec/support/controller_macros.rb +48 -0
  145. data/spec/support/devise.rb +4 -0
  146. data/spec/views/series_statement_merge_lists/edit.html.erb_spec.rb +18 -0
  147. data/spec/views/series_statement_merge_lists/index.html.erb_spec.rb +22 -0
  148. data/spec/views/series_statement_merge_lists/new.html.erb_spec.rb +18 -0
  149. data/spec/views/series_statement_merge_lists/show.html.erb_spec.rb +15 -0
  150. data/spec/views/series_statement_merges/edit.html.erb_spec.rb +23 -0
  151. data/spec/views/series_statement_merges/index.html.erb_spec.rb +25 -0
  152. data/spec/views/series_statement_merges/new.html.erb_spec.rb +23 -0
  153. data/spec/views/series_statement_merges/show.html.erb_spec.rb +17 -0
  154. metadata +433 -0
@@ -0,0 +1,31 @@
1
+ class PatronMergeList < ActiveRecord::Base
2
+ has_many :patron_merges, :dependent => :destroy
3
+ has_many :patrons, :through => :patron_merges
4
+ validates_presence_of :title
5
+
6
+ def self.per_page
7
+ 10
8
+ end
9
+
10
+ def merge_patrons(selected_patron)
11
+ self.patrons.each do |patron|
12
+ Create.update_all(['patron_id = ?', selected_patron.id], ['patron_id = ?', patron.id])
13
+ Realize.update_all(['patron_id = ?', selected_patron.id], ['patron_id = ?', patron.id])
14
+ Produce.update_all(['patron_id = ?', selected_patron.id], ['patron_id = ?', patron.id])
15
+ Own.update_all(['patron_id = ?', selected_patron.id], ['patron_id = ?', patron.id])
16
+ Donate.update_all(['patron_id = ?', selected_patron.id], ['patron_id = ?', patron.id])
17
+ patron.destroy unless patron == selected_patron
18
+ end
19
+ end
20
+ end
21
+
22
+ # == Schema Information
23
+ #
24
+ # Table name: patron_merge_lists
25
+ #
26
+ # id :integer not null, primary key
27
+ # title :string(255)
28
+ # created_at :datetime
29
+ # updated_at :datetime
30
+ #
31
+
@@ -0,0 +1,22 @@
1
+ class SeriesStatementMerge < ActiveRecord::Base
2
+ belongs_to :series_statement, :validate => true
3
+ belongs_to :series_statement_merge_list, :validate => true
4
+ validates_presence_of :series_statement, :series_statement_merge_list
5
+ validates_associated :series_statement, :series_statement_merge_list
6
+
7
+ def self.per_page
8
+ 10
9
+ end
10
+ end
11
+
12
+ # == Schema Information
13
+ #
14
+ # Table name: series_statement_merges
15
+ #
16
+ # id :integer not null, primary key
17
+ # series_statement_id :integer not null
18
+ # series_statement_merge_list_id :integer not null
19
+ # created_at :datetime
20
+ # updated_at :datetime
21
+ #
22
+
@@ -0,0 +1,26 @@
1
+ class SeriesStatementMergeList < ActiveRecord::Base
2
+ has_many :series_statement_merges, :dependent => :destroy
3
+ has_many :series_statements, :through => :series_statement_merges
4
+ validates_presence_of :title
5
+
6
+ def self.per_page
7
+ 10
8
+ end
9
+
10
+ def merge_series_statements(selected_series_statement)
11
+ self.series_statements.each do |series_statement|
12
+ series_statement.destroy unless series_statement == selected_series_statement
13
+ end
14
+ end
15
+ end
16
+
17
+ # == Schema Information
18
+ #
19
+ # Table name: series_statement_merge_lists
20
+ #
21
+ # id :integer not null, primary key
22
+ # title :string(255)
23
+ # created_at :datetime
24
+ # updated_at :datetime
25
+ #
26
+
@@ -0,0 +1,11 @@
1
+ <%= form_for(@patron_merge_list) do |f| -%>
2
+ <%= f.error_messages -%>
3
+ <div class="field">
4
+ <%= f.label :title -%><br />
5
+ <%= f.text_field :title -%>
6
+ </div>
7
+
8
+ <div class="actions">
9
+ <%= f.submit %>
10
+ </div>
11
+ <%- end -%>
@@ -0,0 +1,13 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.editing', :model => t('activerecord.models.patron_merge_list')) -%></h1>
3
+ <div id="content_list">
4
+ <%= render 'form' %>
5
+ </div>
6
+ </div>
7
+
8
+ <div id="submenu" class="ui-corner-all">
9
+ <ul>
10
+ <li><%= link_to t('page.show'), @patron_merge_list -%></li>
11
+ <li><%= link_to t('page.back'), patron_merge_lists_path -%></li>
12
+ </ul>
13
+ </div>
@@ -0,0 +1,33 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.listing', :model => t('activerecord.models.patron_merge_list')) -%></h1>
3
+ <div id="content_list">
4
+
5
+ <table class="index">
6
+ <tr>
7
+ <th><%= t('activerecord.attributes.patron_merge_list.title') -%></th>
8
+ <th><%= t('page.created_at') -%></th>
9
+ <th></th>
10
+ </tr>
11
+
12
+ <%- @patron_merge_lists.each do |patron_merge_list| -%>
13
+ <tr class="line<%= cycle("0", "1") -%>">
14
+ <td><%= link_to patron_merge_list.title, patron_merge_list -%></td>
15
+ <td><%= l(patron_merge_list.created_at) -%></td>
16
+ <td>
17
+ <%= link_to t('page.show'), patron_merge_list -%>
18
+ <%= link_to t('page.edit'), edit_patron_merge_list_path(patron_merge_list) -%>
19
+ <%= link_to t('page.destroy'), patron_merge_list, :confirm => t('page.are_you_sure'), :method => :delete -%>
20
+ </td>
21
+ </tr>
22
+ <%- end -%>
23
+ </table>
24
+
25
+ <%= will_paginate(@patron_merge_lists) -%>
26
+ </div>
27
+ </div>
28
+
29
+ <div id="submenu" class="ui-corner-all">
30
+ <ul>
31
+ <li><%= link_to t('page.new', :model => t('activerecord.models.patron_merge_list')), new_patron_merge_list_path -%></li>
32
+ </ul>
33
+ </div>
@@ -0,0 +1,12 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.new', :model => t('activerecord.models.patron_merge_list')) -%></h1>
3
+ <div id="content_list">
4
+ <%= render 'form' %>
5
+ </div>
6
+ </div>
7
+
8
+ <div id="submenu" class="ui-corner-all">
9
+ <ul>
10
+ <li><%= link_to t('page.back'), :back -%></li>
11
+ </ul>
12
+ </div>
@@ -0,0 +1,31 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.showing', :model => t('activerecord.models.patron_merge_list')) -%></h1>
3
+ <div id="content_list">
4
+ <p id="notice"><%= notice %></p>
5
+
6
+ <%= form_for(:patron_merge_list, :url => patron_merge_list_path(@patron_merge_list, :mode => 'merge'), :html => { :method => :put }) do |f| -%>
7
+ <p>
8
+ <strong><%= t('page.title') -%>:</strong>
9
+ <%= @patron_merge_list.title -%>
10
+ </p>
11
+
12
+ <ul>
13
+ <%- @patron_merge_list.patrons.each do |patron| -%>
14
+ <li><%= radio_button_tag 'selected_patron_id', patron.id -%><%= link_to patron.full_name, patron -%></li>
15
+ <%- end -%>
16
+ </ul>
17
+ <%- if @patron_merge_list.patrons.size > 1 -%>
18
+ <%= f.submit t('page.merge'), :confirm => t('page.are_you_sure') -%>
19
+ <%- end -%>
20
+ <%- end -%>
21
+
22
+ </div>
23
+ </div>
24
+
25
+ <div id="submenu" class="ui-corner-all">
26
+ <ul>
27
+ <li><%= link_to t('page.listing', :model => t('activerecord.models.patron')), patron_merge_list_patrons_path(@patron_merge_list) -%></li>
28
+ <li><%= link_to t('page.edit'), edit_patron_merge_list_path(@patron_merge_list) -%></li>
29
+ <li><%= back_to_index(flash[:page_info]) -%></li>
30
+ </ul>
31
+ </div>
@@ -0,0 +1,31 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.editing', :model => t('activerecord.models.patron_merge')) -%></h1>
3
+ <div id="content_list">
4
+
5
+ <%= form_for(@patron_merge) do |f| -%>
6
+ <%= f.error_messages -%>
7
+
8
+ <div class="field">
9
+ <%= f.label t('activerecord.models.patron') -%><br />
10
+ <%= f.text_field :patron_id -%>
11
+ </div>
12
+
13
+ <div class="field">
14
+ <%= f.label t('activerecord.models.patron_merge_list') -%><br />
15
+ <%= f.text_field :patron_merge_list_id -%>
16
+ </div>
17
+
18
+ <div class="actions">
19
+ <%= f.submit %>
20
+ </div>
21
+ <%- end -%>
22
+
23
+ </div>
24
+ </div>
25
+
26
+ <div id="submenu" class="ui-corner-all">
27
+ <ul>
28
+ <li><%= link_to t('page.show'), @patron_merge -%></li>
29
+ <li><%= link_to t('page.back'), patron_merges_path -%></li>
30
+ </ul>
31
+ </div>
@@ -0,0 +1,32 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.listing', :model => t('activerecord.models.patron_merge')) -%></h1>
3
+ <div id="content_list">
4
+
5
+ <table class="index">
6
+ <tr>
7
+ <td><%= t('activerecord.models.patron') -%></td>
8
+ <td><%= t('activerecord.models.patron_merge_list') -%></td>
9
+ </tr>
10
+
11
+ <%- @patron_merges.each do |patron_merge| -%>
12
+ <tr class="line<%= cycle("0", "1") -%>">
13
+ <td><%= link_to patron_merge.patron.full_name, patron_merge.patron -%></td>
14
+ <td><%= link_to patron_merge.patron_merge_list.title, patron_merge.patron_merge_list -%></td>
15
+ <td><%= link_to t('page.show'), patron_merge -%></td>
16
+ <td><%= link_to t('page.edit'), edit_patron_merge_path(patron_merge) -%></td>
17
+ <td><%= link_to t('page.destroy'), patron_merge, :confirm => t('page.are_you_sure'), :method => :delete -%></td>
18
+ </tr>
19
+ <%- end -%>
20
+ </table>
21
+
22
+ <%= will_paginate(@patron_merges) -%>
23
+ </div>
24
+ </div>
25
+
26
+ <div id="submenu" class="ui-corner-all">
27
+ <ul>
28
+ <%- if @patron_merge_list -%>
29
+ <li><%= link_to t('page.add', :model => t('activerecord.models.patron')), patron_merge_list_patrons_path(@patron_merge_list) -%></li>
30
+ <%- end -%>
31
+ </ul>
32
+ </div>
@@ -0,0 +1,39 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.new', :model => t('activerecord.models.patron_merge')) -%></h1>
3
+ <div id="content_list">
4
+
5
+ <%= form_for(@patron_merge) do |f| -%>
6
+ <%= f.error_messages -%>
7
+ <div class="field">
8
+ <%= f.label t('activerecord.models.patron') -%><br />
9
+ <%- if @patron -%>
10
+ <%= link_to @patron.full_name, @patron -%>
11
+ <%= f.hidden_field :patron_id -%>
12
+ <%- else -%>
13
+ <%= f.text_field :patron_id -%>
14
+ <%- end -%>
15
+ </div>
16
+
17
+ <div class="field">
18
+ <%= f.label t('activerecord.models.patron_merge_list') -%><br />
19
+ <%- if @patron_merge_list -%>
20
+ <%= link_to @patron_merge_list.title, patron_merge_list_path(@patron_merge_list) -%>
21
+ <%= f.hidden_field :patron_merge_list_id, :value => @patron_merge_list.id -%>
22
+ <%- else -%>
23
+ <%= f.text_field :patron_merge_list_id, :value => params[:patron_merge_list_id] -%>
24
+ <%- end -%>
25
+ </div>
26
+
27
+ <div class="actions">
28
+ <%= f.submit %>
29
+ </div>
30
+ <%- end -%>
31
+
32
+ </div>
33
+ </div>
34
+
35
+ <div id="submenu" class="ui-corner-all">
36
+ <ul>
37
+ <li><%= link_to t('page.back'), patron_merges_path -%></li>
38
+ </ul>
39
+ </div>
@@ -0,0 +1,25 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.showing', :model => t('activerecord.models.patron_merge')) -%></h1>
3
+ <div id="content_list">
4
+ <p id="notice"><%= notice %></p>
5
+
6
+ <p>
7
+ <strong><%= t('activerecord.models.patron') -%>:</strong>
8
+ <%= link_to @patron_merge.patron.full_name, @patron_merge.patron -%>
9
+ </p>
10
+
11
+ <p>
12
+ <strong><%= t('activerecord.models.patron_merge_list') -%>:</strong>
13
+ <%= link_to @patron_merge.patron_merge_list.title, @patron_merge.patron_merge_list -%>
14
+ </p>
15
+
16
+ </div>
17
+ </div>
18
+
19
+ <div id="submenu" class="ui-corner-all">
20
+ <ul>
21
+ <li><%= link_to t('page.add', :model => t('activerecord.models.patron')), @patron_merge.patron_merge_list -%></li>
22
+ <li><%= link_to t('page.edit'), edit_patron_merge_path(@patron_merge) -%></li>
23
+ <li><%= back_to_index(flash[:page_info]) -%></li>
24
+ </ul>
25
+ </div>
@@ -0,0 +1,11 @@
1
+ <%= form_for(@series_statement_merge_list) do |f| %>
2
+ <%= f.error_messages %>
3
+ <div class="field">
4
+ <%= f.label :title -%><br />
5
+ <%= f.text_field :title -%>
6
+ </div>
7
+
8
+ <div class="actions">
9
+ <%= f.submit %>
10
+ </div>
11
+ <% end %>
@@ -0,0 +1,13 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.editing', :model => t('activerecord.models.series_statement_merge_list')) -%></h1>
3
+ <div id="content_list">
4
+ <%= render 'form' %>
5
+ </div>
6
+ </div>
7
+
8
+ <div id="submenu" class="ui-corner-all">
9
+ <ul>
10
+ <li><%= link_to t('page.show'), @series_statement_merge_list -%></li>
11
+ <li><%= link_to t('page.back'), series_statement_merge_lists_path -%></li>
12
+ </ul>
13
+ </div>
@@ -0,0 +1,33 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.listing', :model => t('activerecord.models.series_statement_merge_list')) -%></h1>
3
+ <div id="content_list">
4
+
5
+ <table class="index">
6
+ <tr>
7
+ <th><%= t('activerecord.attributes.series_statement_merge_list.title') -%></th>
8
+ <th><%= t('page.created_at') -%></th>
9
+ <th></th>
10
+ </tr>
11
+
12
+ <%- @series_statement_merge_lists.each do |series_statement_merge_list| -%>
13
+ <tr class="line<%= cycle("0", "1") -%>">
14
+ <td><%= link_to series_statement_merge_list.title, series_statement_merge_list -%></td>
15
+ <td><%= l(series_statement_merge_list.created_at) -%></td>
16
+ <td>
17
+ <%= link_to t('page.show'), series_statement_merge_list -%>
18
+ <%= link_to t('page.edit'), edit_series_statement_merge_list_path(series_statement_merge_list) -%>
19
+ <%= link_to t('page.destroy'), series_statement_merge_list, :confirm => t('page.are_you_sure'), :method => :delete -%>
20
+ </td>
21
+ </tr>
22
+ <%- end -%>
23
+ </table>
24
+
25
+ <%= will_paginate(@series_statement_merge_lists) -%>
26
+ </div>
27
+ </div>
28
+
29
+ <div id="submenu" class="ui-corner-all">
30
+ <ul>
31
+ <li><%= link_to t('page.new', :model => t('activerecord.models.series_statement_merge_list')), new_series_statement_merge_list_path -%></li>
32
+ </ul>
33
+ </div>
@@ -0,0 +1,12 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.new', :model => t('activerecord.models.series_statement_merge_list')) -%></h1>
3
+ <div id="content_list">
4
+ <%= render 'form' %>
5
+ </div>
6
+ </div>
7
+
8
+ <div id="submenu" class="ui-corner-all">
9
+ <ul>
10
+ <li><%= link_to t('page.back'), :back -%></li>
11
+ </ul>
12
+ </div>
@@ -0,0 +1,31 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.showing', :model => t('activerecord.models.series_statement_merge_list')) -%></h1>
3
+ <div id="content_list">
4
+ <p id="notice"><%= notice %></p>
5
+
6
+ <%= form_for(:series_statement_merge_list, :url => series_statement_merge_list_path(@series_statement_merge_list, :mode => 'merge'), :html => { :method => :put }) do |f| -%>
7
+ <p>
8
+ <strong><%= t('page.title') -%>:</strong>
9
+ <%= @series_statement_merge_list.title -%>
10
+ </p>
11
+
12
+ <ul>
13
+ <%- @series_statement_merge_list.series_statements.each do |series_statement| -%>
14
+ <li><%= radio_button_tag 'selected_series_statement_id', series_statement.id -%><%= link_to series_statement.original_title, series_statement -%></li>
15
+ <%- end -%>
16
+ </ul>
17
+ <%- if @series_statement_merge_list.series_statements.size > 1 -%>
18
+ <%= f.submit t('page.merge'), :confirm => t('page.are_you_sure') -%>
19
+ <%- end -%>
20
+ <%- end -%>
21
+
22
+ </div>
23
+ </div>
24
+
25
+ <div id="submenu" class="ui-corner-all">
26
+ <ul>
27
+ <li><%= link_to t('page.listing', :model => t('activerecord.models.series_statement')), series_statement_merge_list_series_statements_path(@series_statement_merge_list) -%></li>
28
+ <li><%= link_to t('page.edit'), edit_series_statement_merge_list_path(@series_statement_merge_list) -%></li>
29
+ <li><%= back_to_index(flash[:page_info]) -%></li>
30
+ </ul>
31
+ </div>
@@ -0,0 +1,12 @@
1
+ <%= simple_form_for(@series_statement_merge) do |f| %>
2
+ <%= f.error_messages %>
3
+
4
+ <div class="inputs">
5
+ <%= f.input :series_statement_id %>
6
+ <%= f.input :series_statement_list_id %>
7
+ </div>
8
+
9
+ <div class="actions">
10
+ <%= f.button :submit %>
11
+ </div>
12
+ <% end %>