enju_leaf 1.1.0.rc7 → 1.1.0.rc8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/README.rdoc +7 -4
  3. data/app/assets/javascripts/jquery.mobile-1.4.2.js +15056 -0
  4. data/app/assets/javascripts/mobile.js +1 -1
  5. data/app/assets/javascripts/profiles.js +2 -0
  6. data/app/assets/stylesheets/enju.css +1 -1
  7. data/app/assets/stylesheets/jquery.mobile-1.4.2.css +4698 -0
  8. data/app/assets/stylesheets/mobile.css +1 -1
  9. data/app/assets/stylesheets/normalize.css +406 -0
  10. data/app/assets/stylesheets/profiles.css +4 -0
  11. data/app/controllers/user_import_files_controller.rb +93 -0
  12. data/app/controllers/user_import_results_controller.rb +15 -0
  13. data/app/controllers/users_controller.rb +2 -2
  14. data/app/helpers/profiles_helper.rb +2 -0
  15. data/app/models/enju_leaf/ability.rb +12 -2
  16. data/app/models/profile.rb +15 -0
  17. data/app/models/user_import_file.rb +171 -0
  18. data/app/models/user_import_result.rb +9 -0
  19. data/app/views/kaminari/{_first_page.mobile.erb → enju_leaf_mobile/_first_page.html.erb} +0 -0
  20. data/app/views/kaminari/{_gap.mobile.erb → enju_leaf_mobile/_gap.html.erb} +0 -0
  21. data/app/views/kaminari/{_last_page.mobile.erb → enju_leaf_mobile/_last_page.html.erb} +0 -0
  22. data/app/views/kaminari/{_next_page.mobile.erb → enju_leaf_mobile/_next_page.html.erb} +0 -0
  23. data/app/views/kaminari/{_page.mobile.erb → enju_leaf_mobile/_page.html.erb} +0 -0
  24. data/app/views/kaminari/{_paginator.mobile.erb → enju_leaf_mobile/_paginator.html.erb} +0 -0
  25. data/app/views/kaminari/{_prev_page.mobile.erb → enju_leaf_mobile/_prev_page.html.erb} +0 -0
  26. data/app/views/page/_footer.html.erb +3 -3
  27. data/app/views/page/_menu.html.erb +1 -1
  28. data/app/views/page/about.en.html.erb +2 -2
  29. data/app/views/page/about.ja.html.erb +2 -2
  30. data/app/views/page/configuration.html.erb +12 -0
  31. data/app/views/page/import.html.erb +6 -5
  32. data/app/views/profiles/_form.html.erb +53 -0
  33. data/app/views/profiles/edit.html.erb +6 -0
  34. data/app/views/profiles/index.html.erb +43 -0
  35. data/app/views/profiles/new.html.erb +14 -0
  36. data/app/views/profiles/show.html.erb +54 -0
  37. data/app/views/user_groups/_form.html.erb +1 -1
  38. data/app/views/user_import_files/_form.html.erb +61 -0
  39. data/app/views/user_import_files/edit.html.erb +6 -0
  40. data/app/views/user_import_files/index.html.erb +43 -0
  41. data/app/views/user_import_files/new.html.erb +35 -0
  42. data/app/views/user_import_files/show.html.erb +59 -0
  43. data/app/views/user_import_results/_form.html.erb +29 -0
  44. data/app/views/user_import_results/index.html.erb +31 -0
  45. data/app/views/user_import_results/show.html.erb +19 -0
  46. data/app/views/users/new.html.erb +4 -4
  47. data/config/locales/translation_en.yml +17 -6
  48. data/config/locales/translation_ja.yml +17 -1
  49. data/config/routes.rb +8 -0
  50. data/db/migrate/20140110122216_create_user_import_files.rb +19 -0
  51. data/db/migrate/20140110131010_create_user_import_results.rb +11 -0
  52. data/db/migrate/20140122054321_create_profiles.rb +21 -0
  53. data/lib/enju_leaf/engine.rb +1 -0
  54. data/lib/enju_leaf/user.rb +6 -3
  55. data/lib/enju_leaf/version.rb +1 -1
  56. data/lib/generators/enju_leaf/setup/setup_generator.rb +3 -1
  57. data/lib/generators/enju_leaf/setup/templates/Procfile +3 -0
  58. data/lib/generators/enju_leaf/setup/templates/config/application.yml +1 -1
  59. data/lib/generators/enju_leaf/setup/templates/config/schedule.rb +1 -2
  60. data/spec/controllers/user_import_files_controller_spec.rb +294 -0
  61. data/spec/controllers/user_import_results_controller_spec.rb +137 -0
  62. data/spec/dummy/db/development.sqlite3 +0 -0
  63. data/spec/dummy/db/schema.rb +25 -1
  64. data/spec/dummy/db/test.sqlite3 +0 -0
  65. data/spec/dummy/private/system/user_import_files/user_imports/980/190/963/original/user_delete_file.tsv +4 -0
  66. data/spec/dummy/private/system/user_import_files/user_imports/980/190/963/original/user_import_file_sample.tsv +5 -0
  67. data/spec/dummy/private/system/user_import_files/user_imports/980/190/963/original/user_update_file.tsv +4 -0
  68. data/spec/dummy/private/system/user_import_files/user_imports/980/190/964/original/user_delete_file.tsv +4 -0
  69. data/spec/dummy/solr/default/data/index/segments.gen +0 -0
  70. data/spec/dummy/solr/default/data/index/segments_1la +0 -0
  71. data/spec/dummy/solr/default/data/tlog/{tlog.0000000000000000063 → tlog.0000000000000002051} +0 -0
  72. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000002052 +0 -0
  73. data/spec/dummy/solr/default/data/tlog/{tlog.0000000000000000065 → tlog.0000000000000002053} +0 -0
  74. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000002054 +0 -0
  75. data/spec/dummy/solr/default/data/tlog/{tlog.0000000000000000067 → tlog.0000000000000002055} +0 -0
  76. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000002056 +0 -0
  77. data/spec/dummy/solr/default/data/tlog/{tlog.0000000000000000069 → tlog.0000000000000002057} +0 -0
  78. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000002058 +0 -0
  79. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000002059 +0 -0
  80. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000002060 +0 -0
  81. data/spec/dummy/tmp/cache/4F7/F90/default_role +0 -0
  82. data/spec/dummy/tmp/cache/ACB/B20/manifestation_search_total +0 -0
  83. data/spec/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  84. data/spec/dummy/tmp/cache/assets/test/sprockets/154f7b83f2da0e86effbe25f32135177 +0 -0
  85. data/spec/dummy/tmp/cache/assets/test/sprockets/1b984bdbd3204a51a82d0e01a1569e2d +0 -0
  86. data/spec/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  87. data/spec/dummy/tmp/cache/assets/test/sprockets/3054c50144654f9c7e57bb0639a276e9 +0 -0
  88. data/spec/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  89. data/spec/dummy/tmp/cache/assets/test/sprockets/3bd7a263237ba366f64d938fe5303757 +0 -0
  90. data/spec/dummy/tmp/cache/assets/test/sprockets/62899096da1a3e67660f3b88068be8c9 +0 -0
  91. data/spec/dummy/tmp/cache/assets/test/sprockets/65b2e4f67eab21b30217e29075f433b2 +0 -0
  92. data/spec/dummy/tmp/cache/assets/test/sprockets/87d24a3f43f175d4d17babe9203c79a7 +0 -0
  93. data/spec/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  94. data/spec/dummy/tmp/cache/assets/test/sprockets/d38d8658b30de1d068603968227680d4 +0 -0
  95. data/spec/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  96. data/spec/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  97. data/spec/fixtures/user_import_files.yml +27 -0
  98. data/spec/fixtures/user_import_results.yml +13 -0
  99. data/spec/models/user_import_file_spec.rb +64 -0
  100. data/spec/models/user_import_result_spec.rb +7 -0
  101. data/vendor/assets/javascripts/jquery.colorbox.js +220 -213
  102. data/vendor/assets/stylesheets/colorbox.css +1 -1
  103. metadata +224 -150
  104. data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Administrator/with_valid_params/assigns_a_newly_created_import_request_as_import_request.yml +0 -620
  105. data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Administrator/with_valid_params/redirects_to_the_created_import_request.yml +0 -620
  106. data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Librarian/with_valid_params/assigns_a_newly_created_import_request_as_import_request.yml +0 -620
  107. data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Librarian/with_valid_params/redirects_to_the_created_import_request.yml +0 -620
  108. data/spec/cassette_library/Manifestation/should_import_isbn.yml +0 -537
  109. data/spec/cassette_library/Question/test_should_get_crd_search.yml +0 -437
  110. data/spec/dummy/solr/default/data/index/_z.fdt +0 -0
  111. data/spec/dummy/solr/default/data/index/_z.fdx +0 -0
  112. data/spec/dummy/solr/default/data/index/_z.fnm +0 -0
  113. data/spec/dummy/solr/default/data/index/_z.nvd +0 -0
  114. data/spec/dummy/solr/default/data/index/_z.nvm +0 -0
  115. data/spec/dummy/solr/default/data/index/_z.si +0 -0
  116. data/spec/dummy/solr/default/data/index/_z_Lucene41_0.doc +0 -0
  117. data/spec/dummy/solr/default/data/index/_z_Lucene41_0.pos +0 -0
  118. data/spec/dummy/solr/default/data/index/_z_Lucene41_0.tim +0 -0
  119. data/spec/dummy/solr/default/data/index/_z_Lucene41_0.tip +0 -0
  120. data/spec/dummy/solr/default/data/index/segments_21 +0 -0
  121. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000062 +0 -0
  122. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000064 +0 -0
  123. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000066 +0 -0
  124. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000068 +0 -0
  125. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000070 +0 -0
  126. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000071 +0 -0
