enju_library 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (145) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +3 -0
  3. data/Rakefile +47 -0
  4. data/app/controllers/bookstores_controller.rb +17 -0
  5. data/app/controllers/budget_types_controller.rb +13 -0
  6. data/app/controllers/libraries_controller.rb +125 -0
  7. data/app/controllers/library_groups_controller.rb +46 -0
  8. data/app/controllers/request_status_types_controller.rb +13 -0
  9. data/app/controllers/request_types_controller.rb +13 -0
  10. data/app/controllers/search_engines_controller.rb +17 -0
  11. data/app/controllers/shelves_controller.rb +138 -0
  12. data/app/controllers/subscribes_controller.rb +82 -0
  13. data/app/controllers/subscriptions_controller.rb +87 -0
  14. data/app/helpers/shelves_helper.rb +13 -0
  15. data/app/models/bookstore.rb +37 -0
  16. data/app/models/budget_type.rb +19 -0
  17. data/app/models/library.rb +131 -0
  18. data/app/models/library_group.rb +86 -0
  19. data/app/models/library_group_sweeper.rb +12 -0
  20. data/app/models/request_status_type.rb +20 -0
  21. data/app/models/request_type.rb +19 -0
  22. data/app/models/search_engine.rb +52 -0
  23. data/app/models/shelf.rb +66 -0
  24. data/app/models/subscribe.rb +23 -0
  25. data/app/models/subscription.rb +44 -0
  26. data/app/views/accepts/_form.html.erb +11 -0
  27. data/app/views/accepts/_list.html.erb +31 -0
  28. data/app/views/accepts/edit.html.erb +13 -0
  29. data/app/views/accepts/index.csv.erb +4 -0
  30. data/app/views/accepts/index.html.erb +49 -0
  31. data/app/views/accepts/index.js.erb +1 -0
  32. data/app/views/accepts/new.html.erb +14 -0
  33. data/app/views/accepts/show.html.erb +31 -0
  34. data/app/views/bookstores/_form.html.erb +42 -0
  35. data/app/views/bookstores/edit.html.erb +13 -0
  36. data/app/views/bookstores/index.html.erb +49 -0
  37. data/app/views/bookstores/new.html.erb +12 -0
  38. data/app/views/bookstores/show.html.erb +52 -0
  39. data/app/views/budget_types/_form.html.erb +19 -0
  40. data/app/views/budget_types/edit.html.erb +13 -0
  41. data/app/views/budget_types/index.html.erb +43 -0
  42. data/app/views/budget_types/new.html.erb +12 -0
  43. data/app/views/budget_types/show.html.erb +29 -0
  44. data/app/views/libraries/_calendar.html.erb +13 -0
  45. data/app/views/libraries/_form.html.erb +90 -0
  46. data/app/views/libraries/_map.html.erb +25 -0
  47. data/app/views/libraries/_map.mobile.erb +25 -0
  48. data/app/views/libraries/edit.html.erb +13 -0
  49. data/app/views/libraries/index.html.erb +75 -0
  50. data/app/views/libraries/new.html.erb +12 -0
  51. data/app/views/libraries/show.html.erb +131 -0
  52. data/app/views/libraries/show.mobile.erb +26 -0
  53. data/app/views/library_groups/_form.html.erb +59 -0
  54. data/app/views/library_groups/edit.html.erb +12 -0
  55. data/app/views/library_groups/index.html.erb +30 -0
  56. data/app/views/library_groups/new.html.erb +12 -0
  57. data/app/views/library_groups/show.html.erb +66 -0
  58. data/app/views/request_status_types/_form.html.erb +19 -0
  59. data/app/views/request_status_types/edit.html.erb +13 -0
  60. data/app/views/request_status_types/index.html.erb +40 -0
  61. data/app/views/request_status_types/new.html.erb +12 -0
  62. data/app/views/request_status_types/show.html.erb +29 -0
  63. data/app/views/request_types/_form.html.erb +19 -0
  64. data/app/views/request_types/edit.html.erb +13 -0
  65. data/app/views/request_types/index.html.erb +40 -0
  66. data/app/views/request_types/new.html.erb +12 -0
  67. data/app/views/request_types/show.html.erb +29 -0
  68. data/app/views/search_engines/_form.html.erb +44 -0
  69. data/app/views/search_engines/edit.html.erb +13 -0
  70. data/app/views/search_engines/index.html.erb +44 -0
  71. data/app/views/search_engines/new.html.erb +12 -0
  72. data/app/views/search_engines/show.html.erb +49 -0
  73. data/app/views/shelves/_form.html.erb +37 -0
  74. data/app/views/shelves/_library_facet.html.erb +12 -0
  75. data/app/views/shelves/_select_form.html.erb +1 -0
  76. data/app/views/shelves/edit.html.erb +13 -0
  77. data/app/views/shelves/index.html.erb +73 -0
  78. data/app/views/shelves/new.html.erb +18 -0
  79. data/app/views/shelves/show.html.erb +65 -0
  80. data/app/views/subscribes/edit.html.erb +37 -0
  81. data/app/views/subscribes/index.html.erb +31 -0
  82. data/app/views/subscribes/new.html.erb +48 -0
  83. data/app/views/subscribes/show.html.erb +34 -0
  84. data/app/views/subscriptions/edit.html.erb +29 -0
  85. data/app/views/subscriptions/index.html.erb +39 -0
  86. data/app/views/subscriptions/new.html.erb +28 -0
  87. data/app/views/subscriptions/show.html.erb +40 -0
  88. data/config/routes.rb +17 -0
  89. data/db/migrate/059_create_libraries.rb +28 -0
  90. data/db/migrate/069_create_shelves.rb +15 -0
  91. data/db/migrate/080_create_library_groups.rb +20 -0
  92. data/db/migrate/124_create_bookstores.rb +17 -0
  93. data/db/migrate/130_create_request_status_types.rb +12 -0
  94. data/db/migrate/131_create_request_types.rb +12 -0
  95. data/db/migrate/20081006090811_create_subscriptions.rb +17 -0
  96. data/db/migrate/20081006093246_create_subscribes.rb +14 -0
  97. data/db/migrate/20081023092436_create_search_engines.rb +17 -0
  98. data/db/migrate/20110222073537_add_url_to_library_group.rb +9 -0
  99. data/db/migrate/20110620173525_add_bookstore_id_to_item.rb +11 -0
  100. data/db/migrate/20110627122938_add_number_of_day_to_notify_overdue_to_user_group.rb +13 -0
  101. data/db/migrate/20120105074911_add_isil_to_library.rb +5 -0
  102. data/db/migrate/20120129014038_create_budget_types.rb +12 -0
  103. data/db/migrate/20120510140958_add_closed_to_shelf.rb +5 -0
  104. data/lib/enju_library/engine.rb +16 -0
  105. data/lib/enju_library/master_model.rb +19 -0
  106. data/lib/enju_library/url_validator.rb +10 -0
  107. data/lib/enju_library/version.rb +3 -0
  108. data/lib/enju_library.rb +49 -0
  109. data/lib/tasks/enju_library_tasks.rake +4 -0
  110. data/test/dummy/README.rdoc +261 -0
  111. data/test/dummy/Rakefile +7 -0
  112. data/test/dummy/app/assets/javascripts/application.js +15 -0
  113. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  114. data/test/dummy/app/controllers/application_controller.rb +3 -0
  115. data/test/dummy/app/helpers/application_helper.rb +2 -0
  116. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  117. data/test/dummy/config/application.rb +56 -0
  118. data/test/dummy/config/boot.rb +10 -0
  119. data/test/dummy/config/database.yml +25 -0
  120. data/test/dummy/config/environment.rb +5 -0
  121. data/test/dummy/config/environments/development.rb +37 -0
  122. data/test/dummy/config/environments/production.rb +67 -0
  123. data/test/dummy/config/environments/test.rb +37 -0
  124. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  125. data/test/dummy/config/initializers/inflections.rb +15 -0
  126. data/test/dummy/config/initializers/mime_types.rb +5 -0
  127. data/test/dummy/config/initializers/secret_token.rb +7 -0
  128. data/test/dummy/config/initializers/session_store.rb +8 -0
  129. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  130. data/test/dummy/config/locales/en.yml +5 -0
  131. data/test/dummy/config/routes.rb +58 -0
  132. data/test/dummy/config.ru +4 -0
  133. data/test/dummy/db/development.sqlite3 +0 -0
  134. data/test/dummy/db/test.sqlite3 +0 -0
  135. data/test/dummy/log/development.log +0 -0
  136. data/test/dummy/log/test.log +0 -0
  137. data/test/dummy/public/404.html +26 -0
  138. data/test/dummy/public/422.html +26 -0
  139. data/test/dummy/public/500.html +25 -0
  140. data/test/dummy/public/favicon.ico +0 -0
  141. data/test/dummy/script/rails +6 -0
  142. data/test/enju_library_test.rb +7 -0
  143. data/test/integration/navigation_test.rb +10 -0
  144. data/test/test_helper.rb +15 -0
  145. metadata +576 -0
