enju_subject 0.1.0.pre25 → 0.1.0.pre26

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/classifications_controller.rb +11 -12
  3. data/app/controllers/subjects_controller.rb +17 -18
  4. data/app/models/classification_type.rb +1 -1
  5. data/app/models/subject.rb +1 -1
  6. data/app/models/subject_heading_type.rb +1 -1
  7. data/app/models/subject_type.rb +2 -2
  8. data/app/views/classification_types/_form.html.erb +3 -3
  9. data/app/views/classification_types/edit.html.erb +1 -1
  10. data/app/views/classification_types/index.html.erb +3 -3
  11. data/app/views/classification_types/new.html.erb +1 -1
  12. data/app/views/classification_types/show.html.erb +1 -1
  13. data/app/views/classifications/_form.html.erb +1 -1
  14. data/app/views/classifications/edit.html.erb +1 -1
  15. data/app/views/classifications/index.html.erb +6 -6
  16. data/app/views/classifications/new.html.erb +1 -1
  17. data/app/views/classifications/show.html.erb +1 -1
  18. data/app/views/manifestations/_classification_detail.html.erb +1 -1
  19. data/app/views/manifestations/_subject_detail.html.erb +1 -1
  20. data/app/views/manifestations/_subject_facet.html.erb +3 -3
  21. data/app/views/manifestations/_subject_form.html.erb +2 -2
  22. data/app/views/subject_heading_types/edit.html.erb +1 -1
  23. data/app/views/subject_heading_types/index.html.erb +3 -3
  24. data/app/views/subject_heading_types/new.html.erb +1 -1
  25. data/app/views/subject_heading_types/show.html.erb +1 -1
  26. data/app/views/subject_types/edit.html.erb +1 -1
  27. data/app/views/subject_types/index.html.erb +3 -3
  28. data/app/views/subject_types/new.html.erb +1 -1
  29. data/app/views/subject_types/show.html.erb +1 -1
  30. data/app/views/subjects/edit.html.erb +1 -1
  31. data/app/views/subjects/index.atom.builder +2 -2
  32. data/app/views/subjects/index.html.erb +5 -5
  33. data/app/views/subjects/index.rss.builder +5 -5
  34. data/app/views/subjects/new.html.erb +1 -1
  35. data/app/views/subjects/show.html.erb +2 -2
  36. data/lib/enju_subject/version.rb +1 -1
  37. data/spec/dummy/app/models/user.rb +5 -40
  38. data/spec/dummy/db/development.sqlite3 +0 -0
  39. data/spec/dummy/db/migrate/001_create_agents.rb +0 -3
  40. data/spec/dummy/db/migrate/{20111201155513_add_devise_to_users.rb → 002_devise_create_users.rb} +10 -13
  41. data/spec/dummy/db/migrate/005_create_manifestations.rb +7 -19
  42. data/spec/dummy/db/migrate/006_create_items.rb +0 -3
  43. data/spec/dummy/db/migrate/041_create_roles.rb +13 -0
  44. data/spec/dummy/db/migrate/080_create_library_groups.rb +0 -1
  45. data/spec/dummy/db/migrate/20081028083142_create_agent_import_files.rb +0 -2
  46. data/spec/dummy/db/migrate/20081028083208_create_resource_import_files.rb +1 -3
  47. data/spec/dummy/db/migrate/20100129142347_create_import_requests.rb +0 -1
  48. data/spec/dummy/db/migrate/20100314190054_add_opening_hour_to_library.rb +9 -0
  49. data/spec/dummy/db/migrate/{20111201163718_create_user_has_roles.rb → 20100606065209_create_user_has_roles.rb} +2 -0
  50. data/spec/dummy/db/migrate/20100925074559_create_agent_import_results.rb +0 -1
  51. data/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +11 -0
  52. data/spec/dummy/db/migrate/20121116031206_add_fulltext_content_to_manifestation.rb +5 -0
  53. data/spec/dummy/db/migrate/20121116033446_add_doi_to_manifestation.rb +6 -0
  54. data/spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb +1 -11
  55. data/spec/dummy/db/migrate/20130412083556_add_latitude_and_longitude_to_library.rb +6 -0
  56. data/spec/dummy/db/migrate/20130429020822_add_root_manifestation_id_to_series_statement.rb +6 -0
  57. data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +18 -0
  58. data/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb +11 -0
  59. data/spec/dummy/db/migrate/20140122054321_create_profiles.rb +20 -0
  60. data/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb +14 -0
  61. data/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb +14 -0
  62. data/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb +14 -0
  63. data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +14 -0
  64. data/spec/dummy/db/migrate/20140610123439_drop_email_unique_constraint_enju_leaf_rc10.rb +11 -0
  65. data/spec/dummy/db/migrate/20140614065404_create_resource_export_files.rb +11 -0
  66. data/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb +14 -0
  67. data/spec/dummy/db/migrate/20140628072217_add_user_encoding_to_user_import_file.rb +5 -0
  68. data/spec/dummy/db/migrate/20140628073524_add_user_encoding_to_agent_import_file.rb +5 -0
  69. data/spec/dummy/db/migrate/20140628073535_add_user_encoding_to_resource_import_file.rb +5 -0
  70. data/spec/dummy/db/migrate/20140709113413_create_user_export_files.rb +11 -0
  71. data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +14 -0
  72. data/spec/dummy/db/migrate/20140720140916_add_binding_item_identifier_to_item.rb +8 -0
  73. data/spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +5 -0
  74. data/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +5 -0
  75. data/spec/dummy/db/migrate/20140721151416_add_default_shelf_id_to_resource_import_file.rb +5 -0
  76. data/spec/dummy/db/migrate/20140802082007_add_manifestation_id_to_item.rb +6 -0
  77. data/spec/dummy/db/migrate/20140811031145_add_expired_at_to_profile.rb +5 -0
  78. data/spec/dummy/db/migrate/20140813182425_add_publication_place_to_manifestation.rb +5 -0
  79. data/spec/dummy/db/schema.rb +180 -73
  80. data/spec/dummy/db/test.sqlite3 +0 -0
  81. data/spec/dummy/solr/default/data/index/segments.gen +0 -0
  82. data/spec/dummy/solr/default/data/index/segments_ya +0 -0
  83. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001223 +0 -0
  84. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001224 +0 -0
  85. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001225 +0 -0
  86. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001226 +0 -0
  87. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001227 +0 -0
  88. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001228 +0 -0
  89. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001229 +0 -0
  90. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001230 +0 -0
  91. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001231 +0 -0
  92. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001232 +0 -0
  93. data/spec/factories/profile.rb +9 -0
  94. data/spec/factories/user.rb +21 -9
  95. data/spec/fixtures/agents.yml +0 -6
  96. data/spec/fixtures/library_groups.yml +0 -2
  97. data/spec/fixtures/profiles.yml +98 -0
  98. data/spec/fixtures/users.yml +3 -21
  99. data/spec/models/subject_spec.rb +1 -1
  100. data/spec/spec_helper.rb +5 -0
  101. metadata +124 -53
  102. data/app/models/subject_sweeper.rb +0 -20
  103. data/spec/dummy/db/migrate/20110425133109_add_issn_to_series_statement.rb +0 -9
  104. data/spec/dummy/db/migrate/20110618091240_add_periodical_to_series_statement.rb +0 -9
  105. data/spec/dummy/db/migrate/20110627122938_add_number_of_day_to_notify_overdue_to_user_group.rb +0 -13
  106. data/spec/dummy/db/migrate/20110820131417_create_series_has_manifestations.rb +0 -13
  107. data/spec/dummy/db/migrate/20110916053430_rename_manifestation_number_list_to_number_string.rb +0 -13
  108. data/spec/dummy/db/migrate/20111009183423_add_ndc_to_manifestation.rb +0 -9
  109. data/spec/dummy/db/migrate/20111201121844_create_roles.rb +0 -12
  110. data/spec/dummy/db/migrate/20111201155456_create_users.rb +0 -8
  111. data/spec/dummy/db/migrate/20120415060308_rename_resource_import_file_imported_at_to_executed_at.rb +0 -9
  112. data/spec/dummy/solr/default/data/index/segments_v9 +0 -0
  113. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001114 +0 -0
  114. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001115 +0 -0
  115. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001116 +0 -0
  116. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001117 +0 -0
  117. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001118 +0 -0
  118. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001119 +0 -0
  119. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001120 +0 -0
  120. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001121 +0 -0
  121. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001122 +0 -0
  122. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001123 +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 58fa31fc46e6086be90f44cd2c0bdfc8879e1c86