@@ -0,0 +1,15 @@
1
+ class UserImportResultsController < InheritedResources::Base
2
+ respond_to :html, :json, :csv
3
+ load_and_authorize_resource
4
+ has_scope :file_id
5
+ actions :index, :show, :destroy
6
+
7
+ def index
8
+ @user_import_file = UserImportFile.where(:id => params[:user_import_file_id]).first
9
+ if @user_import_file
10
+ @user_import_results = @user_import_file.user_import_results.page(params[:page])
11
+ else
12
+ @user_import_results = UserImportResult.page(params[:page])
13
+ end
14
+ end
15
+ end
@@ -81,7 +81,7 @@ class UsersController < ApplicationController
81
81
  prepare_options
82
82
  @user_groups = UserGroup.all
83
83
  if @agent.try(:user)
84
- flash[:notice] = t('page.already_activated')
84
+ flash[:notice] = t('user.already_activated')
85
85
  redirect_to @agent
86
86
  return
87
87
  end
@@ -126,7 +126,7 @@ class UsersController < ApplicationController
126
126
  user_has_role.assign_attributes({:user_id => @user.id, :role_id => role.id}, :as => :admin)
127
127
  user_has_role.save
128
128
  flash[:temporary_password] = @user.password
129
- format.html { redirect_to @user, :notice => t('controller.successfully_created.', :model => t('activerecord.models.user')) }
129
+ format.html { redirect_to @user, :notice => t('controller.successfully_created', :model => t('activerecord.models.user')) }
130
130
  format.json { render :json => @user, :status => :created, :location => @user }
