enju_message 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. data/app/models/message.rb +1 -1
  2. data/app/views/baskets/edit.html.erb +30 -0
  3. data/app/views/baskets/index.html.erb +31 -0
  4. data/app/views/baskets/new.html.erb +29 -0
  5. data/app/views/baskets/show.html.erb +23 -0
  6. data/app/views/carrier_type_has_checkout_types/_form.html.erb +19 -0
  7. data/app/views/carrier_type_has_checkout_types/edit.html.erb +13 -0
  8. data/app/views/carrier_type_has_checkout_types/index.html.erb +33 -0
  9. data/app/views/carrier_type_has_checkout_types/new.html.erb +12 -0
  10. data/app/views/carrier_type_has_checkout_types/show.html.erb +29 -0
  11. data/app/views/checked_items/_checkouts.html.erb +20 -0
  12. data/app/views/checked_items/_list.html.erb +39 -0
  13. data/app/views/checked_items/edit.html.erb +21 -0
  14. data/app/views/checked_items/index.html.erb +32 -0
  15. data/app/views/checked_items/index.js.erb +1 -0
  16. data/app/views/checked_items/new.html.erb +20 -0
  17. data/app/views/checked_items/show.html.erb +24 -0
  18. data/app/views/checkins/_form.html.erb +24 -0
  19. data/app/views/checkins/_list.html.erb +51 -0
  20. data/app/views/checkins/edit.html.erb +26 -0
  21. data/app/views/checkins/index.html.erb +16 -0
  22. data/app/views/checkins/index.js.erb +1 -0
  23. data/app/views/checkins/new.html.erb +14 -0
  24. data/app/views/checkins/show.html.erb +24 -0
  25. data/app/views/checkout_stat_has_manifestations/_form.html.erb +15 -0
  26. data/app/views/checkout_stat_has_manifestations/edit.html.erb +13 -0
  27. data/app/views/checkout_stat_has_manifestations/index.html.erb +33 -0
  28. data/app/views/checkout_stat_has_manifestations/new.html.erb +12 -0
  29. data/app/views/checkout_stat_has_manifestations/show.html.erb +28 -0
  30. data/app/views/checkout_stat_has_users/_form.html.erb +15 -0
  31. data/app/views/checkout_stat_has_users/edit.html.erb +13 -0
  32. data/app/views/checkout_stat_has_users/index.html.erb +33 -0
  33. data/app/views/checkout_stat_has_users/new.html.erb +12 -0
  34. data/app/views/checkout_stat_has_users/show.html.erb +28 -0
  35. data/app/views/checkout_types/_form.html.erb +19 -0
  36. data/app/views/checkout_types/edit.html.erb +13 -0
  37. data/app/views/checkout_types/index.html.erb +50 -0
  38. data/app/views/checkout_types/new.html.erb +12 -0
  39. data/app/views/checkout_types/show.html.erb +38 -0
  40. data/app/views/checkouts/_form.html.erb +28 -0
  41. data/app/views/checkouts/_index.html.erb +23 -0
  42. data/app/views/checkouts/_index_overdue.html.erb +33 -0
  43. data/app/views/checkouts/_index_user.html.erb +44 -0
  44. data/app/views/checkouts/_list.html.erb +45 -0
  45. data/app/views/checkouts/edit.html.erb +51 -0
  46. data/app/views/checkouts/index.atom.builder +14 -0
  47. data/app/views/checkouts/index.csv.erb +4 -0
  48. data/app/views/checkouts/index.html.erb +11 -0
  49. data/app/views/checkouts/index.ics.erb +13 -0
  50. data/app/views/checkouts/index.rss.builder +38 -0
  51. data/app/views/checkouts/new.html.erb +20 -0
  52. data/app/views/checkouts/show.html.erb +35 -0
  53. data/app/views/circulation_statuses/_form.html.erb +19 -0
  54. data/app/views/circulation_statuses/edit.html.erb +13 -0
  55. data/app/views/circulation_statuses/index.html.erb +43 -0
  56. data/app/views/circulation_statuses/new.html.erb +12 -0
  57. data/app/views/circulation_statuses/show.html.erb +29 -0
  58. data/app/views/item_has_use_restrictions/edit.html.erb +27 -0
  59. data/app/views/item_has_use_restrictions/index.html.erb +32 -0
  60. data/app/views/item_has_use_restrictions/new.html.erb +25 -0
  61. data/app/views/item_has_use_restrictions/show.html.erb +29 -0
  62. data/app/views/lending_policies/_form.html.erb +41 -0
  63. data/app/views/lending_policies/edit.html.erb +13 -0
  64. data/app/views/lending_policies/index.html.erb +42 -0
  65. data/app/views/lending_policies/new.html.erb +12 -0
  66. data/app/views/lending_policies/show.html.erb +50 -0
  67. data/app/views/manifestation_checkout_stats/_form.html.erb +19 -0
  68. data/app/views/manifestation_checkout_stats/edit.html.erb +13 -0
  69. data/app/views/manifestation_checkout_stats/index.html.erb +35 -0
  70. data/app/views/manifestation_checkout_stats/new.html.erb +12 -0
  71. data/app/views/manifestation_checkout_stats/show.csv.erb +4 -0
  72. data/app/views/manifestation_checkout_stats/show.html.erb +55 -0
  73. data/app/views/manifestation_reserve_stats/_form.html.erb +19 -0
  74. data/app/views/manifestation_reserve_stats/edit.html.erb +13 -0
  75. data/app/views/manifestation_reserve_stats/index.html.erb +35 -0
  76. data/app/views/manifestation_reserve_stats/new.html.erb +12 -0
  77. data/app/views/manifestation_reserve_stats/show.csv.erb +4 -0
  78. data/app/views/manifestation_reserve_stats/show.html.erb +55 -0
  79. data/app/views/reserve_stat_has_manifestations/_form.html.erb +15 -0
  80. data/app/views/reserve_stat_has_manifestations/edit.html.erb +13 -0
  81. data/app/views/reserve_stat_has_manifestations/index.html.erb +33 -0
  82. data/app/views/reserve_stat_has_manifestations/new.html.erb +12 -0
  83. data/app/views/reserve_stat_has_manifestations/show.html.erb +28 -0
  84. data/app/views/reserve_stat_has_users/_form.html.erb +15 -0
  85. data/app/views/reserve_stat_has_users/edit.html.erb +13 -0
  86. data/app/views/reserve_stat_has_users/index.html.erb +33 -0
  87. data/app/views/reserve_stat_has_users/new.html.erb +12 -0
  88. data/app/views/reserve_stat_has_users/show.html.erb +28 -0
  89. data/app/views/reserves/_form.html.erb +49 -0
  90. data/app/views/reserves/_new.html.erb +44 -0
  91. data/app/views/reserves/_new_user.html.erb +50 -0
  92. data/app/views/reserves/_title.html.erb +19 -0
  93. data/app/views/reserves/edit.html.erb +42 -0
  94. data/app/views/reserves/index.atom.builder +14 -0
  95. data/app/views/reserves/index.csv.erb +4 -0
  96. data/app/views/reserves/index.html.erb +75 -0
  97. data/app/views/reserves/index.rss.builder +41 -0
  98. data/app/views/reserves/new.html.erb +5 -0
  99. data/app/views/reserves/show.html.erb +61 -0
  100. data/app/views/use_restrictions/_form.html.erb +19 -0
  101. data/app/views/use_restrictions/edit.html.erb +13 -0
  102. data/app/views/use_restrictions/index.html.erb +43 -0
  103. data/app/views/use_restrictions/new.html.erb +12 -0
  104. data/app/views/use_restrictions/show.html.erb +29 -0
  105. data/app/views/user_checkout_stats/_form.html.erb +19 -0
  106. data/app/views/user_checkout_stats/edit.html.erb +13 -0
  107. data/app/views/user_checkout_stats/index.html.erb +35 -0
  108. data/app/views/user_checkout_stats/new.html.erb +12 -0
  109. data/app/views/user_checkout_stats/show.csv.erb +4 -0
  110. data/app/views/user_checkout_stats/show.html.erb +55 -0
  111. data/app/views/user_group_has_checkout_types/edit.html.erb +63 -0
  112. data/app/views/user_group_has_checkout_types/index.html.erb +32 -0
  113. data/app/views/user_group_has_checkout_types/new.html.erb +62 -0
  114. data/app/views/user_group_has_checkout_types/show.html.erb +64 -0
  115. data/app/views/user_reserve_stats/_form.html.erb +19 -0
  116. data/app/views/user_reserve_stats/edit.html.erb +13 -0
  117. data/app/views/user_reserve_stats/index.html.erb +35 -0
  118. data/app/views/user_reserve_stats/new.html.erb +12 -0
  119. data/app/views/user_reserve_stats/show.csv.erb +4 -0
  120. data/app/views/user_reserve_stats/show.html.erb +54 -0
  121. data/lib/enju_message/engine.rb +2 -2
  122. data/lib/enju_message/version.rb +1 -1
  123. metadata +156 -43
  124. data/test/dummy/db/test.sqlite3 +0 -0
  125. data/test/dummy/log/development.log +0 -0
  126. data/test/dummy/log/test.log +0 -3
