enju_leaf 1.1.0.rc22 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 507c5dbb7c4d5efbbc9f1113fa78a15006835cc4
4
- data.tar.gz: fe3fcc5a20425bb2aa398282dbe62f5fcb1d2623
3
+ metadata.gz: 9ce15458b367d549170357329294bbe8ba7c3b7a
4
+ data.tar.gz: c91e3e707e1544ef2042e1112f9437b57d240f90
5
5
  SHA512:
6
- metadata.gz: eaa0ae5d2c9a3fdf022492467aa360d4a8207f9a0ac80d0cdf5ce5945980f592dce186fae16265ba9e006696da06f5e6edadcc76ae920c96ae7fd06ae77ac147
7
- data.tar.gz: 39ff03e5fd9e8888a2eb59b85a8aa9588ca502528a33ab46c97351cf8dfeda92e116a45c1782d7de80f290f7db27f060a991902a60da744671755e4ad7b1a2a6
6
+ metadata.gz: adbf99aa3bd12ebc290a26535b9a01626cea20b26e66056a6ad52c4a314f56d16fecf759409083bef3dbf172ddb88d2cb2734dd470816b592695ab6ae9292e34
7
+ data.tar.gz: 3e503313b773432bd6f3b309ccd2d88004936467840230485b669ebc31d44234fd7b887d4e190423043b70fc667024516163b0c38f456ffa905db576486a740d
@@ -51,11 +51,11 @@ module EnjuLeaf
51
51
  true
52
52
  else
53
53
  if %w(Librarian User Guest).include?(profile.required_role.name)
54
- unless profile.try(:user).try(:has_role?, 'Administrator')
54
+ unless profile.try(:user).try(:has_role?, 'Administrator')
55
55
  true
56
56
  end
57
57
  end
58
- end
58
+ end
59
59
  end
60
60
  can :destroy, Profile do |profile|
61
61
  if profile.user
@@ -84,7 +84,7 @@ module EnjuLeaf
84
84
  ] if LibraryGroup.site_config.network_access_allowed?(ip_address)
85
85
  when 'User'
86
86
  can :show, Profile do |profile|
87
- profile == user.profile or %w(User Guest).include?(profile.required_role.name)
87
+ profile == user.profile or %w(User Guest).include?(profile.required_role.name)
88
88
  end
89
89
  can :update, Profile do |profile|
90
90
  profile == user.profile
@@ -11,27 +11,14 @@
11
11
  <p><%= t('activerecord.attributes.profile.user_number') %>: <%= current_user.profile.user_number %></p>
12
12
 
13
13
  <% if defined?(EnjuCirculation) %>
14
- <h2>
15
- <%= t('activerecord.models.checkout') %>
16
- <%= link_to image_tag('icons/date.png', size: '16x16', alt: 'iCalendar', class: 'icon'), checkouts_path(icalendar_token: current_user.profile.checkout_icalendar_token, format: :ics) if current_user.profile.checkout_icalendar_token? %>
17
- <%= link_to image_tag('icons/feed.png', size: '16x16', alt: 'RSS', class: 'icon'), checkouts_path(user_id: current_user.username, format: :rss) %>
18
- <%= link_to image_tag('icons/page_white_excel.png', size: '16x16', alt: 'TSV', class: 'icon'), checkouts_path(user_id: current_user.username, format: :txt) %>
19
- </h2>
20
- <%= render 'checkouts/list', checkouts: current_user.checkouts.page(params[:page]) %>
14
+ <%= render 'profiles/checkout_list', profile: current_user.profile %>
21
15
  <% end %>
22
16
  </div>
23
17
  </div>
24
18
 
25
19
  <div id="submenu" class="ui-corner-all ui-widget-content">
26
20
  <% if defined?(EnjuCirculation) %>
27
- <ul>
28
- <%- current_user.profile.user_group.user_group_has_checkout_types.each do |available_checkout_type| -%>
29
- <li>
30
- <%= available_checkout_type.checkout_type.display_name.localize -%>:
31
- <%= current_user.checked_item_count[:"#{available_checkout_type.checkout_type.name}"] -%> / <%= available_checkout_type.checkout_limit -%>
32
- </li>
33
- <%- end -%>
34
- </ul>
21
+ <%= render 'profiles/submenu_checkout', profile: current_user.profile %>
35
22
  <% end %>
36
23
  <ul>