131
131
  else
132
132
  prepare_options
@@ -0,0 +1,2 @@
1
+ module ProfilesHelper
2
+ end
@@ -24,12 +24,16 @@ module EnjuLeaf
24
24
  can :manage, [
25
25
  UserHasRole
26
26
  ]
27
+ can :manage, [
28
+ UserImportFile
29
+ ] if LibraryGroup.site_config.network_access_allowed?(ip_address)
27
30
  can :update, [
28
31
  Role
29
32
  ] if LibraryGroup.site_config.network_access_allowed?(ip_address)
30
33
  can :read, [
31
- Role
32
- ]
34
+ Role,
35
+ UserImportResult
36
+ ] if LibraryGroup.site_config.network_access_allowed?(ip_address)
33
37
  when 'Librarian'
34
38
  can [:read, :create, :update], User
35
39
  can :destroy, User do |u|
@@ -41,10 +45,16 @@ module EnjuLeaf
41
45
  end
42
46
  end
43
47
  end
48
+ can :manage, [
49
+ UserImportFile
50
+ ] if LibraryGroup.site_config.network_access_allowed?(ip_address)
44
51
  can :read, [
45
52
  Role,
46
53
  UserGroup
47
54
  ]
55
+ can :read, [
56
+ UserImportResult
57
+ ] if LibraryGroup.site_config.network_access_allowed?(ip_address)
48
58
  when 'User'