@@ -0,0 +1,12 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.new', :model => t('activerecord.models.checkout_stat_has_manifestation')) -%></h1>
3
+ <div id="content_list">
4
+ <%= render 'form' %>
5
+ </div>
6
+ </div>
7
+
8
+ <div id="submenu" class="ui-corner-all">
9
+ <ul>
10
+ <li><%= link_to t('page.back'), checkout_stat_has_manifestations_path -%></li>
11
+ </ul>
12
+ </div>
@@ -0,0 +1,28 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.showing', :model => t('activerecord.models.checkout_stat_has_manifestation')) -%></h1>
3
+ <div id="content_list">
4
+ <p id="notice"><%= notice %></p>
5
+
6
+ <p>
7
+ <strong><%= t('activerecord.models.manifestation_checkout_stat') -%>:</strong>
8
+ <%= link_to @checkout_stat_has_manifestation.manifestation_checkout_stat.id, @checkout_stat_has_manifestation.manifestation_checkout_stat -%>
9
+ </p>
10
+
11
+ <p>
12
+ <strong><%= t('activerecord.models.manifestation') -%>:</strong>
13
+ <%= link_to @checkout_stat_has_manifestation.manifestation.original_title, @checkout_stat_has_manifestation.manifestation -%>
14
+ </p>
15
+
16
+ <p>
17
+ <strong><%= t('activerecord.attributes.checkout_stat_has_manifestation.checkouts_count') -%>:</strong>
18
+ <%= @checkout_stat_has_manifestation.checkouts_count -%>
19
+ </p>
20
+ </div>
21
+ </div>
22
+
23
+ <div id="submenu" class="ui-corner-all">
24
+ <ul>
25
+ <li><%= link_to t('page.edit'), edit_checkout_stat_has_manifestation_path(@checkout_stat_has_manifestation) -%></li>
26
+ <li><%= back_to_index(flash[:page_info]) -%></li>
27
+ </ul>
28
+ </div>
@@ -0,0 +1,15 @@
1
+ <%= form_for(@checkout_stat_has_user) do |f| -%>
2
+ <%= f.error_messages -%>
3
+
4
+ <div class="field">
5
+ <%= f.label t('activerecord.models.user_checkout_stat') -%><br />
6
+ <%= f.text_field :user_checkout_stat_id -%>
7
+ </div>
8
+ <div class="field">
9
+ <%= f.label t('activerecord.models.user') -%><br />
10
+ <%= f.text_field :user_id -%>
11
+ </div>
12
+ <div class="actions">
13
+ <%= f.submit %>
14
+ </div>
15
+ <%- end -%>
@@ -0,0 +1,13 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.editing', :model => t('activerecord.models.checkout_stat_has_user')) -%></h1>
3
+ <div id="content_list">
4
+ <%= render 'form' %>
5
+ </div>
6
+ </div>
7
+
8
+ <div id="submenu" class="ui-corner-all">
9
+ <ul>
10
+ <li><%= link_to t('page.show'), @checkout_stat_has_user -%></li>
11
+ <li><%= link_to t('page.back'), checkout_stat_has_users_path -%></li>
12
+ </ul>
13
+ </div>
@@ -0,0 +1,33 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.listing', :model => t('activerecord.models.checkout_stat_has_user')) -%></h1>
3
+ <div id="content_list">
4
+
5
+ <table class="index">
6
+ <tr>
7
+ <th><%= t('activerecord.models.user_checkout_stat') -%></th>
8
+ <th><%= t('activerecord.models.user') -%></th>
9
+ <th><%= t('activerecord.attributes.checkout_stat_has_user.checkouts_count') -%></th>
10
+ </tr>
11
+
12
+ <%- @checkout_stat_has_users.each do |checkout_stat_has_user| -%>
13
+ <tr class="line<%= cycle("0", "1") -%>">
14
+ <td><%= link_to checkout_stat_has_user.user_checkout_stat.id, checkout_stat_has_user.user_checkout_stat -%></td>
15
+ <td><%= link_to checkout_stat_has_user.user.username, checkout_stat_has_user.user -%></td>
16
+ <td><%= checkout_stat_has_user.checkouts_count -%></td>
17
+ <td><%= link_to t('page.show'), checkout_stat_has_user -%></td>
18
+ <td><%= link_to t('page.edit'), edit_checkout_stat_has_user_path(checkout_stat_has_user) -%></td>
19
+ <td><%= link_to t('page.destroy'), checkout_stat_has_user, :confirm => t('page.are_you_sure'), :method => :delete -%></td>
20
+ </tr>
21
+ <%- end -%>
22
+ </table>
23
+
24
+ <%= will_paginate(@checkout_stat_has_users) -%>
25
+
26
+ </div>
27
+ </div>
28
+
29
+ <div id="submenu" class="ui-corner-all">
30
+ <ul>
31
+ <li><%= link_to t('page.new', :model => t('activerecord.models.checkout_stat_has_user')), new_checkout_stat_has_user_path -%></li>
32
+ </ul>
33
+ </div>
@@ -0,0 +1,12 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.new', :model => t('activerecord.models.checkout_stat_has_user')) -%></h1>
3
+ <div id="content_list">
4
+ <%= render 'form' %>
5
+ </div>
6
+ </div>
7
+
8
+ <div id="submenu" class="ui-corner-all">
9
+ <ul>
10
+ <li><%= link_to t('page.back'), checkout_stat_has_users_path -%></li>
11
+ </ul>
12
+ </div>
@@ -0,0 +1,28 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.showing', :model => t('activerecord.models.checkout_stat_has_user')) -%></h1>
3
+ <div id="content_list">
4
+ <p id="notice"><%= notice %></p>
5
+
6
+ <p>
7
+ <strong><%= t('activerecord.models.user_checkout_stat') -%>:</strong>
8
+ <%= link_to @checkout_stat_has_user.user_checkout_stat.id, @checkout_stat_has_user.user_checkout_stat -%>
9
+ </p>
10
+
11
+ <p>
12
+ <strong><%= t('activerecord.models.user') -%>:</strong>
13
+ <%= link_to @checkout_stat_has_user.user.username, @checkout_stat_has_user.user -%>
14
+ </p>
15
+
16
+ <p>
17
+ <strong><%= t('activerecord.attributes.checkout_stat_has_user.checkouts_count') -%>:</strong>
18
+ <%= @checkout_stat_has_user.checkouts_count -%>
19
+ </p>
20
+ </div>
21
+ </div>
22
+
23
+ <div id="submenu" class="ui-corner-all">
24
+ <ul>
25
+ <li><%= link_to t('page.edit'), edit_checkout_stat_has_user_path(@checkout_stat_has_user) -%></li>
26
+ <li><%= back_to_index(flash[:page_info]) -%></li>
27
+ </ul>
28
+ </div>
@@ -0,0 +1,19 @@
1
+ <%= simple_form_for(@checkout_type, :validate => true) do |f| %>
2
+ <%= f.error_notification %>
3
+
4
+ <div class="field">
5
+ <%= f.label :name %><br />
6
+ <%= f.text_field :name %>
7
+ </div>
8
+ <div class="field">
9
+ <%= f.label :display_name %><br />
10
+ <%= f.text_area :display_name %>
11
+ </div>
12
+ <div class="field">
13
+ <%= f.label :note %><br />
14
+ <%= f.text_area :note %>
15
+ </div>
16
+ <div class="actions">
17
+ <%= f.submit %>
18
+ </div>
19
+ <% end %>
@@ -0,0 +1,13 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.editing', :model => t('activerecord.models.checkout_type')) -%></h1>
3
+ <div id="content_list">
4
+ <%= render 'form' %>
5
+ </div>
6
+ </div>
7
+
8
+ <div id="submenu" class="ui-corner-all">
9
+ <ul>
10
+ <li><%= link_to t('page.show'), @checkout_type -%></li>
11
+ <li><%= link_to t('page.back'), checkout_types_path -%></li>
12
+ </ul>
13
+ </div>
@@ -0,0 +1,50 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.listing', :model => t('activerecord.models.checkout_type')) -%></h1>
3
+ <div id="content_list">
4
+
5
+ <table class="index">
6
+ <tr>
7
+ <th id="position"></th>
8
+ <th><%= t('activerecord.attributes.checkout_type.name') -%></th>
9
+ <th><%= t('activerecord.attributes.checkout_type.display_name') -%></th>
10
+ <th><%= t('activerecord.attributes.checkout_type.note') -%></th>
11
+ <th></th>
12
+ </tr>
13
+
14
+ <%- @checkout_types.each do |checkout_type| -%>
15
+ <tr class="line<%= cycle("0", "1") -%>">
16
+ <td>
17
+ <%- unless @user_group -%>
18
+ <%- if can? :update, checkout_type -%>
19
+ <%= move_position(checkout_type) -%>
20
+ <%- end -%>
21
+ <%- end -%>
22
+ </td>
23
+ <td><%= link_to checkout_type.name, checkout_type -%></td>
24
+ <td><%= link_to checkout_type.display_name.localize, checkout_type -%></td>
25
+ <td><%= checkout_type.note -%></td>
26
+ <td>
27
+ <%- if can? :update, checkout_type -%>
28
+ <%= link_to t('page.edit'), edit_checkout_type_path(checkout_type) -%>
29
+ <% end %>
30
+ <%- if can? :destroy, checkout_type -%>
31
+ <%= link_to t('page.destroy'), checkout_type, :confirm => t('page.are_you_sure'), :method => :delete -%>
32
+ <% end %>
33
+ </td>
34
+ </tr>
35
+ <%- end -%>
36
+ </table>
37
+
38
+ <%= will_paginate(@checkout_types) -%>
39
+ </div>
40
+ </div>
41
+
42
+ <div id="submenu" class="ui-corner-all">
43
+ <ul>
44
+ <%- if @user_group -%>
45
+ <li><%= link_to t('page.new', :model => t('activerecord.models.user_group_has_checkout_type')), new_user_group_user_group_has_checkout_type_path(@user_group) -%></li>
46
+ <%- else -%>
47
+ <li><%= link_to t('page.new', :model => t('activerecord.models.checkout_type')), new_checkout_type_path -%></li>
48
+ <%- end -%>
49
+ </ul>
50
+ </div>
@@ -0,0 +1,12 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.new', :model => t('activerecord.models.checkout_type')) -%></h1>
3
+ <div id="content_list">
4
+ <%= render 'form' %>
5
+ </div>
6
+ </div>
7
+
8
+ <div id="submenu" class="ui-corner-all">
9
+ <ul>
10
+ <li><%= link_to t('page.back'), checkout_types_path -%></li>
11
+ </ul>
12
+ </div>
@@ -0,0 +1,38 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.showing', :model => t('activerecord.models.checkout_type')) -%></h1>
3
+ <div id="content_list">
4
+ <p id="notice"><%= notice %></p>
5
+
6
+ <p>
7
+ <strong><%= t('activerecord.attributes.checkout_type.name') -%>:</strong>
8
+ <%= @checkout_type.name -%>
9
+ </p>
10
+
11
+ <p>
12
+ <strong><%= t('activerecord.attributes.checkout_type.display_name') -%>:</strong>
13
+ <%= @checkout_type.display_name.localize -%>
14
+ </p>
15
+
16
+ <p>
17
+ <strong><%= t('activerecord.models.user_group') -%></strong>
18
+ <ul>
19
+ <%- @checkout_type.user_group_has_checkout_types.each do |available_user_group| -%>
20
+ <li><%= link_to available_user_group.user_group.display_name.localize, available_user_group.user_group -%></li>
21
+ <%- end -%>
22
+ </ul>
23
+
24
+ <p>
25
+ <strong><%= t('activerecord.attributes.checkout_type.note') -%>:</strong>
26
+ <%= @checkout_type.note -%>
27
+ </p>
28
+
29
+ </div>
30
+ </div>
31
+
32
+ <div id="submenu" class="ui-corner-all">
33
+ <ul>
34
+ <li><%= link_to t('page.edit'), edit_checkout_type_path(@checkout_type) -%></li>
35
+ <li><%= back_to_index(flash[:page_info]) -%></li>
36
+ <li><%= link_to t('page.new', :model => t('activerecord.models.user_group_has_checkout_type')), new_checkout_type_user_group_has_checkout_type_path(@checkout_type) -%></li>
37
+ </ul>
38
+ </div>
@@ -0,0 +1,28 @@
1
+ <%= form_for(@checkout) do |f| %>
2
+ <% if @checkout.errors.any? %>
3
+ <div id="errorExplanation">
4
+ <h2><%= pluralize(@checkout.errors.count, "error") %> prohibited this checkout from being saved:</h2>
5
+ <ul>
6
+ <% @checkout.errors.full_messages.each do |msg| %>
7
+ <li><%= msg %></li>
8
+ <% end %>
9
+ </ul>
10
+ </div>
11
+ <% end %>
12
+
13
+ <div class="field">
14
+ <%= f.label :user_id %><br />
15
+ <%= f.text_field :user_id %>
16
+ </div>
17
+ <div class="field">
18
+ <%= f.label :item_id %><br />
19
+ <%= f.text_field :item_id %>
20
+ </div>
21
+ <div class="field">
22
+ <%= f.label :due_date %><br />
23
+ <%= f.datetime_select :due_date %>
24
+ </div>
25
+ <div class="actions">
26
+ <%= f.submit %>
27
+ </div>
28
+ <% end %>
@@ -0,0 +1,23 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.listing', :model => t('activerecord.models.checkout')) -%></h1>
3
+ <div id="content_list">
4
+ <%= render 'list' -%>
5
+
6
+ <%- if @checkouts.size == 0 -%>
7
+ <p><%= t('checkout.no_checkout') -%></p>
8
+ <%- end -%>
9
+
10
+ </div>
11
+ </div>
12
+
13
+ <div id="submenu" class="ui-corner-all">
14
+ <ul>
15
+ <li><%= link_to t('page.overdue'), checkouts_path(:view => 'overdue') -%></li>
16
+ </ul>
17
+ <p>
18
+ <%= link_to (image_tag 'icons/feed.png', :size => '16x16', :alt => 'RSS', :class => 'icon'), checkouts_path(:format => :rss) -%>
19
+ (<%= link_to 'RSS', checkouts_path(:format => :rss) -%>)
20
+ <%= link_to (image_tag 'icons/page_white_excel.png', :size => '16x16', :alt => 'CSV', :class => 'icon'), checkouts_path(:format => :csv, :locale => @locale.to_s) -%>
21
+ (<%= link_to 'CSV', checkouts_path(:format => :csv, :locale => @locale.to_s) -%>)
22
+ </p>
23
+ </div>
@@ -0,0 +1,33 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('checkout.listing_overdue_item') -%></h1>
3
+ <div id="content_list">
4
+
5
+ <%= form_for(:checkouts, :url => checkouts_path, :html => {:method => 'get'}) do -%>
6
+ <p>
7
+ <%= t('checkout.number_of_day_overdue') -%>:
8
+ <%= text_field_tag 'days_overdue', h(@days_overdue), :class => 'resource_integer' -%>
9
+ <%= hidden_field_tag 'view', 'overdue' -%>
10
+ <%= submit_tag t('page.search') -%>
11
+ </p>
12
+ <%- end -%>
13
+
14
+ <%= render 'list' -%>
15
+
16
+ <%- if @checkouts.size == 0 -%>
17
+ <p><%= t('checkout.no_checkout') -%></p>
18
+ <%- end -%>
19
+
20
+ </div>
21
+ </div>
22
+
23
+ <div id="submenu" class="ui-corner-all">
24
+ <ul>
25
+ <li><%= link_to t('page.back_to', :model => t('activerecord.models.checkout')), checkouts_path -%></li>
26
+ </ul>
27
+ <p>
28
+ <%= link_to (image_tag 'icons/feed.png', :size => '16x16', :alt => 'RSS', :class => 'icon'), checkouts_path(:format => :rss, :view => 'overdue') -%>
29
+ (<%= link_to 'RSS', checkouts_path(:format => :rss, :view => 'overdue') -%>)
30
+ <%= link_to (image_tag 'icons/page_white_excel.png', :size => '16x16', :alt => 'CSV', :class => 'icon'), checkouts_path(:format => :csv, :view => 'overdue', :locale => @locale.to_s) -%>
31
+ (<%= link_to 'CSV', checkouts_path(:format => :csv, :view => 'overdue', :locale => @locale.to_s) -%>)
32
+ </p>
33
+ </div>
@@ -0,0 +1,44 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.listing', :model => t('activerecord.models.checkout')) -%></h1>
3
+ <div id="content_list">
4
+
5
+ <%= render 'list' -%>
6
+
7
+ <%- if @checkouts.size == 0 -%>
8
+ <p><%= t('checkout.no_checkout') -%></p>
9
+ <%- end -%>
10
+
11
+ </div>
12
+ </div>
13
+
14
+ <div id="submenu" class="ui-corner-all">
15
+ <ul>
16
+ <%- user.user_group.user_group_has_checkout_types.each do |available_checkout_type| -%>
17
+ <li>
18
+ <%= available_checkout_type.checkout_type.display_name.localize -%>:
19
+ <%= user.checked_item_count[:"#{available_checkout_type.checkout_type.name}"] -%> / <%= available_checkout_type.checkout_limit -%>
20
+ </li>
21
+ <%- end -%>
22
+ </ul>
23
+ <ul>
24
+ <li><%= link_to t('activerecord.models.reserve'), user_reserves_path(user) -%></li>
25
+ <%- if current_user.has_role?('Librarian') -%>
26
+ <li><%= link_to t('checkout.all_checkout'), checkouts_path -%></li>
27
+ <%- end -%>
28
+ <% if current_user.checkout_icalendar_token? %>
29
+ <li><%= link_to 'iCalendar', checkouts_path(:icalendar_token => user.checkout_icalendar_token, :format => :ics) -%></li>
30
+ <% end %>
31
+ </ul>
32
+ <p>
33
+ <%- if params[:view] == 'overdue' -%>
34
+ <%= link_to (image_tag 'icons/feed.png', :size => '16x16', :alt => 'RSS', :class => 'icon'), user_checkouts_path(user, :format => :rss, :view => 'overdue') -%>
35
+ (<%= link_to 'RSS', user_checkouts_path(user, :format => :rss, :view => 'overdue') -%>)
36
+ (<%= link_to 'CSV', user_checkouts_path(user, :format => :csv, :view => 'overdue', :locale => @locale.to_s) -%>)
37
+ <%- else -%>
38
+ <%= link_to (image_tag 'icons/feed.png', :size => '16x16', :alt => 'RSS', :class => 'icon'), user_checkouts_path(user, :format => :rss) -%>
39
+ (<%= link_to 'RSS', user_checkouts_path(user, :format => :rss) -%>)
40
+ (<%= link_to 'CSV', user_checkouts_path(user, :format => :csv, :locale => @locale.to_s) -%>)
41
+ <%- end -%>
42
+ </p>
43
+
44
+ </div>
@@ -0,0 +1,45 @@
1
+ <table class="index">
2
+ <tr>
3
+ <th><%= t('activerecord.models.user') %></th>
4
+ <th class="checked_item_title"><%= t('page.title') %></th>
5
+ <th><%= t('activerecord.attributes.checkout.due_date') %></th>
6
+ <th></th>
7
+ </tr>
8
+
9
+ <%- if @checkouts -%>
10
+ <%- @checkouts.each_with_index do |checkout, i| %>
11
+ <tr class="line<%= cycle("0", "1") -%>">
12
+ <td>
13
+ <% if checkout.user %>
14
+ <%= link_to checkout.user_username, checkout.user %>
15
+ <br />
16
+ (<%= link_to checkout.user_user_number, checkout.user %>)
17
+ <% end %>
18
+ </td>
19
+ <td>
20
+ <%= render 'manifestations/show_index', :manifestation => checkout.item.manifestation -%>
21
+ (<%= link_to checkout.item.item_identifier, checkout.item -%>)
22
+ </td>
23
+ <td>
24
+ <%= l(checkout.due_date, :format => :only_date) -%>
25
+ <br />
26
+ <% if checkout.checkin %>
27
+ <strong><%= t('checkout.returned') %></strong>
28
+ <% end %>
29
+ </td>
30
+ <td>
31
+ <%- if can? :update, checkout -%>
32
+ <% unless checkout.checkin %>
33
+ <%= link_to t('checkout.extend'), edit_checkout_path(checkout) -%>
34
+ <% end %>
35
+ <%- end -%>
36
+ <%- if can? :destroy, checkout -%>
37
+ <%= link_to t('page.destroy'), checkout, :confirm => t('page.are_you_sure'), :method => :delete -%>
38
+ <%- end -%>
39
+ </td>
40
+ </tr>
41
+ <%- end -%>
42
+ <%- end -%>
43
+ </table>
44
+
45
+ <%= will_paginate(@checkouts) %>
@@ -0,0 +1,51 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.editing', :model => t('activerecord.models.checkout')) -%></h1>
3
+ <div id="content_list">
4
+
5
+ <%= render 'manifestations/title', :manifestation => @checkout.item.manifestation if @checkout.item -%>
6
+
7
+ <h3><%= t('checkout.renewal') -%></h3>
8
+ <%- if @checkout.checkout_renewable? -%>
9
+ <%= form_for(@checkout) do |f| -%>
10
+ <%= t('checkout.new_due_date') -%>: <%= l(@new_due_date, :format => :only_date) if @new_due_date -%>
11
+ <%= f.hidden_field :due_date, :value => @new_due_date -%>
12
+ <br />
13
+ <%= f.submit %>
14
+ <%- end -%>
15
+ <%- else -%>
16
+ <div class="field"><%= t('checkout.this_item_cant_be_renewed') -%></div>
17
+ <%- end -%>
18
+
19
+ <% if current_user.has_role?('Librarian') %>
20
+ <h3><%= t('checkout.editing_due_date') -%></h3>
21
+
22
+ <%= form_for(@checkout) do |f| -%>
23
+ <%= f.error_messages -%>
24
+
25
+ <div class="field">
26
+ <%= f.label :due_date -%>
27
+ <%= f.hidden_field :user_id -%>
28
+ <%= f.hidden_field :item_id -%>
29
+ <%= f.text_field :due_date, :value => @checkout.due_date.try(:strftime, "%Y-%m-%d"), :class => 'date_field', :placeholder => "#{t('page.example')}: 2011-04-12"-%>
30
+ </div>
31
+ <div class="field">
32
+ <%= t('checkout.renewal_count') -%>: <%= f.text_field :checkout_renewal_count, :class => 'resource_integer' -%>
33
+ </div>
34
+
35
+ <div class="actions">
36
+ <%= f.submit %>
37
+ </div>
38
+ <%- end -%>
39
+ <%- end -%>
40
+ </div>
41
+ </div>
42
+
43
+ <div id="submenu" class="ui-corner-all">
44
+ <%= render 'manifestations/book_jacket', :manifestation => @checkout.item.manifestation if @checkout.item -%>
45
+ <ul>
46
+ <li><%= link_to t('page.show'), @checkout -%></li>
47
+ <% if @checkout.user %>
48
+ <li><%= link_to t('page.back'), user_checkouts_path(@checkout.user) -%></li>
49
+ <% end %>
50
+ </ul>
51
+ </div>
@@ -0,0 +1,14 @@
1
+ atom_feed(:url => checkouts_url(:format => :atom)) do |feed|
2
+ if @user
3
+ feed.title t('checkout.user_checkout', :login_name => @user.username)
4
+ else
5
+ feed.title t('checkout.library_group_checkout', :library_group_name => @library_group.display_name.localize)
6
+ end
7
+ feed.updated(@checkouts.first ? @checkouts.first.created_at : Time.zone.now)
8
+
9
+ @checkouts.each do |checkout|
10
+ feed.entry(checkout) do |entry|
11
+ entry.title(checkout.item.manifestation.original_title)
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,4 @@
1
+ <%- if params[:view] == 'overdue' -%><%= ('Overdue items') -%><%- else -%><%= ('Checkout items') -%><%- end -%> (created_at: <%= Time.now -%>)<%= "\n" -%>
2
+ <%- @checkouts.each do |checkout| -%>
3
+ "<%=h checkout.user_username -%>","<%=h checkout.item.item_identifier -%>","<%=h checkout.item.manifestation.original_title -%>","<%=h checkout.created_at -%>","<%= checkout.due_date -%>"<%= "\n" -%>
4
+ <%- end -%>
@@ -0,0 +1,11 @@
1
+ <%- if @user -%>
2
+ <%= render 'index_user', :user => @user -%>
3
+ <%- elsif !current_user.has_role?('Librarian') -%>
4
+ <%= render 'index_user', :user => current_user -%>
5
+ <%- else -%>
6
+ <%- if params[:view] == 'overdue' -%>
7
+ <%= render 'index_overdue' -%>
8
+ <%- else -%>
9
+ <%= render 'index' -%>
10
+ <%- end -%>
11
+ <%- end -%>
@@ -0,0 +1,13 @@
1
+ <%=
2
+ checkouts = @checkouts
3
+ RiCal.Calendar do
4
+ checkouts.each do |checkout|
5
+ event do
6
+ description checkout.item.manifestation.original_title
7
+ dtstart checkout.created_at
8
+ dtend checkout.due_date
9
+ location checkout.item.shelf.library.address
10
+ end
11
+ end
12
+ end.to_s
13
+ -%>
@@ -0,0 +1,38 @@
1
+ xml.instruct! :xml, :version=>"1.0"
2
+ xml.rss('version' => "2.0",
3
+ 'xmlns:opensearch' => "http://a9.com/-/spec/opensearch/1.1/",
4
+ 'xmlns:atom' => "http://www.w3.org/2005/Atom"){
5
+ xml.channel{
6
+ if @user
7
+ xml.title t('checkout.user_checkout', :login_name => @user.username)
8
+ xml.link user_checkouts_url(@user)
9
+ xml.tag! "atom:link", :rel => 'self', :href => "#{request.protocol}#{request.host_with_port}#{url_for(params.merge(:format => :rss))}"
10
+ xml.tag! "atom:link", :rel => 'alternate', :href => user_checkouts_url(@user)
11
+ else
12
+ xml.title t('checkout.library_group_checkout', :library_group_name => @library_group.display_name.localize)
13
+ xml.link checkouts_url
14
+ xml.tag! "atom:link", :rel => 'self', :href => "#{request.protocol}#{request.host_with_port}#{url_for(params.merge(:format => :rss))}"
15
+ xml.tag! "atom:link", :rel => 'alternate', :href => checkouts_url
16
+ end
17
+ xml.description "Next-L Enju, an open source integrated library system developed by Project Next-L"
18
+ xml.language @locale.to_s
19
+ xml.ttl "60"
20
+ #xml.tag! "atom:link", :rel => 'search', :type => 'application/opensearchdescription+xml', :href => "http://#{request.host_with_port}/page/opensearch"
21
+ unless params[:query].blank?
22
+ xml.tag! "opensearch:totalResults", @count[:query_result]
23
+ xml.tag! "opensearch:startIndex", @checkouts.offset + 1
24
+ xml.tag! "opensearch:itemsPerPage", @checkouts.per_page
25
+ #xml.tag! "opensearch:Query", :role => 'request', :searchTerms => params[:query], :startPage => (params[:page] || 1)
26
+ end
27
+ @checkouts.each do |checkout|
28
+ xml.item do
29
+ xml.title checkout.item.manifestation.original_title
30
+ #xml.description(checkout.title)
31
+ # rfc822
32
+ xml.pubDate checkout.created_at.utc.rfc822
33
+ xml.link checkout_url(checkout)
34
+ xml.guid checkout_url(checkout), :isPermaLink => "true"
35
+ end
36
+ end
37
+ }
38
+ }
@@ -0,0 +1,20 @@
1
+ <h1 class="title"><%= t('page.new', :model => t('activerecord.models.checkouts')) -%></h1>
2
+
3
+ <%= form_for(@checkout) do |f| -%>
4
+ <%= f.error_messages -%>
5
+
6
+ <div class="field">
7
+ <%= f.label t('activerecord.models.user') -%><br />
8
+ <%= f.text_field :user_id -%>
9
+ </div>
10
+ <div class="field">
11
+ <%= f.label t('activerecord.models.item') -%><br />
12
+ <%= f.text_field :item_id -%>
13
+ </div>
14
+
15
+ <div class="actions">
16
+ <%= f.submit %>
17
+ </div>
18
+ <%- end -%>
19
+
20
+ <%= link_to t('page.back'), user_checkouts_path(@user) -%>