4
- data.tar.gz: fd2aae3d6bf163b0ad4e955aba991ef1c215a3c5
3
+ metadata.gz: eb377ab73e1f078b5899f949f29b6bca3805a0b2
4
+ data.tar.gz: 219048b79e584acf30c2cf9112b804bb6f7368be
5
5
  SHA512:
6
- metadata.gz: a6be2c158c82d531e1a8606155d86cd79483ca5b0055c3f809f978af10b7ed90c8ce2ae21c19c754389992d6287c895b99047b649b453b4f1f9a1ac627d7e34b
7
- data.tar.gz: 898e1dcd59613aa9cc8aa211c2222cff7d99ebf07671a6b5d2dfbb73e4e113eb67f6abb73c5b4f1e1968311a36f58f18ecc74387925ad3b4c8523aa12b72459b
6
+ metadata.gz: 99de1b3f98bd62786fa6df67b0436aa55065de8211a05a3d393fa1b9bd4e34b7ee9b76b1018d6961d9d46c13613cea90779c0ed4fc29f6e43b8bd472b45d0e00
7
+ data.tar.gz: ccd8eca7c18f65ad8783564d309ebfe464eaca5964f919c11125791aed8675502c7fa6c65dca62ec0ad6a977c4adc6e84ac51fe72f73f677053108bfce727305
@@ -2,8 +2,7 @@
2
2
  class ClassificationsController < ApplicationController
3
3
  load_and_authorize_resource
4
4
  before_filter :get_subject, :get_classification_type
5
- after_filter :solr_commit, :only => [:create, :update, :destroy]
6
- cache_sweeper :subject_sweeper, :only => [:create, :update, :destroy]
5
+ after_filter :solr_commit, only: [:create, :update, :destroy]
7
6
 
8
7
  # GET /classifications
9
8
  # GET /classifications.json
@@ -34,7 +33,7 @@ class ClassificationsController < ApplicationController
34
33
 
