enju_circulation 0.1.0.pre47 → 0.1.0.pre48

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 42c4ad13fae4f036cd78c045f9eded59ff44a229
4
- data.tar.gz: 6fd3afa71eb59716ed7dd801c6b1e07b754f8774
3
+ metadata.gz: 3fa4ac8a717069b0e0e49dafb6822873fed12cb4
4
+ data.tar.gz: f36b593f237141416cf2a7050efc271dacf948d0
5
5
  SHA512:
6
- metadata.gz: ac2e3cc83d35d247fdc12611241a0be61f05a0b98f58dc24bfff70182dd2f17c46cd80f390543d1971d3faf17d1912d1abf4fd7660ef1524c8fae9b7e47bbbd4
7
- data.tar.gz: 0a0348e65018e54f84efa184cbdc417e17ff3884bedc622b683dcfc87fdc9b0ec1650ab72dec210ec575a0e79c3047254b39dd47410b96f6b1d4c882ae09cdfa
6
+ metadata.gz: 5ac896d0434121bcac47efe750df4a8f0e77737c4915ac02489f179035c8710de7234e8409ac2754db8191b8df8536449869ee8b282e3493824a94a08c7530ec
7
+ data.tar.gz: 1d9fb95d1d93a3247c66da62a6fd549a19e63aa6a39e78189f3395f02fc094e0aac4d0c69a1d9bcc9cc7bfb4190894881b694520756fd4f43a1203dac698a4da
@@ -140,7 +140,7 @@ class ReservesController < ApplicationController
140
140
  if @manifestation
141
141
  @reserve.manifestation = @manifestation
142
142
  if @reserve.user
143
- @reserve.expired_at = @manifestation.reservation_expired_period(@reserve.user).days.from_now.end_of_day
143
+ #@reserve.expired_at = @manifestation.reservation_expired_period(@reserve.user).days.from_now.end_of_day
144
144
  if @manifestation.is_reserved_by?(@reserve.user)
145
145
  flash[:notice] = t('reserve.this_manifestation_is_already_reserved')
146
146
  redirect_to @manifestation
@@ -253,7 +253,7 @@ class ReservesController < ApplicationController
253
253
  def reserve_params
254
254
  if current_user.try(:has_role?, 'Librarian')
