enju_circulation 0.1.0.pre11 → 0.1.0.pre12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/app/controllers/checked_items_controller.rb +0 -5
- data/app/controllers/checkins_controller.rb +0 -11
- data/app/controllers/reserves_controller.rb +73 -15
- data/app/helpers/reserves_helper.rb +2 -0
- data/app/models/checked_item.rb +9 -0
- data/app/models/checkin.rb +13 -0
- data/app/models/reserve.rb +186 -42
- data/app/views/baskets/new.html.erb +1 -1
- data/app/views/checked_items/_list.html.erb +1 -1
- data/app/views/checkins/_checkin.html.erb +1 -1
- data/app/views/checkins/_list.html.erb +1 -1
- data/app/views/manifestations/_show_detail_librarian.html.erb +141 -0
- data/app/views/manifestations/_show_detail_user.html.erb +136 -0
- data/app/views/reserves/_new.html.erb +1 -1
- data/app/views/reserves/_state_facet.html.erb +15 -0
- data/app/views/reserves/_title.html.erb +2 -1
- data/app/views/reserves/edit.html.erb +20 -2
- data/app/views/reserves/index.csv.erb +2 -2
- data/app/views/reserves/index.html.erb +30 -6
- data/app/views/reserves/show.html.erb +18 -3
- data/config/locales/translation_en.yml +10 -1
- data/config/locales/translation_ja.yml +10 -1
- data/db/migrate/20130303104849_add_state_index_to_reserve.rb +5 -0
- data/db/migrate/20130303124821_add_retained_at_to_reserve.rb +5 -0
- data/db/migrate/20130304015019_add_postponed_at_to_reserve.rb +5 -0
- data/lib/enju_circulation/item.rb +4 -0
- data/lib/enju_circulation/version.rb +1 -1
- data/spec/controllers/checkins_controller_spec.rb +2 -2
- data/spec/controllers/reserves_controller_spec.rb +29 -5
- data/spec/dummy/db/schema.rb +4 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/solr/data/test/index/_5d.fdt +0 -0
- data/spec/dummy/solr/data/test/index/_5d.fdx +0 -0
- data/spec/dummy/solr/data/test/index/_5d.fnm +4 -0
- data/spec/dummy/solr/data/test/index/_5d.frq +1 -0
- data/spec/dummy/solr/data/test/index/_5d.nrm +1 -0
- data/spec/dummy/solr/data/test/index/_5d.prx +0 -0
- data/spec/dummy/solr/data/test/index/_5d.tii +0 -0
- data/spec/dummy/solr/data/test/index/_5d.tis +0 -0
- data/spec/dummy/solr/data/test/index/segments.gen +0 -0
- data/spec/dummy/solr/data/test/index/segments_at +0 -0
- data/spec/dummy/solr/data/test/spellchecker/segments.gen +0 -0
- data/spec/dummy/solr/data/test/spellchecker/segments_1 +0 -0
- data/spec/fixtures/message_templates.yml +14 -0
- data/spec/fixtures/reserves.yml +39 -38
- data/spec/models/reserve_spec.rb +25 -1
- metadata +65 -72
@@ -0,0 +1,141 @@
|
|
1
|
+
<div id="tabs">
|
2
|
+
<%= render 'manifestations/tab_menu', :manifestation => manifestation %>
|
3
|
+
<div id="detail">
|
4
|
+
<% cache([:manifestation => manifestation.id, :fragment => 'show_detail_librarian_html', :role => current_user_role_name, :locale => @locale]) do %>
|
5
|
+
<table class="table table-striped" id="resource_detail">
|
6
|
+
<%= embed_content(manifestation) -%>
|
7
|
+
<% if manifestation.title_alternative? %>
|
8
|
+
<tr>
|
9
|
+
<td style="width: 200px"><%= t('activerecord.attributes.manifestation.title_alternative') -%>:</td>
|
10
|
+
<td style="width: 500px"><%= manifestation.title_alternative -%></td>
|
11
|
+
</tr>
|
12
|
+
<% end %>
|
13
|
+
<%- if manifestation.series_statement -%>
|
14
|
+
<tr>
|
15
|
+
<td style="width: 200px"><%= t('activerecord.models.series_statement') -%>:</td>
|
16
|
+
<td style="width: 500px">
|
17
|
+
<%= link_to manifestation.series_statement.original_title, manifestation.series_statement -%>
|
18
|
+
<%= manifestation.volume_number_string %>
|
19
|
+
<%- if manifestation.issn.present? -%>
|
20
|
+
(<%= t('activerecord.attributes.manifestation.issn') -%>: <%= manifestation.issn -%>)
|
21
|
+
<%- end -%>
|
22
|
+
</td>
|
23
|
+
</tr>
|
24
|
+
<% end %>
|
25
|
+
<%= render 'edition_and_number', :manifestation => manifestation %>
|
26
|
+
<tr>
|
27
|
+
<td style="width: 200px"><%= t('page.form') -%>:</td>
|
28
|
+
<td style="width: 500px">
|
29
|
+
<%= form_icon(manifestation.carrier_type) -%> <%= manifestation.carrier_type.display_name.localize -%> /
|
30
|
+
<%= content_type_icon(manifestation.manifestation_content_type) -%> <%= manifestation.manifestation_content_type.display_name.localize if manifestation.manifestation_content_type -%>
|
31
|
+
</td>
|
32
|
+
</tr>
|
33
|
+
<tr>
|
34
|
+
<td><%= t('activerecord.models.language') -%>:</td>
|
35
|
+
<td><span itemprop="inLanguage"><%= manifestation.language.display_name.localize -%></span></td>
|
36
|
+
</tr>
|
37
|
+
<tr>
|
38
|
+
<td><%= t('manifestation.physical_description') -%>:</td>
|
39
|
+
<td>
|
40
|
+
<%- if manifestation.number_of_pages -%>
|
41
|
+
<span itemprop="numPages"><%= manifestation.number_of_pages -%></span> p.
|
42
|
+
(<%= manifestation.start_page -%> - <%= manifestation.end_page -%>)
|
43
|
+
<%- end -%>
|
44
|
+
<!-- TODO: センチメートル以外の単位 -->
|
45
|
+
<%- if manifestation.height -%>
|
46
|
+
<%= manifestation.height -%> cm.
|
47
|
+
<%- end -%>
|
48
|
+
</td>
|
49
|
+
</tr>
|
50
|
+
<tr>
|
51
|
+
<td><%= t('activerecord.attributes.manifestation.price') -%>:</td>
|
52
|
+
<td><%= manifestation.price -%></td>
|
53
|
+
</tr>
|
54
|
+
<% if defined?(EnjuSubject) %>
|
55
|
+
<tr>
|
56
|
+
<td><%= t('activerecord.models.subject') -%>:</td>
|
57
|
+
<td>
|
58
|
+
<%- unless manifestation.subjects.empty? -%>
|
59
|
+
<ul>
|
60
|
+
<%- manifestation.subjects.each do |subject| -%>
|
61
|
+
<li>
|
62
|
+
<%= link_to subject.term, subject -%>
|
63
|
+
<%- unless subject.classifications.empty? -%>
|
64
|
+
(
|
65
|
+
<%- subject.classifications.each do |classification| -%>
|
66
|
+
<%= classification.classification_type.name -%>: <%= link_to classification.category, classification -%>
|
67
|
+
<%- end -%>
|
68
|
+
)
|
69
|
+
<%- end -%>
|
70
|
+
</li>
|
71
|
+
<%- end -%>
|
72
|
+
</ul>
|
73
|
+
<%- end -%>
|
74
|
+
</td>
|
75
|
+
</tr>
|
76
|
+
<tr>
|
77
|
+
<td><%= t('activerecord.attributes.classification.category') %></td>
|
78
|
+
<td>
|
79
|
+
<%= manifestation.ndc %>
|
80
|
+
</td>
|
81
|
+
</tr>
|
82
|
+
<% end %>
|
83
|
+
<% if defined?(EnjuBookmark) %>
|
84
|
+
<tr>
|
85
|
+
<td><%= t('activerecord.models.tag') -%>:</td>
|
86
|
+
<td>
|
87
|
+
<%= render 'manifestations/tag_list', :manifestation => manifestation -%>
|
88
|
+
</td>
|
89
|
+
</tr>
|
90
|
+
<% end %>
|
91
|
+
<%- unless manifestation.periodical? -%>
|
92
|
+
<tr>
|
93
|
+
<td><%= t('page.identifier') -%>:</td>
|
94
|
+
<td>
|
95
|
+
<%- if manifestation.isbn.present? -%>
|
96
|
+
ISBN: <span itemprop="isbn"><%= manifestation.isbn -%></span>
|
97
|
+
<%- if manifestation.isbn10.present? -%>
|
98
|
+
( <%= manifestation.isbn10 -%> )
|
99
|
+
<%- end -%>
|
100
|
+
<%- end -%>
|
101
|
+
<%- if manifestation.nbn.present? -%>
|
102
|
+
NBN: <%= manifestation.nbn -%>
|
103
|
+
<%- end -%>
|
104
|
+
<%- if manifestation.lccn.present? -%>
|
105
|
+
<br />
|
106
|
+
LCCN: <%= manifestation.lccn -%>
|
107
|
+
<%- end -%>
|
108
|
+
</td>
|
109
|
+
</tr>
|
110
|
+
<%- end -%>
|
111
|
+
<%- unless manifestation.attachment_file_name.blank? -%>
|
112
|
+
<%= render 'manifestations/attachment_file', :manifestation => manifestation -%>
|
113
|
+
<%- end -%>
|
114
|
+
<tr>
|
115
|
+
<td><%= t('page.created_at') -%>:</td>
|
116
|
+
<td><%=l manifestation.created_at if manifestation.created_at -%></td>
|
117
|
+
</tr>
|
118
|
+
<tr>
|
119
|
+
<td><%= t('page.updated_at') -%>:</td>
|
120
|
+
<td><%=l manifestation.updated_at if manifestation.updated_at -%></td>
|
121
|
+
</tr>
|
122
|
+
<tr>
|
123
|
+
<td><%= t('activerecord.attributes.manifestation.description') -%>:</td>
|
124
|
+
<td>
|
125
|
+
<%= raw simple_format(h(manifestation.description)) -%>
|
126
|
+
</td>
|
127
|
+
</tr>
|
128
|
+
<tr>
|
129
|
+
<td><%= t('activerecord.attributes.manifestation.note') -%>:</td>
|
130
|
+
<td>
|
131
|
+
<%= raw simple_format(h(manifestation.note)) -%>
|
132
|
+
</td>
|
133
|
+
</tr>
|
134
|
+
</table>
|
135
|
+
<% end %>
|
136
|
+
<%- if manifestation.items.on_shelf.exists? -%>
|
137
|
+
<%= render 'manifestations/show_holding', :manifestation => manifestation -%>
|
138
|
+
<%- end -%>
|
139
|
+
</div>
|
140
|
+
<%= render 'manifestations/tab_list', :manifestation => manifestation %>
|
141
|
+
</div>
|
@@ -0,0 +1,136 @@
|
|
1
|
+
<div id="tabs">
|
2
|
+
<%= render 'manifestations/tab_menu', :manifestation => manifestation %>
|
3
|
+
<div id="detail">
|
4
|
+
<% cache([:manifestation => manifestation.id, :fragment => 'show_detail_user_html', :role => current_user_role_name, :locale => @locale]) do %>
|
5
|
+
<table class="table table-striped" id="resource_detail">
|
6
|
+
<%= embed_content(manifestation) -%>
|
7
|
+
<% if manifestation.title_alternative? %>
|
8
|
+
<tr>
|
9
|
+
<td style="width: 200px"><%= t('activerecord.attributes.manifestation.title_alternative') -%>:</td>
|
10
|
+
<td style="width: 500px"><%= manifestation.title_alternative -%></td>
|
11
|
+
</tr>
|
12
|
+
<% end %>
|
13
|
+
<%- if manifestation.series_statement -%>
|
14
|
+
<tr>
|
15
|
+
<td style="width: 200px"><%= t('activerecord.models.series_statement') -%>:</td>
|
16
|
+
<td style="width: 500px">
|
17
|
+
<%= link_to manifestation.series_statement.original_title, manifestation.series_statement -%>
|
18
|
+
<%= manifestation.volume_number_string %>
|
19
|
+
<%- if manifestation.issn.present? -%>
|
20
|
+
(<%= t('activerecord.attributes.manifestation.issn') -%>: <%= manifestation.issn -%>)
|
21
|
+
<%- end -%>
|
22
|
+
</td>
|
23
|
+
</tr>
|
24
|
+
<% end %>
|
25
|
+
<%= render 'edition_and_number', :manifestation => manifestation %>
|
26
|
+
<tr>
|
27
|
+
<td style="width: 200px"><%= t('page.form') -%>:</td>
|
28
|
+
<td style="width: 500px">
|
29
|
+
<%= form_icon(manifestation.carrier_type) -%> <%= manifestation.carrier_type.display_name.localize -%> /
|
30
|
+
<%= content_type_icon(manifestation.manifestation_content_type) -%> <%= manifestation.manifestation_content_type.display_name.localize if manifestation.manifestation_content_type -%>
|
31
|
+
</td>
|
32
|
+
</tr>
|
33
|
+
<tr>
|
34
|
+
<td><%= t('activerecord.models.language') -%>:</td>
|
35
|
+
<td><span itemprop="inLanguage"><%= manifestation.language.display_name.localize -%></span></td>
|
36
|
+
</tr>
|
37
|
+
<tr>
|
38
|
+
<td><%= t('manifestation.physical_description') -%>:</td>
|
39
|
+
<td>
|
40
|
+
<%- if manifestation.number_of_pages -%>
|
41
|
+
<span itemprop="numPages"><%= manifestation.number_of_pages -%></span> p.
|
42
|
+
(<%= manifestation.start_page -%> - <%= manifestation.end_page -%>)
|
43
|
+
<%- end -%>
|
44
|
+
<!-- TODO: センチメートル以外の単位 -->
|
45
|
+
<%- if manifestation.height -%>
|
46
|
+
<%= manifestation.height -%> cm.
|
47
|
+
<%- end -%>
|
48
|
+
</td>
|
49
|
+
</tr>
|
50
|
+
<% if manifestation.price.present? %>
|
51
|
+
<tr>
|
52
|
+
<td><%= t('activerecord.attributes.manifestation.price') -%>:</td>
|
53
|
+
<td><%= manifestation.price -%></td>
|
54
|
+
</tr>
|
55
|
+
<% end %>
|
56
|
+
<% if defined?(EnjuSubject) %>
|
57
|
+
<%- unless manifestation.subjects.empty? -%>
|
58
|
+
<tr>
|
59
|
+
<td><%= t('activerecord.models.subject') -%>:</td>
|
60
|
+
<td>
|
61
|
+
<%- manifestation.subjects.each do |subject| -%>
|
62
|
+
<%= link_to subject.term, subject -%>
|
63
|
+
<%- end -%>
|
64
|
+
</td>
|
65
|
+
</tr>
|
66
|
+
<%- end -%>
|
67
|
+
<tr>
|
68
|
+
<td><%= t('activerecord.attributes.classification.category') %></td>
|
69
|
+
<td>
|
70
|
+
<%= manifestation.ndc %>
|
71
|
+
</td>
|
72
|
+
</tr>
|
73
|
+
<% end %>
|
74
|
+
<% if defined?(EnjuBookmark) %>
|
75
|
+
<tr>
|
76
|
+
<td><%= t('activerecord.models.tag') -%>:</td>
|
77
|
+
<td>
|
78
|
+
<%= render 'manifestations/tag_list', :manifestation => manifestation -%>
|
79
|
+
</td>
|
80
|
+
</tr>
|
81
|
+
<% end %>
|
82
|
+
<%- unless manifestation.periodical? -%>
|
83
|
+
<tr>
|
84
|
+
<td><%= t('page.identifier') -%>:</td>
|
85
|
+
<td>
|
86
|
+
<%- if manifestation.isbn.present? -%>
|
87
|
+
ISBN: <span itemprop="isbn"><%= manifestation.isbn -%></span>
|
88
|
+
<%- if manifestation.isbn10.present? -%>
|
89
|
+
( <%= manifestation.isbn10 -%> )
|
90
|
+
<%- end -%>
|
91
|
+
<%- end -%>
|
92
|
+
<%- if manifestation.nbn.present? -%>
|
93
|
+
NBN: <%= manifestation.nbn -%>
|
94
|
+
<%- end -%>
|
95
|
+
<%- if manifestation.lccn.present? -%>
|
96
|
+
<br />
|
97
|
+
LCCN: <%= manifestation.lccn -%>
|
98
|
+
<%- end -%>
|
99
|
+
</td>
|
100
|
+
</tr>
|
101
|
+
<%- end -%>
|
102
|
+
<%- unless manifestation.attachment_file_name.blank? -%>
|
103
|
+
<%= render 'manifestations/attachment_file', :manifestation => manifestation -%>
|
104
|
+
<%- end -%>
|
105
|
+
<tr>
|
106
|
+
<td><%= t('page.created_at') -%>:</td>
|
107
|
+
<td><%=l manifestation.created_at if manifestation.created_at -%></td>
|
108
|
+
</tr>
|
109
|
+
<tr>
|
110
|
+
<td><%= t('page.updated_at') -%>:</td>
|
111
|
+
<td><%=l manifestation.updated_at if manifestation.updated_at -%></td>
|
112
|
+
</tr>
|
113
|
+
<% if manifestation.description.present? %>
|
114
|
+
<tr>
|
115
|
+
<td><%= t('activerecord.attributes.manifestation.description') -%>:</td>
|
116
|
+
<td>
|
117
|
+
<%= raw simple_format(h(manifestation.description)) -%>
|
118
|
+
</td>
|
119
|
+
</tr>
|
120
|
+
<% end %>
|
121
|
+
<% if manifestation.note.present? %>
|
122
|
+
<tr>
|
123
|
+
<td><%= t('activerecord.attributes.manifestation.note') -%>:</td>
|
124
|
+
<td>
|
125
|
+
<%= raw simple_format(h(manifestation.note)) -%>
|
126
|
+
</td>
|
127
|
+
</tr>
|
128
|
+
<% end %>
|
129
|
+
</table>
|
130
|
+
<% end %>
|
131
|
+
<%- if manifestation.items.on_shelf.exists? -%>
|
132
|
+
<%= render 'manifestations/show_holding', :manifestation => manifestation -%>
|
133
|
+
<%- end -%>
|
134
|
+
</div>
|
135
|
+
<%= render 'manifestations/tab_list', :manifestation => manifestation %>
|
136
|
+
</div>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<h4><%= t('activerecord.attributes.reserve.state') -%></h4>
|
2
|
+
<%- unless @state_facet.blank? -%>
|
3
|
+
<ul>
|
4
|
+
<% @state_facet.each do |state| %>
|
5
|
+
<li>
|
6
|
+
<% if state.value == params[:state].to_s.downcase %><strong><% end %>
|
7
|
+
<%= link_to "#{i18n_state(state.value)} (#{state.count})", url_for(params.merge(:state => state.value, :page => nil, :view => nil, :only_path => true)) %>
|
8
|
+
<% if state.value == params[:state].to_s.downcase %></strong><% end %>
|
9
|
+
</li>
|
10
|
+
<% end %>
|
11
|
+
<%- if params[:state] -%>
|
12
|
+
<li><%= link_to t('page.remove_this_facet'), url_for(params.merge(:state => nil, :page => nil, :view => nil, :only_path => true)) -%></li>
|
13
|
+
<%- end -%>
|
14
|
+
</ul>
|
15
|
+
<%- end -%>
|
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
<strong><%= link_to title_with_volume_number(reserve.manifestation), reserve -%></strong>
|
2
|
+
(<%= link_to t('reserve.bibliographic_detail'), reserve.manifestation %>)
|
2
3
|
<br />
|
3
4
|
<%- if reserve.manifestation.creators.readable_by(current_user).exists? -%>
|
4
5
|
<%= t('patron.creator') -%>: <%= patrons_list(reserve.manifestation.creators.readable_by(current_user)) -%>
|
@@ -21,13 +21,31 @@
|
|
21
21
|
(<%= @reserve.user.user_number %>)
|
22
22
|
</div>
|
23
23
|
|
24
|
+
<% unless @reserve.completed? %>
|
25
|
+
<div class="field">
|
26
|
+
<%= f.label :item_identifier %><br />
|
27
|
+
<%= f.text_field :item_identifier %>
|
28
|
+
</div>
|
29
|
+
<% end %>
|
30
|
+
|
24
31
|
<div class="field">
|
25
32
|
<%= f.label :expired_at -%><br />
|
26
33
|
<%= 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
34
|
</div>
|
28
35
|
|
36
|
+
<% unless @reserve.errors[:base].empty? %>
|
37
|
+
<div class="field">
|
38
|
+
<%= f.label :force_retaining %><br />
|
39
|
+
<%= f.check_box :force_retaining %>
|
40
|
+
</div>
|
41
|
+
<% end %>
|
42
|
+
|
29
43
|
<div class="actions">
|
30
|
-
|
44
|
+
<% if @reserve.retained? %>
|
45
|
+
<%= f.submit :confirm => "#{t('reserve.attempt_to_update_retained_reservation')} #{t('page.continue')}" %>
|
46
|
+
<% else %>
|
47
|
+
<%= f.submit %>
|
48
|
+
<% end %>
|
31
49
|
</div>
|
32
50
|
<%- end -%>
|
33
51
|
|
@@ -37,6 +55,6 @@
|
|
37
55
|
<div id="submenu" class="ui-corner-all">
|
38
56
|
<ul>
|
39
57
|
<li><%= link_to t('page.show'), @reserve -%></li>
|
40
|
-
<li><%= link_to t('page.back'),
|
58
|
+
<li><%= link_to t('page.back'), :back -%></li>
|
41
59
|
</ul>
|
42
60
|
</div>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
title,isbn,item_identifier,call_number,created_at
|
1
|
+
manifestation_id,title,isbn,item_identifier,call_number,username,created_at,expired_at
|
2
2
|
<%- @reserves.each do |reserve| -%>
|
3
|
-
"<%=
|
3
|
+
<%= manifestation.id %>,"<%= reserve.manifestation.original_title.gsub(/"/, '""') -%>",<%= reserve.manifestation.isbn %>,<%= reserve.item.try(:item_identifier) -%>,<%= reserve.item.try(:call_number) -%>,<%= reserve.user.try(:username) %>,<%= reserve.created_at %>,<%= reserve.expired_at %><%= "\n" -%>
|
4
4
|
<%- end -%>
|
@@ -2,13 +2,25 @@
|
|
2
2
|
<div id="content_detail" class="ui-corner-all">
|
3
3
|
<h1 class="title"><%= t('page.listing', :model => t('activerecord.models.reserve')) -%></h1>
|
4
4
|
<div id="content_list">
|
5
|
+
|
6
|
+
<div class="search_form">
|
7
|
+
<%= form_for :reserves, :url => reserves_path, :html => {:method => 'get'} do -%>
|
8
|
+
<p>
|
9
|
+
<%= t('page.search_term') -%>: <%= search_field_tag 'query', h(@query), {:id => 'search_form_top', :class => 'search_form', :placeholder => t('page.search_term')} -%>
|
10
|
+
<br />
|
11
|
+
<%= t('activerecord.attributes.reserve.created_at') %>:
|
12
|
+
<%= t('reserve.reserved_from') %>: <%= text_field_tag 'reserved_from', @reserved_from, {:class => 'date_field', :placeholder => "#{t('page.example')}: 2012-04-12"} -%>
|
13
|
+
<%= t('reserve.reserved_to') %>: <%= text_field_tag 'reserved_to', @reserved_to, {:class => 'date_field', :placeholder => "#{t('page.example')}: 2012-05-11"} -%>
|
14
|
+
<%= submit_tag t('page.search') -%>
|
15
|
+
</p>
|
16
|
+
<%- end -%>
|
17
|
+
</div>
|
18
|
+
|
5
19
|
<table class="table table-striped index">
|
6
20
|
<tr>
|
7
|
-
<th style="width: 30px"
|
8
|
-
<th><%= t('activerecord.models.user') -%></th>
|
21
|
+
<th style="width: 30px">ID</th>
|
9
22
|
<th><%= t('activerecord.models.manifestation') -%></th>
|
10
23
|
<th style="width: 80px"><%= t('activerecord.attributes.reserve.state') -%></th>
|
11
|
-
<th><%= t('activerecord.attributes.reserve.expired_at') -%></th>
|
12
24
|
<%- if can? :update, @reserves.first -%>
|
13
25
|
<th style="width: 70px"></th>
|
14
26
|
<% end %>
|
@@ -17,12 +29,21 @@
|
|
17
29
|
<%- @reserves.each_with_index do |reserve, i| -%>
|
18
30
|
<tr class="line<%= cycle("0", "1") -%>">
|
19
31
|
<td><%= link_to reserve.id, reserve -%></td>
|
20
|
-
<td><%= link_to reserve.user.username, reserve.user -%></td>
|
21
32
|
<td>
|
22
33
|
<%= render 'title', :reserve => reserve -%>
|
34
|
+
<br />
|
35
|
+
<%= t('activerecord.models.user') -%>: <%= link_to reserve.user.username, reserve.user -%>
|
36
|
+
<%= t('activerecord.attributes.reserve.created_at') %>: <%= l(reserve.created_at, :format => :short) -%>
|
37
|
+
<br />
|
38
|
+
<%= t('activerecord.attributes.reserve.expired_at') %>: <%= l(reserve.expired_at, :format => :short) -%>
|
39
|
+
</td>
|
40
|
+
<td>
|
41
|
+
<%= i18n_state(reserve.state) -%>
|
42
|
+
<% if reserve.item %>
|
43
|
+
<br />
|
44
|
+
(<%= link_to reserve.item.item_identifier, reserve.item %>)
|
45
|
+
<% end %>
|
23
46
|
</td>
|
24
|
-
<td><%= i18n_state(reserve.state) -%></td>
|
25
|
-
<td><%= l(reserve.expired_at, :format => :only_date) -%></td>
|
26
47
|
<%- if can? :destroy, reserve -%>
|
27
48
|
<td>
|
28
49
|
<%= link_to t('page.edit'), edit_reserve_path(reserve) -%>
|
@@ -59,6 +80,9 @@
|
|
59
80
|
<li><%= link_to t('page.listing', :model => t('activerecord.models.checkout')), user_checkouts_path(@user) -%></li>
|
60
81
|
<%- end -%>
|
61
82
|
</ul>
|
83
|
+
|
84
|
+
<%= render 'state_facet' %>
|
85
|
+
|
62
86
|
<p>
|
63
87
|
<%- if @user -%>
|
64
88
|
<%= link_to (image_tag 'icons/feed.png', :size => '16x16', :alt => t('page.feed'), :class => 'icon'), user_reserves_path(@user, :format => :rss) -%>
|
@@ -21,23 +21,38 @@
|
|
21
21
|
<%= i18n_state(@reserve.state) -%>
|
22
22
|
</p>
|
23
23
|
|
24
|
+
<p>
|
25
|
+
<strong><%= t('activerecord.attributes.item.item_identifier') -%>:</strong>
|
26
|
+
<%= link_to @reserve.item.item_identifier, @reserve.item if @reserve.item -%>
|
27
|
+
</p>
|
28
|
+
|
24
29
|
<p>
|
25
30
|
<strong><%= t('activerecord.attributes.reserve.created_at') -%>:</strong>
|
26
31
|
<%= l(@reserve.created_at) -%>
|
27
32
|
</p>
|
28
33
|
|
34
|
+
<p>
|
35
|
+
<strong><%= t('activerecord.attributes.reserve.expired_at') -%>:</strong>
|
36
|
+
<%= l(@reserve.expired_at) if @reserve.expired_at -%>
|
37
|
+
</p>
|
38
|
+
|
39
|
+
<p>
|
40
|
+
<strong><%= t('activerecord.attributes.reserve.retained_at') -%>:</strong>
|
41
|
+
<%= l(@reserve.retained_at) if @reserve.retained_at -%>
|
42
|
+
</p>
|
43
|
+
|
29
44
|
<p>
|
30
45
|
<strong><%= t('activerecord.attributes.reserve.canceled_at') -%>:</strong>
|
31
46
|
<%= l(@reserve.canceled_at) if @reserve.canceled_at -%>
|
32
47
|
</p>
|
33
48
|
|
34
49
|
<p>
|
35
|
-
<strong><%= t('activerecord.attributes.reserve.
|
36
|
-
<%= l(@reserve.
|
50
|
+
<strong><%= t('activerecord.attributes.reserve.postponed_at') -%>:</strong>
|
51
|
+
<%= l(@reserve.postponed_at) if @reserve.postponed_at -%>
|
37
52
|
</p>
|
38
53
|
|
39
54
|
<p>
|
40
|
-
<strong><%= t('activerecord.attributes.reserve.checked_out_at') -%>:</strong>
|
55
|
+
<strong><%= t('activerecord.attributes.reserve.checked_out_at') -%>:</strong>
|
41
56
|
<%= l(@reserve.checked_out_at) if @reserve.checked_out_at -%>
|
42
57
|
</p>
|
43
58
|
|
@@ -43,12 +43,15 @@ en:
|
|
43
43
|
expired_at: Expired at
|
44
44
|
deleted_at: Deleted at
|
45
45
|
created_at: Reserved at
|
46
|
+
retained_at: Retained at
|
47
|
+
postponed_at: Postponed at
|
48
|
+
state: State
|
49
|
+
force_retaining: Force retaining
|
46
50
|
checkout_type:
|
47
51
|
name: Name
|
48
52
|
display_name: Display name
|
49
53
|
note: Note
|
50
54
|
position: Position
|
51
|
-
state: State
|
52
55
|
circulation_status:
|
53
56
|
name: Name
|
54
57
|
display_name: Display name
|
@@ -158,6 +161,7 @@ en:
|
|
158
161
|
my_reservation: "My reservations"
|
159
162
|
all_reservation: "All reservations"
|
160
163
|
this_manifestation_is_already_reserved: "This manifestation is already reserved."
|
164
|
+
this_manifestation_is_already_checked_out: "This manifestation is already checked out."
|
161
165
|
excessed_reservation_limit: "Excessed reservation limit."
|
162
166
|
this_patron_cannot_reserve: "This patron can't reserve this manifestation."
|
163
167
|
reservation_was_canceled: "Reservation was canceled."
|
@@ -170,6 +174,11 @@ en:
|
|
170
174
|
retained: "Retained"
|
171
175
|
canceled: "Canceled"
|
172
176
|
expired: "Expired"
|
177
|
+
postponed: "Postponed"
|
173
178
|
completed: "Completed"
|
179
|
+
reserved_from: "From"
|
180
|
+
reserved_to: "To"
|
181
|
+
attempt_to_update_retained_reservation: "You are attemping to update a retained reservation."
|
182
|
+
bibliographic_detail: "Bibliographic details"
|
174
183
|
page:
|
175
184
|
saving: "Saving..."
|
@@ -40,8 +40,11 @@ ja:
|
|
40
40
|
canceled_at: 取消時刻
|
41
41
|
expired_at: 有効期限(この日以降は不要)
|
42
42
|
deleted_at: 削除時刻
|
43
|
-
created_at:
|
43
|
+
created_at: 予約時刻
|
44
|
+
retained_at: 確保時刻
|
45
|
+
postponed_at: 取置取消時刻
|
44
46
|
state: 状態
|
47
|
+
force_retaining: 強制的に取り置きを行う
|
45
48
|
checkout_type:
|
46
49
|
name: 名前
|
47
50
|
display_name: 表示名
|
@@ -156,6 +159,7 @@ ja:
|
|
156
159
|
my_reservation: "自分の予約"
|
157
160
|
all_reservation: "全ての予約"
|
158
161
|
this_manifestation_is_already_reserved: "この資料はすでに予約されています。"
|
162
|
+
this_manifestation_is_already_checked_out: "この資料はすでに貸し出されています。"
|
159
163
|
excessed_reservation_limit: "予約できる資料数の上限を超えています。"
|
160
164
|
this_patron_cannot_reserve: "この利用者はこの資料を予約できません。"
|
161
165
|
reservation_was_canceled: "予約は取り消されました。"
|
@@ -168,6 +172,11 @@ ja:
|
|
168
172
|
retained: "取置済み"
|
169
173
|
canceled: "取消済み"
|
170
174
|
expired: "期限切れ"
|
175
|
+
postponed: "取置延期"
|
171
176
|
completed: "貸出済み"
|
177
|
+
reserved_from: "この日から"
|
178
|
+
reserved_to: "この日まで"
|
179
|
+
attempt_to_update_retained_reservation: "取り置き済みの予約を変更しようとしています。"
|
180
|
+
bibliographic_detail: "書誌詳細"
|
172
181
|
page:
|
173
182
|
saving: "保存中..."
|
@@ -343,8 +343,8 @@ describe CheckinsController do
|
|
343
343
|
|
344
344
|
it "should not update checkin without item_identifier" do
|
345
345
|
put :update, :id => @checkin.id, :checkin => @attrs.merge(:item_identifier => nil)
|
346
|
-
assigns(:checkin).
|
347
|
-
response.should
|
346
|
+
assigns(:checkin).should be_valid
|
347
|
+
response.should redirect_to(@checkin)
|
348
348
|
end
|
349
349
|
end
|
350
350
|
|