35
34
  respond_to do |format|
36
35
  format.html # index.html.erb
37
- format.json { render :json => @classifications }
36
+ format.json { render json: @classifications }
38
37
  end
39
38
  end
40
39
 
@@ -43,7 +42,7 @@ class ClassificationsController < ApplicationController
43
42
  def show
44
43
  respond_to do |format|
45
44
  format.html # show.html.erb
46
- format.json { render :json => @classification }
45
+ format.json { render json: @classification }
47
46
  end
48
47
  end
49
48
 
@@ -56,7 +55,7 @@ class ClassificationsController < ApplicationController
56
55
 
57
56
  respond_to do |format|
58
57
  format.html # new.html.erb
59
- format.json { render :json => @classification }
58
+ format.json { render json: @classification }
60
59
  end
61
60
  end
62
61
 
@@ -72,12 +71,12 @@ class ClassificationsController < ApplicationController
72
71
 
73
72
  respond_to do |format|
74
73
  if @classification.save
75
- format.html { redirect_to @classification, :notice => t('controller.successfully_created', :model => t('activerecord.models.classification')) }
76
- format.json { render :json => @classification, :status => :created, :location => @classification }
74
+ format.html { redirect_to @classification, notice: t('controller.successfully_created', model: t('activerecord.models.classification')) }
75
+ format.json { render json: @classification, status: :created, location: @classification }
77
76
  else
78
77
  @classification_types = ClassificationType.all
79
- format.html { render :action => "new" }
80
- format.json { render :json => @classification.errors, :status => :unprocessable_entity }
78
+ format.html { render action: "new" }
79
+ format.json { render json: @classification.errors, status: :unprocessable_entity }
81
80
  end
82
81
  end
83
82
  end
@@ -87,12 +86,12 @@ class ClassificationsController < ApplicationController
87
86
  def update
88
87
  respond_to do |format|
89
88
  if @classification.update_attributes(params[:classification])
90
- format.html { redirect_to @classification, :notice => t('controller.successfully_updated', :model => t('activerecord.models.classification')) }
89
+ format.html { redirect_to @classification, notice: t('controller.successfully_updated', model: t('activerecord.models.classification')) }
91
90
  format.json { head :no_content }
92
91
  else
93
92
  @classification_types = ClassificationType.all
94
- format.html { render :action => "edit" }
95
- format.json { render :json => @classification.errors, :status => :unprocessable_entity }
93
+ format.html { render action: "edit" }
94
+ format.json { render json: @classification.errors, status: :unprocessable_entity }
96
95
  end
97
96
  end
98
97
  end
@@ -1,15 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  class SubjectsController < ApplicationController
3
- load_and_authorize_resource :except => :index
4
- authorize_resource :only => :index
5
- before_filter :prepare_options, :only => [:new, :edit]
6
- after_filter :solr_commit, :only => [:create, :update, :destroy]
7
- cache_sweeper :subject_sweeper, :only => [:create, :update, :destroy]
3
+ load_and_authorize_resource except: :index
4
+ authorize_resource only: :index
5
+ before_filter :prepare_options, only: [:new, :edit]
6
+ after_filter :solr_commit, only: [:create, :update, :destroy]
8
7
 
9
8
  # GET /subjects
10
9
  # GET /subjects.json
11
10
  def index
12
- sort = {:sort_by => 'created_at', :order => 'desc'}
11
+ sort = {sort_by: 'created_at', order: 'desc'}
13
12
  case params[:sort_by]
14
13
  when 'name'
15
14
  sort[:sort_by] = 'term'
@@ -41,11 +40,11 @@ class SubjectsController < ApplicationController
41
40
  session[:params] = {} unless session[:params]
42
41
  session[:params][:subject] = params
43
42
 
44
- flash[:page_info] = {:page => page, :query => query}
43
+ flash[:page_info] = {page: page, query: query}
45
44
 
46
45
  respond_to do |format|
47
46
  format.html # index.html.erb
48
- format.json { render :json => @subjects }
47
+ format.json { render json: @subjects }
49
48
  format.rss
50
49
  format.atom
51
50
  end
@@ -55,7 +54,7 @@ class SubjectsController < ApplicationController
55
54
  # GET /subjects/1.json
56
55
  def show
57
56
  if params[:term]
58
- subject = Subject.where(:term => params[:term]).first
57
+ subject = Subject.where(term: params[:term]).first
59
58
  redirected_to subject
60
59
  return
61
60
  end
@@ -70,7 +69,7 @@ class SubjectsController < ApplicationController
70
69
 
71
70
  respond_to do |format|
72
71
  format.html # show.html.erb
73
- format.json { render :json => @subject }
72
+ format.json { render json: @subject }
74
73
  end
75
74
  end
76
75
 
@@ -80,7 +79,7 @@ class SubjectsController < ApplicationController
80
79
 
81
80
  respond_to do |format|
82
81
  format.html # new.html.erb
83
- format.json { render :json => @subject }
82
+ format.json { render json: @subject }
84
83
  end
85
84
  end
86
85
 
@@ -95,12 +94,12 @@ class SubjectsController < ApplicationController
95
94
 
96
95
  respond_to do |format|
97
96
  if @subject.save