49
59
  can :show, User
50
60
  can :update, User do |u|
@@ -0,0 +1,15 @@
1
+ class Profile < ActiveRecord::Base
2
+ belongs_to :user
3
+ belongs_to :library, :validate => true
4
+ belongs_to :user_group
5
+ belongs_to :required_role, :class_name => 'Role', :foreign_key => 'required_role_id' #, :validate => true
6
+
7
+ validates_associated :user_group, :library #, :agent
8
+ validates_presence_of :user_group, :library, :locale #, :user_number
9
+ validates :user_number, :uniqueness => true, :format => {:with => /\A[0-9A-Za-z_]+\Z/}, :allow_blank => true
10
+
11
+ searchable do
12
+ text :user_number, :full_name, :note
13
+ string :user_number
14
+ end
15
+ end
@@ -0,0 +1,171 @@
1
+ class UserImportFile < ActiveRecord::Base
2
+ attr_accessible :user_import, :edit_mode
3
+ include ImportFile
4
+ default_scope {order('user_import_files.id DESC')}
5
+ scope :not_imported, -> {where(:state => 'pending')}
6
+ scope :stucked, -> {where('created_at < ? AND state = ?', 1.hour.ago, 'pending')}
7
+
8
+ if Setting.uploaded_file.storage == :s3
9
+ has_attached_file :user_import, :storage => :s3,
10
+ :s3_credentials => "#{Setting.amazon}",
11
+ :s3_permissions => :private
12
+ else
13
+ has_attached_file :user_import,
14
+ :path => ":rails_root/private/system/:class/:attachment/:id_partition/:style/:filename"
15
+ end
16
+ validates_attachment_content_type :user_import, :content_type => [
17
+ 'text/csv',
18
+ 'text/plain',
19
+ 'text/tab-separated-values',
20
+ 'application/octet-stream',
21
+ 'application/vnd.ms-excel'
22
+ ]
23
+ validates_attachment_presence :user_import
24
+ belongs_to :user, :validate => true
25
+ has_many :user_import_results
26
+
27
+ state_machine :initial => :pending do
28
+ event :sm_start do
29
+ transition [:pending, :started] => :started
30
+ end
31
+
32
+ event :sm_complete do
33
+ transition :started => :completed
34
+ end
35
+
36
+ event :sm_fail do
37
+ transition :started => :failed
38
+ end
39
+
40
+ before_transition any => :started do |user_import_file|
41
+ user_import_file.executed_at = Time.zone.now
42
+ end
43
+
44
+ before_transition any => :completed do |user_import_file|
45
+ user_import_file.error_message = nil
46
+ end
47
+ end
48
+
49
+ def import_start
50
+ case edit_mode
51
+ when 'create'
52
+ import
53
+ when 'update'
54
+ modify
55
+ when 'destroy'
56
+ remove
57
+ else
58
+ import
59
+ end
60
+ end
61
+
62
+ def import
63
+ sm_start!
64
+ reload
65
+ num = {:user_imported => 0, :user_found => 0, :failed => 0}
66
+ rows = open_import_file
67
+ row_num = 2
68
+
69
+ field = rows.first
70
+ if [field['username']].reject{|field| field.to_s.strip == ""}.empty?
71
+ raise "username column is not found"
72
+ end
73
+
74
+ rows.each do |row|
75
+ next if row['dummy'].to_s.strip.present?
76
+ import_result = UserImportResult.create!(
77
+ :user_import_file_id => id, :body => row.fields.join("\t")
78
+ )
79
+
80
+ username = row['username']
81
+ new_user = User.where(:username => username).first
82
+ if new_user
83
+ import_result.user = new_user
84
+ import_result.save
85
+ num[:user_found] += 1
86
+ else
87
+ new_user = User.new
88
+ new_user.operator = user
89
+ new_user.username = username
90
+ new_user.email = row['email'] if row['email'].present?
91
+ new_user.role = Role.where(:name => row['role']).first
92
+ if row['user_group'].present?
93
+ new_user.user_group = UserGroup.where(:name => row['user_group']).first
94
+ end
95
+ new_user.user_number = row['user_number']
96
+ if row['expired_at'].present?
97
+ new_user.expired_at = Time.zone.parse(row['expired_at']).end_of_day
98
+ end
99
+ new_user.note = row['note']
100
+ if row['password'].present?
101
+ new_user.password = row['password']
102
+ else
103
+ new_user.set_auto_generated_password
104
+ end
105
+
106
+ if new_user.save!
107
+ num[:user_imported] += 1
108
+ else
109
+ num[:failed] += 1
110
+ end
111
+ end
112
+ end
113
+ num
114
+ end
115
+
116
+ def modify
117
+ sm_start!
118
+ sm_complete!
119
+ end
120
+
121
+ def remove
122
+ sm_start!
123
+ reload
124
+ rows = open_import_file
125
+
126
+ field = rows.first
127
+ if [field['username']].reject{|field| field.to_s.strip == ""}.empty?
128
+ raise "username column is not found"
129
+ end
130
+
131
+ rows.each do |row|
132
+ username = row['username'].to_s.strip
133
+ user = User.where(:username => username).first
134
+ user.destroy if user
135
+ end
136
+ sm_complete!
137
+ end
138
+
139
+ private
140
+ def open_import_file
141
+ tempfile = Tempfile.new('user_import_file')
142
+ if Setting.uploaded_file.storage == :s3
143
+ uploaded_file_path = user_import.expiring_url(10)
144
+ else
145
+ uploaded_file_path = user_import.path
146
+ end
147
+ open(uploaded_file_path){|f|
148
+ f.each{|line|
149
+ if defined?(CharlockHolmes::EncodingDetector)
150
+ begin
151
+ string = line.encode('UTF-8', CharlockHolmes::EncodingDetector.detect(line)[:encoding])
152
+ rescue StandardError
153
+ string = NKF.nkf('-w -Lu', line)
154
+ end
155
+ else
156
+ string = NKF.nkf('-w -Lu', line)
157
+ end
158
+ tempfile.puts(string)
159
+ }
160
+ }
161
+ tempfile.close
162
+
163
+ file = CSV.open(tempfile.path, 'r:utf-8', :col_sep => "\t")
164
+ header = file.first
165
+ rows = CSV.open(tempfile.path, 'r:utf-8', :headers => header, :col_sep => "\t")
166
+ UserImportResult.create!(:user_import_file_id => self.id, :body => header.join("\t"))
167
+ tempfile.close(true)
168
+ file.close
169
+ rows
170
+ end
171
+ end
@@ -0,0 +1,9 @@
1
+ class UserImportResult < ActiveRecord::Base
2
+ attr_accessible :user_import_file_id, :user_id, :body
3
+ default_scope {order('user_import_results.id')}
4
+ scope :file_id, proc{|file_id| where(:user_import_file_id => file_id)}
5
+ scope :failed, -> {where(:user_id => nil)}
6
+
7
+ belongs_to :user_import_file
8
+ belongs_to :user
9
+ end
@@ -1,13 +1,13 @@
1
1
  <div class="header_and_footer">
