enju_circulation 0.0.70 → 0.0.71

Sign up to get free protection for your applications and to get access to all the features.
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 { @checkin = Checkin.new }
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
- if @checkin.item_identifier.blank?
71
- flash[:message] << t('checkin.enter_item_identifier') if @checkin.item_identifier.blank?
72
- else
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 @checkin, :html => {:method => :post}, :url => basket_checkins_path(@basket), :remote => true do |f| -%>
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' %>
@@ -2,6 +2,7 @@
2
2
  <h1 class="title"><%= t('page.new', :model => t('activerecord.models.checkin')) -%></h1>
3
3
  <div id="content_list">
4
4
  <div id="checkin_list">
5
+ <p id="notice"><%= notice %></p>
5
6
  <%= render 'list' -%>
6
7
  </div>
7
8
  </div>
@@ -1,3 +1,3 @@
1
1
  module EnjuCirculation
2
- VERSION = "0.0.70"
2
+ VERSION = "0.0.71"
3
3
  end
@@ -4,6 +4,10 @@ describe CheckoutsController do
4
4
  fixtures :all
5
5
 
6
6
  describe "GET index", :solr => true do
7
+ before do
8
+ Checkout.reindex
9
+ end
10
+
7
11
  before(:each) do
8
12
  FactoryGirl.create(:admin)
9
13
  end
@@ -3,7 +3,7 @@ require 'spec_helper'
3
3
  describe ReservesController do
4
4
  fixtures :all
5
5
 
6
- describe "GET index", :solr => true do
6
+ describe "GET index" do
7
7
  describe "When logged in as Administrator" do
8
8
  login_fixture_admin
9
9
 
Binary file
@@ -0,0 +1,6 @@
1
+ ����
2
+ idtype
3
+ class_name
4
+ username_s
5
+ due_date_d created_at_d
6
+ reserved_bchecked_in_at_d
@@ -0,0 +1 @@
1
+ 
@@ -0,0 +1 @@
1
+ NRM�
data/spec/spec_helper.rb CHANGED
@@ -38,7 +38,7 @@ RSpec.configure do |config|
38
38
  config.before :each, :solr => true do
39
39
  Sunspot::Rails::Tester.start_original_sunspot_session
40
40
  Sunspot.session = $original_sunspot_session
41
- #Sunspot.remove_all!
41
+ Sunspot.remove_all!
42
42
  end
43
43
  end
44
44
 
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.70
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-17 00:00:00.000000000 Z
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.23
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.23
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.24
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.24
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/segments_1
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/segments_1
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