enju_leaf 1.2.0.beta.1 → 1.2.0.beta.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (167) hide show
  1. checksums.yaml +4 -4
  2. data/lib/enju_leaf/engine.rb +1 -15
  3. data/lib/enju_leaf/version.rb +1 -1
  4. data/lib/generators/enju_leaf/quick_install/quick_install_generator.rb +3 -3
  5. data/lib/generators/enju_leaf/setup/setup_generator.rb +0 -1
  6. data/spec/controllers/page_controller_spec.rb +1 -1
  7. data/spec/dummy/app/controllers/application_controller.rb +0 -1
  8. data/spec/dummy/app/helpers/application_helper.rb +2 -1
  9. data/spec/dummy/app/models/user.rb +0 -1
  10. data/spec/dummy/config/application.rb +1 -2
  11. data/{db → spec/dummy/db}/migrate/041_create_roles.rb +0 -0
  12. data/spec/dummy/db/migrate/059_create_libraries.rb +1 -5
  13. data/spec/dummy/db/migrate/069_create_shelves.rb +1 -5
  14. data/{db → spec/dummy/db}/migrate/077_create_user_groups.rb +0 -0
  15. data/spec/dummy/db/migrate/130_create_request_status_types.rb +1 -5
  16. data/spec/dummy/db/migrate/131_create_request_types.rb +1 -5
  17. data/spec/dummy/db/migrate/20100314190054_add_opening_hour_to_library.rb +9 -0
  18. data/{db → spec/dummy/db}/migrate/20100606065209_create_user_has_roles.rb +0 -0
  19. data/{db → spec/dummy/db}/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +0 -0
  20. data/spec/dummy/db/migrate/20111129044509_add_pickup_location_to_reserve.rb +6 -0
  21. data/{db → spec/dummy/db}/migrate/20130221154434_add_additional_attributes_to_user.rb +0 -0
  22. data/spec/dummy/db/migrate/20130412083556_add_latitude_and_longitude_to_library.rb +6 -0
  23. data/{db → spec/dummy/db}/migrate/20140110122216_create_user_import_files.rb +0 -0
  24. data/{db → spec/dummy/db}/migrate/20140110131010_create_user_import_results.rb +0 -0
  25. data/{db → spec/dummy/db}/migrate/20140122054321_create_profiles.rb +0 -0
  26. data/{db → spec/dummy/db}/migrate/20140524074813_create_user_import_file_transitions.rb +0 -0
  27. data/{db → spec/dummy/db}/migrate/20140610123439_drop_email_unique_constraint_enju_leaf_rc10.rb +0 -0
  28. data/{db → spec/dummy/db}/migrate/20140628072217_add_user_encoding_to_user_import_file.rb +0 -0
  29. data/{db → spec/dummy/db}/migrate/20140709113413_create_user_export_files.rb +0 -0
  30. data/{db → spec/dummy/db}/migrate/20140709113905_create_user_export_file_transitions.rb +0 -0
  31. data/{db → spec/dummy/db}/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +0 -0
  32. data/{db → spec/dummy/db}/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +0 -0
  33. data/{db → spec/dummy/db}/migrate/20140811031145_add_expired_at_to_profile.rb +0 -0
  34. data/spec/dummy/db/migrate/20140821151023_create_colors.rb +14 -0
  35. data/{db → spec/dummy/db}/migrate/20141003181336_add_full_name_transcription_to_profile.rb +0 -0
  36. data/{db → spec/dummy/db}/migrate/20141003182825_add_date_of_birth_to_profile.rb +0 -0
  37. data/spec/dummy/db/migrate/20141020120523_add_library_id_to_checkout.rb +6 -0
  38. data/spec/dummy/db/migrate/20150106001709_create_demands.rb +14 -0
  39. data/{db → spec/dummy/db}/migrate/20150421023923_create_identities.rb +0 -0
  40. data/{db → spec/dummy/db}/migrate/20150506105356_add_error_message_to_user_import_result.rb +0 -0
  41. data/spec/dummy/db/migrate/20150924115059_create_withdraws.rb +13 -0
  42. data/{db → spec/dummy/db}/migrate/20151126005552_add_provider_to_identity.rb +0 -0
  43. data/spec/dummy/db/migrate/20160610093229_add_html_snippet_to_library_group.rb +5 -0
  44. data/{db → spec/dummy/db}/migrate/20160627232219_add_most_recent_to_user_import_file_transitions.rb +0 -0
  45. data/{db → spec/dummy/db}/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb +0 -0
  46. data/spec/dummy/db/migrate/20160703184619_add_most_recent_to_reserve_transitions.rb +9 -0
  47. data/spec/dummy/db/migrate/20160703184650_add_most_recent_to_manifestation_checkout_stat_transitions.rb +9 -0
  48. data/spec/dummy/db/migrate/20160703184723_add_most_recent_to_manifestation_reserve_stat_transitions.rb +9 -0
  49. data/spec/dummy/db/migrate/20160703184747_add_most_recent_to_user_checkout_stat_transitions.rb +9 -0
  50. data/spec/dummy/db/migrate/20160703184805_add_most_recent_to_user_reserve_stat_transitions.rb +9 -0
  51. data/spec/dummy/db/migrate/20160703185015_add_most_recent_to_message_transitions.rb +9 -0
  52. data/spec/dummy/db/migrate/20160703190209_add_foreign_key_on_manifestation_id_to_reserve.rb +5 -0
  53. data/spec/dummy/db/schema.rb +47 -12
  54. data/spec/fixtures/library_groups.yml +1 -4
  55. data/spec/models/user_spec.rb +0 -22
  56. data/spec/rails_helper.rb +1 -1
  57. data/spec/views/page/index.html.erb_spec.rb +0 -2
  58. metadata +96 -337
  59. data/app/controllers/concerns/enju_leaf/controller.rb +0 -225
  60. data/app/controllers/my_accounts_controller.rb +0 -93
  61. data/app/controllers/names_controller.rb +0 -60
  62. data/app/controllers/profiles_controller.rb +0 -219
  63. data/app/controllers/roles_controller.rb +0 -61
  64. data/app/controllers/user_export_files_controller.rb +0 -116
  65. data/app/controllers/user_groups_controller.rb +0 -118
  66. data/app/controllers/user_import_files_controller.rb +0 -129
  67. data/app/controllers/user_import_results_controller.rb +0 -57
  68. data/app/mailers/notifier.rb +0 -30
  69. data/app/models/identity.rb +0 -9
  70. data/app/models/profile.rb +0 -101
  71. data/app/models/role.rb +0 -50
  72. data/app/models/user_export_file.rb +0 -67
  73. data/app/models/user_export_file_state_machine.rb +0 -15
  74. data/app/models/user_export_file_transition.rb +0 -20
  75. data/app/models/user_group.rb +0 -29
  76. data/app/models/user_has_role.rb +0 -19
  77. data/app/models/user_import_file.rb +0 -352
  78. data/app/models/user_import_file_state_machine.rb +0 -19
  79. data/app/models/user_import_file_transition.rb +0 -20
  80. data/app/models/user_import_result.rb +0 -20
  81. data/app/policies/application_policy.rb +0 -53
  82. data/app/policies/name_policy.rb +0 -21
  83. data/app/policies/profile_policy.rb +0 -55
  84. data/app/policies/role_policy.rb +0 -21
  85. data/app/policies/user_export_file_policy.rb +0 -21
  86. data/app/policies/user_group_policy.rb +0 -22
  87. data/app/policies/user_import_file_policy.rb +0 -21
  88. data/app/policies/user_import_result_policy.rb +0 -21
  89. data/app/views/my_accounts/_edit_credential.html.erb +0 -99
  90. data/app/views/my_accounts/_form.html.erb +0 -24
  91. data/app/views/my_accounts/_show.html.erb +0 -1
  92. data/app/views/my_accounts/edit.html.erb +0 -32
  93. data/app/views/my_accounts/show.html+phone.erb +0 -1
  94. data/app/views/my_accounts/show.html.erb +0 -49
  95. data/app/views/names/_form.html.erb +0 -41
  96. data/app/views/names/edit.html.erb +0 -6
  97. data/app/views/names/index.html.erb +0 -37
  98. data/app/views/names/new.html.erb +0 -5
  99. data/app/views/names/show.html.erb +0 -34
  100. data/app/views/profiles/_edit_credential.html.erb +0 -88
  101. data/app/views/profiles/_edit_profile.html.erb +0 -42
  102. data/app/views/profiles/_form.html.erb +0 -15
  103. data/app/views/profiles/_show.html.erb +0 -1
  104. data/app/views/profiles/edit.html.erb +0 -33
  105. data/app/views/profiles/index.html.erb +0 -70
  106. data/app/views/profiles/new.html.erb +0 -88
  107. data/app/views/profiles/show.html+phone.erb +0 -1
  108. data/app/views/profiles/show.html.erb +0 -71
  109. data/app/views/roles/_form.html.erb +0 -19
  110. data/app/views/roles/edit.html.erb +0 -13
  111. data/app/views/roles/index.html.erb +0 -32
  112. data/app/views/roles/new.html.erb +0 -12
  113. data/app/views/roles/show.html.erb +0 -46
  114. data/app/views/user_export_files/_form.html.erb +0 -12
  115. data/app/views/user_export_files/edit.html.erb +0 -6
  116. data/app/views/user_export_files/index.html.erb +0 -44
  117. data/app/views/user_export_files/new.html.erb +0 -16
  118. data/app/views/user_export_files/show.html.erb +0 -36
  119. data/app/views/user_groups/_form.html.erb +0 -40
  120. data/app/views/user_groups/edit.html.erb +0 -13
  121. data/app/views/user_groups/index.html.erb +0 -51
  122. data/app/views/user_groups/new.html.erb +0 -12
  123. data/app/views/user_groups/show.html.erb +0 -68
  124. data/app/views/user_import_files/_form.html.erb +0 -61
  125. data/app/views/user_import_files/_results.html.erb +0 -22
  126. data/app/views/user_import_files/edit.html.erb +0 -6
  127. data/app/views/user_import_files/index.html.erb +0 -45
  128. data/app/views/user_import_files/new.html.erb +0 -60
  129. data/app/views/user_import_files/show.html.erb +0 -85
  130. data/app/views/user_import_results/_form.html.erb +0 -29
  131. data/app/views/user_import_results/_list.html.erb +0 -22
  132. data/app/views/user_import_results/_list_lines.html.erb +0 -24
  133. data/app/views/user_import_results/index.html.erb +0 -25
  134. data/app/views/user_import_results/index.txt.erb +0 -3
  135. data/app/views/user_import_results/show.html.erb +0 -33
  136. data/db/migrate/20091202124834_create_versions.rb +0 -18
  137. data/spec/controllers/my_accounts_controller_spec.rb +0 -229
  138. data/spec/controllers/profiles_controller_spec.rb +0 -594
  139. data/spec/controllers/roles_controller_spec.rb +0 -136
  140. data/spec/controllers/user_export_files_controller_spec.rb +0 -296
  141. data/spec/controllers/user_groups_controller_spec.rb +0 -443
  142. data/spec/controllers/user_import_files_controller_spec.rb +0 -305
  143. data/spec/controllers/user_import_results_controller_spec.rb +0 -157
  144. data/spec/fixtures/user_export_files.yml +0 -25
  145. data/spec/fixtures/user_import_files.yml +0 -51
  146. data/spec/fixtures/user_import_results.yml +0 -26
  147. data/spec/fixtures/user_reserve_stats.yml +0 -27
  148. data/spec/models/basket_spec.rb +0 -23
  149. data/spec/models/profile_spec.rb +0 -98
  150. data/spec/models/role_spec.rb +0 -40
  151. data/spec/models/user_export_file_spec.rb +0 -30
  152. data/spec/models/user_group_spec.rb +0 -37
  153. data/spec/models/user_has_role_spec.rb +0 -18
  154. data/spec/models/user_import_file_spec.rb +0 -220
  155. data/spec/models/user_import_result_spec.rb +0 -20
  156. data/spec/requests/profiles_spec.rb +0 -9
  157. data/spec/routing/profiles_routing_spec.rb +0 -35
  158. data/spec/routing/resource_import_files_routing_spec.rb +0 -35
  159. data/spec/routing/roles_routing_spec.rb +0 -35
  160. data/spec/routing/users_spec.rb +0 -14
  161. data/spec/views/my_accounts/show.html.erb_spec.rb +0 -43
  162. data/spec/views/profiles/edit.html.erb_spec.rb +0 -42
  163. data/spec/views/profiles/index.html.erb_spec.rb +0 -19
  164. data/spec/views/profiles/new.html.erb_spec.rb +0 -25
  165. data/spec/views/profiles/show.html.erb_spec.rb +0 -31
  166. data/spec/views/user_export_files/new.html.erb_spec.rb +0 -19
  167. data/spec/views/user_import_results/index.html.erb_spec.rb +0 -29