37
24
  <li><%= link_to t('page.edit'), edit_my_account_path -%></li>
@@ -18,14 +18,14 @@
18
18
  <%- end -%>
19
19
 
20
20
  <% if defined?(EnjuCirculation) %>
21
- <%= render 'checkout_list' %>
21
+ <%= render 'checkout_list', profile: @profile %>
22
22
  <% end %>
23
23
  </div>
24
24
  </div>
25
25
 
26
26
  <div id="submenu" class="ui-corner-all ui-widget-content">
27
27
  <% if defined?(EnjuCirculation) %>
28
- <%= render 'submenu_checkout' %>
28
+ <%= render 'submenu_checkout', profile: @profile %>
29
29
  <% end %>
30
30
  <ul>
31
31
  <%- if flash[:query] -%>
@@ -1,3 +1,3 @@
1
1
  module EnjuLeaf
2
- VERSION = "1.1.0.rc22"
2
+ VERSION = "1.1.0"
3
3
  end
@@ -14,7 +14,7 @@ describe UserImportResultsController do
14
14
  end
15
15
 
16
16
  describe "With @user_import_file parameter" do
17
- before (:each) do
17
+ before(:each) do
18
18
  @file = UserImportFile.create user_import: File.new("#{Rails.root}/../../examples/user_import_file_sample_long.tsv"), user: users(:admin)
19
19
  @file.default_user_group = UserGroup.find(2)
20
20
  @file.default_library = Library.find(3)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enju_leaf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0.rc22
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kosuke Tanabe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-06 00:00:00.000000000 Z
11
+ date: 2015-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -36,42 +36,42 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: 0.1.0.pre70
39
+ version: 0.1.0.pre71
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: 0.1.0.pre70
46
+ version: 0.1.0.pre71
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: enju_library
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: 0.1.0.pre44
53
+ version: 0.1.0.pre45
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: 0.1.0.pre44
60
+ version: 0.1.0.pre45
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: enju_manifestation_viewer
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: 0.1.0.pre18
67
+ version: 0.1.0.pre19
68
68
  type: :runtime
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: 0.1.0.pre18
74
+ version: 0.1.0.pre19
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: friendly_id
77
77
  requirement: !ruby/object:Gem::Requirement
@@ -428,42 +428,42 @@ dependencies:
428
428
  requirements:
429
429
  - - "~>"
430
430
  - !ruby/object:Gem::Version
431
- version: 0.1.0.pre48
431
+ version: 0.1.0.pre49
432
432
  type: :development
433
433
  prerelease: false
434
434
  version_requirements: !ruby/object:Gem::Requirement
435
435
  requirements:
436
436
  - - "~>"
437
437
  - !ruby/object:Gem::Version
438
- version: 0.1.0.pre48
438
+ version: 0.1.0.pre49
439
439
  - !ruby/object:Gem::Dependency
440
440
  name: enju_bookmark
441
441
  requirement: !ruby/object:Gem::Requirement
442
442
  requirements:
443
443
  - - "~>"
444
444
  - !ruby/object:Gem::Version
445
- version: 0.1.2.pre22
445
+ version: 0.1.2.pre23
446
446
  type: :development
447
447
  prerelease: false
448
448
  version_requirements: !ruby/object:Gem::Requirement
449
449
  requirements:
450
450
  - - "~>"
451
451
  - !ruby/object:Gem::Version
452
- version: 0.1.2.pre22
452
+ version: 0.1.2.pre23
453
453
  - !ruby/object:Gem::Dependency
454
454
  name: enju_search_log
455
455
  requirement: !ruby/object:Gem::Requirement
456
456
  requirements:
457
457
  - - "~>"
458
458
  - !ruby/object:Gem::Version
459
- version: 0.1.0.pre11
459
+ version: 0.1.0.pre12
460
460
  type: :development
461
461
  prerelease: false
462
462
  version_requirements: !ruby/object:Gem::Requirement
463
463
  requirements:
464
464
  - - "~>"
465
465
  - !ruby/object:Gem::Version
466
- version: 0.1.0.pre11
466
+ version: 0.1.0.pre12
467
467
  - !ruby/object:Gem::Dependency
468
468
  name: vcr
469
469
  requirement: !ruby/object:Gem::Requirement
@@ -752,12 +752,10 @@ files:
752
752
  - app/views/layouts/devise/sessions.html.erb
753
753
  - app/views/layouts/devise/sessions.mobile.erb