2
2
  <div id="footer">
3
- <a href="https://github.com/nabeta/enju_leaf">Next-L Enju Leaf <%= EnjuLeaf::VERSION %></a>,
3
+ <a href="https://github.com/next-l/enju_leaf">Next-L Enju Leaf <%= EnjuLeaf::VERSION %></a>,
4
4
  <%= t('page.open_source_integrated_library_system') -%> |
5
5
  <%= link_to t('page.about_this_system'), page_about_path -%> |
6
- <%= link_to t('page.report_bugs'), "https://github.com/nabeta/enju_leaf/issues" -%>
6
+ <%= link_to t('page.report_bugs'), "https://github.com/next-l/enju_leaf/issues" -%>
7
7
  <% if is_mobile_request? %>
8
8
  | <%= link_to t('page.mobile_view'), url_for(:mobile_view => 'true') %>
9
9
  <% end %>
10
10
  <br />
11
- Developed by <a href="http://mwr.mediacom.keio.ac.jp/~tanabe/">Kosuke Tanabe</a> and <a href="http://www.next-l.jp/">Project Next-L</a>.
11
+ Developed by <a href="https://github.com/nabeta">Kosuke Tanabe</a> and <a href="http://www.next-l.jp/">Project Next-L</a>.
12
12
  </div>