98
- format.html { redirect_to @subject, :notice => t('controller.successfully_created', :model => t('activerecord.models.subject')) }
99
- format.json { render :json => @subject, :status => :created, :location => @subject }
97
+ format.html { redirect_to @subject, notice: t('controller.successfully_created', model: t('activerecord.models.subject')) }
98
+ format.json { render json: @subject, status: :created, location: @subject }
100
99
  else
101
100
  prepare_options
102
- format.html { render :action => "new" }
103
- format.json { render :json => @subject.errors, :status => :unprocessable_entity }
101
+ format.html { render action: "new" }
102
+ format.json { render json: @subject.errors, status: :unprocessable_entity }
104
103
  end
105
104
  end
106
105
  end
@@ -110,12 +109,12 @@ class SubjectsController < ApplicationController
110
109
  def update
111
110
  respond_to do |format|
112
111
  if @subject.update_attributes(params[:subject])
113
- format.html { redirect_to @subject, :notice => t('controller.successfully_updated', :model => t('activerecord.models.subject')) }
112
+ format.html { redirect_to @subject, notice: t('controller.successfully_updated', model: t('activerecord.models.subject')) }
114
113
  format.json { head :no_content }
115
114
  else
116
115
  prepare_options
117
- format.html { render :action => "edit" }
118
- format.json { render :json => @subject.errors, :status => :unprocessable_entity }
116
+ format.html { render action: "edit" }
117
+ format.json { render json: @subject.errors, status: :unprocessable_entity }
119
118
  end
120
119
  end
121
120
  end
@@ -1,7 +1,7 @@
1
1
  class ClassificationType < ActiveRecord::Base
2
2
  attr_accessible :name, :display_name, :note
3
3
  include MasterModel
4
- default_scope :order => 'position'
4
+ default_scope order: 'classification_types.position'
5
5
  has_many :classifications
6
6
  validates :name, :format => {:with => /\A[0-9a-z][0-9a-z_\-]*[0-9a-z]\Z/}
7
7
  end
@@ -5,7 +5,7 @@ class Subject < ActiveRecord::Base
5
5
  belongs_to :manifestation
6
6
  belongs_to :subject_type
7
7
  belongs_to :subject_heading_type
8
- belongs_to :required_role, :class_name => 'Role', :foreign_key => 'required_role_id'
8
+ belongs_to :required_role, class_name: 'Role', foreign_key: 'required_role_id'
9
9
 
10
10
  validates_associated :subject_type, :subject_heading_type
11
11
  validates_presence_of :term, :subject_type_id, :subject_heading_type_id
@@ -2,7 +2,7 @@ class SubjectHeadingType < ActiveRecord::Base
2
2
  attr_accessible :name, :display_name, :note
3
3
  include MasterModel
4
4
  has_many :subjects
5
- validates :name, :format => {:with => /\A[0-9a-z][0-9a-z_\-]*[0-9a-z]\Z/}
5
+ validates :name, format: {with: /\A[0-9a-z][0-9a-z_\-]*[0-9a-z]\Z/}
6
6
  end
7
7
 
8
8
  # == Schema Information
@@ -1,9 +1,9 @@
1
1
  class SubjectType < ActiveRecord::Base
2
2
  attr_accessible :name, :display_name, :note
3
3
  include MasterModel
4
- default_scope :order => "position"
4
+ default_scope order: "position"
5
5
  has_many :subjects
6
- validates :name, :format => {:with => /\A[0-9A-Za-z][0-9a-z_\-]*[0-9a-z]\Z/}
6
+ validates :name, format: {with: /\A[0-9A-Za-z][0-9a-z_\-]*[0-9a-z]\Z/}
7
7
  end
8
8
 
9
9
  # == Schema Information
@@ -3,15 +3,15 @@
3
3
 
4
4
  <div class="field">
5
5
  <%= f.label :name %><br />
6
- <%= f.text_field :name, :class => 'short_name' %>
6
+ <%= f.text_field :name, class: 'short_name' %>
7
7
  </div>
8
8
  <div class="field">
9
9
  <%= f.label :display_name %><br />
10
- <%= f.text_area :display_name, :class => 'resource_textarea' %>
10
+ <%= f.text_area :display_name, class: 'resource_textarea' %>
11
11
  </div>
12
12
  <div class="field">
13
13
  <%= f.label :note %><br />
14
- <%= f.text_area :note, :class => 'resource_textarea' %>
14
+ <%= f.text_area :note, class: 'resource_textarea' %>
15
15
  </div>
16
16
  <div class="actions">
17
17
  <%= f.submit %>
@@ -1,5 +1,5 @@
1
1
  <div id="content_detail" class="ui-corner-all ui-widget-content">
2
- <h1 class="title"><%= t('page.editing', :model => t('activerecord.models.classification_type')) -%></h1>
2
+ <h1 class="title"><%= t('page.editing', model: t('activerecord.models.classification_type')) -%></h1>
3
3
  <div id="content_list">
4
4
  <%= render 'form' %>
5
5
  </div>
@@ -1,5 +1,5 @@
1
1
  <div id="content_detail" class="ui-corner-all ui-widget-content">
2
- <h1 class="title"><%= t('page.listing', :model => t('activerecord.models.classification_type')) -%></h1>
2
+ <h1 class="title"><%= t('page.listing', model: t('activerecord.models.classification_type')) -%></h1>
3
3
  <div id="content_list">