754
754
  - app/views/my_accounts/_edit_credential.html.erb
755
- - app/views/my_accounts/_edit_credential.html.slim
756
755
  - app/views/my_accounts/_form.html.erb
757
756
  - app/views/my_accounts/_show.html.erb
758
757
  - app/views/my_accounts/edit.html.erb
759
758
  - app/views/my_accounts/show.html.erb
760
- - app/views/my_accounts/show.html.slim
761
759
  - app/views/my_accounts/show.mobile.erb
762
760
  - app/views/page/403.html.erb
763
761
  - app/views/page/403.mobile.erb
@@ -790,7 +788,6 @@ files:
790
788
  - app/views/page/about.en.html.erb
791
789
  - app/views/page/about.ja.html.erb
792
790
  - app/views/page/add_on.html.erb
793
- - app/views/page/add_on.html.slim
794
791
  - app/views/page/advanced_search.html.erb
795
792
  - app/views/page/configuration.html.erb
796
793
  - app/views/page/export.html.erb
@@ -829,9 +826,7 @@ files:
829
826
  - app/views/user_import_files/_results.html.erb
830
827
  - app/views/user_import_files/edit.html.erb
831
828
  - app/views/user_import_files/index.html.erb
832
- - app/views/user_import_files/index.html.slim
833
829
  - app/views/user_import_files/new.html.erb
834
- - app/views/user_import_files/new.html.slim
835
830
  - app/views/user_import_files/show.html.erb
836
831
  - app/views/user_import_results/_form.html.erb
837
832
  - app/views/user_import_results/_list.html.erb
@@ -1339,9 +1334,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
1339
1334
  version: 1.9.3
1340
1335
  required_rubygems_version: !ruby/object:Gem::Requirement
1341
1336
  requirements:
1342
- - - ">"
1337
+ - - ">="
1343
1338
  - !ruby/object:Gem::Version
1344
- version: 1.3.1
1339
+ version: '0'
1345
1340
  requirements: []
1346
1341
  rubyforge_project:
1347
1342
  rubygems_version: 2.4.5.1