13
13
  </div>
@@ -40,7 +40,7 @@
40
40
  <% if defined?(EnjuNdl) %>
41
41
  <li><%= link_to t('enju_ndl.import_from_ndl_search'), ndl_books_path -%></li>
42
42
  <% end %>
43
- <li><%= link_to t('page.add_manually'), new_manifestation_path -%></li>
43
+ <li><%= link_to t('page.add_resource_manually'), new_manifestation_path -%></li>
44
44
  <li><%= link_to t('page.serial'), manifestations_path(:periodical => true) -%></li>
45
45
  <li><%= link_to t('page.import_from_file'), new_resource_import_file_path -%></li>
46
46
  <li><%= link_to t('activerecord.models.accept'), new_accept_path -%></li>
@@ -4,7 +4,7 @@
4
4
 
5
5
  <ul>
6
6
  <li>This integrated library system software "Next-L Enju Leaf" is developed by <a href="http://mwr.mediacom.keio.ac.jp/~tanabe/">Kosuke Tanabe</a> and <a href="http://www.next-l.jp/">Project Next-L</a>.</li>
7
- <li>Next-L Enju Leaf is released under MIT license. For more information, visit <a href="https://github.com/nabeta/enju_leaf">our project website</a>.</li>
7
+ <li>Next-L Enju Leaf is released under MIT license. For more information, visit <a href="https://github.com/next-l/enju_leaf">our project website</a>.</li>
8
8
  </ul>
9
9
 
10
10
  <h2>Contact information</h2>
@@ -52,7 +52,7 @@
52
52
  <div id="submenu" class="ui-corner-all">
53
53
  <ul>
54
54
  <li><a href="http://www.next-l.jp/">Project Next-L</a></li>
55
- <li><a href="https://github.com/nabeta/enju_leaf">this project on GitHub</a></li>
55
+ <li><a href="https://github.com/next-l/enju_leaf">this project on GitHub</a></li>
56
56
  <li><a href="http://www.next-l.jp/?page=%A5%E1%A1%BC%A5%EA%A5%F3%A5%B0%A5%EA%A5%B9%A5%C8">Mailing list</a> (in Japanese)</li>
57
57
  </ul>
58
58
  </div>
@@ -4,7 +4,7 @@
4
4
 
5
5
  <ul>
6
6
  <li>この図書館システム"Next-L Enju Leaf"は、<a href="http://mwr.mediacom.keio.ac.jp/~tanabe/">田辺浩介</a>と<a href="http://www.next-l.jp/">Project Next-L</a>によって開発されています。</li>
7
- <li>Next-L Enju LeafはMITライセンスのもとに公開されています。詳しくは<a href="https://github.com/nabeta/enju_leaf">プロジェクトのホームページ</a>をごらんください。</li>
7
+ <li>Next-L Enju LeafはMITライセンスのもとに公開されています。詳しくは<a href="https://github.com/next-l/enju_leaf">プロジェクトのホームページ</a>をごらんください。</li>
8
8
  </ul>
9
9
 
10
10
  <h2>連絡先</h2>
@@ -51,7 +51,7 @@
51
51
  <div id="submenu" class="ui-corner-all">
52
52
  <ul>
53
53
  <li><a href="http://www.next-l.jp/">Project Next-L</a></li>
54
- <li><a href="https://github.com/nabeta/enju_leaf">GitHubでのプロジェクトのページ</a></li>
54
+ <li><a href="https://github.com/next-l/enju_leaf">GitHubでのプロジェクトのページ</a></li>
55
55
  <li><a href="http://www.next-l.jp/?page=%A5%E1%A1%BC%A5%EA%A5%F3%A5%B0%A5%EA%A5%B9%A5%C8">メーリングリスト</a></li>
56
56
  </ul>
57
57
  </div>
@@ -7,9 +7,12 @@
7
7
  <li><%= link_to t('activerecord.models.library'), libraries_path -%>
8
8
  <ul>
9
9
  <li><%= link_to t('activerecord.models.shelf'), shelves_path -%></li>
