enju_flower 0.1.0.pre2 → 0.1.0.pre3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/resources.js +2 -0
- data/app/assets/stylesheets/resources.css +4 -0
- data/app/controllers/resources_controller.rb +5 -0
- data/app/helpers/manifestations_helper.rb +2 -2
- data/app/helpers/resources_helper.rb +2 -0
- data/app/views/manifestations/_manifestation.html.erb +36 -38
- data/app/views/manifestations/_show_detail_librarian.html.erb +1 -1
- data/app/views/resources/index.html.erb +7 -0
- data/lib/enju_flower/version.rb +1 -1
- data/spec/dummy/app/controllers/application_controller.rb +0 -4
- data/spec/dummy/app/models/ability.rb +197 -176
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/solr/data/test/index/_6m.fdt +0 -0
- data/spec/dummy/solr/data/test/index/_6m.fdx +0 -0
- data/spec/dummy/solr/data/test/index/_6m.fnm +7 -0
- data/spec/dummy/solr/data/test/index/_6m.frq +0 -0
- data/spec/dummy/solr/data/test/index/_6m.nrm +1 -0
- data/spec/dummy/solr/data/test/index/_6m.prx +0 -0
- data/spec/dummy/solr/data/test/index/_6m.tii +0 -0
- data/spec/dummy/solr/data/test/index/_6m.tis +0 -0
- data/spec/dummy/solr/data/test/index/_6n.fdt +0 -0
- data/spec/dummy/solr/data/test/index/_6n.fdx +0 -0
- data/spec/dummy/solr/data/test/index/_6n.fnm +7 -0
- data/spec/dummy/solr/data/test/index/_6n.frq +0 -0
- data/spec/dummy/solr/data/test/index/_6n.nrm +1 -0
- data/spec/dummy/solr/data/test/index/_6n.prx +0 -0
- data/spec/dummy/solr/data/test/index/_6n.tii +0 -0
- data/spec/dummy/solr/data/test/index/_6n.tis +0 -0
- data/spec/dummy/solr/data/test/index/_6o.fdt +0 -0
- data/spec/dummy/solr/data/test/index/_6o.fdx +0 -0
- data/spec/dummy/solr/data/test/index/_6o.fnm +8 -0
- data/spec/dummy/solr/data/test/index/_6o.frq +0 -0
- data/spec/dummy/solr/data/test/index/_6o.nrm +1 -0
- data/spec/dummy/solr/data/test/index/_6o.prx +0 -0
- data/spec/dummy/solr/data/test/index/_6o.tii +0 -0
- data/spec/dummy/solr/data/test/index/_6o.tis +0 -0
- data/spec/dummy/solr/data/test/index/segments.gen +0 -0
- data/spec/dummy/solr/data/test/index/segments_90 +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/dummy/tmp/cache/4F7/F90/default_role +0 -0
- data/spec/dummy/tmp/cache/6E4/420/search_engine_all +0 -0
- metadata +73 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0b67bcc42aea036dcf1a3ae592ec5369debff97
|
4
|
+
data.tar.gz: ea1aee2c43cb55feef5aa907544e5b73feef0127
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cef87f7a9881875c70e86223c253a237148b587d421bd4f00434171e57694a62d805bfc5e9a5ae40ffbcae57495c298ed7fa00820115510fbb65f76c1f1d0634
|
7
|
+
data.tar.gz: 41918aedf564f893a4b656b39eda2ef896912eab76661dbd3f13107555cdabc254f5977d37a3cb29e23f5c565ea939bb0160109aef12fea723ffd123deb77091
|
@@ -69,10 +69,10 @@ module ManifestationsHelper
|
|
69
69
|
current = true if languages.include?(language.name)
|
70
70
|
if current
|
71
71
|
content_tag :strong do
|
72
|
-
link_to("#{language.display_name.localize} (" + facet.count.to_s + ")", url_for(params.merge(:page => nil, :language => language.name, :
|
72
|
+
link_to("#{language.display_name.localize} (" + facet.count.to_s + ")", url_for(params.merge(:page => nil, :language => language.name, :view => nil, :only_path => true)))
|
73
73
|
end
|
74
74
|
else
|
75
|
-
link_to("#{language.display_name.localize} (" + facet.count.to_s + ")", url_for(params.merge(:page => nil, :language => language.name, :
|
75
|
+
link_to("#{language.display_name.localize} (" + facet.count.to_s + ")", url_for(params.merge(:page => nil, :language => language.name, :view => nil, :only_path => true)))
|
76
76
|
end
|
77
77
|
end
|
78
78
|
|
@@ -1,10 +1,10 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
<tr class="line<%= cycle("0", "1") -%>">
|
2
|
+
<td style="width: 30px"><%= @manifestations.offset_value + 1 + manifestation_counter -%></td>
|
3
|
+
<% cache([:manifestation => manifestation.id, :fragment => 'manifestation_html', :role => current_user_role_name, :locale => @locale]) do %>
|
3
4
|
<td style="480px">
|
4
5
|
<% if manifestation.root_of_series? %>
|
5
6
|
<%= render 'manifestations/show_series_index', :manifestation => manifestation -%>
|
6
7
|
<% else %>
|
7
|
-
<% cache([:manifestation => manifestation.id, :fragment => 'manifestation_html', :role => current_user_role_name, :locale => @locale]) do %>
|
8
8
|
<%= render 'manifestations/show_index', :manifestation => manifestation -%>
|
9
9
|
<div class="access_address">
|
10
10
|
<%= link_to manifestation.access_address, manifestation.access_address if manifestation.access_address.present? -%>
|
@@ -19,14 +19,11 @@
|
|
19
19
|
<%= render 'manifestations/show_tag', :manifestation => manifestation -%>
|
20
20
|
<% end %>
|
21
21
|
<%= render 'manifestations/holding', :manifestation => manifestation -%>
|
22
|
-
<%# グループ表示の部分テンプレート %>
|
23
|
-
<%= render 'manifestations/show_group', :manifestation => manifestation -%>
|
24
|
-
<% end %>
|
25
22
|
<% end %>
|
26
23
|
</td>
|
27
|
-
<% if
|
28
|
-
|
29
|
-
|
24
|
+
<% if signed_in? %>
|
25
|
+
<td id="edit_icons">
|
26
|
+
<% if defined?(EnjuCirculation) %>
|
30
27
|
<% unless params[:mode] == 'add' %>
|
31
28
|
<% if manifestation.is_reservable_by?(current_user) %>
|
32
29
|
<%- reserve = manifestation.is_reserved_by?(current_user) -%>
|
@@ -38,36 +35,37 @@
|
|
38
35
|
<% end %>
|
39
36
|
<br />
|
40
37
|
<% end %>
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
38
|
+
<% end %>
|
39
|
+
<%- if can? :update, manifestation -%>
|
40
|
+
<% unless params[:mode] == 'add' %>
|
41
|
+
<%= link_to image_tag('icons/book_edit.png', :size => '16x16', :alt => t('page.edit')), edit_manifestation_path(manifestation) -%>
|
42
|
+
<% if @series_statement %>
|
43
|
+
<% if manifestation.series_statement == @series_statement %>
|
44
|
+
<%= link_to t('page.destroy'), series_statement_series_has_manifestation_path(manifestation.series_statement, manifestation.series_has_manifestation), :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
|
48
45
|
<% end %>
|
49
|
-
<%
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
<% when @manifestation %>
|
62
|
-
<%= link_to t('page.add'), new_manifestation_manifestation_relationship_path(@manifestation, :child_id => manifestation.id) unless @manifestation.derived_manifestations.include?(manifestation) or @manifestation == manifestation -%>
|
63
|
-
<% when @item %>
|
64
|
-
<%= link_to t('page.change'), edit_exemplify_path(@item.exemplify, :manifestation_id => manifestation.id) unless @item.manifestation == manifestation -%>
|
65
|
-
<% else %>
|
66
|
-
<%= link_to image_tag('icons/arrow_divide.png', :size => '16x16', :alt => t('manifestation.add_derivation')), manifestation_manifestations_path(manifestation, :mode => 'add') -%>
|
46
|
+
<% end %>
|
47
|
+
<% else %>
|
48
|
+
<% case %>
|
49
|
+
<% when @index_patron[:creator] %>
|
50
|
+
<%= link_to t('page.add'), new_patron_create_path(@index_patron[:creator], :work_id => manifestation.id) unless manifestation.creators.include?(@index_patron[:creator]) -%>
|
51
|
+
<% when @index_patron[:contributor] %>
|
52
|
+
<%= link_to t('page.add'), new_patron_realize_path(@index_patron[:contributor], :expression_id => manifestation.id) unless manifestation.contributors.include?(@index_patron[:contributor]) -%>
|
53
|
+
<% when @index_patron[:publisher] %>
|
54
|
+
<%= link_to t('page.add'), new_patron_produce_path(@index_patron[:publisher], :manifestation_id => manifestation.id) unless manifestation.publishers.include?(@index_patron[:publisher]) -%>
|
55
|
+
<% when @series_statement %>
|
56
|
+
<% unless manifestation.series_statement -%>
|
57
|
+
<%= link_to t('page.add'), new_series_has_manifestation_path(:series_statement_id => @series_statement.id, :manifestation_id => manifestation.id) -%>
|
67
58
|
<% end %>
|
68
|
-
|
59
|
+
<% when @manifestation %>
|
60
|
+
<%= link_to t('page.add'), new_manifestation_manifestation_relationship_path(@manifestation, :child_id => manifestation.id) unless @manifestation.derived_manifestations.include?(manifestation) or @manifestation == manifestation -%>
|
61
|
+
<% when @item %>
|
62
|
+
<%= link_to t('page.change'), edit_exemplify_path(@item.exemplify, :manifestation_id => manifestation.id) unless @item.manifestation == manifestation -%>
|
63
|
+
<% else %>
|
64
|
+
<%= link_to image_tag('icons/arrow_divide.png', :size => '16x16', :alt => t('manifestation.add_derivation')), manifestation_manifestations_path(manifestation, :mode => 'add') -%>
|
65
|
+
<% end %>
|
69
66
|
<%- end -%>
|
70
|
-
|
71
|
-
|
67
|
+
<%- end -%>
|
68
|
+
</td>
|
72
69
|
<% end %>
|
73
|
-
|
70
|
+
<% end %>
|
71
|
+
</tr>
|
data/lib/enju_flower/version.rb
CHANGED
@@ -51,10 +51,6 @@ class ApplicationController < ActionController::Base
|
|
51
51
|
Sunspot.commit
|
52
52
|
end
|
53
53
|
|
54
|
-
def current_ability
|
55
|
-
@current_ability ||= Ability.new(current_user, request.remote_ip)
|
56
|
-
end
|
57
|
-
|
58
54
|
def move_position(resource, direction, redirect = true)
|
59
55
|
if ['higher', 'lower'].include?(direction)
|
60
56
|
resource.send("move_#{direction}")
|
@@ -1,186 +1,207 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
#module EnjuBiblio
|
2
|
+
class Ability
|
3
|
+
include CanCan::Ability
|
3
4
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
can [:read, :update], Frequency
|
15
|
-
can [:read, :update], FormOfWork
|
16
|
-
can [:read, :create, :update], Item
|
17
|
-
can :destroy, Item do |item|
|
18
|
-
item.deletable?
|
19
|
-
end
|
20
|
-
can :manage, ImportRequest
|
21
|
-
can [:read, :update], Language
|
22
|
-
can [:read, :update], License
|
23
|
-
can [:read, :create, :update], Manifestation
|
24
|
-
can :destroy, Manifestation do |manifestation|
|
25
|
-
if defined?(EnjuCirculation)
|
26
|
-
manifestation.items.empty? and !manifestation.periodical_master? and !manifestation.is_reserved?
|
27
|
-
else
|
28
|
-
manifestation.items.empty? and !manifestation.periodical_master?
|
5
|
+
def initialize(user, ip_address = '0.0.0.0')
|
6
|
+
case user.try(:role).try(:name)
|
7
|
+
when 'Administrator'
|
8
|
+
can [:read, :create, :update], CarrierType
|
9
|
+
can [:destroy, :delete], CarrierType do |carrier_type|
|
10
|
+
true unless carrier_type.manifestations.exists?
|
11
|
+
end if LibraryGroup.site_config.network_access_allowed?(ip_address)
|
12
|
+
can [:read, :create, :update], Item
|
13
|
+
can [:destroy, :delete], Item do |item|
|
14
|
+
item.removable?
|
29
15
|
end
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
can [:read, :create, :update], Patron
|
34
|
-
can :destroy, Patron do |patron|
|
35
|
-
true
|
36
|
-
end
|
37
|
-
can :manage, CarrierType
|
38
|
-
can :manage, PatronImportFile
|
39
|
-
can :read, PatronImportResult
|
40
|
-
can :manage, PatronRelationship
|
41
|
-
can :manage, PatronRelationshipType
|
42
|
-
can [:read, :update], PatronType
|
43
|
-
can :manage, PictureFile
|
44
|
-
can :manage, Produce
|
45
|
-
can :manage, ProduceType
|
46
|
-
can :manage, ManifestationRelationship
|
47
|
-
can :manage, ManifestationRelationshipType
|
48
|
-
can :manage, Realize
|
49
|
-
can :manage, RealizeType
|
50
|
-
can :manage, ResourceImportFile
|
51
|
-
can :read, ResourceImportResult
|
52
|
-
can :manage, SeriesHasManifestation
|
53
|
-
can :manage, SeriesStatement
|
54
|
-
can :manage, SeriesStatementRelationship
|
55
|
-
when 'Librarian'
|
56
|
-
can [:read, :update], CarrierType
|
57
|
-
can :read, ContentType
|
58
|
-
can :read, Country
|
59
|
-
can :manage, Create
|
60
|
-
can :manage, Donate
|
61
|
-
can :manage, Exemplify
|
62
|
-
can :read, Extent
|
63
|
-
can :read, Frequency
|
64
|
-
can :read, FormOfWork
|
65
|
-
can :manage, ImportRequest
|
66
|
-
can [:read, :create, :update], Item
|
67
|
-
can :destroy, Item do |item|
|
68
|
-
if defined?(EnjuCirculation)
|
69
|
-
item.checkouts.not_returned.empty?
|
70
|
-
else
|
71
|
-
true
|
16
|
+
can [:read, :create, :update], Manifestation
|
17
|
+
can [:destroy, :delete], Manifestation do |manifestation|
|
18
|
+
manifestation.items.empty? and !manifestation.periodical_master?
|
72
19
|
end
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
20
|
+
can :manage, [
|
21
|
+
Create,
|
22
|
+
CreateType,
|
23
|
+
Donate,
|
24
|
+
Exemplify,
|
25
|
+
ImportRequest,
|
26
|
+
ManifestationRelationship,
|
27
|
+
ManifestationRelationshipType,
|
28
|
+
Own,
|
29
|
+
Patron,
|
30
|
+
PatronImportFile,
|
31
|
+
PatronRelationship,
|
32
|
+
PatronRelationshipType,
|
33
|
+
PictureFile,
|
34
|
+
Produce,
|
35
|
+
ProduceType,
|
36
|
+
Realize,
|
37
|
+
RealizeType,
|
38
|
+
ResourceImportFile,
|
39
|
+
SeriesStatement,
|
40
|
+
SeriesStatementRelationship,
|
41
|
+
SeriesHasManifestation
|
42
|
+
]
|
43
|
+
can :update, [
|
44
|
+
ContentType,
|
45
|
+
Country,
|
46
|
+
Extent,
|
47
|
+
Frequency,
|
48
|
+
FormOfWork,
|
49
|
+
Language,
|
50
|
+
License,
|
51
|
+
MediumOfPerformance,
|
52
|
+
PatronType,
|
53
|
+
RequestStatusType,
|
54
|
+
RequestType
|
55
|
+
] if LibraryGroup.site_config.network_access_allowed?(ip_address)
|
56
|
+
can :read, [
|
57
|
+
CarrierType,
|
58
|
+
ContentType,
|
59
|
+
Country,
|
60
|
+
Extent,
|
61
|
+
Frequency,
|
62
|
+
FormOfWork,
|
63
|
+
Language,
|
64
|
+
License,
|
65
|
+
MediumOfPerformance,
|
66
|
+
PatronImportResult,
|
67
|
+
PatronType,
|
68
|
+
RequestStatusType,
|
69
|
+
RequestType,
|
70
|
+
ResourceImportResult
|
71
|
+
]
|
72
|
+
when 'Librarian'
|
73
|
+
can :manage, Item
|
74
|
+
can :index, Manifestation
|
75
|
+
can [:show, :create, :update], Manifestation
|
76
|
+
can [:destroy, :delete], Manifestation do |manifestation|
|
81
77
|
manifestation.items.empty? and !manifestation.periodical_master?
|
82
78
|
end
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
can [:index, :create], Patron
|
87
|
-
can [:show, :update, :destroy], Patron do |patron|
|
88
|
-
patron.required_role_id <= 3
|
89
|
-
end
|
90
|
-
can :manage, PatronImportFile
|
91
|
-
can :read, PatronImportResult
|
92
|
-
can :manage, PatronRelationship
|
93
|
-
can :read, PatronRelationshipType
|
94
|
-
can :read, PatronType
|
95
|
-
can :manage, PictureFile
|
96
|
-
can :manage, Produce
|
97
|
-
can :manage, ManifestationRelationship
|
98
|
-
can :read, ManifestationRelationshipType
|
99
|
-
can :manage, Realize
|
100
|
-
can :manage, ResourceImportFile
|
101
|
-
can :read, ResourceImportResult
|
102
|
-
can :manage, SeriesHasManifestation
|
103
|
-
can :manage, SeriesStatement
|
104
|
-
can :manage, SeriesStatementRelationship
|
105
|
-
when 'User'
|
106
|
-
can :read, CarrierType
|
107
|
-
can :read, ContentType
|
108
|
-
can :read, Country
|
109
|
-
can :read, Create
|
110
|
-
can :read, Exemplify
|
111
|
-
can :read, Extent
|
112
|
-
can :read, Frequency
|
113
|
-
can :read, FormOfWork
|
114
|
-
can :index, Item
|
115
|
-
can :show, Item do |item|
|
116
|
-
item.required_role_id <= 2
|
117
|
-
end
|
118
|
-
can :read, Language
|
119
|
-
can :read, License
|
120
|
-
can [:read, :edit], Manifestation do |manifestation|
|
121
|
-
manifestation.required_role_id <= 2
|
122
|
-
end
|
123
|
-
can :read, ManifestationRelationship
|
124
|
-
can :read, ManifestationRelationshipType
|
125
|
-
can :read, MediumOfPerformance
|
126
|
-
can :read, Own
|
127
|
-
can :index, Patron
|
128
|
-
can :show, Patron do |patron|
|
129
|
-
true if patron.required_role_id <= 2
|
130
|
-
end
|
131
|
-
can :read, PatronRelationship
|
132
|
-
can :read, PatronRelationshipType
|
133
|
-
can :index, PictureFile
|
134
|
-
can :show, PictureFile do |picture_file|
|
135
|
-
begin
|
136
|
-
true if picture_file.picture_attachable.required_role_id <= 2
|
137
|
-
rescue NoMethodError
|
138
|
-
true
|
79
|
+
can [:index, :create], Patron
|
80
|
+
can :show, Patron do |patron|
|
81
|
+
patron.required_role_id <= 3
|
139
82
|
end
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
83
|
+
can [:update, :destroy, :delete], Patron do |patron|
|
84
|
+
!patron.user.try(:has_role?, 'Librarian') and patron.required_role_id <= 3
|
85
|
+
end
|
86
|
+
can :manage, [
|
87
|
+
Create,
|
88
|
+
Donate,
|
89
|
+
Exemplify,
|
90
|
+
ImportRequest,
|
91
|
+
ManifestationRelationship,
|
92
|
+
Own,
|
93
|
+
PatronImportFile,
|
94
|
+
PatronRelationship,
|
95
|
+
PictureFile,
|
96
|
+
Produce,
|
97
|
+
Realize,
|
98
|
+
ResourceImportFile,
|
99
|
+
SeriesStatement,
|
100
|
+
SeriesStatementRelationship,
|
101
|
+
SeriesHasManifestation
|
102
|
+
]
|
103
|
+
can :read, [
|
104
|
+
CarrierType,
|
105
|
+
ContentType,
|
106
|
+
Country,
|
107
|
+
Extent,
|
108
|
+
Frequency,
|
109
|
+
FormOfWork,
|
110
|
+
Language,
|
111
|
+
License,
|
112
|
+
ManifestationRelationshipType,
|
113
|
+
PatronImportResult,
|
114
|
+
PatronRelationshipType,
|
115
|
+
PatronType,
|
116
|
+
RequestStatusType,
|
117
|
+
RequestType,
|
118
|
+
ResourceImportResult,
|
119
|
+
MediumOfPerformance
|
120
|
+
]
|
121
|
+
when 'User'
|
122
|
+
can :index, Item
|
123
|
+
can :show, Item do |item|
|
124
|
+
item.required_role_id <= 2
|
125
|
+
end
|
126
|
+
can :index, Manifestation
|
127
|
+
can [:show, :edit], Manifestation do |manifestation|
|
128
|
+
manifestation.required_role_id <= 2
|
129
|
+
end
|
130
|
+
can :index, Patron
|
131
|
+
can :update, Patron do |patron|
|
132
|
+
patron.user == user
|
133
|
+
end
|
134
|
+
can :show, Patron do |patron|
|
135
|
+
#if patron.user == user
|
136
|
+
# true
|
137
|
+
#elsif patron.user != user
|
138
|
+
true if patron.required_role_id <= 2 #name == 'Administrator'
|
139
|
+
#end
|
140
|
+
end
|
141
|
+
can :index, PictureFile
|
142
|
+
can :show, PictureFile do |picture_file|
|
143
|
+
begin
|
144
|
+
true if picture_file.picture_attachable.required_role_id <= 2
|
145
|
+
rescue NoMethodError
|
146
|
+
true
|
147
|
+
end
|
148
|
+
end
|
149
|
+
can :read, [
|
150
|
+
CarrierType,
|
151
|
+
ContentType,
|
152
|
+
Country,
|
153
|
+
Create,
|
154
|
+
Exemplify,
|
155
|
+
Extent,
|
156
|
+
Frequency,
|
157
|
+
FormOfWork,
|
158
|
+
Language,
|
159
|
+
License,
|
160
|
+
ManifestationRelationship,
|
161
|
+
ManifestationRelationshipType,
|
162
|
+
MediumOfPerformance,
|
163
|
+
Own,
|
164
|
+
PatronRelationship,
|
165
|
+
PatronRelationshipType,
|
166
|
+
Produce,
|
167
|
+
Realize,
|
168
|
+
SeriesStatement,
|
169
|
+
SeriesHasManifestation
|
170
|
+
]
|
171
|
+
else
|
172
|
+
can :index, Manifestation
|
173
|
+
can :show, Manifestation do |manifestation|
|
174
|
+
manifestation.required_role_id == 1
|
175
|
+
end
|
176
|
+
can :index, Patron
|
177
|
+
can :show, Patron do |patron|
|
178
|
+
patron.required_role_id == 1 #name == 'Guest'
|
177
179
|
end
|
180
|
+
can :read, [
|
181
|
+
CarrierType,
|
182
|
+
ContentType,
|
183
|
+
Country,
|
184
|
+
Create,
|
185
|
+
Exemplify,
|
186
|
+
Extent,
|
187
|
+
Frequency,
|
188
|
+
FormOfWork,
|
189
|
+
Item,
|
190
|
+
Language,
|
191
|
+
License,
|
192
|
+
ManifestationRelationship,
|
193
|
+
ManifestationRelationshipType,
|
194
|
+
MediumOfPerformance,
|
195
|
+
Own,
|
196
|
+
PatronRelationship,
|
197
|
+
PatronRelationshipType,
|
198
|
+
PictureFile,
|
199
|
+
Produce,
|
200
|
+
Realize,
|
201
|
+
SeriesStatement,
|
202
|
+
SeriesHasManifestation
|
203
|
+
]
|
178
204
|
end
|
179
|
-
can :show, User
|
180
|
-
can :read, Produce
|
181
|
-
can :read, Realize
|
182
|
-
can :read, SeriesHasManifestation
|
183
|
-
can :read, SeriesStatement
|
184
205
|
end
|
185
206
|
end
|
186
|
-
end
|
207
|
+
#end
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,7 @@
|
|
1
|
+
����*idtype
|
2
|
+
class_nametitle_smconnect_title_sconnect_creator_sconnect_publisher_sisbn_smcarrier_type_s
|
3
|
+
library_sm
|
4
|
+
language_sitem_identifier_smshelf_smcreated_at_dupdated_at_dcreator_ids_imcontributor_ids_impublisher_ids_imitem_ids_imrequired_role_id_istart_page_i
|
5
|
+
end_page_inumber_of_pages_iseries_statement_id_irepository_content_b
|
6
|
+
creator_smsort_title_speriodical_bperiodical_master_b
|
7
|
+
title_textcreator_textcontributor_textpublisher_textitem_identifier_textaulast_textaufirst_textau_textbtitle_text isbn_textoriginal_manifestation_ids_imjtitle_textpub_date_dm
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
NRM�turxtuxutrtwsssuuvyrttrvrrtxtxswuywtrtyvywtuwwttptxy|||||||||||tuuu|||||||||||||||||||||||||||||||||wxwwx|||||||||||||||||||||||||||||||||||||||||||||wxwwx|||||||||||||||||||||||||||u|||||||||||||||||uvw|||||||x|||||||||||||||||||||||||||||||||||||||y||||||||||||w���|||||||||||||||||||||||||||||||||��|||||||||||w���|||||||||||||||||||||||||||||||||xy|||||||||||tuuu|||||||||||||||||||||||||||||||||turxtuxutrtwsssuuvyrttrvrrtxtxswuywtrtyvywtuwwttpt||||��|||||��||||||||||||||||||||||||||||||||||||||tu|||||||||||||||||||||||||||||||||||||||||||||||
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,7 @@
|
|
1
|
+
����*idtype
|
2
|
+
class_nametitle_smconnect_title_sconnect_creator_sconnect_publisher_sisbn_smcarrier_type_s
|
3
|
+
library_sm
|
4
|
+
language_sitem_identifier_smshelf_smcreated_at_dupdated_at_dcreator_ids_imcontributor_ids_impublisher_ids_imitem_ids_imrequired_role_id_istart_page_i
|
5
|
+
end_page_inumber_of_pages_iseries_statement_id_irepository_content_b
|
6
|
+
creator_smsort_title_speriodical_bperiodical_master_b
|
7
|
+
title_textcreator_textcontributor_textpublisher_textitem_identifier_textaulast_textaufirst_textau_textbtitle_text isbn_textoriginal_manifestation_ids_imjtitle_textpub_date_dm
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
NRM�xuuwuyutxxvxvxwtyvxwxxxvvtwwxvytwxwrwvxxyxuyxyuysx||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||xuuwuyutxxvxvxwtyvxwxxxvvtwwxvytwxwrwvxxyxuyxyuysx||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,8 @@
|
|
1
|
+
����2idtype
|
2
|
+
class_nametitle_smconnect_title_sconnect_creator_sconnect_publisher_sisbn_smcarrier_type_s
|
3
|
+
library_sm
|
4
|
+
language_sitem_identifier_smshelf_smcreated_at_dupdated_at_dcreator_ids_imcontributor_ids_impublisher_ids_imitem_ids_imrequired_role_id_istart_page_i
|
5
|
+
end_page_inumber_of_pages_iseries_statement_id_irepository_content_b
|
6
|
+
creator_smsort_title_speriodical_bperiodical_master_b
|
7
|
+
title_textcreator_textcontributor_textpublisher_textitem_identifier_textaulast_textaufirst_textau_textbtitle_text isbn_textoriginal_manifestation_ids_imjtitle_textpub_date_dmissn_sm issn_textvolume_number_iissue_number_iserial_number_iatitle_textdate_of_publication_d
|
8
|
+
pub_year_i
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
NRM�vruwvvuur|xutttttwwuuuuuuxx||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||xtt|uuutt||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||vruwvvuur|xu||tttwwuuuuuuxx|||||y|||��|||||||���������||||||||||||xw|||||||||||||||||||||||||y||||||||||||||||||||||||||tt|||||||||||||
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enju_flower
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.
|
4
|
+
version: 0.1.0.pre3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kosuke Tanabe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.2
|
19
|
+
version: '3.2'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.2
|
26
|
+
version: '3.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: sqlite3
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,28 +114,28 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - ~>
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.1.0.
|
117
|
+
version: 0.1.0.pre28
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - ~>
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0.1.0.
|
124
|
+
version: 0.1.0.pre28
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: enju_library
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - ~>
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.1.0.
|
131
|
+
version: 0.1.0.pre16
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - ~>
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.1.0.
|
138
|
+
version: 0.1.0.pre16
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: mobylette
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -157,7 +157,11 @@ executables: []
|
|
157
157
|
extensions: []
|
158
158
|
extra_rdoc_files: []
|
159
159
|
files:
|
160
|
+
- app/assets/javascripts/resources.js
|
161
|
+
- app/assets/stylesheets/resources.css
|
162
|
+
- app/controllers/resources_controller.rb
|
160
163
|
- app/helpers/manifestations_helper.rb
|
164
|
+
- app/helpers/resources_helper.rb
|
161
165
|
- app/views/manifestations/_all_facet.html.erb
|
162
166
|
- app/views/manifestations/_attachment_file.html.erb
|
163
167
|
- app/views/manifestations/_book_jacket.html.erb
|
@@ -225,6 +229,7 @@ files:
|
|
225
229
|
- app/views/page/_footer.mobile.erb
|
226
230
|
- app/views/page/add_on.html.erb
|
227
231
|
- app/views/page/msie_acceralator.builder
|
232
|
+
- app/views/resources/index.html.erb
|
228
233
|
- config/routes.rb
|
229
234
|
- lib/enju_flower/engine.rb
|
230
235
|
- lib/enju_flower/version.rb
|
@@ -452,6 +457,36 @@ files:
|
|
452
457
|
- spec/dummy/solr/conf/spellings.txt
|
453
458
|
- spec/dummy/solr/conf/stopwords.txt
|
454
459
|
- spec/dummy/solr/conf/synonyms.txt
|
460
|
+
- spec/dummy/solr/data/test/index/_6m.fdt
|
461
|
+
- spec/dummy/solr/data/test/index/_6m.fdx
|
462
|
+
- spec/dummy/solr/data/test/index/_6m.fnm
|
463
|
+
- spec/dummy/solr/data/test/index/_6m.frq
|
464
|
+
- spec/dummy/solr/data/test/index/_6m.nrm
|
465
|
+
- spec/dummy/solr/data/test/index/_6m.prx
|
466
|
+
- spec/dummy/solr/data/test/index/_6m.tii
|
467
|
+
- spec/dummy/solr/data/test/index/_6m.tis
|
468
|
+
- spec/dummy/solr/data/test/index/_6n.fdt
|
469
|
+
- spec/dummy/solr/data/test/index/_6n.fdx
|
470
|
+
- spec/dummy/solr/data/test/index/_6n.fnm
|
471
|
+
- spec/dummy/solr/data/test/index/_6n.frq
|
472
|
+
- spec/dummy/solr/data/test/index/_6n.nrm
|
473
|
+
- spec/dummy/solr/data/test/index/_6n.prx
|
474
|
+
- spec/dummy/solr/data/test/index/_6n.tii
|
475
|
+
- spec/dummy/solr/data/test/index/_6n.tis
|
476
|
+
- spec/dummy/solr/data/test/index/_6o.fdt
|
477
|
+
- spec/dummy/solr/data/test/index/_6o.fdx
|
478
|
+
- spec/dummy/solr/data/test/index/_6o.fnm
|
479
|
+
- spec/dummy/solr/data/test/index/_6o.frq
|
480
|
+
- spec/dummy/solr/data/test/index/_6o.nrm
|
481
|
+
- spec/dummy/solr/data/test/index/_6o.prx
|
482
|
+
- spec/dummy/solr/data/test/index/_6o.tii
|
483
|
+
- spec/dummy/solr/data/test/index/_6o.tis
|
484
|
+
- spec/dummy/solr/data/test/index/segments.gen
|
485
|
+
- spec/dummy/solr/data/test/index/segments_90
|
486
|
+
- spec/dummy/solr/data/test/spellchecker/segments.gen
|
487
|
+
- spec/dummy/solr/data/test/spellchecker/segments_1
|
488
|
+
- spec/dummy/tmp/cache/4F7/F90/default_role
|
489
|
+
- spec/dummy/tmp/cache/6E4/420/search_engine_all
|
455
490
|
- spec/factories/basket.rb
|
456
491
|
- spec/factories/carrier_type.rb
|
457
492
|
- spec/factories/content_type.rb
|
@@ -773,6 +808,36 @@ test_files:
|
|
773
808
|
- spec/dummy/solr/conf/spellings.txt
|
774
809
|
- spec/dummy/solr/conf/stopwords.txt
|
775
810
|
- spec/dummy/solr/conf/synonyms.txt
|
811
|
+
- spec/dummy/solr/data/test/index/_6m.fdt
|
812
|
+
- spec/dummy/solr/data/test/index/_6m.fdx
|
813
|
+
- spec/dummy/solr/data/test/index/_6m.fnm
|
814
|
+
- spec/dummy/solr/data/test/index/_6m.frq
|
815
|
+
- spec/dummy/solr/data/test/index/_6m.nrm
|
816
|
+
- spec/dummy/solr/data/test/index/_6m.prx
|
817
|
+
- spec/dummy/solr/data/test/index/_6m.tii
|
818
|
+
- spec/dummy/solr/data/test/index/_6m.tis
|
819
|
+
- spec/dummy/solr/data/test/index/_6n.fdt
|
820
|
+
- spec/dummy/solr/data/test/index/_6n.fdx
|
821
|
+
- spec/dummy/solr/data/test/index/_6n.fnm
|
822
|
+
- spec/dummy/solr/data/test/index/_6n.frq
|
823
|
+
- spec/dummy/solr/data/test/index/_6n.nrm
|
824
|
+
- spec/dummy/solr/data/test/index/_6n.prx
|
825
|
+
- spec/dummy/solr/data/test/index/_6n.tii
|
826
|
+
- spec/dummy/solr/data/test/index/_6n.tis
|
827
|
+
- spec/dummy/solr/data/test/index/_6o.fdt
|
828
|
+
- spec/dummy/solr/data/test/index/_6o.fdx
|
829
|
+
- spec/dummy/solr/data/test/index/_6o.fnm
|
830
|
+
- spec/dummy/solr/data/test/index/_6o.frq
|
831
|
+
- spec/dummy/solr/data/test/index/_6o.nrm
|
832
|
+
- spec/dummy/solr/data/test/index/_6o.prx
|
833
|
+
- spec/dummy/solr/data/test/index/_6o.tii
|
834
|
+
- spec/dummy/solr/data/test/index/_6o.tis
|
835
|
+
- spec/dummy/solr/data/test/index/segments.gen
|
836
|
+
- spec/dummy/solr/data/test/index/segments_90
|
837
|
+
- spec/dummy/solr/data/test/spellchecker/segments.gen
|
838
|
+
- spec/dummy/solr/data/test/spellchecker/segments_1
|
839
|
+
- spec/dummy/tmp/cache/4F7/F90/default_role
|
840
|
+
- spec/dummy/tmp/cache/6E4/420/search_engine_all
|
776
841
|
- spec/factories/basket.rb
|
777
842
|
- spec/factories/carrier_type.rb
|
778
843
|
- spec/factories/content_type.rb
|