@@ -1,63 +0,0 @@
1
- = f.fields_for :user do |user_form|
2
- #left_pane_detail
3
- .form-group
4
- = user_form.label :username
5
- br
6
- = profile.user.username
7
- .form-group
8
- = user_form.label :email
9
- br
10
- = user_form.text_field :email, class: 'form-control'
11
- .form-group
12
- = f.label :expired_at
13
- br
14
- - if current_user.has_role?('Librarian')
15
- = f.text_field :expired_at, value: profile.expired_at.try(:strftime, "%Y-%m-%d"), class: 'form-control', placeholder: "#{t('page.example')}: 2011-04-12"
16
- - else
17
- = l(profile.expired_at) if profile.expired_at
18
- .form-group
19
- .checkbox-inline
20
- = user_form.check_box :locked, disabled: 'disabled'
21
- = user_form.label :locked
22
- .form-group
23
- = user_form.label t('activerecord.models.role')
24
- br
25
- = user_form.fields_for :user_has_role do |u|
26
- - if current_user.has_role?('Administrator') and current_user != profile.user
27
- = u.select(:role_id, @roles.collect{|r| [r.display_name.localize, r.id]}, {}, {class: 'form-control'})
28
- - else
29
- = u.select(:role_id, @roles.collect{|r| [r.display_name.localize, r.id]}, {}, {disabled: 'disabled', class: 'form-control'})
30
- #right_pane_detail
31
- .form-group
32
- = f.label :full_name
33
- br
34
- = f.text_field :full_name, class: 'form-control'
35
- .form-group
36
- = f.label :full_name_transcription
37
- br
38
- = f.text_field :full_name_transcription, class: 'form-control'
39
- - if current_user.has_role?('Librarian')
40
- .form-group
41
- = f.label t('activerecord.models.user_group')
42
- br
43
- = f.select(:user_group_id, @user_groups.collect{|u| [u.display_name.localize, u.id]}, {}, {class: 'form-control'})
44
- .form-group
45
- = f.label :user_number
46
- br
47
- - if current_user.has_role?('Librarian')
48
- = f.text_field :user_number, class: 'form-control'
49
- - else
50
- = profile.user_number
51
- - if current_user.has_role?('Librarian')
52
- .form-group
53
- = f.label t('activerecord.models.library')
54
- br
55
- = f.select(:library_id, @libraries.collect{|l| [l.display_name.localize, l.id]}, {}, {class: 'form-control'})
56
- .form-group
57
- = f.label t('role.required_role')
58
- br
59
- = f.select(:required_role_id, @roles.collect{|r| [r.display_name.localize, r.id]}, {}, {class: 'form-control'})
60
- .form-group
61
- = f.label :locale
62
- br
63
- = f.select(:locale, @available_languages.collect{|language| [language.display_name.localize, language.iso_639_1]}, {}, {class: 'form-control'})
@@ -1,59 +0,0 @@
1
- .row
2
- #submenu.col-md-3
3
- .panel.panel-default
4
- .panel-heading
5
- h2.panel-title
6
- = t('activerecord.models.profile')
7
- - if defined?(EnjuCirculation)
8
- ul.list-group
9
- - current_user.profile.user_group.user_group_has_checkout_types.each do |available_checkout_type|
10
- li.list-group-item
11
- = available_checkout_type.checkout_type.display_name.localize
12
- | :
13
- = current_user.checked_item_count[:"#{available_checkout_type.checkout_type.name}"]
14
- | /
15
- = available_checkout_type.checkout_limit
16
- ul.list-group
17
- li.list-group-item
18
- = link_to t('page.edit'), edit_my_account_path
19
- li.list-group-item
20
- = link_to t('page.password'), edit_user_registration_path
21
- - if policy(current_user.profile).destroy?
22
- li.list-group-item
23
- = link_to t('page.destroy'), curent_user, data: {confirm: t('page.are_you_sure')}, method: :delete
24
- - if defined?(EnjuSearchLog)
25
- li.list-group-item
26
- = link_to t('activerecord.models.search_history'), search_histories_path
27
- - if defined?(EnjuCirculation)
28
- li.list-group-item
29
- = link_to t('activerecord.models.checkout'), checkouts_path
30
- li.list-group-item
31
- = link_to t('activerecord.models.reserve'), reserves_path
32
- - if defined?(EnjuQuestion)
33
- li.list-group-item
34
- = link_to t('activerecord.models.question'), user_questions_path(current_user)
35
- - if defined?(EnjuBookmark)
36
- li.list-group-item
37
- = link_to t('activerecord.models.bookmark'), bookmarks_path
38
- - if defined?(EnjuPurchaseRequest)
39
- li.list-group-item
40
- = link_to t('activerecord.models.purchase_request'), purchase_requests_path
41
- #content_list.col-md-9
42
- h1.panel-title
43
- = t('page.showing', model: t('activerecord.models.user'))
44
- p#notice
45
- = notice
46
- h2.resource_title
47
- | [U]
48
- = current_user.username
49
- p
50
- = t('activerecord.attributes.profile.user_number')
51
- | :
52
- = current_user.profile.user_number
53
- - if defined?(EnjuCirculation)
54
- h2
55
- = t('activerecord.models.checkout')
56
- => link_to image_tag('icons/date.png', size: '16x16', alt: 'iCalendar', class: 'icon'), checkouts_path(icalendar_token: current_user.profile.checkout_icalendar_token, format: :ics) if current_user.profile.checkout_icalendar_token?
57
- => link_to image_tag('icons/feed.png', size: '16x16', alt: 'RSS', class: 'icon'), checkouts_path(user_id: current_user.username, format: :rss)
58
- => link_to image_tag('icons/page_white_excel.png', size: '16x16', alt: 'TSV', class: 'icon'), checkouts_path(user_id: current_user.username, format: :txt)
59
- = render 'checkouts/list', checkouts: current_user.checkouts.page(params[:page])
@@ -1,7 +0,0 @@
1
- .row
2
- h1.title
3
- = t('page.add_on')
4
- #content_list.col-md-9
5
- = msie_accelerator
6
- #submenu.col-md-3
7
- ul
@@ -1,52 +0,0 @@
1
- .row
2
- #submenu.col-md-3
3
- .panel.panel-default
4
- .panel-heading
5
- h2.panel-title
6
- = t('activerecord.models.user_import_file')
7
- ul.list-group
8
- li.list-group-item
9
- = link_to t('page.new', model: t('activerecord.models.user_import_file')), new_user_import_file_path
10
- #content_list.col-md-9
11
- .panel.panel-default
12
- .panel-heading
13
- h1.panel-title
14
- = t('page.listing', model: t('activerecord.models.user_import_file'))
15
- .panel-body
16
- table.table.table-striped.index
17
- thead
18
- tr
19
- th[style="width: 30px"]
20
- | Id
21
- th
22
- = t('activerecord.attributes.user_import_file.user_import_filename')
23
- th
24
- = t('activerecord.attributes.user_import_file.edit_mode')
25
- th
26
- = t('activerecord.attributes.user_import_file.executed_at')
27
- th
28
- = t('activerecord.attributes.user_import_file.state')
29
- th
30
- tbody
31
- - @user_import_files.each do |user_import_file|
32
- | <tr class="line
33
- = cycle("0", "1")
34
- | ">
35
- td
36
- = link_to (user_import_file.id), user_import_file
37
- td
38
- = link_to user_import_file.user_import_filename, user_import_file_path(user_import_file, format: :download) if user_import_file.user_import_filename
39
- br
40
- = t('activerecord.models.user')
41
- | :
42
- = link_to user_import_file.user.username, user_import_file.user.profile if user_import_file.user.try(:profile)
43
- td
44
- = user_import_file.edit_mode
45
- td
46
- = l(user_import_file.executed_at) if user_import_file.executed_at
47
- td
48
- = localized_state(user_import_file.current_state)
49
- td
50
- => link_to t('page.show'), user_import_file
51
- => link_to t('page.destroy'), user_import_file, data: {confirm: t('page.are_you_sure')}, method: :delete
52
- = paginate(@user_import_files)
@@ -1,64 +0,0 @@
1
- .row
2
- #submenu.col-md-3
3
- .panel.panel-default
4
- .panel-heading
5
- h2.panel-title
6
- = t('activerecord.models.user_import_file')
7
- ul.list-group
8
- li.list-group-item
9
- = back_to_index(flash[:page_info])
10
- #content_list.col-md-9
11
- .panel.panel-default
12
- .panel-heading
13
- h1.panel-title
14
- = t('page.new', model: t('activerecord.models.user_import_file'))
15
- .panel-body
16
- = form_for(@user_import_file, html: { multipart: true }) do |f|
17
- = f.error_messages
18
- .form-group
19
- = f.label t('page.file')
20
- br
21
- = f.file_field :user_import
22
- .form-group
23
- = f.label :edit_mode
24
- br
25
- .radio-inline
26
- = f.radio_button :edit_mode, 'create', checked: 'checked'
27
- = f.label :edit_mode, t('page.create'), value: 'create'
28
- .radio-inline
29
- = f.radio_button :edit_mode, 'update'
30
- = f.label :edit_mode, t('page.update'), value: 'update'
31
- .radio-inline
32
- = f.radio_button :edit_mode, 'update_relationship'
33
- = f.label :edit_mode, t('resource_import_file.update_relationship'), value: 'update_relationship'
34
- .radio-inline
35
- = f.radio_button :edit_mode, 'destroy'
36
- = f.label :edit_mode, t('page.destroy'), value: 'destroy'
37
- .form-group
38
- = f.label :user_encoding
39
- br
40
- .radio-inline
41
- = f.radio_button :user_encoding, 'auto_detect', checked: 'checked'
42
- = f.label :user_encoding, t('import.auto_detect'), value: 'auto_detect'
43
- .radio-inline
44
- = f.radio_button :user_encoding, 'utf-8'
45
- = f.label :user_encoding, 'UTF-8', value: 'utf-8'
46
- .radio-inline
47
- = f.radio_button :user_encoding, 'shift_jis'
48
- = f.label :user_encoding, 'Shift_JIS', value: 'shift_jis'
49
- .radio-inline
50
- = f.radio_button :user_encoding, 'euc-jp'
51
- = f.label :user_encoding, 'EUC-JP', value: 'euc-jp'
52
- .form-group
53
- = f.label :default_user_group_id
54
- = f.select(:default_user_group_id, @user_groups.collect{|u| [u.display_name.localize, u.id]}, {}, {class: 'form-control'})
55
- br
56
- = t('user_import_file.default_user_group')
57
- .form-group
58
- = f.label :default_library_id
59
- = f.select(:default_library_id, @libraries.collect{|l| [l.display_name.localize, l.id]}, {}, {class: 'form-control'})
60
- br
61
- = t('user_import_file.default_library')
62
- .form-group
63
- = f.hidden_field :mode, value: 'import'
64
- = f.submit t('page.start_import'), class: 'btn btn-default'