enju_biblio 0.0.9 → 0.1.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/accepts_controller.rb +83 -0
- data/app/controllers/items_controller.rb +2 -2
- data/app/controllers/manifestations_controller.rb +8 -8
- data/app/controllers/patrons_controller.rb +18 -4
- data/app/controllers/series_has_manifestations_controller.rb +1 -1
- data/app/controllers/series_statements_controller.rb +2 -5
- data/app/models/accept.rb +36 -0
- data/app/models/create.rb +0 -4
- data/app/models/donate.rb +0 -4
- data/app/models/exemplify.rb +0 -4
- data/app/models/import_request.rb +0 -4
- data/app/models/item.rb +2 -4
- data/app/models/manifestation.rb +5 -8
- data/app/models/own.rb +0 -3
- data/app/models/patron.rb +2 -4
- data/app/models/picture_file.rb +0 -4
- data/app/models/produce.rb +0 -4
- data/app/models/realize.rb +0 -4
- data/app/models/series_has_manifestation.rb +1 -3
- data/app/models/series_statement.rb +2 -4
- 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/countries/index.html.erb +1 -1
- data/app/views/creates/_index.html.erb +1 -1
- data/app/views/creates/_index_patron.html.erb +1 -1
- data/app/views/creates/_index_work.html.erb +1 -1
- data/app/views/donates/index.html.erb +1 -1
- data/app/views/exemplifies/index.html.erb +1 -1
- data/app/views/extents/index.html.erb +1 -1
- data/app/views/import_requests/index.html.erb +1 -1
- data/app/views/items/index.html.erb +1 -1
- data/app/views/items/index.mobile.erb +1 -1
- data/app/views/languages/index.html.erb +1 -1
- data/app/views/licenses/index.html.erb +1 -1
- data/app/views/manifestations/_list.html.erb +2 -2
- data/app/views/manifestations/_manifestation.html.erb +1 -1
- data/app/views/manifestations/_question_list.html.erb +2 -2
- data/app/views/manifestations/_tab_list.html.erb +1 -1
- data/app/views/manifestations/index.html.erb +2 -2
- data/app/views/manifestations/index.mobile.erb +1 -1
- data/app/views/medium_of_performances/index.html.erb +1 -1
- data/app/views/owns/index.html.erb +1 -1
- data/app/views/patron_import_files/index.html.erb +1 -1
- data/app/views/patron_import_results/index.html.erb +1 -1
- data/app/views/patrons/_expression_list.html.erb +2 -2
- data/app/views/patrons/_index.html.erb +1 -1
- data/app/views/patrons/_index_expression.html.erb +1 -1
- data/app/views/patrons/_index_manifestation.html.erb +1 -1
- data/app/views/patrons/_index_patron.html.erb +1 -1
- data/app/views/patrons/_index_patron_merge_list.html.erb +1 -1
- data/app/views/patrons/_index_work.html.erb +1 -1
- data/app/views/patrons/_manifestation_list.html.erb +2 -2
- data/app/views/patrons/_work_list.html.erb +2 -2
- data/app/views/patrons/index.mobile.erb +1 -1
- data/app/views/picture_files/_index.html.erb +1 -1
- data/app/views/picture_files/_index_event.html.erb +1 -1
- data/app/views/picture_files/_index_manifestation.html.erb +1 -1
- data/app/views/picture_files/_index_patron.html.erb +1 -1
- data/app/views/picture_files/_index_shelf.html.erb +1 -1
- data/app/views/produces/_index.html.erb +1 -1
- data/app/views/produces/_index_manifestation.html.erb +1 -1
- data/app/views/produces/_index_patron.html.erb +1 -1
- data/app/views/realizes/_index.html.erb +1 -1
- data/app/views/realizes/_index_expression.html.erb +1 -1
- data/app/views/realizes/_index_patron.html.erb +1 -1
- data/app/views/resource_import_files/index.html.erb +1 -1
- data/app/views/resource_import_results/index.html.erb +1 -1
- data/app/views/series_has_manifestations/index.html.erb +1 -1
- data/app/views/series_statements/_index.html.erb +1 -1
- data/app/views/series_statements/_index_manifestation.html.erb +1 -1
- data/app/views/series_statements/_index_series_statement_merge_list.html.erb +1 -1
- data/app/views/series_statements/_manifestation_list.html.erb +2 -2
- data/{spec/dummy/db → db}/migrate/120_create_baskets.rb +0 -0
- data/{spec/dummy/db → db}/migrate/20120319173203_create_accepts.rb +0 -0
- data/lib/enju_biblio.rb +4 -0
- data/lib/enju_biblio/engine.rb +0 -3
- data/lib/enju_biblio/version.rb +1 -1
- data/lib/generators/enju_biblio/views_generator.rb +51 -0
- data/spec/controllers/accepts_controller_spec.rb +304 -0
- data/spec/dummy/app/models/ability.rb +2 -0
- data/spec/dummy/config/application.rb +9 -1
- data/spec/dummy/config/initializers/kaminari_config.rb +9 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/lib/plugins/ext.rb +0 -2
- data/spec/dummy/tmp/cache/4F7/F90/default_role +0 -0
- data/spec/dummy/tmp/cache/6E4/420/search_engine_all +0 -0
- data/spec/factories/accepts.rb +9 -0
- data/spec/factories/basket.rb +5 -0
- data/spec/models/accept_spec.rb +22 -0
- data/spec/requests/accepts_spec.rb +11 -0
- data/spec/routing/accepts_routing_spec.rb +27 -0
- data/spec/views/accepts/edit.html.erb_spec.rb +18 -0
- data/spec/views/accepts/index.html.erb_spec.rb +25 -0
- data/spec/views/accepts/new.html.erb_spec.rb +29 -0
- data/spec/views/accepts/show.html.erb_spec.rb +17 -0
- data/spec/views/creates/index.html.erb_spec.rb +2 -2
- data/spec/views/exemplifies/index.html.erb_spec.rb +2 -2
- data/spec/views/owns/index.html.erb_spec.rb +2 -2
- data/spec/views/produces/index.html.erb_spec.rb +2 -2
- data/spec/views/realizes/index.html.erb_spec.rb +2 -2
- data/spec/views/series_has_manifestations/index.html.erb_spec.rb +2 -2
- metadata +50 -42
- data/app/views/resource_import_files/_show_object_list.html.erb +0 -26
- data/spec/dummy/lib/enju_leaf.rb +0 -9
- data/spec/dummy/lib/enju_leaf/calculate_stat.rb +0 -30
- data/spec/dummy/lib/plugins/ext/will_paginate.rb +0 -64
@@ -0,0 +1,31 @@
|
|
1
|
+
<div style="color: red"><%= flash[:message] -%></div>
|
2
|
+
|
3
|
+
<div class="search_form">
|
4
|
+
<%= form_for(@accept, :url => basket_accepts_path(@basket), :remote => true) do |f| %>
|
5
|
+
<%= f.error_messages %>
|
6
|
+
<p>
|
7
|
+
<%= t('activerecord.attributes.item.item_identifier') -%>:
|
8
|
+
<%= f.search_field :item_identifier, :class => 'resource_item_identifier', :value => nil -%>
|
9
|
+
<%= f.submit t('accept.accept'), 'data-disable-with' => t('page.saving') -%>
|
10
|
+
</p>
|
11
|
+
<%- end -%>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<table class="index">
|
15
|
+
<tr>
|
16
|
+
<th><%= t('activerecord.models.item') -%></th>
|
17
|
+
</tr>
|
18
|
+
<%- @accepts.each_with_index do |accept, i| -%>
|
19
|
+
<tr class="line<%= cycle("0", "1") -%>">
|
20
|
+
<td>
|
21
|
+
<%= render 'manifestations/show_index', :manifestation => accept.item.manifestation %>
|
22
|
+
<%= link_to accept.item.item_identifier, accept.item -%> / <%= accept.item.call_number %>
|
23
|
+
(<%= link_to accept.item.shelf.library.display_name.localize, accept.item.shelf.library %> /
|
24
|
+
<%= link_to accept.item.shelf.display_name.localize, accept.item.shelf %>)<br />
|
25
|
+
<%=l accept.created_at %>
|
26
|
+
</td>
|
27
|
+
</tr>
|
28
|
+
<%- end -%>
|
29
|
+
</table>
|
30
|
+
|
31
|
+
<%= javascript_tag("$('#accept_item_identifier').focus()") -%>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<div id="content_detail" class="ui-corner-all">
|
2
|
+
<h1 class="title"><%= t('page.editing', :model => t('activerecord.models.accept')) -%></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'), @accept -%></li>
|
11
|
+
<li><%= link_to t('page.back'), accepts_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.accept')) -%></h1>
|
3
|
+
<div id="content_list">
|
4
|
+
|
5
|
+
<div class="search_form">
|
6
|
+
<%= form_for(:accept, :html => {:method => :get}) do |f| %>
|
7
|
+
<p>
|
8
|
+
<%= t('activerecord.attributes.item.item_identifier') -%>:
|
9
|
+
<%= f.search_field :item_identifier, :value => @query, :class => 'resource_item_identifier' -%>
|
10
|
+
<%= f.submit t('page.search') -%>
|
11
|
+
</p>
|
12
|
+
<%- end -%>
|
13
|
+
</div>
|
14
|
+
|
15
|
+
<table class="table table-striped index">
|
16
|
+
<tr>
|
17
|
+
<th><%= t('activerecord.models.item') -%></th>
|
18
|
+
<th></th>
|
19
|
+
</tr>
|
20
|
+
<%- @accepts.each_with_index do |accept, i| -%>
|
21
|
+
<tr class="line<%= cycle("0", "1") -%>">
|
22
|
+
<td>
|
23
|
+
<% if accept.item %>
|
24
|
+
<%= render 'manifestations/show_index', :manifestation => accept.item.manifestation %>
|
25
|
+
<%= link_to accept.item.item_identifier, accept.item -%> / <%= accept.item.call_number %>
|
26
|
+
(<%= link_to accept.item.shelf.library.display_name.localize, accept.item.shelf.library %> /
|
27
|
+
<%= link_to accept.item.shelf.display_name.localize, accept.item.shelf %>)<br />
|
28
|
+
<%=l accept.created_at %>
|
29
|
+
<% end %>
|
30
|
+
</td>
|
31
|
+
<td>
|
32
|
+
<%- if can? :destroy, accept -%>
|
33
|
+
<%= link_to t('page.destroy'), accept, :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
|
34
|
+
<%- end -%>
|
35
|
+
</td>
|
36
|
+
</tr>
|
37
|
+
<%- end -%>
|
38
|
+
</table>
|
39
|
+
<%= javascript_tag("$('#accept_item_identifier').focus()") -%>
|
40
|
+
|
41
|
+
<%= paginate(@accepts) %>
|
42
|
+
</div>
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<div id="submenu" class="ui-corner-all">
|
46
|
+
<ul>
|
47
|
+
<li><%= link_to t('page.new', :model => t('activerecord.models.accept')), new_accept_path -%></li>
|
48
|
+
</ul>
|
49
|
+
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
$("#accept_list").html("<%= escape_javascript(render('accepts/list')) %>");
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<div id="content_detail" class="ui-corner-all">
|
2
|
+
<h1 class="title"><%= t('page.new', :model => t('activerecord.models.accept')) -%></h1>
|
3
|
+
<div id="content_list">
|
4
|
+
<div id="accept_list">
|
5
|
+
<%= render 'list' -%>
|
6
|
+
</div>
|
7
|
+
</div>
|
8
|
+
</div>
|
9
|
+
|
10
|
+
<div id="submenu" class="ui-corner-all">
|
11
|
+
<ul>
|
12
|
+
<li><%= link_to t('page.back'), accepts_path -%></li>
|
13
|
+
</ul>
|
14
|
+
</div>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<div id="content_detail" class="ui-corner-all">
|
2
|
+
<h1 class="title"><%= t('page.showing', :model => t('activerecord.models.accept')) -%></h1>
|
3
|
+
<div id="content_list">
|
4
|
+
<p id="notice"><%= notice %></p>
|
5
|
+
|
6
|
+
<p>
|
7
|
+
<strong><%= t('activerecord.models.item') -%>:</strong>
|
8
|
+
<% if @accept.item %>
|
9
|
+
<%= link_to @accept.item.item_identifier, @accept.item -%>
|
10
|
+
(<%= link_to @accept.item.manifestation.original_title, @accept.item.manifestation %>)
|
11
|
+
<% end %>
|
12
|
+
</p>
|
13
|
+
|
14
|
+
<p>
|
15
|
+
<strong><%= t('activerecord.models.user') -%>:</strong>
|
16
|
+
<%= link_to @accept.librarian.username, @accept.librarian if @accept.librarian -%>
|
17
|
+
</p>
|
18
|
+
|
19
|
+
<p>
|
20
|
+
<strong><%= t('page.created_at') -%>:</strong>
|
21
|
+
<%=l @accept.created_at %>
|
22
|
+
</p>
|
23
|
+
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
|
27
|
+
<div id="submenu" class="ui-corner-all">
|
28
|
+
<ul>
|
29
|
+
<li><%= back_to_index(flash[:page_info]) -%></li>
|
30
|
+
</ul>
|
31
|
+
</div>
|
@@ -2,11 +2,11 @@
|
|
2
2
|
<%= render manifestations %>
|
3
3
|
</table>
|
4
4
|
|
5
|
-
<%=
|
5
|
+
<%= paginate(manifestations) -%>
|
6
6
|
<br />
|
7
7
|
|
8
8
|
<div>
|
9
|
-
<%- if manifestations and manifestations.size >
|
9
|
+
<%- if manifestations and manifestations.size > @manifestations.per_page.div(2) -%>
|
10
10
|
<%= form_for :manifestations, :html => {:method => 'get'} do -%>
|
11
11
|
<p>
|
12
12
|
<%= t('page.search_term') -%>:
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<tr class="line<%= cycle("0", "1") -%>">
|
2
|
-
<td style="width: 30px"><%=
|
2
|
+
<td style="width: 30px"><%= @manifestations.offset_value + 1 + manifestation_counter -%></td>
|
3
3
|
<td style="480px">
|
4
4
|
<% if manifestation.root_of_series? %>
|
5
5
|
<%= render 'manifestations/show_series_index', :manifestation => manifestation -%>
|
@@ -1,13 +1,13 @@
|
|
1
1
|
<div id="question">
|
2
2
|
<div id="question_list">
|
3
3
|
<ul>
|
4
|
-
<%
|
4
|
+
<% @questions.each do |question| %>
|
5
5
|
<li>
|
6
6
|
<%= link_to question.body, question %>
|
7
7
|
(<%= t('page.last_updated') %>: <%=l question.updated_at %>)
|
8
8
|
</li>
|
9
9
|
<% end %>
|
10
10
|
</ul>
|
11
|
-
<%=
|
11
|
+
<%= paginate(@questions, :param_name => :question_page, :remote => true) -%>
|
12
12
|
</div>
|
13
13
|
</div>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<%- if manifestation.original_manifestations.first or manifestation.derived_manifestations.first -%>
|
2
2
|
<%= render 'manifestations/manifestation_list', :manifestation => manifestation -%>
|
3
3
|
<%- end -%>
|
4
|
-
<%-
|
4
|
+
<%-if defined?(EnjuQuestion) -%>
|
5
5
|
<%- unless manifestation.questions(:user => current_user).empty? -%>
|
6
6
|
<%= render 'manifestations/question_list', :manifestation => manifestation -%>
|
7
7
|
<%- end -%>
|
@@ -25,7 +25,7 @@
|
|
25
25
|
<%= render 'show_series_statement' %>
|
26
26
|
<% end %>
|
27
27
|
|
28
|
-
<%- if @manifestations.
|
28
|
+
<%- if @manifestations.total_count > 0 -%>
|
29
29
|
<p>
|
30
30
|
<%= t('page.number_of_search_results', :count => @count[:query_result], :numdocs => Manifestation.search.total, :seconds => sprintf("%.3f", @seconds)) -%>
|
31
31
|
<%- if @count[:query_result] > configatron.max_number_of_results -%>
|
@@ -83,7 +83,7 @@
|
|
83
83
|
<%= render 'submenu_series_statement' %>
|
84
84
|
<% end %>
|
85
85
|
<h3><%= link_to h("#{t('page.total')}: #{@count[:query_result]}"), url_for(params.merge(:action => 'index', :view => nil, :carrier_type => nil, :library => nil, :language => nil, :subject => nil, :only_path => true)) -%></h3>
|
86
|
-
<%- if @manifestations.
|
86
|
+
<%- if @manifestations.total_count > 0 -%>
|
87
87
|
<%= render 'manifestations/all_facet' -%>
|
88
88
|
<%- end -%>
|
89
89
|
<div>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div id="expression">
|
2
|
-
<%=
|
2
|
+
<%= paginate(@expressions, :param_name => :expression_list_page, :remote => true) -%>
|
3
3
|
<ul>
|
4
4
|
<%- @expressions.each do |manifestation| -%>
|
5
5
|
<li>
|
@@ -15,6 +15,6 @@
|
|
15
15
|
</li>
|
16
16
|
<%- end -%>
|
17
17
|
</ul>
|
18
|
-
<%=
|
18
|
+
<%= paginate(@expressions, :param_name => :expression_list_page, :remote => true) %>
|
19
19
|
</div>
|
20
20
|
|