4
4
 
5
5
  <table class="table table-striped index">
@@ -26,7 +26,7 @@
26
26
  <%= link_to t('page.edit'), edit_classification_type_path(classification_type) -%>
27
27
  <% end %>
28
28
  <%- if can? :delete, classification_type -%>
29
- <%= link_to t('page.destroy'), classification_type, :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
29
+ <%= link_to t('page.destroy'), classification_type, data: {confirm: t('page.are_you_sure')}, method: :delete -%>
30
30
  <%- end -%>
31
31
  </td>
32
32
  </tr>
@@ -39,7 +39,7 @@
39
39
  <div id="submenu" class="ui-corner-all ui-widget-content">
40
40
  <ul>
41
41
  <%- if can? :create, ClassificationType -%>
42
- <li><%= link_to t('page.new', :model => t('activerecord.models.classification_type')), new_classification_type_path -%></li>
42
+ <li><%= link_to t('page.new', model: t('activerecord.models.classification_type')), new_classification_type_path -%></li>
43
43
  <%- end -%>
44
44
  </ul>
45
45
  </div>
@@ -1,5 +1,5 @@
1
1
  <div id="content_detail" class="ui-corner-all ui-widget-content">
2
- <h1 class="title"><%= t('page.new', :model => t('activerecord.models.classification_type')) -%></h1>
2
+ <h1 class="title"><%= t('page.new', model: t('activerecord.models.classification_type')) -%></h1>
3
3
  <div id="content_list">
4
4
  <%= render 'form' %>
5
5
  </div>
@@ -1,5 +1,5 @@
1
1
  <div id="content_detail" class="ui-corner-all ui-widget-content">
2
- <h1 class="title"><%= t('page.showing', :model => t('activerecord.models.classification_type')) -%></h1>
2
+ <h1 class="title"><%= t('page.showing', model: t('activerecord.models.classification_type')) -%></h1>
3
3
  <div id="content_list">
4
4
  <p id="notice"><%= notice %></p>
5
5
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  <div class="field">
10
10
  <%= f.label :note -%><br />
11
- <%= f.text_area :note, :class => 'resource_textarea' -%>
11
+ <%= f.text_area :note, class: 'resource_textarea' -%>
12
12
  </div>
13
13
 
14
14
  <div class="field">
@@ -1,5 +1,5 @@
1
1
  <div id="content_detail" class="ui-corner-all ui-widget-content">
2
- <h1 class="title"><%= t('page.editing', :model => t('activerecord.models.classification')) -%></h1>
2
+ <h1 class="title"><%= t('page.editing', model: t('activerecord.models.classification')) -%></h1>
3
3
  <div id="content_list">
4
4
  <%= render 'form' %>
5
5
  </div>
@@ -1,11 +1,11 @@
1
1
  <div id="content_detail" class="ui-corner-all ui-widget-content">
2
- <h1 class="title"><%= t('page.listing', :model => t('activerecord.models.classification')) -%></h1>
2
+ <h1 class="title"><%= t('page.listing', model: t('activerecord.models.classification')) -%></h1>
3
3
  <div id="content_list">
4
4
 
5
5
  <div class="search_form">
6
- <%= form_for :classifications, :url => classifications_path, :html => {:method => 'get'} do -%>
6
+ <%= form_for :classifications, url: classifications_path, html: {method: 'get'} do -%>
7
7
  <p>
8
- <%= t('page.search_term') -%>: <%= search_field_tag 'query', h(@query), {:id => 'search_form_top', :class => 'search_form', :placeholder => t('page.search_term')} -%>
8
+ <%= t('page.search_term') -%>: <%= search_field_tag 'query', h(@query), {id: 'search_form_top', class: 'search_form', placeholder: t('page.search_term')} -%>
9
9
  <%= submit_tag t('page.search') -%>
10
10
  </p>
11
11
  <%- end -%>
@@ -27,7 +27,7 @@
27
27
  <td>
28
28
  <%- if can? :delete, classification -%>
29
29
  <%= link_to t('page.edit'), edit_classification_path(classification) -%>
30
- <%= link_to t('page.destroy'), classification, :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
30
+ <%= link_to t('page.destroy'), classification, data: {confirm: t('page.are_you_sure')}, method: :delete -%>
31
31
  <%- end -%>
32
32
  </td>
33
33
  </tr>
@@ -43,9 +43,9 @@
43
43
  <ul>
44
44
  <%- if can? :create, Classification -%>
45
45
  <%- if @classification_type -%>
46
- <li><%= link_to t('page.new', :model => t('activerecord.models.classification')), new_classification_type_classification_path(@classification_type) -%></li>
46
+ <li><%= link_to t('page.new', model: t('activerecord.models.classification')), new_classification_type_classification_path(@classification_type) -%></li>
47
47
  <%- else -%>
48
- <li><%= link_to t('page.new', :model => t('activerecord.models.classification')), new_classification_path -%></li>
48
+ <li><%= link_to t('page.new', model: t('activerecord.models.classification')), new_classification_path -%></li>
49
49
  <%- end -%>
50
50
  <%- end -%>
51
51
  </ul>
@@ -1,5 +1,5 @@
1
1
  <div id="content_detail" class="ui-corner-all ui-widget-content">
