enju_library 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +47 -0
- data/app/controllers/bookstores_controller.rb +17 -0
- data/app/controllers/budget_types_controller.rb +13 -0
- data/app/controllers/libraries_controller.rb +125 -0
- data/app/controllers/library_groups_controller.rb +46 -0
- data/app/controllers/request_status_types_controller.rb +13 -0
- data/app/controllers/request_types_controller.rb +13 -0
- data/app/controllers/search_engines_controller.rb +17 -0
- data/app/controllers/shelves_controller.rb +138 -0
- data/app/controllers/subscribes_controller.rb +82 -0
- data/app/controllers/subscriptions_controller.rb +87 -0
- data/app/helpers/shelves_helper.rb +13 -0
- data/app/models/bookstore.rb +37 -0
- data/app/models/budget_type.rb +19 -0
- data/app/models/library.rb +131 -0
- data/app/models/library_group.rb +86 -0
- data/app/models/library_group_sweeper.rb +12 -0
- data/app/models/request_status_type.rb +20 -0
- data/app/models/request_type.rb +19 -0
- data/app/models/search_engine.rb +52 -0
- data/app/models/shelf.rb +66 -0
- data/app/models/subscribe.rb +23 -0
- data/app/models/subscription.rb +44 -0
- data/app/views/accepts/_form.html.erb +11 -0
- data/app/views/accepts/_list.html.erb +31 -0
- data/app/views/accepts/edit.html.erb +13 -0
- data/app/views/accepts/index.csv.erb +4 -0
- data/app/views/accepts/index.html.erb +49 -0
- data/app/views/accepts/index.js.erb +1 -0
- data/app/views/accepts/new.html.erb +14 -0
- data/app/views/accepts/show.html.erb +31 -0
- data/app/views/bookstores/_form.html.erb +42 -0
- data/app/views/bookstores/edit.html.erb +13 -0
- data/app/views/bookstores/index.html.erb +49 -0
- data/app/views/bookstores/new.html.erb +12 -0
- data/app/views/bookstores/show.html.erb +52 -0
- data/app/views/budget_types/_form.html.erb +19 -0
- data/app/views/budget_types/edit.html.erb +13 -0
- data/app/views/budget_types/index.html.erb +43 -0
- data/app/views/budget_types/new.html.erb +12 -0
- data/app/views/budget_types/show.html.erb +29 -0
- data/app/views/libraries/_calendar.html.erb +13 -0
- data/app/views/libraries/_form.html.erb +90 -0
- data/app/views/libraries/_map.html.erb +25 -0
- data/app/views/libraries/_map.mobile.erb +25 -0
- data/app/views/libraries/edit.html.erb +13 -0
- data/app/views/libraries/index.html.erb +75 -0
- data/app/views/libraries/new.html.erb +12 -0
- data/app/views/libraries/show.html.erb +131 -0
- data/app/views/libraries/show.mobile.erb +26 -0
- data/app/views/library_groups/_form.html.erb +59 -0
- data/app/views/library_groups/edit.html.erb +12 -0
- data/app/views/library_groups/index.html.erb +30 -0
- data/app/views/library_groups/new.html.erb +12 -0
- data/app/views/library_groups/show.html.erb +66 -0
- data/app/views/request_status_types/_form.html.erb +19 -0
- data/app/views/request_status_types/edit.html.erb +13 -0
- data/app/views/request_status_types/index.html.erb +40 -0
- data/app/views/request_status_types/new.html.erb +12 -0
- data/app/views/request_status_types/show.html.erb +29 -0
- data/app/views/request_types/_form.html.erb +19 -0
- data/app/views/request_types/edit.html.erb +13 -0
- data/app/views/request_types/index.html.erb +40 -0
- data/app/views/request_types/new.html.erb +12 -0
- data/app/views/request_types/show.html.erb +29 -0
- data/app/views/search_engines/_form.html.erb +44 -0
- data/app/views/search_engines/edit.html.erb +13 -0
- data/app/views/search_engines/index.html.erb +44 -0
- data/app/views/search_engines/new.html.erb +12 -0
- data/app/views/search_engines/show.html.erb +49 -0
- data/app/views/shelves/_form.html.erb +37 -0
- data/app/views/shelves/_library_facet.html.erb +12 -0
- data/app/views/shelves/_select_form.html.erb +1 -0
- data/app/views/shelves/edit.html.erb +13 -0
- data/app/views/shelves/index.html.erb +73 -0
- data/app/views/shelves/new.html.erb +18 -0
- data/app/views/shelves/show.html.erb +65 -0
- data/app/views/subscribes/edit.html.erb +37 -0
- data/app/views/subscribes/index.html.erb +31 -0
- data/app/views/subscribes/new.html.erb +48 -0
- data/app/views/subscribes/show.html.erb +34 -0
- data/app/views/subscriptions/edit.html.erb +29 -0
- data/app/views/subscriptions/index.html.erb +39 -0
- data/app/views/subscriptions/new.html.erb +28 -0
- data/app/views/subscriptions/show.html.erb +40 -0
- data/config/routes.rb +17 -0
- data/db/migrate/059_create_libraries.rb +28 -0
- data/db/migrate/069_create_shelves.rb +15 -0
- data/db/migrate/080_create_library_groups.rb +20 -0
- data/db/migrate/124_create_bookstores.rb +17 -0
- data/db/migrate/130_create_request_status_types.rb +12 -0
- data/db/migrate/131_create_request_types.rb +12 -0
- data/db/migrate/20081006090811_create_subscriptions.rb +17 -0
- data/db/migrate/20081006093246_create_subscribes.rb +14 -0
- data/db/migrate/20081023092436_create_search_engines.rb +17 -0
- data/db/migrate/20110222073537_add_url_to_library_group.rb +9 -0
- data/db/migrate/20110620173525_add_bookstore_id_to_item.rb +11 -0
- data/db/migrate/20110627122938_add_number_of_day_to_notify_overdue_to_user_group.rb +13 -0
- data/db/migrate/20120105074911_add_isil_to_library.rb +5 -0
- data/db/migrate/20120129014038_create_budget_types.rb +12 -0
- data/db/migrate/20120510140958_add_closed_to_shelf.rb +5 -0
- data/lib/enju_library/engine.rb +16 -0
- data/lib/enju_library/master_model.rb +19 -0
- data/lib/enju_library/url_validator.rb +10 -0
- data/lib/enju_library/version.rb +3 -0
- data/lib/enju_library.rb +49 -0
- data/lib/tasks/enju_library_tasks.rake +4 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +15 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/config/application.rb +56 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +58 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +0 -0
- data/test/dummy/log/test.log +0 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/enju_library_test.rb +7 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/test_helper.rb +15 -0
- metadata +576 -0
@@ -0,0 +1,13 @@
|
|
1
|
+
<div id="content_detail" class="ui-corner-all">
|
2
|
+
<h1 class="title"><%= t('page.editing', :model => t('activerecord.models.bookstore')) -%></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'), @bookstore -%></li>
|
11
|
+
<li><%= link_to t('page.back'), bookstores_path -%></li>
|
12
|
+
</ul>
|
13
|
+
</div>
|
@@ -0,0 +1,49 @@
|
|
1
|
+
<div id="content_detail" class="ui-corner-all">
|
2
|
+
<h1 class="title"><%= t('page.listing', :model => t('activerecord.models.bookstore')) -%></h1>
|
3
|
+
<div id="content_list">
|
4
|
+
|
5
|
+
<table class="index">
|
6
|
+
<tr>
|
7
|
+
<th id="position"></th>
|
8
|
+
<th><%= t('activerecord.attributes.bookstore.name') -%></th>
|
9
|
+
<th><%= t('activerecord.attributes.bookstore.telephone_number') -%></th>
|
10
|
+
<th><%= t('activerecord.attributes.bookstore.fax_number') -%></th>
|
11
|
+
<th id="edit_icons"></th>
|
12
|
+
</tr>
|
13
|
+
|
14
|
+
<%- @bookstores.each_with_index do |bookstore, i| -%>
|
15
|
+
<tr class="line<%= cycle("0", "1") -%>">
|
16
|
+
<td>
|
17
|
+
<%- if can? :update, bookstore -%>
|
18
|
+
<%= move_position(bookstore) -%>
|
19
|
+
<%- end -%>
|
20
|
+
</td>
|
21
|
+
<td>
|
22
|
+
<%= link_to bookstore.name, bookstore -%><br />
|
23
|
+
<%= link_to bookstore.url, bookstore.url -%>
|
24
|
+
</td>
|
25
|
+
<td><%= bookstore.telephone_number -%></td>
|
26
|
+
<td><%= bookstore.fax_number -%></td>
|
27
|
+
<td>
|
28
|
+
<%- if can? :update, bookstore -%>
|
29
|
+
<%= link_to image_tag('icons/page_white_edit.png', :size => '16x16', :alt => t('page.edit')), edit_bookstore_path(bookstore) -%>
|
30
|
+
<% end %>
|
31
|
+
<%- if can? :destroy, bookstore -%>
|
32
|
+
<%= link_to image_tag('icons/delete.png', :size => '16x16', :alt => t('page.destroy')), bookstore, :confirm => t('page.are_you_sure'), :method => :delete -%>
|
33
|
+
<%- end -%>
|
34
|
+
</td>
|
35
|
+
</tr>
|
36
|
+
<%- end -%>
|
37
|
+
</table>
|
38
|
+
|
39
|
+
<%= will_paginate(@bookstores) -%>
|
40
|
+
</div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="submenu" class="ui-corner-all">
|
44
|
+
<%- if can? :create, Bookstore -%>
|
45
|
+
<ul>
|
46
|
+
<li><%= link_to t('page.new', :model => t('activerecord.models.bookstore')), new_bookstore_path -%></li>
|
47
|
+
</ul>
|
48
|
+
<%- end -%>
|
49
|
+
</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.bookstore')) -%></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'), bookstores_path -%></li>
|
11
|
+
</ul>
|
12
|
+
</div>
|
@@ -0,0 +1,52 @@
|
|
1
|
+
<div id="content_detail" class="ui-corner-all">
|
2
|
+
<h1 class="title"><%= t('page.showing', :model => t('activerecord.models.bookstore')) -%></h1>
|
3
|
+
<div id="content_list">
|
4
|
+
<p id="notice"><%= notice %></p>
|
5
|
+
|
6
|
+
<p>
|
7
|
+
<strong><%= t('activerecord.attributes.bookstore.name') -%>:</strong>
|
8
|
+
<%= @bookstore.name -%>
|
9
|
+
</p>
|
10
|
+
|
11
|
+
<p>
|
12
|
+
<strong><%= t('activerecord.attributes.bookstore.zip_code') -%>:</strong>
|
13
|
+
<%= @bookstore.zip_code -%>
|
14
|
+
</p>
|
15
|
+
|
16
|
+
<p>
|
17
|
+
<strong><%= t('activerecord.attributes.bookstore.address') -%>:</strong>
|
18
|
+
<%= @bookstore.address -%>
|
19
|
+
</p>
|
20
|
+
|
21
|
+
<p>
|
22
|
+
<strong><%= t('activerecord.attributes.bookstore.telephone_number') -%>:</strong>
|
23
|
+
<%= @bookstore.telephone_number -%>
|
24
|
+
</p>
|
25
|
+
|
26
|
+
<p>
|
27
|
+
<strong><%= t('activerecord.attributes.bookstore.fax_number') -%>:</strong>
|
28
|
+
<%= @bookstore.fax_number -%>
|
29
|
+
</p>
|
30
|
+
|
31
|
+
<p>
|
32
|
+
<strong><%= t('activerecord.attributes.bookstore.url') -%>:</strong>
|
33
|
+
<%= link_to @bookstore.url, @bookstore.url -%>
|
34
|
+
</p>
|
35
|
+
|
36
|
+
<p>
|
37
|
+
<strong><%= t('activerecord.attributes.bookstore.note') -%>:</strong>
|
38
|
+
<%= @bookstore.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_bookstore_path(@bookstore) -%></li>
|
47
|
+
<li><%= back_to_index(flash[:page_info]) -%></li>
|
48
|
+
<% if defined?(EnjuPurchaseRequest) %>
|
49
|
+
<li><%= link_to t('activerecord.models.order_list'), bookstore_order_lists_path(@bookstore) -%></li>
|
50
|
+
<% end %>
|
51
|
+
</ul>
|
52
|
+
</div>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<%= form_for(@budget_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, :class => 'resource_textarea' -%>
|
11
|
+
</div>
|
12
|
+
<div class="field">
|
13
|
+
<%= f.label :note %><br />
|
14
|
+
<%= f.text_area :note, :class => 'resource_textarea' -%>
|
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.budget_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'), @budget_type -%></li>
|
11
|
+
<li><%= link_to t('page.back'), budget_types_path -%></li>
|
12
|
+
</ul>
|
13
|
+
</div>
|
@@ -0,0 +1,43 @@
|
|
1
|
+
<div id="content_detail" class="ui-corner-all">
|
2
|
+
<h1 class="title"><%= t('page.listing', :model => t('activerecord.models.budget_type')) -%></h1>
|
3
|
+
<div id="content_list">
|
4
|
+
|
5
|
+
<table class="index">
|
6
|
+
<tr>
|
7
|
+
<th id="position"></th>
|
8
|
+
<th><%= t('activerecord.attributes.budget_type.name') -%></th>
|
9
|
+
<th><%= t('activerecord.attributes.budget_type.note') -%></th>
|
10
|
+
<th></th>
|
11
|
+
</tr>
|
12
|
+
|
13
|
+
<%- @budget_types.each do |budget_type| -%>
|
14
|
+
<tr class="line<%= cycle("0", "1") -%>">
|
15
|
+
<td>
|
16
|
+
<%- if can? :update, budget_type -%>
|
17
|
+
<%= move_position(budget_type) -%>
|
18
|
+
<%- end -%>
|
19
|
+
</td>
|
20
|
+
<td>
|
21
|
+
<%= link_to budget_type.name, budget_type -%>
|
22
|
+
</td>
|
23
|
+
<td><%= budget_type.note -%></td>
|
24
|
+
<td>
|
25
|
+
<%- if can? :update, budget_type -%>
|
26
|
+
<%= link_to t('page.edit'), edit_budget_type_path(budget_type) -%>
|
27
|
+
<% end %>
|
28
|
+
<%- if can? :destroy, budget_type -%>
|
29
|
+
<%= link_to t('page.destroy'), budget_type, :confirm => t('page.are_you_sure'), :method => :delete -%>
|
30
|
+
<%- end -%>
|
31
|
+
</td>
|
32
|
+
</tr>
|
33
|
+
<%- end -%>
|
34
|
+
</table>
|
35
|
+
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="submenu" class="ui-corner-all">
|
40
|
+
<ul>
|
41
|
+
<li><%= link_to t('page.new', :model => t('activerecord.models.budget_type')), new_budget_type_path -%></li>
|
42
|
+
</ul>
|
43
|
+
</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.budget_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'), budget_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.budget_type')) -%></h1>
|
3
|
+
<div id="content_list">
|
4
|
+
<p id="notice"><%= notice %></p>
|
5
|
+
|
6
|
+
<p>
|
7
|
+
<strong><%= t('activerecord.attributes.budget_type.name') -%>:</strong>
|
8
|
+
<%= @budget_type.name -%>
|
9
|
+
</p>
|
10
|
+
|
11
|
+
<p>
|
12
|
+
<strong><%= t('activerecord.attributes.budget_type.display_name') -%>:</strong>
|
13
|
+
<%= @budget_type.display_name.localize -%>
|
14
|
+
</p>
|
15
|
+
|
16
|
+
<p>
|
17
|
+
<strong><%= t('activerecord.attributes.budget_type.note') -%>:</strong>
|
18
|
+
<%= @budget_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_budget_type_path(@budget_type) -%></li>
|
27
|
+
<li><%= back_to_index(flash[:page_info]) -%></li>
|
28
|
+
</ul>
|
29
|
+
</div>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<div id="event_list">
|
2
|
+
(<%= link_to t('page.calendar'), :controller => :calendar, :action => :index, :library_id => @library.name -%>)
|
3
|
+
<ul>
|
4
|
+
<%- @events.each do |event| -%>
|
5
|
+
<li>
|
6
|
+
<%= link_to event.display_name.localize, event -%>
|
7
|
+
(<%= l(event.start_at) -%> - <%= l(event.end_at) -%>)
|
8
|
+
</li>
|
9
|
+
<%- end -%>
|
10
|
+
</ul>
|
11
|
+
|
12
|
+
<%= will_paginate(@events, :param_name => :event_page, :class => 'content_pagination digg_pagination') -%>
|
13
|
+
</div>
|
@@ -0,0 +1,90 @@
|
|
1
|
+
<%= render 'page/required_field' %>
|
2
|
+
<%= simple_form_for(@library) do |f| -%>
|
3
|
+
<%= f.error_notification -%>
|
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 :short_display_name -%><br />
|
12
|
+
<%= f.text_area :short_display_name, :class => 'resource_textarea' -%>
|
13
|
+
</div>
|
14
|
+
|
15
|
+
<div class="field">
|
16
|
+
<%= f.label :display_name -%><br />
|
17
|
+
<%= f.text_area :display_name, :class => 'resource_textarea' -%>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<div class="field">
|
21
|
+
<%= f.label :isil -%><br />
|
22
|
+
<%= f.text_field :isil, :class => 'resource_identifierr' -%>
|
23
|
+
</div>
|
24
|
+
|
25
|
+
<% unless @library.web? %>
|
26
|
+
<div class="field">
|
27
|
+
<%= f.label t('activerecord.models.country') -%><br />
|
28
|
+
<%= f.select(:country_id, @countries.collect{|c| [c.display_name.localize, c.id]}) -%>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
<div class="field">
|
32
|
+
<%= f.label :zip_code -%><br />
|
33
|
+
<%= f.text_field :zip_code -%>
|
34
|
+
</div>
|
35
|
+
|
36
|
+
<div class="field">
|
37
|
+
<%= f.label :region -%><br />
|
38
|
+
<%= f.text_area :region, :class => 'resource_textarea' -%>
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<div class="field">
|
42
|
+
<%= f.label :locality -%><br />
|
43
|
+
<%= f.text_area :locality, :class => 'resource_textarea' -%>
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div class="field">
|
47
|
+
<%= f.label :street -%><br />
|
48
|
+
<%= f.text_area :street, :class => 'resource_textarea' -%>
|
49
|
+
</div>
|
50
|
+
|
51
|
+
<div class="field">
|
52
|
+
<%= f.label :telephone_number_1 -%><br />
|
53
|
+
<%= f.phone_field :telephone_number_1 -%>
|
54
|
+
</div>
|
55
|
+
|
56
|
+
<div class="field">
|
57
|
+
<%= f.label :telephone_number_2 -%><br />
|
58
|
+
<%= f.phone_field :telephone_number_2 -%>
|
59
|
+
</div>
|
60
|
+
|
61
|
+
<div class="field">
|
62
|
+
<%= f.label :fax_number -%><br />
|
63
|
+
<%= f.phone_field :fax_number -%>
|
64
|
+
</div>
|
65
|
+
|
66
|
+
<div class="field">
|
67
|
+
<%= f.label :call_number_rows -%><br />
|
68
|
+
<%= f.text_field :call_number_rows, :class => 'resource_integer' -%>
|
69
|
+
</div>
|
70
|
+
|
71
|
+
<div class="field">
|
72
|
+
<%= f.label :call_number_delimiter -%><br />
|
73
|
+
<%= f.text_field :call_number_delimiter, :class => 'resource_integer' -%>
|
74
|
+
</div>
|
75
|
+
|
76
|
+
<div class="field">
|
77
|
+
<%= f.label :opening_hour -%><br />
|
78
|
+
<%= f.text_area :opening_hour, :class => 'resource_textarea' -%>
|
79
|
+
</div>
|
80
|
+
|
81
|
+
<div class="field">
|
82
|
+
<%= f.label :note -%><br />
|
83
|
+
<%= f.text_area :note, :class => 'resource_textarea' -%>
|
84
|
+
</div>
|
85
|
+
<% end %>
|
86
|
+
|
87
|
+
<div class="actions">
|
88
|
+
<%= f.submit %>
|
89
|
+
</div>
|
90
|
+
<%- end -%>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
|
2
|
+
<script type="text/javascript">
|
3
|
+
google.maps.event.addDomListener(window, 'load', function() {
|
4
|
+
var latlng = new google.maps.LatLng(<%= library.latitude %>, <%= library.longitude %>);
|
5
|
+
var options = {
|
6
|
+
zoom: 16,
|
7
|
+
center: latlng,
|
8
|
+
mapTypeId: google.maps.MapTypeId.ROADMAP,
|
9
|
+
scaleControl: true
|
10
|
+
};
|
11
|
+
var map = new google.maps.Map(document.getElementById("library_map"), options);
|
12
|
+
var marker = new google.maps.Marker({
|
13
|
+
position: latlng,
|
14
|
+
map: map,
|
15
|
+
title: '<%= library.display_name.localize %>'
|
16
|
+
});
|
17
|
+
var infowindow = new google.maps.InfoWindow({
|
18
|
+
content: '<%= library.display_name.localize %>'
|
19
|
+
});
|
20
|
+
google.maps.event.addListener(marker, 'click', function() {
|
21
|
+
infowindow.open(map,marker);
|
22
|
+
});
|
23
|
+
});
|
24
|
+
</script>
|
25
|
+
<div id="library_map" style="width: 500px; height: 500px;"></div>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
|
2
|
+
<script type="text/javascript">
|
3
|
+
google.maps.event.addDomListener(window, 'load', function() {
|
4
|
+
var latlng = new google.maps.LatLng(<%= library.latitude %>, <%= library.longitude %>);
|
5
|
+
var options = {
|
6
|
+
zoom: 16,
|
7
|
+
center: latlng,
|
8
|
+
mapTypeId: google.maps.MapTypeId.ROADMAP,
|
9
|
+
scaleControl: true
|
10
|
+
};
|
11
|
+
var map = new google.maps.Map(document.getElementById("library_map"), options);
|
12
|
+
var marker = new google.maps.Marker({
|
13
|
+
position: latlng,
|
14
|
+
map: map,
|
15
|
+
title: '<%= library.display_name.localize %>'
|
16
|
+
});
|
17
|
+
var infowindow = new google.maps.InfoWindow({
|
18
|
+
content: '<%= library.display_name.localize %>'
|
19
|
+
});
|
20
|
+
google.maps.event.addListener(marker, 'click', function() {
|
21
|
+
infowindow.open(map,marker);
|
22
|
+
});
|
23
|
+
});
|
24
|
+
</script>
|
25
|
+
<div id="library_map" style="width: 500px; height: 500px;"></div>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<div id="content_detail" class="ui-corner-all">
|
2
|
+
<h1 class="title"><%= t('page.editing', :model => t('activerecord.models.library')) -%></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'), library_path(@library) -%></li>
|
11
|
+
<li><%= link_to t('page.back'), libraries_path -%></li>
|
12
|
+
</ul>
|
13
|
+
</div>
|
@@ -0,0 +1,75 @@
|
|
1
|
+
<div id="content_detail" class="ui-corner-all">
|
2
|
+
<h1 class="title"><%= t('page.listing', :model => t('activerecord.models.library')) -%></h1>
|
3
|
+
<div id="content_list">
|
4
|
+
|
5
|
+
<%= form_for :libraries, :url => libraries_path, :html => {:method => 'get'} do -%>
|
6
|
+
<p>
|
7
|
+
<%= t('page.search_term') -%>: <%= search_field_tag 'query', h(@query), {:id => 'search_form_top', :class => 'search_form', :placeholder => t('page.search_term')} -%>
|
8
|
+
<%= submit_tag t('page.search') -%>
|
9
|
+
</p>
|
10
|
+
<%- end -%>
|
11
|
+
|
12
|
+
<p>
|
13
|
+
<%= t('page.sort_by') -%>:
|
14
|
+
<%= link_to t('activerecord.attributes.tag.name'), libraries_path(:order => 'name') -%>
|
15
|
+
<%= link_to t('page.created_at'), libraries_path(:sort_by => 'created_at') -%>
|
16
|
+
</p>
|
17
|
+
|
18
|
+
<table class="index">
|
19
|
+
<tr>
|
20
|
+
<th id="position"></th>
|
21
|
+
<th><%= t('activerecord.attributes.library.name') -%></th>
|
22
|
+
<th>
|
23
|
+
<%= t('activerecord.attributes.library.telephone_number_1') -%>
|
24
|
+
/
|
25
|
+
<%= t('activerecord.attributes.library.telephone_number_2') -%>
|
26
|
+
</th>
|
27
|
+
<th>
|
28
|
+
<%= t('activerecord.attributes.library.fax_number') -%>
|
29
|
+
</th>
|
30
|
+
<th id="edit_icons"></th>
|
31
|
+
</tr>
|
32
|
+
|
33
|
+
<%- @libraries.each_with_index do |library, i| -%>
|
34
|
+
<tr class="line<%= cycle("0", "1") -%>">
|
35
|
+
<td>
|
36
|
+
<%- if can?(:update, library) and params[:query].blank? -%>
|
37
|
+
<%= library.first? ? image_tag('icons/stop.png', :size => '16x16') : link_to(image_tag('icons/arrow_up.png', :size => '16x16', :alt => t('page.asc')), {:action => 'update', :move => 'higher', :id => library.name}, :method => :put) -%>
|
38
|
+
<%= library.last? ? image_tag('icons/stop.png', :size => '16x16') : link_to(image_tag('icons/arrow_down.png', :size => '16x16', :alt => t('page.desc')), {:action => 'update', :move => 'lower', :id => library.name}, :method => :put) -%>
|
39
|
+
<%- end -%>
|
40
|
+
</td>
|
41
|
+
<td>
|
42
|
+
<%= link_to library.display_name.localize, library -%>
|
43
|
+
<br />
|
44
|
+
<%= library.zip_code -%>
|
45
|
+
<%= library.address -%>
|
46
|
+
</td>
|
47
|
+
<td>
|
48
|
+
<%= library.telephone_number_1 -%>
|
49
|
+
<br />
|
50
|
+
<%= library.telephone_number_2 -%>
|
51
|
+
</td>
|
52
|
+
<td><%= library.fax_number -%></td>
|
53
|
+
<td>
|
54
|
+
<%- if can? :update, library -%>
|
55
|
+
<%= link_to image_tag('icons/page_white_edit.png', :size => '16x16', :alt => t('page.edit')), edit_library_path(library) -%>
|
56
|
+
<% end %>
|
57
|
+
<%- if can? :destroy, library -%>
|
58
|
+
<%= link_to image_tag('icons/delete.png', :size => '16x16', :alt => t('page.destroy')), library, :confirm => t('page.are_you_sure'), :method => :delete -%>
|
59
|
+
<%- end -%>
|
60
|
+
</td>
|
61
|
+
</tr>
|
62
|
+
<%- end -%>
|
63
|
+
</table>
|
64
|
+
<%= will_paginate(@libraries) %>
|
65
|
+
|
66
|
+
</div>
|
67
|
+
</div>
|
68
|
+
|
69
|
+
<div id="submenu" class="ui-corner-all">
|
70
|
+
<ul>
|
71
|
+
<%- if can? :create, Library -%>
|
72
|
+
<li><%= link_to t('page.new', :model => t('activerecord.models.library')), new_library_path -%></li>
|
73
|
+
<%- end -%>
|
74
|
+
</ul>
|
75
|
+
</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')) -%></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'), libraries_path -%></li>
|
11
|
+
</ul>
|
12
|
+
</div>
|
@@ -0,0 +1,131 @@
|
|
1
|
+
<div id="content_detail" class="ui-corner-all">
|
2
|
+
<h1 class="title"><%= @library.display_name.localize -%></h1>
|
3
|
+
<div id="content_list">
|
4
|
+
<p id="notice"><%= notice %></p>
|
5
|
+
|
6
|
+
<p>
|
7
|
+
<%= t('activerecord.attributes.library.name') -%>: <%= @library.name -%>
|
8
|
+
<% unless @library.web? %>
|
9
|
+
(ISIL: <%= @library.isil %>)
|
10
|
+
<% end %>
|
11
|
+
</p>
|
12
|
+
|
13
|
+
<%- unless @library.web? -%>
|
14
|
+
<p>
|
15
|
+
<%= t('library.address') -%>: <%= @library.zip_code -%> <%= @library.address.localize -%>
|
16
|
+
<br />
|
17
|
+
<%= t('activerecord.attributes.library.telephone_number_1') -%>: <%= @library.telephone_number_1 -%>
|
18
|
+
<%= t('activerecord.attributes.library.telephone_number_2') -%>: <%= @library.telephone_number_2 -%>
|
19
|
+
<br />
|
20
|
+
<%= t('activerecord.attributes.library.fax_number') -%>: <%= @library.fax_number -%>
|
21
|
+
</p>
|
22
|
+
<p>
|
23
|
+
<%= @library.opening_hour -%>
|
24
|
+
</p>
|
25
|
+
<p>
|
26
|
+
<%= @library.note -%>
|
27
|
+
</p>
|
28
|
+
|
29
|
+
<div id="tabs">
|
30
|
+
<ul>
|
31
|
+
<li title="active" class="selected"><a href="#tab1"><em><%= t('library.map') -%></em></a></li>
|
32
|
+
<li><a href="#tab2"><em><%= t('library.staff') -%></em></a></li>
|
33
|
+
<li><a href="#tab3"><em><%= t('activerecord.models.shelf') -%></em></a></li>
|
34
|
+
<% if defined?(EnjuEvent) %>
|
35
|
+
<li><a href="#tab4"><em><%= t('activerecord.models.event') -%></em></a></li>
|
36
|
+
<% end %>
|
37
|
+
<%- if can? :update, @library -%>
|
38
|
+
<li><a href="#tab5"><em><%= t('page.configuration') -%></em></a></li>
|
39
|
+
<%- end -%>
|
40
|
+
</ul>
|
41
|
+
<div id="tab1">
|
42
|
+
<%= render 'libraries/map', :library => @library if @library.latitude and @library.longitude -%>
|
43
|
+
</div>
|
44
|
+
<div id="tab2">
|
45
|
+
<%- if @library.users.librarians.exists? -%>
|
46
|
+
<ul>
|
47
|
+
<%- @library.users.librarians.each do |librarian| -%>
|
48
|
+
<li>
|
49
|
+
<%= link_to librarian.username, librarian -%>
|
50
|
+
<%- unless librarian.note.blank? -%>
|
51
|
+
<br />
|
52
|
+
<%= librarian.note -%>
|
53
|
+
<%- end -%>
|
54
|
+
</li>
|
55
|
+
<%- end -%>
|
56
|
+
</ul>
|
57
|
+
<%- end -%>
|
58
|
+
</div>
|
59
|
+
<div id="tab3">
|
60
|
+
<table class="index">
|
61
|
+
<tr>
|
62
|
+
<th><%= t('activerecord.models.shelf') -%></th>
|
63
|
+
<th><%= t('library.number_of_item') -%></th>
|
64
|
+
<th><%= t('activerecord.attributes.shelf.note') -%></th>
|
65
|
+
</tr>
|
66
|
+
<%- @library.shelves.each do |shelf| -%>
|
67
|
+
<tr class="line<%= cycle("0", "1") -%>">
|
68
|
+
<td>
|
69
|
+
<%= link_to shelf.display_name.localize, library_shelf_path(@library, shelf) -%>
|
70
|
+
<%- shelf.picture_files.each do |picture_file| -%>
|
71
|
+
<%= link_to image_tag('icons/picture.png', :size => '16x16', :alt => t('page.picture')), picture_file_path(picture_file, :format => :download), :rel => "shelf_#{h(shelf.id)}" -%>
|
72
|
+
<%- end -%>
|
73
|
+
<script type="text/javascript">
|
74
|
+
$(document).ready(function(){
|
75
|
+
$("a[rel='shelf_<%= shelf.id -%>']").colorbox({transition:"none", photo:true});
|
76
|
+
})
|
77
|
+
</script>
|
78
|
+
</td>
|
79
|
+
<td><%= shelf.items_count -%></td>
|
80
|
+
<td><%= shelf.note -%></td>
|
81
|
+
</tr>
|
82
|
+
<%- end -%>
|
83
|
+
</table>
|
84
|
+
</div>
|
85
|
+
|
86
|
+
<% if defined?(EnjuEvent) %>
|
87
|
+
<div id="tab4">
|
88
|
+
<h3><%= link_to t('activerecord.models.event'), library_events_path(@library) -%></h3>
|
89
|
+
<div id="library_calendar" style="text-align:left">
|
90
|
+
<%= render 'calendar' -%>
|
91
|
+
</div>
|
92
|
+
</div>
|
93
|
+
<% end %>
|
94
|
+
|
95
|
+
<%- if can? :update, @library -%>
|
96
|
+
<div id="tab5">
|
97
|
+
<h3><%= t('page.configuration') -%></h3>
|
98
|
+
<p>
|
99
|
+
<strong><%= t('activerecord.attributes.library.call_number_rows') -%>:</strong>
|
100
|
+
<%= @library.call_number_rows -%>
|
101
|
+
</p>
|
102
|
+
|
103
|
+
<p>
|
104
|
+
<strong><%= t('activerecord.attributes.library.call_number_delimiter') -%>:</strong>
|
105
|
+
<%= @library.call_number_delimiter -%>
|
106
|
+
</p>
|
107
|
+
</div>
|
108
|
+
<%- end -%>
|
109
|
+
|
110
|
+
</div>
|
111
|
+
<%- end -%>
|
112
|
+
</div>
|
113
|
+
</div>
|
114
|
+
|
115
|
+
<div id="submenu" class="ui-corner-all">
|
116
|
+
<ul>
|
117
|
+
<%- if can? :update, @library -%>
|
118
|
+
<li><%= link_to t('page.edit'), edit_library_path(@library) -%></li>
|
119
|
+
<%- end -%>
|
120
|
+
|
121
|
+
<%- if can? :create, Shelf and !@library.web? -%>
|
122
|
+
<li><%= link_to t('page.new', :model => t('activerecord.models.shelf')), new_library_shelf_path(@library) -%></li>
|
123
|
+
<%- end -%>
|
124
|
+
<% if defined?(EnjuEvent) %>
|
125
|
+
<%- if can? :create, Event and !@library.web? -%>
|
126
|
+
<li><%= link_to t('page.new', :model => t('activerecord.models.event')), new_library_event_path(@library) -%></li>
|
127
|
+
<%- end -%>
|
128
|
+
<%- end -%>
|
129
|
+
<li><%= link_to t('page.listing', :model => t('activerecord.models.library')), libraries_path -%></li>
|
130
|
+
</ul>
|
131
|
+
</div>
|