enju_circulation 0.0.70 → 0.0.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +2 -2
- data/app/controllers/checkins_controller.rb +7 -9
- data/app/views/baskets/index.html.erb +2 -2
- data/app/views/checked_items/new.html.erb +1 -1
- data/app/views/checkins/_list.html.erb +2 -1
- data/app/views/checkins/new.html.erb +1 -0
- data/lib/enju_circulation/version.rb +1 -1
- data/spec/controllers/checkouts_controller_spec.rb +4 -0
- data/spec/controllers/reserves_controller_spec.rb +1 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/solr/data/test/index/_2r.fdt +0 -0
- data/spec/dummy/solr/data/test/index/_2r.fdx +0 -0
- data/spec/dummy/solr/data/test/index/_2r.fnm +6 -0
- data/spec/dummy/solr/data/test/index/_2r.frq +1 -0
- data/spec/dummy/solr/data/test/index/_2r.nrm +1 -0
- data/spec/dummy/solr/data/test/index/_2r.prx +0 -0
- data/spec/dummy/solr/data/test/index/_2r.tii +0 -0
- data/spec/dummy/solr/data/test/index/_2r.tis +0 -0
- data/spec/dummy/solr/data/test/index/segments.gen +0 -0
- data/spec/dummy/solr/data/test/index/segments_6n +0 -0
- data/spec/dummy/solr/data/test/spellchecker/segments_1 +0 -0
- data/spec/spec_helper.rb +1 -1
- metadata +24 -8
- data/spec/dummy/solr/data/test/index/segments_1 +0 -0
data/README.rdoc
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
= EnjuCirculation
|
1
|
+
= EnjuCirculation {<img src="https://secure.travis-ci.org/nabeta/enju_circulation.png?branch=master" alt="Build Status" />}[http://travis-ci.org/nabeta/enju_circulation]
|
2
2
|
|
3
|
-
This project rocks and uses MIT-LICENSE.
|
3
|
+
This project rocks and uses MIT-LICENSE.
|
@@ -1,7 +1,6 @@
|
|
1
1
|
class CheckinsController < ApplicationController
|
2
2
|
load_and_authorize_resource :except => :index
|
3
3
|
authorize_resource :only => :index
|
4
|
-
before_filter :get_user
|
5
4
|
before_filter :get_basket, :only => [:index, :create]
|
6
5
|
cache_sweeper :circulation_sweeper, :only => [:create, :update, :destroy]
|
7
6
|
|
@@ -17,7 +16,7 @@ class CheckinsController < ApplicationController
|
|
17
16
|
respond_to do |format|
|
18
17
|
format.html # index.html.erb
|
19
18
|
format.json { render :json => @checkins }
|
20
|
-
format.js
|
19
|
+
format.js
|
21
20
|
end
|
22
21
|
end
|
23
22
|
|
@@ -43,7 +42,7 @@ class CheckinsController < ApplicationController
|
|
43
42
|
@basket.save!
|
44
43
|
end
|
45
44
|
@checkin = Checkin.new
|
46
|
-
@checkins = []
|
45
|
+
@checkins = [].paginate(:page => 1)
|
47
46
|
flash[:checkin_basket_id] = @basket.id
|
48
47
|
|
49
48
|
respond_to do |format|
|
@@ -67,12 +66,11 @@ class CheckinsController < ApplicationController
|
|
67
66
|
@checkin.librarian = current_user
|
68
67
|
|
69
68
|
flash[:message] = ''
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
item = Item.where(:item_identifier => @checkin.item_identifier.to_s.strip).first
|
69
|
+
item_identifier = @checkin.item_identifier.to_s.strip
|
70
|
+
unless item_identifier.blank?
|
71
|
+
item = Item.where(:item_identifier => item_identifier).first
|
74
72
|
end
|
75
|
-
@checkin.item = item
|
73
|
+
@checkin.item = item if item
|
76
74
|
|
77
75
|
respond_to do |format|
|
78
76
|
if @checkin.save
|
@@ -83,7 +81,7 @@ class CheckinsController < ApplicationController
|
|
83
81
|
format.json { render :json => @checkin, :status => :created, :location => @checkin }
|
84
82
|
format.js { redirect_to basket_checkins_url(@basket, :format => :js) }
|
85
83
|
else
|
86
|
-
@checkins = @basket.checkins
|
84
|
+
@checkins = @basket.checkins.paginate(:page => 1)
|
87
85
|
format.html { render :action => "new" }
|
88
86
|
format.json { render :json => @checkin.errors, :status => :unprocessable_entity }
|
89
87
|
format.js { render :action => "index" }
|
@@ -1,6 +1,6 @@
|
|
1
|
-
<div id="content_list">
|
2
|
-
<h1 class="title"><%= t('page.listing', :model => t('activerecord.models.basket')) -%></h1>
|
3
1
|
<div id="content_detail" class="ui-corner-all">
|
2
|
+
<h1 class="title"><%= t('page.listing', :model => t('activerecord.models.basket')) -%></h1>
|
3
|
+
<div id="content_list">
|
4
4
|
|
5
5
|
<table class="table table-striped index">
|
6
6
|
<tr>
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<div id="content_detail" class="ui-corner-all">
|
2
2
|
<h1 class="title"><%= t('page.new', :model => t('activerecord.models.checked_item')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
|
-
<p id="notice"><%= notice %></p>
|
5
4
|
|
6
5
|
<div id="checked_item_list">
|
6
|
+
<p id="notice"><%= notice %></p>
|
7
7
|
<%= render 'list' -%>
|
8
8
|
</div>
|
9
9
|
<%= render 'checkout' -%>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<div style="color: red"><%= flash[:message] -%></div>
|
2
2
|
|
3
3
|
<div class="search_form">
|
4
|
-
<%= form_for
|
4
|
+
<%= form_for :checkin, :html => {:method => :post}, :url => basket_checkins_path(@basket), :remote => true do |f| -%>
|
5
5
|
<%= f.error_messages %>
|
6
6
|
<p>
|
7
7
|
<%= t('activerecord.attributes.item.item_identifier') -%>:
|
@@ -9,6 +9,7 @@
|
|
9
9
|
<%= f.submit t('checkin.checkin'), 'data-disable-with' => t('page.saving') -%>
|
10
10
|
</p>
|
11
11
|
<%- end -%>
|
12
|
+
<%= javascript_tag("$('#checkin_item_identifier').focus().select();") %>
|
12
13
|
</div>
|
13
14
|
|
14
15
|
<%= render 'checkin' %>
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
NRM�
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enju_circulation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.71
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-07-
|
12
|
+
date: 2012-07-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -98,7 +98,7 @@ dependencies:
|
|
98
98
|
requirements:
|
99
99
|
- - ! '>='
|
100
100
|
- !ruby/object:Gem::Version
|
101
|
-
version: 0.0.
|
101
|
+
version: 0.0.24
|
102
102
|
type: :runtime
|
103
103
|
prerelease: false
|
104
104
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -106,7 +106,7 @@ dependencies:
|
|
106
106
|
requirements:
|
107
107
|
- - ! '>='
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: 0.0.
|
109
|
+
version: 0.0.24
|
110
110
|
- !ruby/object:Gem::Dependency
|
111
111
|
name: enju_event
|
112
112
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,7 +114,7 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - ! '>='
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.0.
|
117
|
+
version: 0.0.27
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -122,7 +122,7 @@ dependencies:
|
|
122
122
|
requirements:
|
123
123
|
- - ! '>='
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version: 0.0.
|
125
|
+
version: 0.0.27
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: enju_core
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
@@ -612,8 +612,16 @@ files:
|
|
612
612
|
- spec/dummy/solr/conf/spellings.txt
|
613
613
|
- spec/dummy/solr/conf/stopwords.txt
|
614
614
|
- spec/dummy/solr/conf/synonyms.txt
|
615
|
+
- spec/dummy/solr/data/test/index/_2r.fdt
|
616
|
+
- spec/dummy/solr/data/test/index/_2r.fdx
|
617
|
+
- spec/dummy/solr/data/test/index/_2r.fnm
|
618
|
+
- spec/dummy/solr/data/test/index/_2r.frq
|
619
|
+
- spec/dummy/solr/data/test/index/_2r.nrm
|
620
|
+
- spec/dummy/solr/data/test/index/_2r.prx
|
621
|
+
- spec/dummy/solr/data/test/index/_2r.tii
|
622
|
+
- spec/dummy/solr/data/test/index/_2r.tis
|
615
623
|
- spec/dummy/solr/data/test/index/segments.gen
|
616
|
-
- spec/dummy/solr/data/test/index/
|
624
|
+
- spec/dummy/solr/data/test/index/segments_6n
|
617
625
|
- spec/dummy/solr/data/test/spellchecker/segments.gen
|
618
626
|
- spec/dummy/solr/data/test/spellchecker/segments_1
|
619
627
|
- spec/factories/accepts.rb
|
@@ -890,8 +898,16 @@ test_files:
|
|
890
898
|
- spec/dummy/solr/conf/spellings.txt
|
891
899
|
- spec/dummy/solr/conf/stopwords.txt
|
892
900
|
- spec/dummy/solr/conf/synonyms.txt
|
901
|
+
- spec/dummy/solr/data/test/index/_2r.fdt
|
902
|
+
- spec/dummy/solr/data/test/index/_2r.fdx
|
903
|
+
- spec/dummy/solr/data/test/index/_2r.fnm
|
904
|
+
- spec/dummy/solr/data/test/index/_2r.frq
|
905
|
+
- spec/dummy/solr/data/test/index/_2r.nrm
|
906
|
+
- spec/dummy/solr/data/test/index/_2r.prx
|
907
|
+
- spec/dummy/solr/data/test/index/_2r.tii
|
908
|
+
- spec/dummy/solr/data/test/index/_2r.tis
|
893
909
|
- spec/dummy/solr/data/test/index/segments.gen
|
894
|
-
- spec/dummy/solr/data/test/index/
|
910
|
+
- spec/dummy/solr/data/test/index/segments_6n
|
895
911
|
- spec/dummy/solr/data/test/spellchecker/segments.gen
|
896
912
|
- spec/dummy/solr/data/test/spellchecker/segments_1
|
897
913
|
- spec/factories/accepts.rb
|
Binary file
|