2
- <h1 class="title"><%= t('page.new', :model => t('activerecord.models.classification')) -%></h1>
2
+ <h1 class="title"><%= t('page.new', model: t('activerecord.models.classification')) -%></h1>
3
3
  <div id="content_list">
4
4
  <%= render 'form' %>
5
5
  </div>
@@ -1,5 +1,5 @@
1
1
  <div id="content_detail" class="ui-corner-all ui-widget-content">
2
- <h1 class="title"><%= t('page.showing', :model => t('activerecord.models.classification')) -%></h1>
2
+ <h1 class="title"><%= t('page.showing', model: t('activerecord.models.classification')) -%></h1>
3
3
  <div id="content_list">
4
4
  <p id="notice"><%= notice %></p>
5
5
 
@@ -5,7 +5,7 @@
5
5
  <ul>
6
6
  <%- manifestation.classifications.each do |classification| -%>
7
7
  <li>
8
- <%= link_to "#{classification.classification_type.display_name.localize}: #{classification.category}", manifestations_path(:query => "classification_sm:#{classification.category}") -%>
8
+ <%= link_to "#{classification.classification_type.display_name.localize}: #{classification.category}", manifestations_path(query: "classification_sm:#{classification.category}") -%>
9
9
  </li>
10
10
  <%- end -%>
11
11
  </ul>
@@ -5,7 +5,7 @@
5
5
  <ul>
6
6
  <%- manifestation.subjects.each do |subject| -%>
7
7
  <li>
8
- <%= link_to "#{subject.subject_heading_type.display_name.localize}: #{subject.term}", manifestations_path(:query => "subject_sm:\"#{subject.term}\"") -%>
8
+ <%= link_to "#{subject.subject_heading_type.display_name.localize}: #{subject.term}", manifestations_path(query: "subject_sm:\"#{subject.term}\"") -%>
9
9
  </li>
10
10
  <%- end -%>
11
11
  </ul>
@@ -2,15 +2,15 @@
2
2
  <%- unless @subject_facet.blank? -%>
3
3
  <ul>
4
4
  <%- @subject_facet[0..19].each do |facet| -%>
5
- <%- subject = Subject.where(:id => facet.value).first -%>
5
+ <%- subject = Subject.where(id: facet.value).first -%>
6
6
  <%- if subject -%>
7
7
  <li>
8
- <%= link_to "#{subject.term} (#{facet.count})", url_for(params.merge(:page => nil, :subject => "\"#{subject.term}\"", :view => nil, :only_path => true)) -%>
8
+ <%= link_to "#{subject.term} (#{facet.count})", url_for(params.merge(page: nil, subject: "\"#{subject.term}\"", view: nil, only_path: true)) -%>
9
9
  </li>
10
10
  <%- end -%>
11
11
  <%- end -%>
12
12
  <%- if @subject_by_term -%>
13
- <li><%= link_to t('page.remove_this_facet'), url_for(params.merge(:subject => nil, :page => nil, :view => nil, :only_path => true)) -%></li>
13
+ <li><%= link_to t('page.remove_this_facet'), url_for(params.merge(subject: nil, page: nil, view: nil, only_path: true)) -%></li>
14
14
  <%- end -%>
15
15
  </ul>
16
16
  <%- else -%>
@@ -4,7 +4,7 @@
4
4
  <%= subject_form.select(:subject_heading_type_id, @subject_heading_types.collect{|s| [s.display_name.localize, s.id]}) %>
5
5
  <%= subject_form.text_field :term %>
6
6
  <%= subject_form.select(:subject_type_id, @subject_types.collect{|s| [s.display_name.localize, s.id]}) %>
7
- <%= subject_form.link_to_remove t('page.remove'), :confirm => t('page.are_you_sure') %>
7
+ <%= subject_form.link_to_remove t('page.remove'), confirm: t('page.are_you_sure') %>
8
8
  <% end %>
9
9
  <p><%= f.link_to_add t('page.add'), :subjects %></p>
10
10
  </div>
@@ -14,7 +14,7 @@
14
14
  <%= f.fields_for :classifications do |classification_form| %>
15
15
  <%= classification_form.select(:classification_type_id, @classification_types.collect{|c| [c.display_name.localize, c.id]}) %>
16
16
  <%= classification_form.text_field :category %>
17
- <%= classification_form.link_to_remove t('page.remove'), :confirm => t('page.are_you_sure') %>
17
+ <%= classification_form.link_to_remove t('page.remove'), confirm: t('page.are_you_sure') %>
18
18
  <% end %>
19
19
  <p><%= f.link_to_add t('page.add'), :classifications %></p>
20
20
  </div>
@@ -1,5 +1,5 @@
1
1
  <div id="content_detail" class="ui-corner-all ui-widget-content">
2
- <h1 class="title"><%= t('page.editing', :model => t('activerecord.models.subject_heading_type')) -%></h1>
2
+ <h1 class="title"><%= t('page.editing', model: t('activerecord.models.subject_heading_type')) -%></h1>
3
3
  <div id="content_list">
4
4
  <%= render 'form' %>
5
5
  </div>
@@ -1,5 +1,5 @@
1
1
  <div id="content_detail" class="ui-corner-all ui-widget-content">