@@ -1 +0,0 @@
1
- <%= render 'page/index' %>
@@ -1,49 +0,0 @@
1
- <div id="content_detail" class="ui-corner-all ui-widget-content">
2
- <h1 class="title"><%= t('page.showing', model: t('activerecord.models.user')) -%></h1>
3
- <div id="content_list">
4
- <p id="notice"><%= notice %></p>
5
-
6
- <h2 class="resource_title">
7
- [U]
8
- <%= current_user.username -%>
9
- </h2>
10
-
11
- <p><%= t('activerecord.attributes.profile.user_number') %>: <%= @profile.user_number %></p>
12
- <% if defined?(EnjuOrcid) %>
13
- <p><%= 'ORCID iD' %>: <%= link_to orcid_url(@profile), orcid_url(@profile) %></p>
14
- <% end %>
15
-
16
- <% if defined?(EnjuCirculation) %>
17
- <%= render 'profiles/checkout_list', profile: @profile %>
18
- <% end %>
19
- </div>
20
- </div>
21
-
22
- <div id="submenu" class="ui-corner-all ui-widget-content">
23
- <% if defined?(EnjuCirculation) %>
24
- <%= render 'profiles/submenu_checkout', profile: @profile %>
25
- <% end %>
26
- <ul>
27
- <li><%= link_to t('page.edit'), edit_my_account_path -%></li>
28
- <li><%= link_to t('activerecord.models.registration'), edit_user_registration_path -%></li>
29
- <%- if policy(@profile).destroy? -%>
30
- <li><%= link_to t('page.destroy'), @profile, data: {confirm: t('page.are_you_sure')}, method: :delete -%></li>
31
- <%- end -%>
32
- <% if defined?(EnjuSearchLog) %>
33
- <li><%= link_to t('activerecord.models.search_history'), search_histories_path %></li>
34
- <% end %>
35
- <% if defined?(EnjuCirculation) %>
36
- <li><%= link_to t('page.listing', model: t('activerecord.models.checkout')), checkouts_path(user_id: @profile.user.username) %></li>
37
- <li><%= link_to t('page.listing', model: t('activerecord.models.reserve')), reserves_path(user_id: @profile.user.username) %></li>
38
- <% end %>
39
- <% if defined?(EnjuQuestion) %>
40
- <li><%= link_to t('page.listing', model: t('activerecord.models.question')), questions_path(user_id: @profile.user.username) %></li>
41
- <% end %>
42
- <% if defined?(EnjuBookmark) %>
43
- <li><%= link_to t('page.listing', model: t('activerecord.models.bookmark')), bookmarks_path(user_id: @profile.user.username) %></li>
44
- <% end %>
45
- <% if defined?(EnjuPurchaseRequest) %>
46
- <li><%= link_to t('page.listing', model: t('activerecord.models.purchase_request')), purchase_requests_path(user_id: @profile.user.username) %></li>
47
- <% end %>
48
- </ul>
49
- </div>
@@ -1,41 +0,0 @@
1
- <%= form_for(@name) do |f| %>
2
- <% if @name.errors.any? %>
3
- <div id="error_explanation">
4
- <h2><%= pluralize(@name.errors.count, "error") %> prohibited this name from being saved:</h2>
5
-
6
- <ul>
7
- <% @name.errors.full_messages.each do |message| %>
8
- <li><%= message %></li>
9
- <% end %>
10
- </ul>
11
- </div>
12
- <% end %>
13
-
14
- <div class="field">
15
- <%= f.label :first_name %><br>
16
- <%= f.text_field :first_name %>
17
- </div>
18
- <div class="field">
19
- <%= f.label :middle_name %><br>
20
- <%= f.text_field :middle_name %>
21
- </div>
22
- <div class="field">
23
- <%= f.label :last_name %><br>
24
- <%= f.text_field :last_name %>
25
- </div>
26
- <div class="field">
27
- <%= f.label :language_id %><br>
28
- <%= f.number_field :language_id %>
29
- </div>
30
- <div class="field">
31
- <%= f.label :profile_id %><br>
32
- <%= f.number_field :profile_id %>
33
- </div>
34
- <div class="field">
35
- <%= f.label :position %><br>
36
- <%= f.number_field :position %>
37
- </div>
38
- <div class="actions">
39
- <%= f.submit %>
40
- </div>
41
- <% end %>
@@ -1,6 +0,0 @@
1
- <h1>Editing Name</h1>
2
-
3
- <%= render 'form' %>
4
-
5
- <%= link_to 'Show', @name %> |
6
- <%= link_to 'Back', names_path %>
@@ -1,37 +0,0 @@
1
- <p id="notice"><%= notice %></p>
2
-
3
- <h1>Listing Names</h1>
4
-
5
- <table>
6
- <thead>
7
- <tr>
8
- <th>First name</th>
9
- <th>Middle name</th>
10
- <th>Last name</th>
11
- <th>Language</th>
12
- <th>Profile</th>
13
- <th>Position</th>
14
- <th colspan="3"></th>
15
- </tr>
16
- </thead>
17
-
18
- <tbody>
19
- <% @names.each do |name| %>
20
- <tr>
21
- <td><%= name.first_name %></td>
22
- <td><%= name.middle_name %></td>
23
- <td><%= name.last_name %></td>
24
- <td><%= name.language_id %></td>
25
- <td><%= name.profile_id %></td>
26
- <td><%= name.position %></td>
27
- <td><%= link_to 'Show', name %></td>
28
- <td><%= link_to 'Edit', edit_name_path(name) %></td>
29
- <td><%= link_to 'Destroy', name, method: :delete, data: { confirm: 'Are you sure?' } %></td>
30
- </tr>
31
- <% end %>
32
- </tbody>
33
- </table>
34
-
35
- <br>
36
-
37
- <%= link_to 'New Name', new_name_path %>
@@ -1,5 +0,0 @@
1
- <h1>New Name</h1>
2
-
3
- <%= render 'form' %>
4
-
5
- <%= link_to 'Back', names_path %>
@@ -1,34 +0,0 @@
1
- <p id="notice"><%= notice %></p>
2
-
3
- <p>
4
- <strong>First name:</strong>
5
- <%= @name.first_name %>
6
- </p>
7
-
8
- <p>
9
- <strong>Middle name:</strong>
10
- <%= @name.middle_name %>
11
- </p>
12
-
13
- <p>
14
- <strong>Last name:</strong>
15
- <%= @name.last_name %>
16
- </p>
17
-
18
- <p>
19
- <strong>Language:</strong>
20
- <%= @name.language_id %>
21
- </p>
22
-
23
- <p>
24
- <strong>Profile:</strong>
25
- <%= @name.profile_id %>
26
- </p>
27
-
28
- <p>
29
- <strong>Position:</strong>
30
- <%= @name.position %>
31
- </p>
32
-
33
- <%= link_to 'Edit', edit_name_path(@name) %> |
34
- <%= link_to 'Back', names_path %>
@@ -1,88 +0,0 @@
1
- <%= f.fields_for :user do |user_form| %>
2
- <div id="left_pane_detail">
3
-
4
- <div class="field">
5
- <%= user_form.label :username -%><br />
6
- <%= profile.user.username -%>
7
- </div>
8
-
9
- <div class="field">
10
- <%= user_form.label :email -%><br />
11
- <%= user_form.text_field :email %>
12
- </div>
13
-
14
- <div class="field">
15
- <%= user_form.label :auto_generated_password -%>
16
- <%= user_form.check_box :auto_generated_password -%>
17
- </div>
18
-
19
- <div class="field">
20
- <%= f.label :expired_at -%><br />
21
- <%- if current_user.has_role?('Librarian') -%>
22
- <%= f.text_field :expired_at, value: profile.expired_at.try(:strftime, "%Y-%m-%d"), class: 'date_text_field', placeholder: "#{t('page.example')}: 2011-04-12"-%>
23
- <%- else -%>
24
- <%= l(profile.expired_at) if profile.expired_at -%>
25
- <%- end -%>
26
- </div>
27
-
28
- <div class="field">
29
- <%= user_form.label :locked -%>
30
- <%= user_form.check_box :locked -%>
31
- </div>
32
-
33
- <div class="field">
34
- <%= user_form.label t('activerecord.models.role') -%><br />
35
- <%= user_form.fields_for :user_has_role do |u| %>
36
- <%- if current_user.has_role?('Administrator') and current_user != profile.user -%>
37
- <%= u.select :role_id, @roles.select{|r| r.name != 'Guest' }.collect{|r| [r.display_name.localize, r.id]} %>
38
- <% else %>
39
- <%= u.select :role_id, @roles.select{|r| r.name != 'Guest' }.collect{|r| [r.display_name.localize, r.id]}, {}, {disabled: 'disabled'} %>
40
- <% end %>
41
- <% end %>
42
- </div>
43
- </div>
44
-
45
- <div id="right_pane_detail">
46
- <div class="field">
47
- <%= f.label :full_name -%><br />
48
- <%= f.text_field :full_name -%>
49
- </div>
50
-
51
- <div class="field">
52
- <%= f.label :full_name_transcription -%><br />
53
- <%= f.text_field :full_name_transcription -%>
54
- </div>
55
-
56
- <%- if current_user.has_role?('Librarian') -%>
57
- <div class="field">
58
- <%= f.label t('activerecord.models.user_group') -%><br />
59
- <%= f.select(:user_group_id, @user_groups.collect{|u| [u.display_name.localize, u.id]}) -%>
60
- </div>
61
- <%- end -%>
62
-
63
- <div class="field">
64
- <%= f.label :user_number -%><br />
65
- <%- if current_user.has_role?('Librarian') -%>
66
- <%= f.text_field :user_number, class: 'resource_user_number' -%>
67
- <%- else -%>
68
- <%= profile.user_number -%>
69
- <%- end -%>
70
- </div>
71
-
72
- <%- if current_user.has_role?('Librarian') -%>
73
- <div class="field">
74
- <%= f.label t('activerecord.models.library') -%><br />
75
- <%= f.select(:library_id, @libraries.collect{|l| [l.display_name.localize, l.id]}) -%>
76
- </div>
77
-
78
- <div class="field">
79
- <%= f.label t('role.required_role') -%><br />
80
- <%= f.select(:required_role_id, @roles.collect{|r| [r.display_name.localize, r.id]}) -%>
81
- </div>
82
- <%- end -%>
83
- <div class="field">
84
- <%= f.label :locale -%><br />
85
- <%= f.select(:locale, @available_languages.collect{|language| [language.display_name.localize, language.iso_639_1]}) -%>
86
- </div>
87
- </div>
88
- <% end %>
@@ -1,42 +0,0 @@
1
- <% if defined?(EnjuCirculation) %>
2
- <div class="field">
3
- <%= f.label t('user.checkout_history_icalendar_url') -%><br />
4
- <div id="feed_token">
5
- <%- if profile.checkout_icalendar_token? -%>
6
- <%= link_to checkouts_url(icalendar_token: profile.checkout_icalendar_token, format: :ics), checkouts_url(icalendar_token: profile.checkout_icalendar_token, format: :ics) -%>
7
- <%= f.hidden_field :checkout_icalendar_token -%>
8
- <%- end -%>
9
- <br />
10
- <input onclick="$.ajax({data:'authenticity_token=' + encodeURIComponent('<%= form_authenticity_token %>'), success:function(request){$('#feed_token').html(request);}, type:'get', url:'<%= edit_profile_path(profile, mode: 'feed_token') %>'});" type="button" value="<%= t('page.reset') %>" />
11
- <input onclick="$.ajax({data:'authenticity_token=' + encodeURIComponent('<%= form_authenticity_token %>'), success:function(request){$('#feed_token').html(request);}, type:'get', url:'<%= edit_profile_path(profile, disable: true, mode: 'feed_token') %>'});" type="button" value="<%= t('page.delete') %>" />
12
- </div>
13
- <br />
14
- </div>
15
- <% end %>
16
-
17
- <% if defined?(EnjuSearchLog) %>
18
- <div class="field">
19
- <%= f.label :save_search_history %>
20
- <%= f.check_box :save_search_history %>
21
- </div>
22
- <% end %>
23
-
24
- <% if defined?(EnjuCirculation) %>
25
- <div class="field">
26
- <%= f.label :save_checkout_history %>
27
- <%= f.check_box :save_checkout_history %>
28
- </div>
29
- <% end %>
30
-
31
- <% if current_user.has_role?('Librarian') %>
32
- <div class="field">
33
- <%= f.label :note -%><br />
34
- <%= f.text_area :note, class: 'resource_textarea' -%>
35
- </div>
36
- <% end %>
37
-
38
- <div class="actions">
39
- <%= f.submit %>
40
- </div>
41
-
42
-
@@ -1,15 +0,0 @@
1
- <%= form_for(@user) do |f| %>
2
- <%= f.error_notification -%>
3
-
4
- <div class="field">
5
- <%= f.label :username %><br />
6
- <%= f.text_field :username %>
7
- </div>
8
- <div class="field">
9
- <%= f.label :email %><br />
10
- <%= f.email_field :email %>
11
- </div>
12
- <div class="actions">
13
- <%= f.submit %>
14
- </div>
15
- <% end %>
@@ -1 +0,0 @@
1
- <%= render 'page/index' %>
@@ -1,33 +0,0 @@
1
- <div id="content_detail" class="ui-corner-all ui-widget-content">
2
- <h1 class="title"><%= t('page.edit_user_profile', login_name: @profile.user.username) -%></h1>
3
- <div id="content_list">
4
- <%= render 'page/required_field' %>
5
- <%= simple_form_for(@profile, validate: true) do |f| -%>
6
- <%= f.error_messages -%>
7
-
8
- <%= render partial: 'profiles/edit_credential', locals: {f: f, profile: @profile} -%>
9
-
10
- <div class="actions" style="clear: both">
11
- <%= f.submit %>
12
- </div>
13
-
14
- <div class="field">
15
- <%= f.label :keyword_list -%><br />
16
- <%= f.text_area :keyword_list, class: 'resource_textarea' -%>
17
- </div>
18
-
19
- <%= render partial: 'profiles/edit_profile', locals: {f: f, profile: @profile} -%>
20
- <%- end -%>
21
-
22
- </div>
23
- </div>
24
-
25
- <div id="submenu" class="ui-corner-all ui-widget-content">
26
- <ul>
27
- <li><%= link_to t('page.show'), @profile -%></li>
28
- <li><%= link_to t('page.listing', model: t('activerecord.models.profile')), profiles_path -%></li>
29
- <%- if policy(@profile).destroy? -%>
30
- <li><%= link_to t('page.destroy'), @profile, data: {confirm: t('page.are_you_sure')}, method: :delete -%></li>
31
- <%- end -%>
32
- </ul>
33
- </div>
@@ -1,70 +0,0 @@
1
- <div id="content_detail" class="ui-corner-all ui-widget-content">
2
- <h1 class="title"><%= t('page.listing', model: t('activerecord.models.profile')) -%></h1>
3
- <div id="content_list">
4
- <p id="notice"><%= notice %></p>
5
-
6
- <div class="search_form">
7
- <%= form_for :profiles, url: profiles_path, html: {method: 'get'} do -%>
8
- <p>
9
- <%= label_tag :query, t('page.search_term') -%>: <%= search_field_tag 'query', h(@query), class: 'search_form', placeholder: t('page.search_term') -%>
10
- <%= submit_tag t('page.search') -%>
11
- </p>
12
- <%- end -%>
13
- </div>
14
-
15
- <table class="table table-striped index">
16
- <tr>
17
- <th><%= t('activerecord.attributes.profile.user_number') -%></th>
18
- <th><%= t('activerecord.attributes.user.username') -%>
19
- <%= link_to image_tag('icons/arrow_up.png', size: '16x16', alt: t('page.asc')), url_for(params.permit.merge(sort_by: 'username', order: 'asc', only_path: true)) -%>
20
- <%= link_to image_tag('icons/arrow_down.png', size: '16x16', alt: t('page.desc')), url_for(params.permit.merge(sort_by: 'username', order: 'desc', only_path: true)) -%>
21
- </th>
22
- <th>
23
- <%= t('page.created_at') -%>
24
- <%= link_to image_tag('icons/arrow_up.png', size: '16x16', alt: t('page.asc')), url_for(params.permit.merge(sort_by: 'created_at', order: 'asc', only_path: true)) -%>
25
- <%= link_to image_tag('icons/arrow_down.png', size: '16x16', alt: t('page.desc')), url_for(params.permit.merge(sort_by: 'created_at', order: 'desc', only_path: true)) -%>
26
- </th>
27
- <th style="width: 80px"></th>
28
- </tr>
29
-
30
- <%- @profiles.each_with_index do |profile, i| -%>
31
- <tr class="line<%= cycle("0", "1") -%>">
32
- <td>
33
- <% if profile.user_number? %>
34
- <%= link_to profile.user_number, profile -%>
35
- <% else %>
36
- <%= link_to t('profile.no_number'), profile -%>
37
- <% end %>
38
- </td>
39
- <td>
40
- <%= profile.user.try(:username) -%>
41
- <br />
42
- <%= profile.full_name %>
43
- </td>
44
- <td><%= l(profile.created_at) -%></td>
45
- <td>
46
- <%= link_to t('page.show'), profile -%>
47
- <%= link_to t('page.edit'), edit_profile_path(profile) if policy(profile).update? -%>
48
- </td>
49
- </tr>
50
- <%- end -%>
51
- </table>
52
-
53
- <br />
54
- <%= paginate(@profiles) -%>
55
-
56
- </div>
57
- </div>
58
-
59
- <div id="submenu" class="ui-corner-all ui-widget-content">
60
- <ul>
61
- <%- if current_user.try(:has_role?, 'Librarian') -%>
62
- <li><%= link_to t('page.new', model: t('activerecord.models.profile')), new_profile_path -%></li>
63
- <li><%= link_to t('page.new', model: t('activerecord.models.user_import_file')), new_user_import_file_path -%></li>
64
- <li><%= link_to t('page.listing', model: t('activerecord.models.user_import_file')), user_import_files_path -%></li>
65
- <%- if current_user.has_role?('Administrator') -%>
66
- <li><%= link_to t('activerecord.models.user_export_file'), user_export_files_path -%></li>
67
- <%- end -%>
68
- <%- end -%>
69
- </ul>
70
- </div>
@@ -1,88 +0,0 @@
1
- <div id="content_detail" class="ui-corner-all ui-widget-content">
2
- <h1 class="title"><%= t('page.new', model: t('activerecord.models.profile')) -%></h1>
3
- <div id="content_list">
4
- <%= render 'page/required_field' %>
5
- <%= simple_form_for(@profile, validate: true) do |f| -%>
6
- <%= f.error_messages -%>
7
-
8
- <%= f.fields_for :user do |user_form| %>
9
- <div class="field">
10
- <%= user_form.label :username -%>
11
- <%= user_form.text_field :username, class: 'resource_user' -%>
12
- </div>
13
-
14
- <div class="field">
15
- <%= user_form.label :email -%>
16
- <%= user_form.email_field :email, class: 'resource_email' -%>
17
- </div>
18
- <% end %>
19
-
20
- <div class="field">
21
- <%= f.label :expired_at -%>
22
- <%= f.text_field :expired_at, class: 'date_text_field', placeholder: "#{t('page.example')}: 2011-04-12"-%>
23
- </div>
24
-
25
- <div class="field">
26
- <%= f.label :full_name -%><br />
27
- <%= f.text_field :full_name -%>
28
- </div>
29
-
30
- <div class="field">
31
- <%= f.label :full_name_transcription -%><br />
32
- <%= f.text_field :full_name_transcription -%>
33
- </div>
34
-
35
- <div class="field">
36
- <%= f.label :user_group_id -%>
37
- <%= f.select(:user_group_id, @user_groups.collect{|u| [u.display_name.localize, u.id]}) -%>
38
- </div>
39
-
40
- <div class="field">
41
- <%= f.label t('activerecord.models.library') -%>
42
- <%= f.select(:library_id, @libraries.collect{|l| [l.display_name.localize, l.id]}) -%>
43
- </div>
44
-
45
- <div class="field">
46
- <%= f.label :locale -%>
47
- <%= f.select(:locale, @available_languages.collect{|language| [language.display_name.localize, language.iso_639_1]}) -%>
48
- </div>
49
-
50
- <% if defined?(EnjuSearchLog) %>
51
- <div class="field">
52
- <%= f.label :save_search_history %>
53
- <%= f.check_box :save_search_history %>
54
- </div>
55
- <% end %>
56
-
57
- <% if defined?(EnjuCirculation) %>
58
- <div class="field">
59
- <%= f.label :save_checkout_history %>
60
- <%= f.check_box :save_checkout_history %>
61
- </div>
62
- <% end %>
63
-
64
- <% if current_user.has_role?('Librarian') %>
65
- <div class="field">
66
- <%= f.label :note -%><br />
67
- <%= f.text_area :note, class: 'resource_textarea' -%>
68
- </div>
69
- <% end %>
70
-
71
- <div class="field">
72
- <%= f.label :user_number -%>
73
- <%= f.text_field :user_number, class: 'resource_user' -%>
74
- </div>
75
-
76
- <div class="actions">
77
- <%= f.submit t('user.sign_up') -%>
78
- </div>
79
- <%- end -%>
80
- </div>
81
- </div>
82
-
83
- <div id="submenu" class="ui-corner-all ui-widget-content">
84
- <ul>
85
- <li><%= link_to t('page.listing', model: t('activerecord.models.profile')), profiles_path -%></li>
86
- <li><%= link_to t('page.import'), new_user_import_file_path -%></li>
87
- </ul>
88
- </div>