10
+ <li><%= link_to t('activerecord.models.event'), events_path -%></li>
10
11
  </ul>
11
12
  </li>
12
13
  <li><%= link_to t('activerecord.models.user_group'), user_groups_path -%></li>
14
+ <li><%= link_to t('activerecord.models.user'), users_path -%></li>
15
+ <li><%= link_to t('activerecord.models.user_import_file'), user_import_files_path -%></li>
13
16
  <% if defined?(EnjuCirculation) %>
14
17
  <li><%= link_to t('activerecord.models.checkout_type'), checkout_types_path -%>
15
18
  <ul>
@@ -112,4 +115,13 @@
112
115
  </ul>
113
116
  </div>
114
117
  </div>
118
+
119
+ <div class="portlet" id="system">
120
+ <h2 class="title"><%= t('page.system') -%></h2>
121
+ <div class="config_box">
122
+ <ul>
123
+ <li><%= link_to 'Resque', resque_path %></li>
124
+ </ul>
125
+ </div>
126
+ </div>
115
127
  </div>
@@ -3,17 +3,18 @@
3
3
  <div id="content_list">
4
4
 
5
5
  <ul>
6
- <li><%= link_to t('activerecord.models.agent'), agent_import_files_path -%>
7
- (<%= t('activerecord.models.user') -%>)</li>
8
-
6
+ <li><%= link_to t('activerecord.models.user'), user_import_files_path -%>
7
+ <li><%= link_to t('page.resource'), new_resource_import_file_path -%></li>
9
8
  <li><%= link_to t('activerecord.models.event'), event_import_files_path -%></li>
10
- <li><%= link_to t('page.resource'), new_resource_import_file_path -%> (MARC, TSV)</li>
9
+ <!--
10
+ <li><%= link_to t('activerecord.models.agent'), agent_import_files_path -%></li>
11
+ -->
11
12
  </ul>
12
13
  </div>
13
14
  </div>
14
15
 
15
16
  <div id="submenu" class="ui-corner-all">
16
17
  <ul>
17
- <li><%= link_to t('page.add_manually'), new_import_request_path -%></li>
18
+ <li><%= link_to t('page.add_resource_manually'), new_import_request_path -%></li>
18
19
  </ul>
19
20
  </div>
@@ -0,0 +1,53 @@
1
+ <%= form_for(@profile) do |f| %>
2
+ <% if @profile.errors.any? %>
3
+ <div id="error_explanation">
4
+ <h2><%= pluralize(@profile.errors.count, "error") %> prohibited this profile from being saved:</h2>
5
+
6
+ <ul>
7
+ <% @profile.errors.full_messages.each do |msg| %>
8
+ <li><%= msg %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <% end %>
13
+
14
+ <div class="field">
15
+ <%= f.label :user_id %><br>
16
+ <%= f.number_field :user_id %>
17
+ </div>
18
+ <div class="field">
19
+ <%= f.label :user_group_id %><br>
20
+ <%= f.select :user_group_id, @user_groups.map{|u| [u.display_name.localize, u.id]} %>
21
+ </div>
22
+ <div class="field">
23
+ <%= f.label :library_id %><br>
24
+ <%= f.select :library_id, @libraries.map{|l| [l.display_name.localize, l.id]} %>
25
+ </div>
26
+ <div class="field">
27
+ <%= f.label :locale %><br>
28
+ <%= f.text_field :locale %>
29
+ </div>
30
+ <div class="field">
31
+ <%= f.label :user_number %><br>
32
+ <%= f.text_field :user_number %>
33
+ </div>
34
+ <div class="field">
35
+ <%= f.label :full_name %><br>
36
+ <%= f.text_area :full_name %>
37
+ </div>
38
+ <div class="field">
39
+ <%= f.label :note %><br>
40
+ <%= f.text_area :note %>
41
+ </div>
42
+ <div class="field">
43
+ <%= f.label :keyword_list %><br>
44
+ <%= f.text_area :keyword_list %>
45
+ </div>
46
+ <div class="field">
47
+ <%= f.label :required_role_id %><br>
48
+ <%= f.number_field :required_role_id %>
49
+ </div>
50
+ <div class="actions">
51
+ <%= f.submit %>
52
+ </div>
53
+ <% end %>