2
- <h1 class="title"><%= t('page.listing', :model => t('activerecord.models.subject_heading_type')) -%></h1>
2
+ <h1 class="title"><%= t('page.listing', model: t('activerecord.models.subject_heading_type')) -%></h1>
3
3
  <div id="content_list">
4
4
 
5
5
  <table class="table table-striped index">
@@ -26,7 +26,7 @@
26
26
  <%= link_to t('page.edit'), edit_subject_heading_type_path(subject_heading_type) -%>
27
27
  <% end %>
28
28
  <%- if can? :delete, subject_heading_type -%>
29
- <%= link_to t('page.destroy'), subject_heading_type, :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
29
+ <%= link_to t('page.destroy'), subject_heading_type, data: {confirm: t('page.are_you_sure')}, method: :delete -%>
30
30
  <%- end -%>
31
31
  </td>
32
32
  </tr>
@@ -38,6 +38,6 @@
38
38
 
39
39
  <div id="submenu" class="ui-corner-all ui-widget-content">
40
40
  <ul>
41
- <li><%= link_to t('page.new', :model => t('activerecord.models.subject_heading_type')), new_subject_heading_type_path -%></li>
41
+ <li><%= link_to t('page.new', model: t('activerecord.models.subject_heading_type')), new_subject_heading_type_path -%></li>
42
42
  </ul>
43
43
  </div>
@@ -1,5 +1,5 @@
1
1
  <div id="content_detail" class="ui-corner-all ui-widget-content">
2
- <h1 class="title"><%= t('page.new', :model => t('activerecord.models.subject_heading_type')) -%></h1>
2
+ <h1 class="title"><%= t('page.new', model: t('activerecord.models.subject_heading_type')) -%></h1>
3
3
  <div id="content_list">
4
4
  <%= render 'form' %>
5
5
  </div>
@@ -1,5 +1,5 @@
1
1
  <div id="content_detail" class="ui-corner-all ui-widget-content">
2
- <h1 class="title"><%= t('page.showing', :model => t('activerecord.models.subject_heading_type')) -%></h1>
2
+ <h1 class="title"><%= t('page.showing', model: t('activerecord.models.subject_heading_type')) -%></h1>
3
3
  <div id="content_list">
4
4
  <p id="notice"><%= notice %></p>
5
5
 
@@ -1,5 +1,5 @@
1
1
  <div id="content_detail" class="ui-corner-all ui-widget-content">
2
- <h1 class="title"><%= t('page.editing', :model => t('activerecord.models.subject_type')) -%></h1>
2
+ <h1 class="title"><%= t('page.editing', model: t('activerecord.models.subject_type')) -%></h1>
3
3
  <div id="content_list">
4
4
  <%= render 'form' %>
5
5
  </div>
@@ -1,5 +1,5 @@
1
1
  <div id="content_detail" class="ui-corner-all ui-widget-content">
2
- <h1 class="title"><%= t('page.listing', :model => t('activerecord.models.subject_type')) -%></h1>
2
+ <h1 class="title"><%= t('page.listing', model: t('activerecord.models.subject_type')) -%></h1>
3
3
  <div id="content_list">
4
4
 
5
5
  <table class="table table-striped index">
@@ -26,7 +26,7 @@
26
26
  <%= link_to t('page.edit'), edit_subject_type_path(subject_type) -%>
27
27
  <% end %>
28
28
  <%- if can? :delete, subject_type -%>
29
- <%= link_to t('page.destroy'), subject_type, :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
29
+ <%= link_to t('page.destroy'), subject_type, data: {confirm: t('page.are_you_sure')}, method: :delete -%>
30
30
  <%- end -%>
31
31
  </td>
32
32
  </tr>
@@ -39,7 +39,7 @@
39
39
  <div id="submenu" class="ui-corner-all ui-widget-content">
40
40
  <ul>
41
41
  <% if can? :create, SubjectType %>
42
- <li><%= link_to t('page.new', :model => t('activerecord.models.subject_type')), new_subject_type_path -%></li>
42
+ <li><%= link_to t('page.new', model: t('activerecord.models.subject_type')), new_subject_type_path -%></li>
43
43
  <% end %>
44
44
  </ul>
45
45
  </div>
@@ -1,5 +1,5 @@
1
1
  <div id="content_detail" class="ui-corner-all ui-widget-content">
2
- <h1 class="title"><%= t('page.new', :model => t('activerecord.models.subject_type')) -%></h1>
2
+ <h1 class="title"><%= t('page.new', model: t('activerecord.models.subject_type')) -%></h1>
3
3
  <div id="content_list">
4
4
  <%= render 'form' %>
5
5
  </div>
@@ -1,5 +1,5 @@
1
1
  <div id="content_detail" class="ui-corner-all ui-widget-content">
2
- <h1 class="title"><%= t('page.showing', :model => t('activerecord.models.subject_type')) -%></h1>
2
+ <h1 class="title"><%= t('page.showing', model: t('activerecord.models.subject_type')) -%></h1>
3
3
  <div id="content_list">
4
4
  <p id="notice"><%= notice %></p>
5
5
 
@@ -1,5 +1,5 @@
1
1
  <div id="content_detail" class="ui-corner-all ui-widget-content">
2
- <h1 class="title"><%= t('page.editing', :model => t('activerecord.models.subject')) -%></h1>
2
+ <h1 class="title"><%= t('page.editing', model: t('activerecord.models.subject')) -%></h1>
3
3
  <div id="content_list">