255
255
  params.fetch(:reserve, {}).permit(
256
- :manifestation_id, :user_number, :expired_at,
256
+ :manifestation_id, :user_number,
257
257
  :pickup_location_id, :expired_at,
258
258
  :manifestation_id, :item_identifier, :user_number,
259
259
  :request_status_type, :canceled_at, :checked_out_at,
@@ -270,7 +270,7 @@ class ReservesController < ApplicationController
270
270
  def reserve_update_params
271
271
  if current_user.try(:has_role?, 'Librarian')
272
272
  params.fetch(:reserve, {}).permit(
273
- :manifestation_id, :user_number, :expired_at,
273
+ :manifestation_id, :user_number,
274
274
  :pickup_location_id, :expired_at,
275
275
  :manifestation_id, :item_identifier, :user_number,
276
276
  :request_status_type, :canceled_at, :checked_out_at,
@@ -96,18 +96,14 @@ module EnjuCirculation
96
96
  can :read, [
97
97
  CirculationStatus,
98
98
  ManifestationCheckoutStat,
99
- ManifestationReserveStat,
100
- UserCheckoutStat,
101
- UserReserveStat,
99
+ ManifestationReserveStat
102
100
  ]
103
101
  else
104
102
  can :index, Checkout
105
103
  can :read, [
106
104
  CirculationStatus,
107
105
  ManifestationCheckoutStat,
108
- ManifestationReserveStat,
109
- UserCheckoutStat,
110
- UserReserveStat
106
+ ManifestationReserveStat
111
107
  ]
112
108
  end
113
109
  end
@@ -56,7 +56,8 @@ class Reserve < ActiveRecord::Base
56
56
  validate :valid_item?
57
57
  validate :retained_by_other_user?
58
58
  before_validation :set_manifestation, on: :create
59
- before_validation :set_item, :set_expired_at
59
+ before_validation :set_item
60
+ validate :check_expired_at
60
61
  before_validation :set_user, on: :update
61
62
  before_validation :set_request_status, on: :create
62
63
 
@@ -141,16 +142,11 @@ class Reserve < ActiveRecord::Base
141
142
  self.request_status_type = RequestStatusType.where(name: 'In Process').first
142
143
  end
143
144
 
144
- def set_expired_at
145
- if user and manifestation
146
- if canceled_at.blank?
147
- if expired_at.blank?
148
- expired_period = manifestation.reservation_expired_period(user)
149
- self.expired_at = (expired_period + 1).days.from_now.beginning_of_day
150
- elsif !completed?
151
- if expired_at.beginning_of_day < Time.zone.now
152
- errors[:base] << I18n.t('reserve.invalid_date')
153
- end
145
+ def check_expired_at
146
+ if canceled_at.blank? and expired_at?
147
+ if !completed?
148
+ if expired_at.beginning_of_day < Time.zone.now
149
+ errors[:base] << I18n.t('reserve.invalid_date')
154
150
  end
155
151
  end
156
152
  end
@@ -1,14 +1,14 @@
1
- <%- if @user.profile.try(:checkout_icalendar_token?) -%>
2
- <%= checkouts_url(icalendar_token: @user.profile.checkout_icalendar_token, format: :ics) -%>
3
- <%= hidden_field_tag 'user.profile.checkout_icalendar_token]', @user.profile.checkout_icalendar_token -%>
1
+ <%- if profile.respond_to?(:checkout_icalendar_token?) -%>
2
+ <%= checkouts_url(icalendar_token: profile.checkout_icalendar_token, format: :ics) if profile.checkout_icalendar_token -%>
3
+ <%= hidden_field_tag 'profile[checkout_icalendar_token]', profile.checkout_icalendar_token -%>
4
4
  <%- end -%>
5
5
  <br />
6
- <%- if @user.profile.try(:checkout_icalendar_token?) -%>
7
- <input onclick="$.ajax({data:'authenticity_token=' + encodeURIComponent('<%= form_authenticity_token %>'), success:function(request){$('#feed_token').html(request);}, type:'get', url:'<%= edit_user_path(@user, disable: true, mode: 'feed_token') %>'});" type="button" value="<%= t('page.delete') %>" />
6
+ <%- if profile.try(:checkout_icalendar_token?) -%>
7
+ <input onclick="$.ajax({data:'authenticity_token=' + encodeURIComponent('<%= form_authenticity_token %>'), success:function(request){$('#feed_token').html(request);}, type:'get', url:'<%= edit_profile_path(profile, disable: true, mode: 'feed_token') %>'});" type="button" value="<%= t('page.delete') %>" />
8
8
  <br />
9
9
  <%= t('user.you_have_to_save_profile_to_activate_feed_url') -%>
10
10
  <%- else -%>
11
- <input onclick="$.ajax({data:'authenticity_token=' + encodeURIComponent('<%= form_authenticity_token %>'), success:function(request){$('#feed_token').html(request);}, type:'get', url:'<%= edit_user_path(@user, mode: 'feed_token') %>'});" type="button" value="<%= t('page.reset') %>" />
11
+ <input onclick="$.ajax({data:'authenticity_token=' + encodeURIComponent('<%= form_authenticity_token %>'), success:function(request){$('#feed_token').html(request);}, type:'get', url:'<%= edit_profile_path(profile, mode: 'feed_token') %>'});" type="button" value="<%= t('page.reset') %>" />
12
12
  <br />
13
13
  <%= t('user.you_have_to_save_profile_to_deactivate_feed_url') -%>
14
14
  <%- end -%>
@@ -49,7 +49,7 @@
49
49
  <%= t('activerecord.models.user') -%>: <%= link_to reserve.user.username, reserve.user.profile -%>
50
50
  <%= t('activerecord.attributes.reserve.created_at') %>: <%= l(reserve.created_at, format: :short) -%>
51
51
  <br />
52
- <%= t('activerecord.attributes.reserve.expired_at') %>: <%= l(reserve.expired_at, format: :short) -%>
52
+ <%= t('activerecord.attributes.reserve.expired_at') %>: <%= l(reserve.expired_at, format: :short) if reserve.expired_at? -%>
53
53
  <br />
54
54
  <%= t('activerecord.attributes.reserve.pickup_location_id') %>: <%= link_to reserve.pickup_location.display_name.localize, reserve.pickup_location if reserve.pickup_location %>
55
55
  </td>
@@ -33,11 +33,6 @@
33
33
  <%= f.text_field :reservation_limit, class: 'resource_integer' -%>
34
34
  </div>
35
35
 
36
- <div class="field">
37
- <%= f.label :reservation_expired_period -%><br />
38
- <%= f.text_field :reservation_expired_period, class: 'resource_integer' -%>
39
- </div>
40
-
41
36
  <div class="field">
42
37
  <%= f.label :set_due_date_before_closing_day -%>
43
38
  <%= f.check_box :set_due_date_before_closing_day -%>
@@ -33,11 +33,6 @@
33
33
  <%= f.text_field :reservation_limit, class: 'resource_integer' -%>
34
34
  </div>
35
35
 
36
- <div class="field">
37
- <%= f.label :reservation_expired_period -%><br />
38
- <%= f.text_field :reservation_expired_period, class: 'resource_integer' -%>
39
- </div>
40
-
41
36
  <div class="field">
42
37
  <%= f.label :set_due_date_before_closing_day -%>
43
38
  <%= f.check_box :set_due_date_before_closing_day -%>
@@ -38,11 +38,6 @@
38
38
  <%= @user_group_has_checkout_type.reservation_limit -%>
39
39
  </p>
40
40
 
41
- <p>
42
- <strong><%= t('activerecord.attributes.user_group_has_checkout_type.reservation_expired_period') -%>:</strong>
43
- <%= @user_group_has_checkout_type.reservation_expired_period -%>
44
- </p>
45
-
46
41
  <p>
47
42
  <strong><%= t('activerecord.attributes.user_group_has_checkout_type.set_due_date_before_closing_day') -%>:</strong>
48
43
  <%= localized_boolean(@user_group_has_checkout_type.set_due_date_before_closing_day) -%>
@@ -14,8 +14,6 @@
14
14
  <br />
15
15
  <%= checkout_form.label :reservation_limit -%>
16
16
  <%= checkout_form.text_field :reservation_limit, class: 'resource_integer' %>
17
- <%= checkout_form.label :reservation_expired_period -%>
18
- <%= checkout_form.text_field :reservation_expired_period, class: 'resource_integer' %>
19
17
  <%= checkout_form.label :set_due_date_before_closing_day -%>
20
18
  <%= checkout_form.check_box :set_due_date_before_closing_day %>
21
19
  <% end %>
@@ -75,12 +75,12 @@ ja:
75
75
  note: 注記
76
76
  position: 位置
77
77
  user_group_id: 利用者グループ
78
- checkout_type_id: 貸出種別
78
+ checkout_type_id: 貸出区分
79
79
  current_checkout_count: 現在の貸出数
80
80
  carrier_type_has_checkout_type:
81
81
  note: 注記
82
82
  position: 位置
83
- checkout_type_id: 貸出種別
83
+ checkout_type_id: 貸出区分
84
84
  manifestation_checkout_stat:
85
85
  start_date: 開始日
86
86
  end_date: 終了日
@@ -117,7 +117,7 @@ ja:
117
117
  note: 注記
118
118
  position: 位置
119
119
  item:
120
- checkout_type: 貸出種別
120
+ checkout_type: 貸出区分
121
121
  circulation_status: 貸出状態
122
122
  profile:
123
123
  checkout_icalendar_token: 貸出iCalendarのトークン
@@ -1,6 +1,4 @@
1
- require "enju_biblio"
2
- require "enju_library"
3
- require "enju_message"
1
+ require "enju_leaf"
4
2
  require "enju_event"
5
3
 
6
4
  module EnjuCirculation
@@ -27,10 +27,12 @@ module EnjuCirculation
27
27
  include InstanceMethods
28
28
  has_many :reserves, :foreign_key => :manifestation_id
29
29
 
30
- scope :for_checkout, -> { includes(:circulation_status, :use_restriction).where(
30
+ scope :for_checkout, ->(identifier_conditions = 'item_identifier IS NOT NULL') {
31
+ includes(:circulation_status, :use_restriction).where(
31
32
  'circulation_statuses.name' => FOR_CHECKOUT_CIRCULATION_STATUS,
32
33
  'use_restrictions.name' => FOR_CHECKOUT_USE_RESTRICTION
33
- ).where('item_identifier IS NOT NULL') }
34
+ ).where(identifier_conditions)
35
+ }
34
36
  scope :removed, -> { includes(:circulation_status).where('circulation_statuses.name' => 'Removed') }
35
37
  has_many :checkouts
36
38
  has_many :reserves
@@ -1,3 +1,3 @@
1
1
  module EnjuCirculation
2
- VERSION = "0.1.0.pre47"
2
+ VERSION = "0.1.0.pre48"
3
3
  end
@@ -0,0 +1,21 @@
1
+ module EnjuCirculation
2
+ module EnjuWithdraw
3
+ def self.included(base)
4
+ base.extend ClassMethods
5
+ end
6
+
7
+ module ClassMethods
8
+ def enju_circulation_withdraw_model
9
+ include InstanceMethods
10
+ before_save :withdraw!, on: :create
11
+ end
12
+ end
13
+
14
+ module InstanceMethods
15
+ def withdraw!
16
+ circulation_status = CirculationStatus.where(name: 'Removed').first
17
+ item.update_column(:circulation_status_id, circulation_status.id) if circulation_status
18
+ end
19
+ end
20
+ end
21
+ end
@@ -7,6 +7,7 @@ require "enju_circulation/profile"
7
7
  require "enju_circulation/accept"
8
8
  require "enju_circulation/basket"
9
9
  require "enju_circulation/carrier_type"
10
+ require "enju_circulation/withdraw"
10
11
  require "enju_circulation/controller"
11
12
  require "enju_circulation/helper"
12
13
 
@@ -22,4 +23,5 @@ ActiveRecord::Base.send :include, EnjuCirculation::EnjuProfile
22
23
  ActiveRecord::Base.send :include, EnjuCirculation::EnjuAccept
23
24
  ActiveRecord::Base.send :include, EnjuCirculation::EnjuBasket
24
25
  ActiveRecord::Base.send :include, EnjuCirculation::EnjuCarrierType
26
+ ActiveRecord::Base.send :include, EnjuCirculation::EnjuWithdraw
25
27
  ActionView::Base.send :include, EnjuCirculation::ManifestationsHelper
@@ -353,7 +353,7 @@ describe ReservesController do
353
353
  it "redirects to the created reserve" do
354
354
  post :create, :reserve => @attrs
355
355
  response.should redirect_to(assigns(:reserve))
356
- assigns(:reserve).expired_at.should be_truthy
356
+ assigns(:reserve).expired_at.should be_nil
357
357
  end
358
358
  end
359
359
 
@@ -379,7 +379,7 @@ describe ReservesController do
379
379
 
380
380
  it "should create other user's reserve" do
381
381
  post :create, :reserve => {:user_number => users(:user1).profile.user_number, :manifestation_id => 5}
382
- assigns(:reserve).expired_at.should be_truthy
382
+ assigns(:reserve).expired_at.should be_nil
383
383
  response.should redirect_to reserve_url(assigns(:reserve))
384
384
  end
385
385
 
@@ -407,7 +407,7 @@ describe ReservesController do
407
407
  it "redirects to the created reserve" do
408
408
  post :create, :reserve => @attrs
409
409
  response.should redirect_to(assigns(:reserve))
410
- assigns(:reserve).expired_at.should be_truthy
410
+ assigns(:reserve).expired_at.should be_nil
411
411
  end
412
412
 
413
413
  it "should send accepted messages" do
@@ -434,7 +434,7 @@ describe ReservesController do
434
434
  it "should create other user's reserve" do
435
435
  post :create, :reserve => {:user_number => users(:user1).profile.user_number, :manifestation_id => 5}
436
436
  assigns(:reserve).should be_valid
437
- assigns(:reserve).expired_at.should be_truthy
437
+ assigns(:reserve).expired_at.should be_nil
438
438
  response.should redirect_to reserve_url(assigns(:reserve))
439
439
  end
440
440
 
@@ -456,7 +456,7 @@ describe ReservesController do
456
456
  it "redirects to the created reserve" do
457
457
  post :create, :reserve => @attrs
458
458
  response.should redirect_to(assigns(:reserve))
459
- assigns(:reserve).expired_at.should be > Time.zone.now
459
+ assigns(:reserve).expired_at.should be_nil
460
460
  end
461
461
  end
462
462
 
@@ -31,14 +31,16 @@ describe UserCheckoutStatsController do
31
31
 
32
32
  it "assigns all user_checkout_stats as @user_checkout_stats" do
33
33
  get :index
34
- assigns(:user_checkout_stats).should eq(UserCheckoutStat.order('id DESC').page(1))
34
+ assigns(:user_checkout_stats).should be_empty
35
+ response.should be_forbidden
35
36
  end
36
37
  end
37
38
 
38
39
  describe "When not logged in" do
39
40
  it "should not assign user_checkout_stats as @user_checkout_stats" do
40
41
  get :index
41
- assigns(:user_checkout_stats).should eq(UserCheckoutStat.order('id DESC').page(1))
42
+ assigns(:user_checkout_stats).should be_empty
43
+ response.should redirect_to(new_user_session_url)
42
44
  end
43
45
  end
44
46
  end
@@ -71,6 +73,7 @@ describe UserCheckoutStatsController do
71
73
  user_checkout_stat = FactoryGirl.create(:user_checkout_stat)
72
74
  get :show, :id => user_checkout_stat.id
73
75
  assigns(:user_checkout_stat).should eq(user_checkout_stat)
76
+ response.should be_forbidden
74
77
  end
75
78
  end
76
79
 
@@ -79,6 +82,7 @@ describe UserCheckoutStatsController do
79
82
  user_checkout_stat = FactoryGirl.create(:user_checkout_stat)
80
83
  get :show, :id => user_checkout_stat.id
81
84
  assigns(:user_checkout_stat).should eq(user_checkout_stat)
85
+ response.should redirect_to(new_user_session_url)
82
86
  end
83
87
  end
84
88
  end
@@ -31,14 +31,16 @@ describe UserReserveStatsController do
31
31
 
32
32
  it "assigns all user_reserve_stats as @user_reserve_stats" do
33
33
  get :index
34
- assigns(:user_reserve_stats).should eq(UserReserveStat.order('id DESC').page(1))
34
+ assigns(:user_reserve_stats).should be_empty
35
+ response.should be_forbidden
35
36
  end
36
37
  end
37
38
 
38
39
  describe "When not logged in" do
39
40
  it "should not assign user_reserve_stats as @user_reserve_stats" do
40
41
  get :index
41
- assigns(:user_reserve_stats).should eq(UserReserveStat.order('id DESC').page(1))
42
+ assigns(:user_reserve_stats).should be_empty
43
+ response.should redirect_to(new_user_session_url)
42
44
  end
43
45
  end
44
46
  end
@@ -71,6 +73,7 @@ describe UserReserveStatsController do
71
73
  user_reserve_stat = FactoryGirl.create(:user_reserve_stat)
72
74
  get :show, :id => user_reserve_stat.id
73
75
  assigns(:user_reserve_stat).should eq(user_reserve_stat)
76
+ response.should be_forbidden
74
77
  end
75
78
  end
76
79
 
@@ -79,6 +82,7 @@ describe UserReserveStatsController do
79
82
  user_reserve_stat = FactoryGirl.create(:user_reserve_stat)
80
83
  get :show, :id => user_reserve_stat.id
81
84
  assigns(:user_reserve_stat).should eq(user_reserve_stat)
85
+ response.should redirect_to(new_user_session_url)
82
86
  end
83
87
  end
84
88
  end
@@ -17,4 +17,11 @@ describe "reserves/index" do
17
17
  assert_select "tr>td:nth-child(2)", :text => /#{reserves(:reserve_00001).user.username}/
18
18
  assert_select "tr>td:nth-child(2)", :text => /#{reserves(:reserve_00002).manifestation.original_title}/
19
19
  end
20
+
21
+ it "renders a list of reserves when a reserve does not have expired_at" do
22
+ reserve = FactoryGirl.create(:reserve, :expired_at => nil)
23
+ assign(:reserves, Reserve.page(2))
24
+ render
25
+ rendered.should match /<td/
26
+ end
20
27
  end
metadata CHANGED
@@ -1,57 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enju_circulation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre47
4
+ version: 0.1.0.pre48
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kosuke Tanabe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-20 00:00:00.000000000 Z
11
+ date: 2015-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: enju_biblio
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: 0.1.0.pre67
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: 0.1.0.pre67
27
- - !ruby/object:Gem::Dependency
28
- name: enju_library
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: 0.1.0.pre42
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: 0.1.0.pre42
41
- - !ruby/object:Gem::Dependency
42
- name: enju_message
14
+ name: enju_leaf
43
15
  requirement: !ruby/object:Gem::Requirement
44
16
  requirements:
45
17
  - - "~>"
46
18
  - !ruby/object:Gem::Version
47
- version: 0.1.14.pre25
19
+ version: 1.1.0.rc20
48
20
  type: :runtime
49
21
  prerelease: false
50
22
  version_requirements: !ruby/object:Gem::Requirement
51
23
  requirements:
52
24
  - - "~>"
53
25
  - !ruby/object:Gem::Version
54
- version: 0.1.14.pre25
26
+ version: 1.1.0.rc20
55
27
  - !ruby/object:Gem::Dependency
56
28
  name: enju_event
57
29
  requirement: !ruby/object:Gem::Requirement
@@ -66,20 +38,6 @@ dependencies:
66
38
  - - "~>"
67
39
  - !ruby/object:Gem::Version
68
40
  version: 0.1.17.pre26
69
- - !ruby/object:Gem::Dependency
70
- name: enju_leaf
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: 1.1.0.rc19
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: 1.1.0.rc19
83
41
  - !ruby/object:Gem::Dependency
84
42
  name: sqlite3
85
43
  requirement: !ruby/object:Gem::Requirement
@@ -98,16 +56,16 @@ dependencies:
98
56
  name: mysql2
99
57
  requirement: !ruby/object:Gem::Requirement
100
58
  requirements:
101
- - - ">="
59
+ - - "~>"
102
60
  - !ruby/object:Gem::Version
103
- version: '0'
61
+ version: 0.3.20
104
62
  type: :development
105
63
  prerelease: false
106
64
  version_requirements: !ruby/object:Gem::Requirement
107
65
  requirements:
108
- - - ">="
66
+ - - "~>"
109
67
  - !ruby/object:Gem::Version
110
- version: '0'
68
+ version: 0.3.20
111
69
  - !ruby/object:Gem::Dependency
112
70
  name: pg
113
71
  requirement: !ruby/object:Gem::Requirement
@@ -384,7 +342,6 @@ files:
384
342
  - app/views/manifestation_reserve_stats/new.html.erb
385
343
  - app/views/manifestation_reserve_stats/show.html.erb
386
344
  - app/views/manifestation_reserve_stats/show.txt.erb
387
- - app/views/my_accounts/_feed_token.html.erb
388
345
  - app/views/profiles/_feed_token.html.erb
389
346
  - app/views/reserves/_form.html.erb
390
347
  - app/views/reserves/_new.html.erb
@@ -485,6 +442,7 @@ files:
485
442
  - lib/enju_circulation/user.rb
486
443
  - lib/enju_circulation/user_group.rb
487
444
  - lib/enju_circulation/version.rb
445
+ - lib/enju_circulation/withdraw.rb
488
446
  - lib/generators/enju_circulation/setup/USAGE
489
447
  - lib/generators/enju_circulation/setup/setup_generator.rb
490
448
  - lib/generators/enju_circulation/setup/templates/config/schedule.rb
@@ -1,14 +0,0 @@
1
- <%- if @user.profile.try(:checkout_icalendar_token?) -%>
2
- <%= checkouts_url(icalendar_token: @user.profile.checkout_icalendar_token, format: :ics) -%>
3
- <%= hidden_field_tag 'user.profile.checkout_icalendar_token]', @user.profile.checkout_icalendar_token -%>
4
- <%- end -%>
5
- <br />
6
- <%- if @user.profile.try(:checkout_icalendar_token?) -%>
7
- <input onclick="$.ajax({data:'authenticity_token=' + encodeURIComponent('<%= form_authenticity_token %>'), success:function(request){$('#feed_token').html(request);}, type:'get', url:'<%= edit_my_account_path(@user, disable: true, mode: 'feed_token') %>'});" type="button" value="<%= t('page.delete') %>" />
8
- <br />
9
- <%= t('user.you_have_to_save_profile_to_activate_feed_url') -%>
10
- <%- else -%>
11
- <input onclick="$.ajax({data:'authenticity_token=' + encodeURIComponent('<%= form_authenticity_token %>'), success:function(request){$('#feed_token').html(request);}, type:'get', url:'<%= edit_my_account_path(@user, mode: 'feed_token') %>'});" type="button" value="<%= t('page.reset') %>" />
12
- <br />
13
- <%= t('user.you_have_to_save_profile_to_deactivate_feed_url') -%>
14
- <%- end -%>