enju_library 0.4.0.beta.4 → 0.4.0.rc.1
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 +4 -4
- data/README.md +1 -1
- data/app/controllers/library_groups_controller.rb +1 -4
- data/app/helpers/enju_library/application_helper.rb +2 -2
- data/app/mailers/notifier.rb +2 -2
- data/app/mailers/user_export_mailer.rb +2 -2
- data/app/mailers/user_import_mailer.rb +2 -2
- data/app/models/accept.rb +6 -6
- data/app/models/basket.rb +4 -4
- data/app/models/bookstore.rb +3 -4
- data/app/models/budget_type.rb +3 -3
- data/app/models/color.rb +4 -4
- data/app/models/concerns/enju_library/enju_user.rb +62 -0
- data/app/models/library.rb +5 -6
- data/app/models/library_group.rb +5 -4
- data/app/models/request_status_type.rb +3 -3
- data/app/models/request_type.rb +3 -3
- data/app/models/search_engine.rb +3 -3
- data/app/models/shelf.rb +5 -6
- data/app/models/subscribe.rb +4 -4
- data/app/models/subscription.rb +5 -6
- data/app/models/user_export_file.rb +14 -20
- data/app/models/user_export_file_state_machine.rb +1 -1
- data/app/models/user_export_file_transition.rb +4 -4
- data/app/models/user_group.rb +3 -4
- data/app/models/user_import_file.rb +13 -21
- data/app/models/user_import_file_state_machine.rb +1 -1
- data/app/models/user_import_file_transition.rb +4 -4
- data/app/models/user_import_result.rb +5 -5
- data/app/models/withdraw.rb +4 -10
- data/app/policies/shelf_policy.rb +1 -1
- data/app/views/layouts/libraries.html.erb +31 -0
- data/app/views/libraries/_map.html.erb +8 -24
- data/app/views/libraries/_map_header.html.erb +6 -0
- data/app/views/library_groups/_form.html.erb +1 -3
- data/app/views/library_groups/show.html.erb +1 -1
- data/app/views/user_groups/show.html.erb +5 -3
- data/app/views/user_import_files/_results.html.erb +5 -0
- data/app/views/user_import_results/index.html.erb +0 -11
- data/db/migrate/059_create_libraries.rb +1 -2
- data/db/migrate/069_create_shelves.rb +1 -2
- data/db/migrate/077_create_user_groups.rb +1 -2
- data/db/migrate/080_create_library_groups.rb +1 -1
- data/db/migrate/120_create_baskets.rb +1 -1
- data/db/migrate/124_create_bookstores.rb +1 -2
- data/db/migrate/130_create_request_status_types.rb +1 -1
- data/db/migrate/131_create_request_types.rb +1 -1
- data/db/migrate/20081006090811_create_subscriptions.rb +1 -2
- data/db/migrate/20081006093246_create_subscribes.rb +1 -1
- data/db/migrate/20081023092436_create_search_engines.rb +1 -1
- data/db/migrate/20100211105551_add_admin_networks_to_library_group.rb +1 -1
- data/db/migrate/20100314190054_add_opening_hour_to_library.rb +1 -1
- data/db/migrate/20110222073537_add_url_to_library_group.rb +1 -1
- data/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +1 -1
- data/db/migrate/20120105074911_add_isil_to_library.rb +1 -1
- data/db/migrate/20120129014038_create_budget_types.rb +1 -1
- data/db/migrate/20120319173203_create_accepts.rb +1 -1
- data/db/migrate/20120510140958_add_closed_to_shelf.rb +1 -1
- data/db/migrate/20130412083556_add_latitude_and_longitude_to_library.rb +1 -1
- data/db/migrate/20140110122216_create_user_import_files.rb +1 -1
- data/db/migrate/20140110131010_create_user_import_results.rb +1 -1
- data/db/migrate/20140524074813_create_user_import_file_transitions.rb +1 -1
- data/db/migrate/20140628072217_add_user_encoding_to_user_import_file.rb +1 -1
- data/db/migrate/20140709113413_create_user_export_files.rb +1 -1
- data/db/migrate/20140709113905_create_user_export_file_transitions.rb +1 -1
- data/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +1 -1
- data/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +1 -1
- data/db/migrate/20140821151023_create_colors.rb +1 -1
- data/db/migrate/20150221063719_add_settings_to_library_group.rb +1 -1
- data/db/migrate/20150506105356_add_error_message_to_user_import_result.rb +1 -1
- data/db/migrate/20150924115059_create_withdraws.rb +1 -1
- data/db/migrate/20160610093229_add_html_snippet_to_library_group.rb +1 -1
- data/db/migrate/20160627232219_add_most_recent_to_user_import_file_transitions.rb +1 -1
- data/db/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb +1 -1
- data/db/migrate/20160813191647_add_max_number_of_results_to_library_group.rb +1 -1
- data/db/migrate/20160813191733_add_family_name_first_to_library_group.rb +1 -1
- data/db/migrate/20160813192542_add_pub_year_facet_range_interval_to_library_group.rb +1 -1
- data/db/migrate/20160813203039_add_user_id_to_library_group.rb +1 -1
- data/db/migrate/20170305064014_add_csv_charset_conversion_to_library_group.rb +1 -1
- data/db/migrate/20171014084528_add_header_logo_to_library_group.rb +1 -1
- data/db/migrate/20171126133835_rename_login_banner_to_old_login_banner.rb +1 -1
- data/db/migrate/20171126135238_add_foreign_key_to_library_group_id_on_library.rb +1 -1
- data/db/migrate/20180102162311_add_header_logo_meta_to_library_group.rb +1 -1
- data/db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb +1 -1
- data/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb +1 -1
- data/db/migrate/20191216131755_add_email_to_library_group.rb +6 -0
- data/lib/enju_library/version.rb +1 -1
- data/lib/generators/enju_library/setup/setup_generator.rb +4 -3
- data/lib/generators/enju_library/setup/templates/db/fixtures/library_groups.yml +2 -2
- data/lib/generators/enju_library/setup/templates/db/fixtures/search_engines.yml +9 -0
- data/spec/dummy/app/assets/config/manifest.js +2 -0
- data/spec/dummy/app/controllers/application_controller.rb +0 -1
- data/spec/dummy/app/models/user.rb +0 -2
- data/spec/dummy/config/initializers/assets.rb +1 -1
- data/spec/dummy/db/migrate/001_create_agents.rb +0 -1
- data/spec/dummy/db/migrate/005_create_manifestations.rb +0 -1
- data/spec/dummy/db/migrate/006_create_items.rb +0 -1
- data/spec/dummy/db/migrate/20190818075603_add_memo_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20190818075628_add_memo_to_item.rb +5 -0
- data/spec/dummy/db/migrate/20191219122214_create_custom_properties.rb +12 -0
- data/spec/dummy/db/schema.rb +98 -90
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/postcss.config.js +12 -0
- data/spec/factories/accepts.rb +6 -6
- data/spec/factories/budget_types.rb +3 -3
- data/spec/fixtures/baskets.yml +4 -4
- data/spec/fixtures/bookstores.yml +3 -11
- data/spec/fixtures/budget_types.yml +3 -3
- data/spec/fixtures/colors.yml +4 -4
- data/spec/fixtures/events.yml +0 -9
- data/spec/fixtures/libraries.yml +5 -6
- data/spec/fixtures/library_groups.yml +6 -5
- data/spec/fixtures/request_status_types.yml +3 -3
- data/spec/fixtures/request_types.yml +3 -3
- data/spec/fixtures/search_engines.yml +3 -3
- data/spec/fixtures/shelves.yml +4 -5
- data/spec/fixtures/subscribes.yml +4 -4
- data/spec/fixtures/subscriptions.yml +5 -6
- data/spec/fixtures/user_export_files.yml +4 -4
- data/spec/fixtures/user_groups.yml +3 -4
- data/spec/fixtures/user_import_files.yml +6 -6
- data/spec/fixtures/user_import_results.yml +5 -5
- data/spec/fixtures/withdraws.yml +4 -4
- data/spec/models/accept_spec.rb +6 -6
- data/spec/models/basket_spec.rb +4 -4
- data/spec/models/bookstore_spec.rb +3 -4
- data/spec/models/budget_type_spec.rb +3 -3
- data/spec/models/library_group_spec.rb +5 -4
- data/spec/models/library_spec.rb +5 -6
- data/spec/models/request_status_type_spec.rb +3 -3
- data/spec/models/request_type_spec.rb +3 -3
- data/spec/models/search_engine_spec.rb +3 -3
- data/spec/models/shelf_spec.rb +4 -5
- data/spec/models/subscribe_spec.rb +4 -4
- data/spec/models/subscription_spec.rb +5 -6
- data/spec/models/user_export_file_spec.rb +4 -4
- data/spec/models/user_group_spec.rb +3 -4
- data/spec/models/user_import_file_spec.rb +8 -8
- data/spec/models/user_import_result_spec.rb +5 -5
- data/spec/models/withdraw_spec.rb +4 -4
- data/spec/system/libraries_spec.rb +5 -5
- data/spec/system/user_groups_spec.rb +46 -0
- metadata +32 -18
@@ -6,7 +6,7 @@ class UserExportFileStateMachine
|
|
6
6
|
state :completed
|
7
7
|
state :failed
|
8
8
|
|
9
|
-
transition from: :pending, to: :started
|
9
|
+
transition from: :pending, to: [:started, :failed]
|
10
10
|
transition from: :started, to: [:completed, :failed]
|
11
11
|
|
12
12
|
after_transition(from: :pending, to: :started) do |user_export_file|
|
@@ -10,12 +10,12 @@ end
|
|
10
10
|
#
|
11
11
|
# Table name: user_export_file_transitions
|
12
12
|
#
|
13
|
-
# id :
|
13
|
+
# id :bigint not null, primary key
|
14
14
|
# to_state :string
|
15
15
|
# metadata :text default({})
|
16
16
|
# sort_key :integer
|
17
|
-
# user_export_file_id :
|
18
|
-
# created_at :datetime
|
19
|
-
# updated_at :datetime
|
17
|
+
# user_export_file_id :bigint
|
18
|
+
# created_at :datetime not null
|
19
|
+
# updated_at :datetime not null
|
20
20
|
# most_recent :boolean not null
|
21
21
|
#
|
data/app/models/user_group.rb
CHANGED
@@ -14,14 +14,13 @@ end
|
|
14
14
|
#
|
15
15
|
# Table name: user_groups
|
16
16
|
#
|
17
|
-
# id :
|
17
|
+
# id :bigint not null, primary key
|
18
18
|
# name :string
|
19
19
|
# display_name :text
|
20
20
|
# note :text
|
21
21
|
# position :integer
|
22
|
-
# created_at :datetime
|
23
|
-
# updated_at :datetime
|
24
|
-
# deleted_at :datetime
|
22
|
+
# created_at :datetime not null
|
23
|
+
# updated_at :datetime not null
|
25
24
|
# valid_period_for_new_user :integer default(0), not null
|
26
25
|
# expired_at :datetime
|
27
26
|
# number_of_day_to_notify_overdue :integer default(7), not null
|
@@ -48,7 +48,7 @@ class UserImportFile < ApplicationRecord
|
|
48
48
|
# 利用者情報をTSVファイルを用いて作成します。
|
49
49
|
def import
|
50
50
|
transition_to!(:started)
|
51
|
-
num = { user_imported: 0, user_found: 0, error: 0 }
|
51
|
+
num = { user_imported: 0, user_found: 0, failed: 0, error: 0 }
|
52
52
|
rows = open_import_file(create_import_temp_file(user_import))
|
53
53
|
row_num = 1
|
54
54
|
|
@@ -149,7 +149,7 @@ class UserImportFile < ApplicationRecord
|
|
149
149
|
)
|
150
150
|
|
151
151
|
username = row['username']
|
152
|
-
new_user = User.
|
152
|
+
new_user = User.find_by(username: username)
|
153
153
|
if new_user.try(:profile)
|
154
154
|
new_user.assign_attributes(set_user_params(row))
|
155
155
|
new_user.profile.assign_attributes(set_profile_params(row))
|
@@ -196,7 +196,7 @@ class UserImportFile < ApplicationRecord
|
|
196
196
|
rows.each do |row|
|
197
197
|
row_num += 1
|
198
198
|
username = row['username'].to_s.strip
|
199
|
-
remove_user = User.
|
199
|
+
remove_user = User.find_by(username: username)
|
200
200
|
if remove_user.try(:deletable_by?, user)
|
201
201
|
UserImportFile.transaction do
|
202
202
|
remove_user.destroy
|
@@ -218,14 +218,6 @@ class UserImportFile < ApplicationRecord
|
|
218
218
|
|
219
219
|
private
|
220
220
|
|
221
|
-
def self.transition_class
|
222
|
-
UserImportFileTransition
|
223
|
-
end
|
224
|
-
|
225
|
-
def self.initial_state
|
226
|
-
:pending
|
227
|
-
end
|
228
|
-
|
229
221
|
# インポート作業用のファイルを読み込みます。
|
230
222
|
# @param [File] tempfile 作業用のファイル
|
231
223
|
def open_import_file(tempfile)
|
@@ -292,15 +284,15 @@ class UserImportFile < ApplicationRecord
|
|
292
284
|
# @param [Hash] row 利用者情報のハッシュ
|
293
285
|
def set_profile_params(row)
|
294
286
|
params = {}
|
295
|
-
user_group = UserGroup.
|
287
|
+
user_group = UserGroup.find_by(name: row['user_group'])
|
296
288
|
unless user_group
|
297
289
|
user_group = default_user_group
|
298
290
|
end
|
299
291
|
params[:user_group_id] = user_group.id if user_group
|
300
292
|
|
301
|
-
required_role = Role.
|
293
|
+
required_role = Role.find_by(name: row['required_role'])
|
302
294
|
unless required_role
|
303
|
-
required_role = Role.
|
295
|
+
required_role = Role.find_by(name: 'Librarian')
|
304
296
|
end
|
305
297
|
params[:required_role_id] = required_role.id if required_role
|
306
298
|
|
@@ -322,7 +314,7 @@ class UserImportFile < ApplicationRecord
|
|
322
314
|
params[:locale] = row['locale']
|
323
315
|
end
|
324
316
|
|
325
|
-
library = Library.
|
317
|
+
library = Library.find_by(name: row['library'].to_s.strip)
|
326
318
|
unless library
|
327
319
|
library = default_library || Library.web
|
328
320
|
end
|
@@ -346,8 +338,8 @@ end
|
|
346
338
|
#
|
347
339
|
# Table name: user_import_files
|
348
340
|
#
|
349
|
-
# id :
|
350
|
-
# user_id :
|
341
|
+
# id :bigint not null, primary key
|
342
|
+
# user_id :bigint
|
351
343
|
# note :text
|
352
344
|
# executed_at :datetime
|
353
345
|
# user_import_file_name :string
|
@@ -357,9 +349,9 @@ end
|
|
357
349
|
# user_import_fingerprint :string
|
358
350
|
# edit_mode :string
|
359
351
|
# error_message :text
|
360
|
-
# created_at :datetime
|
361
|
-
# updated_at :datetime
|
352
|
+
# created_at :datetime not null
|
353
|
+
# updated_at :datetime not null
|
362
354
|
# user_encoding :string
|
363
|
-
# default_library_id :
|
364
|
-
# default_user_group_id :
|
355
|
+
# default_library_id :bigint
|
356
|
+
# default_user_group_id :bigint
|
365
357
|
#
|
@@ -6,7 +6,7 @@ class UserImportFileStateMachine
|
|
6
6
|
state :completed
|
7
7
|
state :failed
|
8
8
|
|
9
|
-
transition from: :pending, to: :started
|
9
|
+
transition from: :pending, to: [:started, :failed]
|
10
10
|
transition from: :started, to: [:completed, :failed]
|
11
11
|
|
12
12
|
after_transition(from: :pending, to: :started) do |user_import_file|
|
@@ -9,12 +9,12 @@ end
|
|
9
9
|
#
|
10
10
|
# Table name: user_import_file_transitions
|
11
11
|
#
|
12
|
-
# id :
|
12
|
+
# id :bigint not null, primary key
|
13
13
|
# to_state :string
|
14
14
|
# metadata :text default({})
|
15
15
|
# sort_key :integer
|
16
|
-
# user_import_file_id :
|
17
|
-
# created_at :datetime
|
18
|
-
# updated_at :datetime
|
16
|
+
# user_import_file_id :bigint
|
17
|
+
# created_at :datetime not null
|
18
|
+
# updated_at :datetime not null
|
19
19
|
# most_recent :boolean not null
|
20
20
|
#
|
@@ -10,11 +10,11 @@ end
|
|
10
10
|
#
|
11
11
|
# Table name: user_import_results
|
12
12
|
#
|
13
|
-
# id :
|
14
|
-
# user_import_file_id :
|
15
|
-
# user_id :
|
13
|
+
# id :bigint not null, primary key
|
14
|
+
# user_import_file_id :bigint
|
15
|
+
# user_id :bigint
|
16
16
|
# body :text
|
17
|
-
# created_at :datetime
|
18
|
-
# updated_at :datetime
|
17
|
+
# created_at :datetime not null
|
18
|
+
# updated_at :datetime not null
|
19
19
|
# error_message :text
|
20
20
|
#
|
data/app/models/withdraw.rb
CHANGED
@@ -7,26 +7,20 @@ class Withdraw < ApplicationRecord
|
|
7
7
|
uniqueness: true, #{ message: I18n.t('withdraw.already_withdrawn', locale: I18n.default_locale) },
|
8
8
|
presence: true #, { message: I18n.translate('withdraw.item_not_found', locale: I18n.default_locale) }
|
9
9
|
validates_presence_of :basket_id
|
10
|
-
validate :check_item
|
11
10
|
|
12
11
|
attr_accessor :item_identifier
|
13
12
|
|
14
13
|
paginates_per 10
|
15
|
-
|
16
|
-
def check_item
|
17
|
-
errors.add(:item) if item.try(:rent?)
|
18
|
-
errors.add(:item) if item.try(:reserved?)
|
19
|
-
end
|
20
14
|
end
|
21
15
|
|
22
16
|
# == Schema Information
|
23
17
|
#
|
24
18
|
# Table name: withdraws
|
25
19
|
#
|
26
|
-
# id :
|
27
|
-
# basket_id :
|
28
|
-
# item_id :
|
29
|
-
# librarian_id :
|
20
|
+
# id :bigint not null, primary key
|
21
|
+
# basket_id :bigint
|
22
|
+
# item_id :bigint
|
23
|
+
# librarian_id :bigint
|
30
24
|
# created_at :datetime not null
|
31
25
|
# updated_at :datetime not null
|
32
26
|
#
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<%= @locale.to_s -%>" lang="<%= @locale.to_s -%>">
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8" />
|
5
|
+
<%= render 'page/include' %>
|
6
|
+
<title><%= title(controller.controller_name) %></title>
|
7
|
+
<%- if controller.controller_name == 'manifestations' and controller.action_name == 'index' -%>
|
8
|
+
<%= auto_discovery_link_tag(:rss, url_for(params.permit.merge(format: 'rss', page: nil, commit: nil, only_path: true)), title: (t('manifestation.library_group_manifestation', library_group_name: @library_group.display_name) + " (RSS)")) %>
|
9
|
+
<%= auto_discovery_link_tag(:atom, url_for(params.permit.merge(format: 'atom', page: nil, commit: nil, only_path: true)), title: (t('manifestation.library_group_manifestation', library_group_name: @library_group.display_name) + " (Atom)")) %>
|
10
|
+
<% if defined?(EnjuNews) %>
|
11
|
+
<%= auto_discovery_link_tag(:rss, news_posts_url(format: :rss, locale: @locale), title: (t('news_post.library_group_news_post', library_group_name: @library_group.display_name) + " (RSS)")) %>
|
12
|
+
<%= auto_discovery_link_tag(:atom, news_posts_url(format: :atom, locale: @locale), title: (t('news_post.library_group_news_post', library_group_name: @library_group.display_name) + " (Atom)")) %>
|
13
|
+
<% end %>
|
14
|
+
<% end %>
|
15
|
+
<%= render 'libraries/map_header' %>
|
16
|
+
</head>
|
17
|
+
<body itemscope itemtype="http://schema.org/WebPage">
|
18
|
+
|
19
|
+
<%= render 'page/header' %>
|
20
|
+
<%= render 'page/menu' %>
|
21
|
+
|
22
|
+
<div id="content">
|
23
|
+
|
24
|
+
<%= yield %>
|
25
|
+
|
26
|
+
</div>
|
27
|
+
|
28
|
+
<%= render 'page/footer' %>
|
29
|
+
|
30
|
+
</body>
|
31
|
+
</html>
|
@@ -1,25 +1,9 @@
|
|
1
|
-
<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false"></script>
|
2
|
-
<script type="text/javascript">
|
3
|
-
google.maps.event.addDomListener(window, 'load', function() {
|
4
|
-
var latlng = new google.maps.LatLng(<%= library.latitude %>, <%= library.longitude %>);
|
5
|
-
var options = {
|
6
|
-
zoom: 16,
|
7
|
-
center: latlng,
|
8
|
-
mapTypeId: google.maps.MapTypeId.ROADMAP,
|
9
|
-
scaleControl: true
|
10
|
-
};
|
11
|
-
var map = new google.maps.Map(document.getElementById("library_map"), options);
|
12
|
-
var marker = new google.maps.Marker({
|
13
|
-
position: latlng,
|
14
|
-
map: map,
|
15
|
-
title: '<%= library.display_name %>'
|
16
|
-
});
|
17
|
-
var infowindow = new google.maps.InfoWindow({
|
18
|
-
content: '<%= library.display_name %>'
|
19
|
-
});
|
20
|
-
google.maps.event.addListener(marker, 'click', function() {
|
21
|
-
infowindow.open(map,marker);
|
22
|
-
});
|
23
|
-
});
|
24
|
-
</script>
|
25
1
|
<div id="library_map" style="width: 500px; height: 500px;"></div>
|
2
|
+
<script>
|
3
|
+
var mymap = L.map('library_map').setView([<%= @library.latitude %>, <%= @library.longitude %>], 13);
|
4
|
+
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
5
|
+
attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
|
6
|
+
maxZoom: 18
|
7
|
+
}).addTo(mymap);
|
8
|
+
L.marker([<%= @library.latitude %>, <%= @library.longitude %>]).addTo(mymap).bindPopup('<%= @library.display_name %>').openPopup();
|
9
|
+
</script>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.6.0/dist/leaflet.css"
|
2
|
+
integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ=="
|
3
|
+
crossorigin=""/>
|
4
|
+
<script src="https://unpkg.com/leaflet@1.6.0/dist/leaflet.js"
|
5
|
+
integrity="sha512-gZwIG9x3wUXg2hdXF6+rVkLF/0Vi9U8D2Ntg4Ga5I5BZpVkVxlJWbSQtXPSiUTtC0TjtGOmxa1AJPuV0CPthew=="
|
6
|
+
crossorigin=""></script>
|
@@ -24,9 +24,7 @@
|
|
24
24
|
|
25
25
|
<div class="field">
|
26
26
|
<%= f.label :email -%><br />
|
27
|
-
<%= f.
|
28
|
-
<%= user_form.email_field :email, class: 'resource_email' -%>
|
29
|
-
<% end %>
|
27
|
+
<%= f.email_field :email, class: 'resource_email' -%>
|
30
28
|
</div>
|
31
29
|
|
32
30
|
<div class="field">
|
@@ -61,8 +61,10 @@
|
|
61
61
|
<li><%= link_to t('page.edit'), edit_user_group_path(@user_group) -%></li>
|
62
62
|
<%- end -%>
|
63
63
|
<li><%= back_to_index(flash[:page_info]) -%></li>
|
64
|
-
|
65
|
-
|
66
|
-
|
64
|
+
<% if defined?(EnjuCirculation) %>
|
65
|
+
<%- if policy(UserGroupHasCheckoutType).create? -%>
|
66
|
+
<li><%= link_to t('page.new', model: t('activerecord.models.checkout_type')), new_user_group_user_group_has_checkout_type_path(@user_group) -%></li>
|
67
|
+
<%- end -%>
|
68
|
+
<% end %>
|
67
69
|
</ul>
|
68
70
|
</div>
|
@@ -1,4 +1,9 @@
|
|
1
1
|
<h2><%= t('activerecord.models.user_import_result') %></h2>
|
2
|
+
<p>
|
3
|
+
<%= link_to((image_tag 'icons/page_white_excel.png', size: '16x16', class: 'enju_icon', alt: 'TSV'), user_import_results_path(user_import_file_id: @user_import_file.id, format: :txt, locale: @locale.to_s)) -%>
|
4
|
+
(<%= link_to 'TSV', user_import_results_path(user_import_file_id: @user_import_file.id, format: :txt, locale: @locale.to_s) -%>)
|
5
|
+
</p>
|
6
|
+
|
2
7
|
<table class="table table-striped index">
|
3
8
|
<tr>
|
4
9
|
<th><%= t('activerecord.attributes.user_import_result.lineno') %></th>
|
@@ -11,15 +11,4 @@
|
|
11
11
|
</div>
|
12
12
|
|
13
13
|
<div id="submenu" class="ui-corner-all ui-widget-content">
|
14
|
-
<ul>
|
15
|
-
<li>
|
16
|
-
<% if @user_import_file %>
|
17
|
-
<%= link_to((image_tag 'icons/page_white_excel.png', size: '16x16', class: 'enju_icon', alt: 'TSV'), user_import_results_path(user_import_file_id: @user_import_file.id, format: :txt, locale: @locale.to_s)) -%>
|
18
|
-
(<%= link_to 'TSV', user_import_results_path(user_import_file_id: @user_import_file.id, format: :txt, locale: @locale.to_s) -%>)
|
19
|
-
<% else %>
|
20
|
-
<%= link_to((image_tag 'icons/page_white_excel.png', size: '16x16', class: 'enju_icon', alt: 'TSV'), user_import_results_path(format: :txt, locale: @locale.to_s)) -%>
|
21
|
-
(<%= link_to 'TSV', user_import_results_path(format: :txt, locale: @locale.to_s) -%>)
|
22
|
-
<% end %>
|
23
|
-
</li>
|
24
|
-
</ul>
|
25
14
|
</div>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class CreateLibraries < ActiveRecord::Migration[
|
1
|
+
class CreateLibraries < ActiveRecord::Migration[5.2]
|
2
2
|
def change
|
3
3
|
create_table :libraries do |t|
|
4
4
|
t.string :name, index: true, null: false
|
@@ -20,7 +20,6 @@ class CreateLibraries < ActiveRecord::Migration[4.2]
|
|
20
20
|
t.references :country
|
21
21
|
|
22
22
|
t.timestamps
|
23
|
-
t.datetime :deleted_at
|
24
23
|
end
|
25
24
|
end
|
26
25
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class CreateShelves < ActiveRecord::Migration[
|
1
|
+
class CreateShelves < ActiveRecord::Migration[5.2]
|
2
2
|
def change
|
3
3
|
create_table :shelves do |t|
|
4
4
|
t.string :name, null: false
|
@@ -8,7 +8,6 @@ class CreateShelves < ActiveRecord::Migration[4.2]
|
|
8
8
|
t.integer :items_count, default: 0, null: false
|
9
9
|
t.integer :position
|
10
10
|
t.timestamps
|
11
|
-
t.datetime :deleted_at
|
12
11
|
end
|
13
12
|
end
|
14
13
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class CreateUserGroups < ActiveRecord::Migration[
|
1
|
+
class CreateUserGroups < ActiveRecord::Migration[5.2]
|
2
2
|
def change
|
3
3
|
create_table :user_groups do |t|
|
4
4
|
t.string :name, not_null: true
|
@@ -6,7 +6,6 @@ class CreateUserGroups < ActiveRecord::Migration[4.2]
|
|
6
6
|
t.text :note
|
7
7
|
t.integer :position
|
8
8
|
t.timestamps
|
9
|
-
t.datetime :deleted_at
|
10
9
|
end
|
11
10
|
end
|
12
11
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class CreateBookstores < ActiveRecord::Migration[
|
1
|
+
class CreateBookstores < ActiveRecord::Migration[5.2]
|
2
2
|
def change
|
3
3
|
create_table :bookstores do |t|
|
4
4
|
t.text :name, null: false
|
@@ -9,7 +9,6 @@ class CreateBookstores < ActiveRecord::Migration[4.2]
|
|
9
9
|
t.string :fax_number
|
10
10
|
t.string :url
|
11
11
|
t.integer :position
|
12
|
-
t.datetime :deleted_at
|
13
12
|
|
14
13
|
t.timestamps
|
15
14
|
end
|