4
4
  <%= render 'form' %>
5
5
  </div>
@@ -1,5 +1,5 @@
1
- atom_feed(:url => subjects_url(:format => :atom)) do |feed|
2
- feed.title t('page.listing', :model => t('activerecord.models.subject')) + " (#{@library_group.display_name.localize})"
1
+ atom_feed(url: subjects_url(format: :atom)) do |feed|
2
+ feed.title t('page.listing', model: t('activerecord.models.subject')) + " (#{@library_group.display_name.localize})"
3
3
  feed.updated(@subjects.first ? @subjects.first.created_at : Time.zone.now)
4
4
 
5
5
  @subjects.each do |subject|
@@ -1,11 +1,11 @@
1
1
  <div id="content_detail" class="ui-corner-all ui-widget-content">
2
- <h1 class="title"><%= t('page.listing', :model => t('activerecord.models.subject')) -%></h1>
2
+ <h1 class="title"><%= t('page.listing', model: t('activerecord.models.subject')) -%></h1>
3
3
  <div id="content_list">
4
4
 
5
5
  <div class="search_form">
6
- <%= form_for :subjects, :url => subjects_path, :html => {:method => 'get'} do -%>
6
+ <%= form_for :subjects, url: subjects_path, html: {method: 'get'} do -%>
7
7
  <p>
8
- <%= t('page.search_term') -%>: <%= search_field_tag 'query', h(@query), {:id => 'search_form_top', :class => 'search_form', :placeholder => t('page.search_term')} -%>
8
+ <%= t('page.search_term') -%>: <%= search_field_tag 'query', h(@query), {id: 'search_form_top', class: 'search_form', placeholder: t('page.search_term')} -%>
9
9
  <%= submit_tag t('page.search') -%>
10
10
  </p>
11
11
  <%- end -%>
@@ -24,7 +24,7 @@
24
24
  <%= link_to t('page.edit'), edit_subject_path(subject) -%>
25
25
  <%- end -%>
26
26
  <%- if can? :delete, subject -%>
27
- <%= link_to t('page.destroy'), subject, :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
27
+ <%= link_to t('page.destroy'), subject, data: {confirm: t('page.are_you_sure')}, method: :delete -%>
28
28
  <%- end -%>
29
29
  </td>
30
30
  </tr>
@@ -38,7 +38,7 @@
38
38
  <div id="submenu" class="ui-corner-all ui-widget-content">
39
39
  <ul>
40
40
  <%- if can? :create, Subject -%>
41
- <li><%= link_to t('page.new', :model => t('activerecord.models.subject')), new_subject_path -%></li>
41
+ <li><%= link_to t('page.new', model: t('activerecord.models.subject')), new_subject_path -%></li>
42
42
  <%- end -%>
43
43
  </ul>
44
44
  </div>
@@ -3,14 +3,14 @@ xml.rss('version' => "2.0",
3
3
  'xmlns:opensearch' => "http://a9.com/-/spec/opensearch/1.1/",
4
4
  'xmlns:atom' => "http://www.w3.org/2005/Atom"){
5
5
  xml.channel{
6
- xml.title t('page.listing', :model => t('activerecord.models.subject')) + " (#{@library_group.display_name.localize})"
7
- xml.link "#{request.protocol}#{request.host_with_port}#{url_for(params.merge(:format => nil, :only_path => true))}"
6
+ xml.title t('page.listing', model: t('activerecord.models.subject')) + " (#{@library_group.display_name.localize})"
7
+ xml.link "#{request.protocol}#{request.host_with_port}#{url_for(params.merge(format: nil, only_path: true))}"
8
8
  xml.description "Next-L Enju, an open source integrated library system developed by Project Next-L"
9
9
  xml.language @locale.to_s
10
10
  xml.ttl "60"
11
- xml.tag! "atom:link", :rel => 'self', :href => "#{request.protocol}#{request.host_with_port}#{url_for(params.merge(:format => :rss, :only_path => true))}"
12
- xml.tag! "atom:link", :rel => 'alternate', :href => subjects_url
13
- xml.tag! "atom:link", :rel => 'search', :type => 'application/opensearchdescription+xml', :href => page_opensearch_url
11
+ xml.tag! "atom:link", rel: 'self', href: "#{request.protocol}#{request.host_with_port}#{url_for(params.merge(format: :rss, only_path: true))}"
12
+ xml.tag! "atom:link", rel: 'alternate', href: subjects_url
13
+ xml.tag! "atom:link", rel: 'search', type: 'application/opensearchdescription+xml', href: page_opensearch_url
14
14
  unless params[:query].blank?
15
15
  xml.tag! "opensearch:totalResults", @count[:query_result]
16
16
  xml.tag! "opensearch:startIndex", @subjects.offset + 1
@@ -1,5 +1,5 @@
1
1
  <div id="content_detail" class="ui-corner-all ui-widget-content">
2
- <h1 class="title"><%= t('page.new', :model => t('activerecord.models.subject')) -%></h1>
2
+ <h1 class="title"><%= t('page.new', model: t('activerecord.models.subject')) -%></h1>
3
3
  <div id="content_list">
4
4
  <%= render 'form' %>
5
5
  </div>