enju_message 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- data/app/views/baskets/edit.html.erb +30 -0
- data/app/views/baskets/index.html.erb +31 -0
- data/app/views/baskets/new.html.erb +29 -0
- data/app/views/baskets/show.html.erb +23 -0
- data/app/views/carrier_type_has_checkout_types/_form.html.erb +19 -0
- data/app/views/carrier_type_has_checkout_types/edit.html.erb +13 -0
- data/app/views/carrier_type_has_checkout_types/index.html.erb +33 -0
- data/app/views/carrier_type_has_checkout_types/new.html.erb +12 -0
- data/app/views/carrier_type_has_checkout_types/show.html.erb +29 -0
- data/app/views/checked_items/_checkouts.html.erb +20 -0
- data/app/views/checked_items/_list.html.erb +39 -0
- data/app/views/checked_items/edit.html.erb +21 -0
- data/app/views/checked_items/index.html.erb +32 -0
- data/app/views/checked_items/index.js.erb +1 -0
- data/app/views/checked_items/new.html.erb +20 -0
- data/app/views/checked_items/show.html.erb +24 -0
- data/app/views/checkins/_form.html.erb +24 -0
- data/app/views/checkins/_list.html.erb +51 -0
- data/app/views/checkins/edit.html.erb +26 -0
- data/app/views/checkins/index.html.erb +16 -0
- data/app/views/checkins/index.js.erb +1 -0
- data/app/views/checkins/new.html.erb +14 -0
- data/app/views/checkins/show.html.erb +24 -0
- data/app/views/checkout_stat_has_manifestations/_form.html.erb +15 -0
- data/app/views/checkout_stat_has_manifestations/edit.html.erb +13 -0
- data/app/views/checkout_stat_has_manifestations/index.html.erb +33 -0
- data/app/views/checkout_stat_has_manifestations/new.html.erb +12 -0
- data/app/views/checkout_stat_has_manifestations/show.html.erb +28 -0
- data/app/views/checkout_stat_has_users/_form.html.erb +15 -0
- data/app/views/checkout_stat_has_users/edit.html.erb +13 -0
- data/app/views/checkout_stat_has_users/index.html.erb +33 -0
- data/app/views/checkout_stat_has_users/new.html.erb +12 -0
- data/app/views/checkout_stat_has_users/show.html.erb +28 -0
- data/app/views/checkout_types/_form.html.erb +19 -0
- data/app/views/checkout_types/edit.html.erb +13 -0
- data/app/views/checkout_types/index.html.erb +50 -0
- data/app/views/checkout_types/new.html.erb +12 -0
- data/app/views/checkout_types/show.html.erb +38 -0
- data/app/views/checkouts/_form.html.erb +28 -0
- data/app/views/checkouts/_index.html.erb +23 -0
- data/app/views/checkouts/_index_overdue.html.erb +33 -0
- data/app/views/checkouts/_index_user.html.erb +44 -0
- data/app/views/checkouts/_list.html.erb +45 -0
- data/app/views/checkouts/edit.html.erb +51 -0
- data/app/views/checkouts/index.atom.builder +14 -0
- data/app/views/checkouts/index.csv.erb +4 -0
- data/app/views/checkouts/index.html.erb +11 -0
- data/app/views/checkouts/index.ics.erb +13 -0
- data/app/views/checkouts/index.rss.builder +38 -0
- data/app/views/checkouts/new.html.erb +20 -0
- data/app/views/checkouts/show.html.erb +35 -0
- data/app/views/circulation_statuses/_form.html.erb +19 -0
- data/app/views/circulation_statuses/edit.html.erb +13 -0
- data/app/views/circulation_statuses/index.html.erb +43 -0
- data/app/views/circulation_statuses/new.html.erb +12 -0
- data/app/views/circulation_statuses/show.html.erb +29 -0
- data/app/views/item_has_use_restrictions/edit.html.erb +27 -0
- data/app/views/item_has_use_restrictions/index.html.erb +32 -0
- data/app/views/item_has_use_restrictions/new.html.erb +25 -0
- data/app/views/item_has_use_restrictions/show.html.erb +29 -0
- data/app/views/lending_policies/_form.html.erb +41 -0
- data/app/views/lending_policies/edit.html.erb +13 -0
- data/app/views/lending_policies/index.html.erb +42 -0
- data/app/views/lending_policies/new.html.erb +12 -0
- data/app/views/lending_policies/show.html.erb +50 -0
- data/app/views/manifestation_checkout_stats/_form.html.erb +19 -0
- data/app/views/manifestation_checkout_stats/edit.html.erb +13 -0
- data/app/views/manifestation_checkout_stats/index.html.erb +35 -0
- data/app/views/manifestation_checkout_stats/new.html.erb +12 -0
- data/app/views/manifestation_checkout_stats/show.csv.erb +4 -0
- data/app/views/manifestation_checkout_stats/show.html.erb +55 -0
- data/app/views/manifestation_reserve_stats/_form.html.erb +19 -0
- data/app/views/manifestation_reserve_stats/edit.html.erb +13 -0
- data/app/views/manifestation_reserve_stats/index.html.erb +35 -0
- data/app/views/manifestation_reserve_stats/new.html.erb +12 -0
- data/app/views/manifestation_reserve_stats/show.csv.erb +4 -0
- data/app/views/manifestation_reserve_stats/show.html.erb +55 -0
- data/app/views/reserve_stat_has_manifestations/_form.html.erb +15 -0
- data/app/views/reserve_stat_has_manifestations/edit.html.erb +13 -0
- data/app/views/reserve_stat_has_manifestations/index.html.erb +33 -0
- data/app/views/reserve_stat_has_manifestations/new.html.erb +12 -0
- data/app/views/reserve_stat_has_manifestations/show.html.erb +28 -0
- data/app/views/reserve_stat_has_users/_form.html.erb +15 -0
- data/app/views/reserve_stat_has_users/edit.html.erb +13 -0
- data/app/views/reserve_stat_has_users/index.html.erb +33 -0
- data/app/views/reserve_stat_has_users/new.html.erb +12 -0
- data/app/views/reserve_stat_has_users/show.html.erb +28 -0
- data/app/views/reserves/_form.html.erb +49 -0
- data/app/views/reserves/_new.html.erb +44 -0
- data/app/views/reserves/_new_user.html.erb +50 -0
- data/app/views/reserves/_title.html.erb +19 -0
- data/app/views/reserves/edit.html.erb +42 -0
- data/app/views/reserves/index.atom.builder +14 -0
- data/app/views/reserves/index.csv.erb +4 -0
- data/app/views/reserves/index.html.erb +75 -0
- data/app/views/reserves/index.rss.builder +41 -0
- data/app/views/reserves/new.html.erb +5 -0
- data/app/views/reserves/show.html.erb +61 -0
- data/app/views/use_restrictions/_form.html.erb +19 -0
- data/app/views/use_restrictions/edit.html.erb +13 -0
- data/app/views/use_restrictions/index.html.erb +43 -0
- data/app/views/use_restrictions/new.html.erb +12 -0
- data/app/views/use_restrictions/show.html.erb +29 -0
- data/app/views/user_checkout_stats/_form.html.erb +19 -0
- data/app/views/user_checkout_stats/edit.html.erb +13 -0
- data/app/views/user_checkout_stats/index.html.erb +35 -0
- data/app/views/user_checkout_stats/new.html.erb +12 -0
- data/app/views/user_checkout_stats/show.csv.erb +4 -0
- data/app/views/user_checkout_stats/show.html.erb +55 -0
- data/app/views/user_group_has_checkout_types/edit.html.erb +63 -0
- data/app/views/user_group_has_checkout_types/index.html.erb +32 -0
- data/app/views/user_group_has_checkout_types/new.html.erb +62 -0
- data/app/views/user_group_has_checkout_types/show.html.erb +64 -0
- data/app/views/user_reserve_stats/_form.html.erb +19 -0
- data/app/views/user_reserve_stats/edit.html.erb +13 -0
- data/app/views/user_reserve_stats/index.html.erb +35 -0
- data/app/views/user_reserve_stats/new.html.erb +12 -0
- data/app/views/user_reserve_stats/show.csv.erb +4 -0
- data/app/views/user_reserve_stats/show.html.erb +54 -0
- data/lib/enju_message.rb +3 -0
- data/lib/enju_message/user.rb +28 -0
- data/lib/enju_message/version.rb +1 -1
- data/spec/dummy/app/models/user.rb +2 -13
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/production.sqlite3 +0 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/solr/data/test/index/_0.fdt +0 -0
- data/spec/dummy/solr/data/test/index/_0.fdx +0 -0
- data/spec/dummy/solr/data/test/index/_0.fnm +3 -0
- data/spec/dummy/solr/data/test/index/_0.frq +1 -0
- data/spec/dummy/solr/data/test/index/_0.nrm +1 -0
- data/spec/dummy/solr/data/test/index/_0.prx +0 -0
- data/spec/dummy/solr/data/test/index/_0.tii +0 -0
- data/spec/dummy/solr/data/test/index/_0.tis +0 -0
- data/spec/dummy/solr/data/test/index/segments.gen +0 -0
- data/spec/dummy/solr/data/test/index/segments_2 +0 -0
- data/spec/dummy/solr/data/test/spellchecker/segments_1 +0 -0
- metadata +144 -4
- data/spec/dummy/solr/data/test/index/segments_1 +0 -0
@@ -0,0 +1,50 @@
|
|
1
|
+
<div id="content_detail" class="ui-corner-all">
|
2
|
+
<h1 class="title"><%= t('page.new', :model => t('activerecord.models.reserve')) -%></h1>
|
3
|
+
<div id="content_list">
|
4
|
+
|
5
|
+
<%= form_for(@reserve, :url => user_reserves_path(@user)) do |f| -%>
|
6
|
+
<%= f.error_messages -%>
|
7
|
+
|
8
|
+
<div class="field">
|
9
|
+
<%- if @item -%>
|
10
|
+
<%= render 'manifestations/title', :manifestation => @reserve.manifestation -%>
|
11
|
+
(<%= link_to @item.item_identifier, @item -%>)
|
12
|
+
<%= f.hidden_field :manifestation_id, :value => @item.manifestation.id -%>
|
13
|
+
<%= f.hidden_field :item_id, :value => @item.id -%>
|
14
|
+
<%- elsif @manifestation -%>
|
15
|
+
<%= render 'manifestations/title', :manifestation => @manifestation -%>
|
16
|
+
<%= f.hidden_field :manifestation_id -%>
|
17
|
+
<%- else -%>
|
18
|
+
<%= f.label t('activerecord.models.manifestation') -%><br />
|
19
|
+
<%= f.text_field :manifestation_id -%>
|
20
|
+
<%- end -%>
|
21
|
+
</div>
|
22
|
+
|
23
|
+
<div class="field">
|
24
|
+
<%= f.label t('activerecord.models.user') -%>
|
25
|
+
<%= link_to @reserve.user.username, @reserve.user -%>
|
26
|
+
(<%= @reserve.user.user_number %>)
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<div class="field">
|
30
|
+
<%= f.label :expired_at -%><br />
|
31
|
+
<%= f.text_field :expired_at, :value => @reserve.expired_at.try(:strftime, "%Y-%m-%d"), :class => 'date_field', :placeholder => "#{t('page.example')}: 2011-04-12"-%>
|
32
|
+
</div>
|
33
|
+
|
34
|
+
<div class="field">
|
35
|
+
<%= f.hidden_field :user_number, :value => @user.user_number -%>
|
36
|
+
<%= f.submit t('page.create') -%>
|
37
|
+
</div>
|
38
|
+
<%- end -%>
|
39
|
+
</div>
|
40
|
+
</div>
|
41
|
+
|
42
|
+
<div id="submenu" class="ui-corner-all">
|
43
|
+
<%= render 'manifestations/book_jacket', :manifestation => @reserve.manifestation -%>
|
44
|
+
<ul>
|
45
|
+
<li><%= link_to t('page.listing', :model => t('activerecord.models.reserve')), user_reserves_path(@reserve.user) -%></li>
|
46
|
+
<%- if @manifestation -%>
|
47
|
+
<li><%= link_to t('page.showing', :model => t('activerecord.models.manifestation')), @manifestation -%></li>
|
48
|
+
<%- end -%>
|
49
|
+
</ul>
|
50
|
+
</div>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<strong><%= link_to title_with_volume_number(reserve.manifestation), reserve -%></strong>
|
2
|
+
<br />
|
3
|
+
<%- if reserve.manifestation.creators.readable_by(current_user).exists? -%>
|
4
|
+
<%= t('patron.creator') -%>: <%= patrons_list(reserve.manifestation.creators.readable_by(current_user)) -%>
|
5
|
+
<%- end -%>
|
6
|
+
<%- if reserve.manifestation.contributors.readable_by(current_user).exists? -%>
|
7
|
+
<%= t('patron.contributor') -%>: <%= patrons_list(reserve.manifestation.contributors.readable_by(current_user)) -%>
|
8
|
+
<%- end -%>
|
9
|
+
<%- if reserve.manifestation.publishers.readable_by(current_user).exists? -%>
|
10
|
+
<%= t('patron.publisher') -%>: <%= patrons_list(reserve.manifestation.publishers.readable_by(current_user)) -%>
|
11
|
+
<%- if reserve.manifestation.pub_date.present? -%>
|
12
|
+
(<%= reserve.manifestation.pub_date -%>)
|
13
|
+
<%- end -%>
|
14
|
+
<%- end -%>
|
15
|
+
<%- if reserve.manifestation.access_address? -%>
|
16
|
+
<br />
|
17
|
+
<%= link_to reserve.manifestation.access_address, manifestation.access_address -%>
|
18
|
+
<%= link_to image_tag('icons/world_go.png', :size => '16x16', :alt => 'Web'), reserve.manifestation.access_address -%>
|
19
|
+
<%- end -%>
|
@@ -0,0 +1,42 @@
|
|
1
|
+
<div id="content_detail" class="ui-corner-all">
|
2
|
+
<h1 class="title"><%= t('page.editing', :model => t('activerecord.models.reserve')) -%></h1>
|
3
|
+
<div id="content_list">
|
4
|
+
|
5
|
+
<%= form_for(@reserve) do |f| -%>
|
6
|
+
<%= f.error_messages -%>
|
7
|
+
|
8
|
+
<div class="field">
|
9
|
+
<%- if @reserve.manifestation -%>
|
10
|
+
<%= render 'manifestations/title', :manifestation => @reserve.manifestation -%>
|
11
|
+
<%= f.hidden_field :manifestation_id -%>
|
12
|
+
<%- else -%>
|
13
|
+
<%= f.label t('activerecord.models.manifestation') -%><br />
|
14
|
+
<%= f.text_field :manifestation_id -%>
|
15
|
+
<%- end -%>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<div class="field">
|
19
|
+
<%= f.label t('activerecord.models.user') -%>
|
20
|
+
<%= link_to @reserve.user.username, @reserve.user -%>
|
21
|
+
(<%= @reserve.user.user_number %>)
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<div class="field">
|
25
|
+
<%= f.label :expired_at -%><br />
|
26
|
+
<%= f.text_field :expired_at, :value => @reserve.expired_at.try(:strftime, "%Y-%m-%d"), :class => 'date_field', :placeholder => "#{t('page.example')}: 2011-04-12"-%>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<div class="actions">
|
30
|
+
<%= f.submit %>
|
31
|
+
</div>
|
32
|
+
<%- end -%>
|
33
|
+
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
<div id="submenu" class="ui-corner-all">
|
38
|
+
<ul>
|
39
|
+
<li><%= link_to t('page.show'), @reserve -%></li>
|
40
|
+
<li><%= link_to t('page.back'), user_reserves_path(@reserve.user) -%></li>
|
41
|
+
</ul>
|
42
|
+
</div>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
atom_feed(:url => reserves_url(:format => :atom)) do |feed|
|
2
|
+
if @user
|
3
|
+
feed.title t('reserve.user_reserve', :login_name => @user.username)
|
4
|
+
else
|
5
|
+
feed.title t('reserve.library_group_reserve', :library_group_name => @library_group.display_name.localize)
|
6
|
+
end
|
7
|
+
feed.updated(@reserves.first ? @reserves.first.created_at : Time.zone.now)
|
8
|
+
|
9
|
+
@reserves.each do |reserve|
|
10
|
+
feed.entry(reserve) do |entry|
|
11
|
+
entry.title(reserve.manifestation.original_title)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,4 @@
|
|
1
|
+
title,isbn,item_identifier,call_number,created_at
|
2
|
+
<%- @reserves.each do |reserve| -%>
|
3
|
+
"<%=h reserve.manifestation.original_title.gsub(/"/, '""') -%>",<%=h reserve.manifestation.isbn %>,<%=h reserve.item.try(:item_identifier) -%>,<%=h reserve.item.try(:call_number) -%>,<%=h reserve.item.try(:created_at) %><%= "\n" -%>
|
4
|
+
<%- end -%>
|
@@ -0,0 +1,75 @@
|
|
1
|
+
<div style="color: red"><%= flash[:message].to_s -%></div>
|
2
|
+
<div id="content_detail" class="ui-corner-all">
|
3
|
+
<h1 class="title"><%= t('page.listing', :model => t('activerecord.models.reserve')) -%></h1>
|
4
|
+
<div id="content_list">
|
5
|
+
<table class="index">
|
6
|
+
<tr>
|
7
|
+
<th style="width: 30px"><%= 'Id' -%></th>
|
8
|
+
<th><%= t('activerecord.models.user') -%></th>
|
9
|
+
<th><%= t('activerecord.models.manifestation') -%></th>
|
10
|
+
<th style="width: 80px"><%= t('activerecord.attributes.reserve.state') -%></th>
|
11
|
+
<th><%= t('activerecord.attributes.reserve.expired_at') -%></th>
|
12
|
+
<%- if can? :update, @reserves.first -%>
|
13
|
+
<th style="width: 70px"></th>
|
14
|
+
<% end %>
|
15
|
+
</tr>
|
16
|
+
|
17
|
+
<%- @reserves.each_with_index do |reserve, i| -%>
|
18
|
+
<tr class="line<%= cycle("0", "1") -%>">
|
19
|
+
<td><%= link_to reserve.id, reserve -%></td>
|
20
|
+
<td><%= link_to reserve.user.username, reserve.user -%></td>
|
21
|
+
<td>
|
22
|
+
<%= render 'title', :reserve => reserve -%>
|
23
|
+
</td>
|
24
|
+
<td><%= i18n_state(reserve.state) -%></td>
|
25
|
+
<td><%= l(reserve.expired_at, :format => :only_date) -%></td>
|
26
|
+
<%- if can? :destroy, reserve -%>
|
27
|
+
<td>
|
28
|
+
<%= link_to t('page.edit'), edit_reserve_path(reserve) -%>
|
29
|
+
<%- if reserve.user.reserves.waiting.include?(reserve) -%>
|
30
|
+
<br />
|
31
|
+
<%= link_to t('page.cancel'), reserve_path(reserve, :mode => 'cancel'), :confirm => t('page.are_you_sure'), :method => :put -%>
|
32
|
+
<%- else -%>
|
33
|
+
<br />
|
34
|
+
<%= link_to t('page.destroy'), reserve, :confirm => t('page.are_you_sure'), :method => :delete -%>
|
35
|
+
<%- end -%>
|
36
|
+
</td>
|
37
|
+
<%- end -%>
|
38
|
+
</tr>
|
39
|
+
<%- end -%>
|
40
|
+
</table>
|
41
|
+
|
42
|
+
<%= will_paginate(@reserves) -%>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
</div>
|
46
|
+
|
47
|
+
<div id="submenu" class="ui-corner-all">
|
48
|
+
<ul>
|
49
|
+
<li>
|
50
|
+
<%= link_to t('page.new', :model => t('activerecord.models.reserve')), manifestations_path(:reservable => true) -%>
|
51
|
+
<br />
|
52
|
+
(<%= t('page.search_resource', :model => t('page.resource')) -%>)
|
53
|
+
</li>
|
54
|
+
<%- if current_user.has_role?('Librarian') -%>
|
55
|
+
<li><%= link_to t('reserve.all_reservation'), reserves_path -%></li>
|
56
|
+
<li><%= link_to t('reserve.my_reservation'), user_reserves_path(current_user) -%></li>
|
57
|
+
<%- end -%>
|
58
|
+
<%- if @user -%>
|
59
|
+
<li><%= link_to t('page.listing', :model => t('activerecord.models.checkout')), user_checkouts_path(@user) -%></li>
|
60
|
+
<%- end -%>
|
61
|
+
</ul>
|
62
|
+
<p>
|
63
|
+
<%- if @user -%>
|
64
|
+
<%= link_to (image_tag 'icons/feed.png', :size => '16x16', :alt => t('page.feed'), :class => 'icon'), user_reserves_path(@user, :format => :rss) -%>
|
65
|
+
(<%= link_to 'RSS', user_reserves_path(@user, :format => :rss) -%>)
|
66
|
+
<%= link_to (image_tag 'icons/page_white_excel.png', :size => '16x16', :alt => 'CSV', :class => 'icon'), user_reserves_path(@user, :format => :csv, :locale => @locale.to_s) -%>
|
67
|
+
(<%= link_to 'CSV', user_reserves_path(@user, :format => :csv, :locale => @locale.to_s) -%>)
|
68
|
+
<%- else -%>
|
69
|
+
<%= link_to (image_tag 'icons/feed.png', :size => '16x16', :alt => t('page.feed'), :class => 'icon'), reserves_path(:format => :rss) -%>
|
70
|
+
(<%= link_to 'RSS', reserves_path(:format => :rss) -%>)
|
71
|
+
<%= link_to (image_tag 'icons/page_white_excel.png', :size => '16x16', :alt => 'CSV', :class => 'icon'), reserves_path(:format => :csv, :locale => @locale.to_s) -%>
|
72
|
+
(<%= link_to 'CSV', reserves_path(:format => :csv, :locale => @locale.to_s) -%>)
|
73
|
+
<%- end -%>
|
74
|
+
</p>
|
75
|
+
</div>
|
@@ -0,0 +1,41 @@
|
|
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('reserve.user_reserve', :login_name => @user.username)
|
8
|
+
xml.link user_reserves_url(@user, :format => :rss)
|
9
|
+
else
|
10
|
+
xml.title t('reserve.library_group_reserve', :library_group_name => @library_group.display_name.localize)
|
11
|
+
xml.link reserves_url(:format => :rss)
|
12
|
+
end
|
13
|
+
xml.description "Next-L Enju, an open source integrated library system developed by Project Next-L"
|
14
|
+
xml.language @locale.to_s
|
15
|
+
xml.ttl "60"
|
16
|
+
if @user
|
17
|
+
xml.tag! "atom:link", :rel => 'self', :href => user_reserves_url(@user, :format => :rss)
|
18
|
+
xml.tag! "atom:link", :rel => 'alternate', :href => user_reserves_url(@user)
|
19
|
+
else
|
20
|
+
xml.tag! "atom:link", :rel => 'self', :href => reserves_url(:format => :rss)
|
21
|
+
xml.tag! "atom:link", :rel => 'alternate', :href => reserves_url
|
22
|
+
end
|
23
|
+
#xml.tag! "atom:link", :rel => 'search', :type => 'application/opensearchdescription+xml', :href => "http://#{request.host_with_port}/page/opensearch"
|
24
|
+
unless params[:query].blank?
|
25
|
+
xml.tag! "opensearch:totalResults", @count[:query_result]
|
26
|
+
xml.tag! "opensearch:startIndex", @reserves.offset + 1
|
27
|
+
xml.tag! "opensearch:itemsPerPage", @reserves.per_page
|
28
|
+
#xml.tag! "opensearch:Query", :role => 'request', :searchTerms => params[:query], :startPage => (params[:page] || 1)
|
29
|
+
end
|
30
|
+
@reserves.each do |reserve|
|
31
|
+
xml.item do
|
32
|
+
xml.title reserve.manifestation.original_title
|
33
|
+
#xml.description(reserve.title)
|
34
|
+
# rfc822
|
35
|
+
xml.pubDate reserve.created_at.utc.rfc822
|
36
|
+
xml.link reserve_url(reserve)
|
37
|
+
xml.guid reserve_url(reserve), :isPermaLink => "true"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
}
|
41
|
+
}
|
@@ -0,0 +1,61 @@
|
|
1
|
+
<div id="content_detail" class="ui-corner-all">
|
2
|
+
<h1 class="title"><%= t('page.showing', :model => t('activerecord.models.reserve')) -%></h1>
|
3
|
+
<div id="content_list">
|
4
|
+
<p id="notice"><%= notice %></p>
|
5
|
+
|
6
|
+
<%= render 'manifestations/title', :manifestation => @reserve.manifestation -%>
|
7
|
+
|
8
|
+
<p>
|
9
|
+
<strong><%= t('activerecord.models.manifestation') -%>:</strong>
|
10
|
+
<%= link_to @reserve.manifestation.original_title, @reserve.manifestation -%>
|
11
|
+
</p>
|
12
|
+
|
13
|
+
<p>
|
14
|
+
<strong><%= t('activerecord.models.user') -%>:</strong>
|
15
|
+
<%= link_to @reserve.user.username, @reserve.user -%>
|
16
|
+
(<%= @reserve.user.user_number %>)
|
17
|
+
</p>
|
18
|
+
|
19
|
+
<p>
|
20
|
+
<strong><%= t('activerecord.attributes.reserve.state') -%>:</strong>
|
21
|
+
<%= i18n_state(@reserve.state) -%>
|
22
|
+
</p>
|
23
|
+
|
24
|
+
<p>
|
25
|
+
<strong><%= t('activerecord.attributes.reserve.created_at') -%>:</strong>
|
26
|
+
<%= l(@reserve.created_at) -%>
|
27
|
+
</p>
|
28
|
+
|
29
|
+
<p>
|
30
|
+
<strong><%= t('activerecord.attributes.reserve.canceled_at') -%>:</strong>
|
31
|
+
<%= l(@reserve.canceled_at) if @reserve.canceled_at -%>
|
32
|
+
</p>
|
33
|
+
|
34
|
+
<p>
|
35
|
+
<strong><%= t('activerecord.attributes.reserve.expired_at') -%>:</strong>
|
36
|
+
<%= l(@reserve.expired_at, :format => :only_date) if @reserve.expired_at -%>
|
37
|
+
</p>
|
38
|
+
|
39
|
+
<p>
|
40
|
+
<strong><%= t('activerecord.attributes.reserve.checked_out_at') -%>:</strong>
|
41
|
+
<%= l(@reserve.checked_out_at) if @reserve.checked_out_at -%>
|
42
|
+
</p>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
</div>
|
46
|
+
|
47
|
+
<div id="submenu" class="ui-corner-all">
|
48
|
+
<%= render 'manifestations/book_jacket', :manifestation => @reserve.manifestation -%>
|
49
|
+
<ul>
|
50
|
+
<li><%= link_to t('page.edit'), edit_reserve_path(@reserve) -%></li>
|
51
|
+
<%- if @reserve.user.reserves.waiting.include?(@reserve) -%>
|
52
|
+
<li><%= link_to t('page.cancel'), reserve_path(@reserve, :mode => 'cancel'), :confirm => t('page.are_you_sure'), :method => :put -%></li>
|
53
|
+
<%- else -%>
|
54
|
+
<li><%= link_to t('page.destroy'), @reserve, :confirm => t('page.are_you_sure'), :method => :delete -%></li>
|
55
|
+
<%- end -%>
|
56
|
+
<li><%= link_to t('page.back'), @reserve -%></li>
|
57
|
+
</ul>
|
58
|
+
<!--
|
59
|
+
<p>TODO: 予約取り消し時に、次の予約者に連絡する</p>
|
60
|
+
-->
|
61
|
+
</div>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<%= form_for(@use_restriction, :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.use_restriction')) -%></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'), @use_restriction -%></li>
|
11
|
+
<li><%= link_to t('page.back'), use_restrictions_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.use_restriction')) -%></h1>
|
3
|
+
<div id="content_list">
|
4
|
+
|
5
|
+
<table class="index">
|
6
|
+
<tr>
|
7
|
+
<th id="position"></th>
|
8
|
+
<th><%= t('activerecord.attributes.use_restriction.name') -%></th>
|
9
|
+
<th><%= t('activerecord.attributes.use_restriction.display_name') -%></th>
|
10
|
+
<th></th>
|
11
|
+
</tr>
|
12
|
+
|
13
|
+
<%- @use_restrictions.each do |use_restriction| -%>
|
14
|
+
<tr class="line<%= cycle("0", "1") -%>">
|
15
|
+
<td>
|
16
|
+
<%- if can? :update, use_restriction -%>
|
17
|
+
<%= move_position(use_restriction) -%>
|
18
|
+
<%- end -%>
|
19
|
+
</td>
|
20
|
+
<td><%= link_to use_restriction.name, use_restriction -%></td>
|
21
|
+
<td><%= link_to use_restriction.display_name.localize, use_restriction -%></td>
|
22
|
+
<td>
|
23
|
+
<%- if can? :update, use_restriction -%>
|
24
|
+
<%= link_to t('page.edit'), edit_use_restriction_path(use_restriction) -%>
|
25
|
+
<% end %>
|
26
|
+
<%- if can? :destroy, use_restriction -%>
|
27
|
+
<%= link_to t('page.destroy'), use_restriction, :confirm => t('page.are_you_sure'), :method => :delete -%>
|
28
|
+
<%- end -%>
|
29
|
+
</td>
|
30
|
+
</tr>
|
31
|
+
<%- end -%>
|
32
|
+
</table>
|
33
|
+
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
<div id="submenu" class="ui-corner-all">
|
38
|
+
<ul>
|
39
|
+
<%- if can? :create, UseRestriction -%>
|
40
|
+
<li><%= link_to t('page.new', :model => t('activerecord.models.use_restriction')), new_use_restriction_path -%></li >
|
41
|
+
<%- end -%>
|
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.use_restriction')) -%></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'), use_restrictions_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.use_restriction')) -%></h1>
|
3
|
+
<div id="content_list">
|
4
|
+
<p id="notice"><%= notice %></p>
|
5
|
+
|
6
|
+
<p>
|
7
|
+
<strong><%= t('activerecord.attributes.use_restriction.name') -%></strong>
|
8
|
+
<%= @use_restriction.name -%>
|
9
|
+
</p>
|
10
|
+
|
11
|
+
<p>
|
12
|
+
<strong><%= t('activerecord.attributes.use_restriction.display_name') -%></strong>
|
13
|
+
<%= @use_restriction.display_name.localize -%>
|
14
|
+
</p>
|
15
|
+
|
16
|
+
<p>
|
17
|
+
<strong><%= t('activerecord.attributes.use_restriction.note') -%></strong>
|
18
|
+
<%= @use_restriction.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_use_restriction_path(@use_restriction) -%></li>
|
27
|
+
<li><%= back_to_index(flash[:page_info]) -%></li>
|
28
|
+
</ul>
|
29
|
+
</div>
|