@@ -0,0 +1,26 @@
1
+ <div data-role="header">
2
+ <h1 class="title"><%= @library.display_name.localize -%></h1>
3
+ </div>
4
+ <div data-role="content">
5
+ <p>
6
+ <%= t('activerecord.attributes.library.name') -%>: <%= @library.name -%>
7
+ </p>
8
+ <div id="detail">
9
+ <%- unless @library.web? -%>
10
+ <p>
11
+ <%= t('library.address') -%>: <%= @library.zip_code -%> <%= @library.address -%>
12
+ <br />
13
+ <%= t('activerecord.attributes.library.telephone_number_1') -%>: <%= @library.telephone_number_1 -%>
14
+ <%= t('activerecord.attributes.library.telephone_number_2') -%>: <%= @library.telephone_number_2 -%>
15
+ <br />
16
+ <%= t('activerecord.attributes.library.fax_number') -%>: <%= @library.fax_number -%>
17
+ </p>
18
+ <p>
19
+ <%= @library.opening_hour -%>
20
+ </p>
21
+ <p>
22
+ <%= @library.note -%>
23
+ </p>
24
+ <%- end -%>
25
+ </div>
26
+ </div>
@@ -0,0 +1,59 @@
1
+ <%= simple_form_for(@library_group, :validate => true) do |f| -%>
2
+ <%= f.error_notification -%>
3
+
4
+ <div class="field">
5
+ <%= f.label :name -%><br />
6
+ <%= f.text_field :name, :class => 'short_name' -%>
7
+ </div>
8
+
9
+ <div class="field">
10
+ <%= f.label :display_name -%><br />
11
+ <%= f.text_area :display_name, :class => 'resource_textarea' -%>
12
+ </div>
13
+
14
+ <div class="field">
15
+ <%= f.label :email -%><br />
16
+ <%= f.email_field :email, :class => 'resource_email' -%>
17
+ </div>
18
+
19
+ <div class="field">
20
+ <%= f.label :url -%><br />
21
+ <%= f.url_field :url, :class => 'resource_url' -%>
22
+ </div>
23
+
24
+ <div class="field">
25
+ <%= f.label :login_banner -%><br />
26
+ <%= f.text_area :login_banner -%>
27
+ </div>
28
+
29
+ <% if defined?(EnjuBookmark) %>
30
+ <div class="field">
31
+ <%= f.label :allow_bookmark_external_url -%>
32
+ <%= f.check_box :allow_bookmark_external_url -%>
33
+ </div>
34
+ <% end %>
35
+
36
+ <div class="field">
37
+ <%= f.label :my_networks -%><br />
38
+ <%= f.text_area :my_networks -%>
39
+ </div>
40
+
41
+ <div class="field">
42
+ <%= f.label :admin_networks -%><br />
43
+ <%= f.text_area :admin_networks -%>
44
+ </div>
45
+
46
+ <div class="field">
47
+ <%= f.label :note -%><br />
48
+ <%= f.text_area :note -%>
49
+ </div>
50
+
51
+ <div class="field">
52
+ <%= f.label t('activerecord.models.country') -%><br />
53
+ <%= f.select(:country_id, @countries.collect{|c| [c.display_name.localize, c.id]}) -%>
54
+ </div>
55
+
56
+ <div class="actions">
57
+ <%= f.submit %>
58
+ </div>
59
+ <%- end -%>
@@ -0,0 +1,12 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.editing', :model => t('activerecord.models.library_group')) -%></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'), library_groups_path -%></li>
11
+ </ul>
12
+ </div>
@@ -0,0 +1,30 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.listing', :model => t('activerecord.models.library_group')) -%></h1>
3
+ <div id="content_list">
4
+
5
+ <table class="index">
6
+ <tr>
7
+ <th><%= t('activerecord.attributes.library_group.display_name') -%></th>
8
+ <th><%= t('activerecord.attributes.library_group.name') -%></th>
9
+ <th><%= t('activerecord.attributes.library_group.email') -%></th>
10
+ <td></td>
11
+ </tr>
12
+
13
+ <%- @library_groups.each do |library_group| -%>
14
+ <tr class="line<%= cycle("0", "1") -%>">
15
+ <td><%= link_to h(library_group.display_name.localize), edit_library_group_path(library_group) -%></td>
16
+ <td><%= library_group.name -%></td>
17
+ <td><%= library_group.email -%></td>
18
+ <td><%= link_to t('page.edit'), edit_library_group_path(library_group) -%></td>
19
+ </tr>
20
+ <%- end -%>
21
+ </table>
22
+
23
+ </div>
24
+ </div>
25
+
26
+ <div id="submenu" class="ui-corner-all">
27
+ <ul>
28
+ <li><%= t('library_group.configuration') -%></li>
29
+ </ul>
30
+ </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.library_group')) -%></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'), library_groups_path -%></li>
11
+ </ul>
12
+ </div>
@@ -0,0 +1,66 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.showing', :model => t('activerecord.models.library_group')) -%></h1>
3
+ <div id="content_list">
4
+ <p id="notice"><%= notice %></p>
5
+
6
+ <p>
7
+ <strong><%= t('activerecord.attributes.library_group.name') -%>:</strong>
8
+ <%= @library_group.name -%>
9
+ </p>
10
+
11
+ <p>
12
+ <strong><%= t('activerecord.attributes.library_group.display_name') -%>:</strong>
13
+ <%= @library_group.display_name.localize -%>
14
+ </p>
15
+
16
+ <p>
17
+ <strong><%= t('activerecord.attributes.library_group.email') -%>:</strong>
18
+ <%= @library_group.email -%>
19
+ </p>
20
+
21
+ <div>
22
+ <strong><%= t('activerecord.attributes.library_group.login_banner') -%>:</strong>
23
+ <%= raw textilize(h(@library_group.login_banner)) -%>
24
+ </div>
25
+
26
+ <% if defined?(EnjuBookmark) %>
27
+ <p>
28
+ <strong><%= t('activerecord.attributes.library_group.allow_bookmark_external_url') -%>:</strong>
29
+ <%= localized_boolean(@library_group.allow_bookmark_external_url) -%>
30
+ </p>
31
+ <% end %>
32
+
33
+ <p>
34
+ <strong><%= t('activerecord.attributes.library_group.my_networks') -%>:</strong>
35
+ <%= @library_group.my_networks -%>
36
+ </p>
37
+
38
+ <p>
39
+ <strong><%= t('activerecord.attributes.library_group.admin_networks') -%>:</strong>
40
+ <%= @library_group.admin_networks -%>
41
+ </p>
42
+
43
+ <p>
44
+ <strong><%= t('activerecord.attributes.library_group.note') -%>:</strong>
45
+ <%= @library_group.note -%>
46
+ </p>
47
+
48
+ <p>
49
+ <strong><%= t('activerecord.models.library') -%>:</strong><br />
50
+ </p>
51
+
52
+ <ul>
53
+ <%- @library_group.real_libraries.each do |library| -%>
54
+ <li><%= link_to library.display_name.localize, library -%></li>
55
+ <%- end -%>
56
+ </ul>
57
+
58
+ </div>
59
+ </div>
60
+
61
+ <div id="submenu" class="ui-corner-all">
62
+ <ul>
63
+ <li><%= link_to t('page.edit'), edit_library_group_path(@library_group) -%></li>
64
+ <li><%= back_to_index(flash[:page_info]) -%></li>
65
+ </ul>
66
+ </div>
@@ -0,0 +1,19 @@
1
+ <%= form_for(@request_status_type) do |f| %>
2
+ <%= f.error_messages %>
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.request_status_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'), @request_status_type -%></li>
11
+ <li><%= link_to t('page.back'), request_status_types_path -%></li>
12
+ </ul>
13
+ </div>
@@ -0,0 +1,40 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.listing', :model => t('activerecord.models.request_status_type')) -%></h1>
3
+ <div id="content_list">
4
+
5
+ <table class="index">
6
+ <tr>
7
+ <th id="position"></th>
8
+ <th><%= t('activerecord.attributes.request_status_type.name') -%></th>
9
+ <th><%= t('activerecord.attributes.request_status_type.display_name') -%></th>
10
+ <th></th>
11
+ </tr>
12
+
13
+ <%- @request_status_types.each do |request_status_type| -%>
14
+ <tr class="line<%= cycle("0", "1") -%>">
15
+ <td>
16
+ <%- if can? :update, request_status_type -%>
17
+ <%= move_position(request_status_type) -%>
18
+ <%- end -%>
19
+ </td>
20
+ <td><%= link_to request_status_type.name, request_status_type -%></td>
21
+ <td><%= link_to request_status_type.display_name.localize, request_status_type -%></td>
22
+ <td>
23
+ <%- if can? :update, request_status_type -%>
24
+ <%= link_to t('page.edit'), edit_request_status_type_path(request_status_type) -%>
25
+ <% end %>
26
+ <%- if can? :destroy, request_status_type -%>
27
+ <%= link_to t('page.destroy'), request_status_type, :confirm => t('page.are_you_sure'), :method => :delete -%>
28
+ <% end %>
29
+ </td>
30
+ </tr>
31
+ <%- end -%>
32
+ </table>
33
+ </div>
34
+ </div>
35
+
36
+ <div id="submenu" class="ui-corner-all">
37
+ <ul>
38
+ <li><%= link_to t('page.new', :model => t('activerecord.models.request_status_type')), new_request_status_type_path -%></li>
39
+ </ul>
40
+ </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.request_status_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'), request_status_types_path -%></li>
11
+ </ul>
12
+ </div>
@@ -0,0 +1,29 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.showing', :model => t('activerecord.models.request_status_type')) -%></h1>
3
+ <div id="content_list">
4
+ <p id="notice"><%= notice %></p>
5
+
6
+ <p>
7
+ <strong><%= t('activerecord.attributes.request_status_type.name') -%>:</strong>
8
+ <%= @request_status_type.name -%>
9
+ </p>
10
+
11
+ <p>
12
+ <strong><%= t('activerecord.attributes.request_status_type.display_name') -%>:</strong>
13
+ <%= @request_status_type.display_name.localize -%>
14
+ </p>
15
+
16
+ <p>
17
+ <strong><%= t('activerecord.attributes.request_status_type.note') -%>:</strong>
18
+ <%= @request_status_type.note -%>
19
+ </p>
20
+
21
+ </div>
22
+ </div>
23
+
24
+ <div id="submenu" class="ui-corner-all">
25
+ <ul>
26
+ <li><%= link_to t('page.edit'), edit_request_status_type_path(@request_status_type) -%></li>
27
+ <li><%= back_to_index(flash[:page_info]) -%></li>
28
+ </ul>
29
+ </div>
@@ -0,0 +1,19 @@
1
+ <%= form_for(@request_type) do |f| %>
2
+ <%= f.error_messages %>
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.request_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'), @request_type -%></li>
11
+ <li><%= link_to t('page.back'), request_types_path -%></li>
12
+ </ul>
13
+ </div>
@@ -0,0 +1,40 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.listing', :model => t('activerecord.models.request_type')) -%></h1>
3
+ <div id="content_list">
4
+
5
+ <table class="index">
6
+ <tr>
7
+ <th id="position"></th>
8
+ <th><%= t('activerecord.attributes.request_type.name') -%></th>
9
+ <th><%= t('activerecord.attributes.request_type.display_name') -%></th>
10
+ <th></th>
11
+ </tr>
12
+
13
+ <%- @request_types.each do |request_type| -%>
14
+ <tr class="line<%= cycle("0", "1") -%>">
15
+ <td>
16
+ <%- if can? :update, request_type -%>
17
+ <%= move_position(request_type) -%>
18
+ <%- end -%>
19
+ </td>
20
+ <td><%= link_to request_type.name, request_type -%></td>
21
+ <td><%= link_to request_type.display_name.localize, request_type -%></td>
22
+ <td>
23
+ <%- if can? :update, request_type -%>
24
+ <%= link_to t('page.edit'), edit_request_type_path(request_type) -%>
25
+ <% end %>
26
+ <%- if can? :destroy, request_type -%>
27
+ <%= link_to t('page.destroy'), request_type, :confirm => t('page.are_you_sure'), :method => :delete -%>
28
+ <% end %>
29
+ </td>
30
+ </tr>
31
+ <%- end -%>
32
+ </table>
33
+ </div>
34
+ </div>
35
+
36
+ <div id="submenu" class="ui-corner-all">
37
+ <ul>
38
+ <li><%= link_to t('page.new', :model => t('activerecord.models.request_type')), new_request_type_path -%></li>
39
+ </ul>
40
+ </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.request_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'), request_types_path -%></li>
11
+ </ul>
12
+ </div>
@@ -0,0 +1,29 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.showing', :model => t('activerecord.models.request_type')) -%></h1>
3
+ <div id="content_list">
4
+ <p id="notice"><%= notice %></p>
5
+
6
+ <p>
7
+ <strong><%= t('activerecord.attributes.request_type.name') -%>:</strong>
8
+ <%= @request_type.name -%>
9
+ </p>
10
+
11
+ <p>
12
+ <strong><%= t('activerecord.attributes.request_type.display_name') -%>:</strong>
13
+ <%= @request_type.display_name.localize -%>
14
+ </p>
15
+
16
+ <p>
17
+ <strong><%= t('activerecord.attributes.request_type.note') -%>:</strong>
18
+ <%= @request_type.note -%>
19
+ </p>
20
+
21
+ </div>
22
+ </div>
23
+
24
+ <div id="submenu" class="ui-corner-all">
25
+ <ul>
26
+ <li><%= link_to t('page.edit'), edit_request_type_path(@request_type) -%></li>
27
+ <li><%= back_to_index(flash[:page_info]) -%></li>
28
+ </ul>
29
+ </div>
@@ -0,0 +1,44 @@
1
+ <%= form_for(@search_engine) do |f| -%>
2
+ <% if @search_engine.errors.any? %>
3
+ <div id="errorExplanation">
4
+ <h2><%= pluralize(@search_engine.errors.count, "error") %> prohibited this search_engine from being saved:</h2>
5
+ <ul>
6
+ <% @search_engine.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 :name -%><br />
15
+ <%= f.text_field :name -%>
16
+ </div>
17
+ <div class="field">
18
+ <%= f.label :url -%><br />
19
+ <%= f.url_field :url, :class => 'resource_url' -%>
20
+ </div>
21
+ <div class="field">
22
+ <%= f.label :base_url -%><br />
23
+ <%= f.text_area :base_url, :class => 'resource_textarea' -%>
24
+ </div>
25
+ <div class="field">
26
+ <%= f.label :http_method -%><br />
27
+ <%= f.select :http_method, ['get', 'post'] -%>
28
+ </div>
29
+ <div class="field">
30
+ <%= f.label :query_param -%><br />
31
+ <%= f.text_field :query_param -%>
32
+ </div>
33
+ <div class="field">
34
+ <%= f.label :additional_param -%><br />
35
+ <%= f.text_area :additional_param, :class => 'resource_textarea' -%>
36
+ </div>
37
+ <div class="field">
38
+ <%= f.label :note -%><br />
39
+ <%= f.text_area :note, :class => 'resource_textarea' -%>
40
+ </div>
41
+ <div class="actions">
42
+ <%= f.submit %>
43
+ </div>
44
+ <%- 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.search_engine')) -%></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'), @search_engine -%></li>
11
+ <li><%= link_to t('page.back'), search_engines_path -%></li>
12
+ </ul>
13
+ </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.search_engine')) -%></h1>
3
+ <div id="content_list">
4
+
5
+ <table class="index">
6
+ <tr>
7
+ <th id="position"></th>
8
+ <th><%= t('activerecord.attributes.search_engine.name') -%></th>
9
+ <th><%= t('activerecord.attributes.search_engine.note') -%></th>
10
+ <th></th>
11
+ <th></th>
12
+ </tr>
13
+
14
+ <%- @search_engines.each do |search_engine| -%>
15
+ <tr class="line<%= cycle("0", "1") -%>">
16
+ <td>
17
+ <%- if can? :update, search_engine -%>
18
+ <%= move_position(search_engine) -%>
19
+ <%- end -%>
20
+ </td>
21
+ <td><%= link_to search_engine.name, search_engine.url -%></td>
22
+ <td><%= search_engine.note -%></td>
23
+ <td><%= link_to t('page.show'), search_engine -%></td>
24
+ <td>
25
+ <%- if can? :update, search_engine -%>
26
+ <%= link_to t('page.edit'), edit_search_engine_path(search_engine) -%>
27
+ <% end %>
28
+ <%- if can? :destroy, search_engine -%>
29
+ <%= link_to t('page.destroy'), search_engine, :confirm => t('page.are_you_sure'), :method => :delete -%>
30
+ <%- end -%>
31
+ </td>
32
+ </tr>
33
+ <%- end -%>
34
+ </table>
35
+
36
+ <%= will_paginate(@search_engines) -%>
37
+ </div>
38
+ </div>
39
+
40
+ <div id="submenu" class="ui-corner-all">
41
+ <ul>
42
+ <li><%= link_to t('page.new', :model => t('activerecord.models.search_engine')), new_search_engine_path -%></li>
43
+ </ul>
44
+ </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.search_engine')) -%></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'), search_engines_path -%></li>
11
+ </ul>
12
+ </div>
@@ -0,0 +1,49 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.showing', :model => t('activerecord.models.search_engine')) -%></h1>
3
+ <div id="content_list">
4
+ <p id="notice"><%= notice %></p>
5
+
6
+ <p>
7
+ <strong><%= t('activerecord.attributes.search_engine.name') -%>:</strong>
8
+ <%= @search_engine.name -%>
9
+ </p>
10
+
11
+ <p>
12
+ <strong><%= t('activerecord.attributes.search_engine.url') -%>:</strong>
13
+ <%= link_to @search_engine.url, @search_engine.url -%>
14
+ </p>
15
+
16
+ <p>
17
+ <strong><%= t('activerecord.attributes.search_engine.base_url') -%>:</strong>
18
+ <%= @search_engine.base_url -%>
19
+ </p>
20
+
21
+ <p>
22
+ <strong><%= t('activerecord.attributes.search_engine.http_method') -%>:</strong>
23
+ <%= @search_engine.http_method -%>
24
+ </p>
25
+
26
+ <p>
27
+ <strong><%= t('activerecord.attributes.search_engine.query_param') -%>:</strong>
28
+ <%= @search_engine.query_param -%>
29
+ </p>
30
+
31
+ <p>
32
+ <strong><%= t('activerecord.attributes.search_engine.additional_param') -%>:</strong>
33
+ <%= raw simple_format(h(@search_engine.additional_param)) -%>
34
+ </p>
35
+
36
+ <p>
37
+ <strong><%= t('activerecord.attributes.search_engine.note') -%>:</strong>
38
+ <%= @search_engine.note -%>
39
+ </p>
40
+
41
+ </div>
42
+ </div>
43
+
44
+ <div id="submenu" class="ui-corner-all">
45
+ <ul>
46
+ <li><%= link_to t('page.edit'), edit_search_engine_path(@search_engine) -%></li>
47
+ <li><%= back_to_index(flash[:page_info]) -%></li>
48
+ </ul>
49
+ </div>
@@ -0,0 +1,37 @@
1
+ <%= render 'page/required_field' %>
2
+ <%= simple_form_for(@shelf, :validate => true) do |f| -%>
3
+ <%= f.error_messages -%>
4
+
5
+ <div class="field">
6
+ <%= f.label :name -%><br />
7
+ <%= f.text_field :name, :class => 'short_name' -%>
8
+ </div>
9
+
10
+ <div class="field">
11
+ <%= f.label :display_name -%><br />
12
+ <%= f.text_area :display_name, :class => 'resource_textarea' -%>
13
+ </div>
14
+
15
+ <div class="field">
16
+ <%= f.label :closed -%>
17
+ <%= f.check_box :closed %>
18
+ </div>
19
+
20
+ <div class="field">
21
+ <%= f.label :note -%><br />
22
+ <%= f.text_area :note, :class => 'resource_textarea' -%>
23
+ </div>
24
+
25
+ <div class="field">
26
+ <%= f.label t('activerecord.models.library') -%><br />
27
+ <select id="library_id" name="library_id">
28
+ <%- @libraries.each do |library| -%>
29
+ <option value="<%= library.name -%>"<%= " selected='selected'" if @shelf.library == library -%>><%= library.display_name.localize -%></option>
30
+ <%- end -%>
31
+ </select>
32
+ </div>
33
+
34
+ <div class="actions">
35
+ <%= f.submit %>
36
+ </div>
37
+ <%- end -%>