fcrepo_admin 0.4.1 → 0.5.0
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 +4 -4
- data/HISTORY.rdoc +10 -2
- data/README.rdoc +59 -14
- data/app/controllers/fcrepo_admin/datastreams_controller.rb +8 -46
- data/app/controllers/fcrepo_admin/objects_controller.rb +1 -1
- data/app/views/fcrepo_admin/datastreams/_alert.html.erb +4 -0
- data/app/views/fcrepo_admin/datastreams/_content.html.erb +1 -1
- data/app/views/fcrepo_admin/datastreams/_datastreams_list.html.erb +3 -3
- data/app/views/fcrepo_admin/datastreams/_profile.html.erb +4 -5
- data/app/views/fcrepo_admin/datastreams/content.html.erb +2 -1
- data/app/views/fcrepo_admin/datastreams/edit.html.erb +4 -3
- data/app/views/fcrepo_admin/datastreams/history.html.erb +3 -8
- data/app/views/fcrepo_admin/datastreams/index.html.erb +4 -1
- data/app/views/fcrepo_admin/datastreams/upload.html.erb +4 -3
- data/app/views/fcrepo_admin/objects/_direct_permissions.html.erb +1 -1
- data/app/views/fcrepo_admin/objects/_permissions_list.html.erb +1 -1
- data/app/views/fcrepo_admin/objects/permissions.html.erb +8 -2
- data/app/views/fcrepo_admin/shared/_context_nav.html.erb +2 -2
- data/app/views/layouts/fcrepo_admin/datastreams.html.erb +5 -7
- data/app/views/layouts/fcrepo_admin/objects.html.erb +1 -1
- data/config/locales/fcrepo_admin.en.yml +33 -22
- data/config/routes.rb +5 -2
- data/lib/fcrepo_admin.rb +51 -1
- data/lib/fcrepo_admin/decorators/active_fedora/base_decorator.rb +33 -0
- data/lib/fcrepo_admin/decorators/active_fedora/datastream_decorator.rb +35 -0
- data/lib/fcrepo_admin/engine.rb +6 -0
- data/lib/fcrepo_admin/helpers/datastreams_helper_behavior.rb +132 -8
- data/lib/fcrepo_admin/helpers/objects_helper_behavior.rb +47 -8
- data/lib/fcrepo_admin/version.rb +1 -1
- data/spec/controllers/datastreams_controller_spec.rb +53 -29
- data/spec/controllers/objects_controller_spec.rb +1 -1
- data/spec/features/datastreams/content.html.erb_spec.rb +7 -0
- data/spec/features/datastreams/edit.html.erb_spec.rb +1 -1
- data/spec/features/datastreams/index.html.erb_spec.rb +3 -3
- data/spec/features/datastreams/show.html.erb_spec.rb +44 -12
- data/spec/features/datastreams/upload.html.erb_spec.rb +1 -1
- data/spec/internal/app/models/item.rb +3 -0
- data/spec/internal/app/models/solr_document.rb +0 -2
- data/spec/internal/spec/fixtures/files/hydra.jpg +0 -0
- metadata +9 -8
- data/app/views/fcrepo_admin/datastreams/_context_nav.html.erb +0 -9
- data/app/views/fcrepo_admin/datastreams/_context_nav_items.html.erb +0 -38
- data/app/views/fcrepo_admin/objects/_context_nav.html.erb +0 -9
- data/app/views/fcrepo_admin/objects/_context_nav_datastreams.html.erb +0 -13
- data/app/views/fcrepo_admin/objects/_context_nav_items.html.erb +0 -19
- data/lib/fcrepo_admin/helpers/fcrepo_admin_helper_behavior.rb +0 -27
data/lib/fcrepo_admin/version.rb
CHANGED
@@ -1,67 +1,91 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
# shared_examples "a datastream profile view" do
|
4
|
-
# it { should render_template(:show) }
|
5
|
-
# end
|
6
|
-
|
7
3
|
describe FcrepoAdmin::DatastreamsController do
|
8
|
-
|
9
|
-
|
10
|
-
@dsid = "descMetadata"
|
11
|
-
end
|
12
|
-
after { @object.delete }
|
4
|
+
let(:object) { FactoryGirl.create(:item) }
|
5
|
+
after { object.delete }
|
13
6
|
context "#show" do
|
14
|
-
|
15
|
-
|
7
|
+
it "should render the show template" do
|
8
|
+
get :show, :object_id => object, :id => object.descMetadata, :use_route => 'fcrepo_admin'
|
9
|
+
response.should be_successful
|
10
|
+
response.should render_template(:show)
|
11
|
+
end
|
16
12
|
end
|
17
|
-
context "#
|
18
|
-
|
19
|
-
|
13
|
+
context "#content" do
|
14
|
+
it "should render the content template" do
|
15
|
+
get :content, :object_id => object, :id => object.descMetadata, :use_route => 'fcrepo_admin'
|
16
|
+
response.should be_successful
|
17
|
+
response.should render_template(:content)
|
18
|
+
end
|
20
19
|
end
|
21
20
|
context "#download" do
|
22
|
-
subject { get :download, :object_id =>
|
21
|
+
subject { get :download, :object_id => object, :id => object.descMetadata, :use_route => 'fcrepo_admin' }
|
23
22
|
it { should be_successful }
|
24
23
|
end
|
25
24
|
context "change methods" do
|
26
25
|
let(:user) { FactoryGirl.create(:user) }
|
27
26
|
before do
|
28
|
-
|
29
|
-
|
27
|
+
object.permissions = [{type: 'user', name: user.email, access: 'edit'}]
|
28
|
+
object.save
|
30
29
|
sign_in user
|
31
30
|
end
|
32
31
|
after { user.delete }
|
33
32
|
context "#edit" do
|
34
|
-
|
35
|
-
|
33
|
+
context "content is editable" do
|
34
|
+
it "should render the edit tenplate" do
|
35
|
+
get :edit, :object_id => object, :id => object.descMetadata, :use_route => 'fcrepo_admin'
|
36
|
+
response.should be_successful
|
37
|
+
response.should render_template(:edit)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
context "content is not editable" do
|
41
|
+
before do
|
42
|
+
object.content.content = File.read(File.join(Rails.root, "spec", "fixtures", "files", "hydra.jpg"), {mode: 'rb'})
|
43
|
+
object.save
|
44
|
+
end
|
45
|
+
subject { get :edit, :object_id => object, :id => object.content, :use_route => 'fcrepo_admin' }
|
46
|
+
its(:response_code) { should eq(403) }
|
47
|
+
end
|
48
|
+
end
|
49
|
+
context "#upload" do
|
50
|
+
context "content is uploadable" do
|
51
|
+
it "should render the upload template" do
|
52
|
+
get :upload, :object_id => object, :id => object.descMetadata, :use_route => 'fcrepo_admin'
|
53
|
+
response.should be_successful
|
54
|
+
response.should render_template(:upload)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
context "content is not uploadable" do
|
58
|
+
subject { get :upload, :object_id => object, :id => object.externalMetadata, :use_route => 'fcrepo_admin' }
|
59
|
+
its(:response_code) { should eq(403) }
|
60
|
+
end
|
36
61
|
end
|
37
62
|
context "#update" do
|
38
63
|
context "content" do
|
39
64
|
before do
|
40
|
-
|
65
|
+
content = <<EOS
|
41
66
|
<dc xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
42
67
|
<dcterms:title>Altered Test Component</dcterms:title>
|
43
68
|
</dc>
|
44
69
|
EOS
|
45
|
-
put :update, :object_id =>
|
46
|
-
|
70
|
+
put :update, :object_id => object, :id => object.descMetadata, :content => content, :use_route => 'fcrepo_admin'
|
71
|
+
object.reload
|
47
72
|
end
|
48
73
|
it "should update the datastream content and redirect to the show page" do
|
49
|
-
|
74
|
+
object.title.should == "Altered Test Component"
|
50
75
|
# TODO get this to work
|
51
|
-
# response.should redirect_to :action => :show, :object_id =>
|
76
|
+
# response.should redirect_to :action => :show, :object_id => object, :id => datastream, :use_route => 'fcrepo_admin'
|
52
77
|
response.response_code.should == 302
|
53
78
|
end
|
54
79
|
end
|
55
80
|
context "file" do
|
56
81
|
before do
|
57
|
-
|
58
|
-
|
59
|
-
@object.reload
|
82
|
+
put :update, :object_id => object, :id => object.descMetadata, :file => fixture_file_upload('/files/descMetadata.xml', 'text/xml'), :use_route => 'fcrepo_admin'
|
83
|
+
object.reload
|
60
84
|
end
|
61
85
|
it "should update the datastream content and redirect to the show page" do
|
62
|
-
|
86
|
+
object.title.should == "Altered Test Component"
|
63
87
|
# TODO get this to work
|
64
|
-
# response.should redirect_to :action => :show, :object_id =>
|
88
|
+
# response.should redirect_to :action => :show, :object_id => object, :id => datastream, :use_route => 'fcrepo_admin'
|
65
89
|
response.response_code.should == 302
|
66
90
|
end
|
67
91
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe FcrepoAdmin::ObjectsController do
|
4
|
-
let(:object) { FactoryGirl.create(:item) }
|
4
|
+
let!(:object) { FactoryGirl.create(:item) }
|
5
5
|
after { object.delete }
|
6
6
|
context "#show" do
|
7
7
|
subject { get :show, :id => object, :use_route => 'fcrepo_admin' }
|
@@ -24,7 +24,7 @@ describe "datastreams/edit.html.erb" do
|
|
24
24
|
<dcterms:title>Altered Test Component</dcterms:title>
|
25
25
|
</dc>
|
26
26
|
EOS
|
27
|
-
click_button I18n.t("fcrepo_admin.datastream.edit.submit")
|
27
|
+
click_button I18n.t("fcrepo_admin.datastream.edit.form.submit")
|
28
28
|
object.reload
|
29
29
|
object.title.should == "Altered Test Component"
|
30
30
|
end
|
@@ -4,9 +4,9 @@ describe "datastreams/index.html.erb" do
|
|
4
4
|
before { visit fcrepo_admin.object_datastreams_path(object) }
|
5
5
|
after { object.delete }
|
6
6
|
let(:object) { FactoryGirl.create(:item) }
|
7
|
-
it "should link to all
|
8
|
-
object.datastreams.
|
9
|
-
page.should have_link(dsid, :href => fcrepo_admin.object_datastream_path(object,
|
7
|
+
it "should link to all datastreams" do
|
8
|
+
object.datastreams.each do |dsid, ds|
|
9
|
+
page.should have_link(dsid, :href => fcrepo_admin.object_datastream_path(object, ds))
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -6,18 +6,41 @@ end
|
|
6
6
|
|
7
7
|
describe "datastreams/show.html.erb" do
|
8
8
|
let!(:object) { FactoryGirl.create(:item) }
|
9
|
-
let(:dsid) { "descMetadata" }
|
10
|
-
before { visit fcrepo_admin.object_datastream_path(object, dsid) }
|
11
9
|
after { object.delete }
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
10
|
+
context "user can read" do
|
11
|
+
before { visit fcrepo_admin.object_datastream_path(object, datastream) }
|
12
|
+
context "content is text" do
|
13
|
+
let(:datastream) { object.descMetadata }
|
14
|
+
it "should display all attributes of the datastream profile" do
|
15
|
+
datastream.profile.each do |key, value|
|
16
|
+
page.should have_content(I18n.t("fcrepo_admin.datastream.profile.keys.#{key}"))
|
17
|
+
end
|
18
|
+
end
|
19
|
+
it "should have a link to download the datastream content" do
|
20
|
+
page.should have_link(I18n.t("fcrepo_admin.datastream.nav.items.content"), :href => fcrepo_admin.content_object_datastream_path(object, datastream))
|
21
|
+
end
|
22
|
+
it "should have a link to view the content" do
|
23
|
+
page.should have_link(I18n.t("fcrepo_admin.datastream.nav.items.content"), :href => fcrepo_admin.content_object_datastream_path(object, datastream))
|
24
|
+
end
|
25
|
+
end
|
26
|
+
context "content is not text" do
|
27
|
+
let(:datastream) { object.content }
|
28
|
+
before do
|
29
|
+
datastream.content = File.read(File.join(Rails.root, "spec", "fixtures", "files", "hydra.jpg"), {mode: 'rb'})
|
30
|
+
object.save
|
31
|
+
end
|
32
|
+
it "should not have a link to view the content" do
|
33
|
+
page.should_not have_link(I18n.t("fcrepo_admin.datastream.nav.items.content"), :href => fcrepo_admin.content_object_datastream_path(object, datastream))
|
34
|
+
end
|
17
35
|
end
|
18
36
|
end
|
19
|
-
|
20
|
-
|
37
|
+
context "user cannot edit" do
|
38
|
+
let(:datastream) { object.descMetadata }
|
39
|
+
before { visit fcrepo_admin.object_datastream_path(object, datastream) }
|
40
|
+
it "should not have links to edit or upload" do
|
41
|
+
page.should_not have_link(I18n.t("fcrepo_admin.datastream.nav.items.edit"), :href => fcrepo_admin.edit_object_datastream_path(object, datastream))
|
42
|
+
page.should_not have_link(I18n.t("fcrepo_admin.datastream.nav.items.upload"), :href => fcrepo_admin.upload_object_datastream_path(object, datastream))
|
43
|
+
end
|
21
44
|
end
|
22
45
|
context "user can edit" do
|
23
46
|
let(:user) { FactoryGirl.create(:user) }
|
@@ -25,14 +48,23 @@ describe "datastreams/show.html.erb" do
|
|
25
48
|
object.permissions = [{type: 'user', name: user.email, access: 'edit'}]
|
26
49
|
object.save
|
27
50
|
login_as(user, :scope => :user, :run_callbacks => false)
|
28
|
-
visit fcrepo_admin.object_datastream_path(object,
|
51
|
+
visit fcrepo_admin.object_datastream_path(object, datastream)
|
29
52
|
end
|
30
53
|
after do
|
31
54
|
user.delete
|
32
55
|
Warden.test_reset!
|
33
56
|
end
|
34
|
-
|
35
|
-
|
57
|
+
context "datastream content is editable" do
|
58
|
+
let(:datastream) { object.descMetadata }
|
59
|
+
it "should have an edit link" do
|
60
|
+
page.should have_link(I18n.t("fcrepo_admin.datastream.nav.items.edit"), :href => fcrepo_admin.edit_object_datastream_path(object, datastream))
|
61
|
+
end
|
62
|
+
end
|
63
|
+
context "datastream content is uploadable" do
|
64
|
+
let(:datastream) { object.descMetadata }
|
65
|
+
it "should have an upload link" do
|
66
|
+
page.should have_link(I18n.t("fcrepo_admin.datastream.nav.items.upload"), :href => fcrepo_admin.upload_object_datastream_path(object, datastream))
|
67
|
+
end
|
36
68
|
end
|
37
69
|
end
|
38
70
|
end
|
@@ -20,7 +20,7 @@ describe "datastreams/upload.html.erb" do
|
|
20
20
|
end
|
21
21
|
it "should provide an upload form" do
|
22
22
|
attach_file "file", File.join(Rails.root, "spec", "fixtures", "files", "descMetadata.xml")
|
23
|
-
click_button I18n.t("fcrepo_admin.datastream.upload.submit")
|
23
|
+
click_button I18n.t("fcrepo_admin.datastream.upload.form.submit")
|
24
24
|
object.reload
|
25
25
|
object.title.should == "Altered Test Component"
|
26
26
|
end
|
@@ -2,6 +2,9 @@ class Item < ActiveFedora::Base
|
|
2
2
|
|
3
3
|
has_metadata :name => "descMetadata", :type => ActiveFedora::QualifiedDublinCoreDatastream
|
4
4
|
has_metadata :name => "rightsMetadata", :type => Hydra::Datastream::RightsMetadata
|
5
|
+
has_metadata :name => "externalMetadata", :type => ActiveFedora::Datastream, :control_group => 'E'
|
6
|
+
has_metadata :name => "redirectedMetadata", :type => ActiveFedora::Datastream, :control_group => 'R'
|
7
|
+
has_file_datastream :name => "content"
|
5
8
|
|
6
9
|
delegate :title, :to => "descMetadata", :unique => true
|
7
10
|
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fcrepo_admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Chandek-Stark
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2013-05-
|
14
|
+
date: 2013-05-17 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: hydra-head
|
@@ -254,9 +254,8 @@ files:
|
|
254
254
|
- app/views/fcrepo_admin/associations/show.html.erb
|
255
255
|
- app/views/fcrepo_admin/catalog/_document.html.erb
|
256
256
|
- app/views/fcrepo_admin/datastreams/_active_fedora.html.erb
|
257
|
+
- app/views/fcrepo_admin/datastreams/_alert.html.erb
|
257
258
|
- app/views/fcrepo_admin/datastreams/_content.html.erb
|
258
|
-
- app/views/fcrepo_admin/datastreams/_context_nav.html.erb
|
259
|
-
- app/views/fcrepo_admin/datastreams/_context_nav_items.html.erb
|
260
259
|
- app/views/fcrepo_admin/datastreams/_datastreams.html.erb
|
261
260
|
- app/views/fcrepo_admin/datastreams/_datastreams_list.html.erb
|
262
261
|
- app/views/fcrepo_admin/datastreams/_profile.html.erb
|
@@ -267,9 +266,6 @@ files:
|
|
267
266
|
- app/views/fcrepo_admin/datastreams/index.html.erb
|
268
267
|
- app/views/fcrepo_admin/datastreams/show.html.erb
|
269
268
|
- app/views/fcrepo_admin/datastreams/upload.html.erb
|
270
|
-
- app/views/fcrepo_admin/objects/_context_nav.html.erb
|
271
|
-
- app/views/fcrepo_admin/objects/_context_nav_datastreams.html.erb
|
272
|
-
- app/views/fcrepo_admin/objects/_context_nav_items.html.erb
|
273
269
|
- app/views/fcrepo_admin/objects/_datastreams.html.erb
|
274
270
|
- app/views/fcrepo_admin/objects/_direct_permissions.html.erb
|
275
271
|
- app/views/fcrepo_admin/objects/_inherited_permissions.html.erb
|
@@ -291,11 +287,12 @@ files:
|
|
291
287
|
- lib/fcrepo_admin.rb
|
292
288
|
- lib/fcrepo_admin/ability.rb
|
293
289
|
- lib/fcrepo_admin/controller/controller_behavior.rb
|
290
|
+
- lib/fcrepo_admin/decorators/active_fedora/base_decorator.rb
|
291
|
+
- lib/fcrepo_admin/decorators/active_fedora/datastream_decorator.rb
|
294
292
|
- lib/fcrepo_admin/engine.rb
|
295
293
|
- lib/fcrepo_admin/helpers/associations_helper_behavior.rb
|
296
294
|
- lib/fcrepo_admin/helpers/blacklight_helper_behavior.rb
|
297
295
|
- lib/fcrepo_admin/helpers/datastreams_helper_behavior.rb
|
298
|
-
- lib/fcrepo_admin/helpers/fcrepo_admin_helper_behavior.rb
|
299
296
|
- lib/fcrepo_admin/helpers/objects_helper_behavior.rb
|
300
297
|
- lib/fcrepo_admin/solr_document_extension.rb
|
301
298
|
- lib/fcrepo_admin/version.rb
|
@@ -307,6 +304,7 @@ files:
|
|
307
304
|
- spec/factories/fcrepo_admin_factories.rb
|
308
305
|
- spec/factories/user_factories.rb
|
309
306
|
- spec/features/associations/index.html.erb_spec.rb
|
307
|
+
- spec/features/datastreams/content.html.erb_spec.rb
|
310
308
|
- spec/features/datastreams/edit.html.erb_spec.rb
|
311
309
|
- spec/features/datastreams/index.html.erb_spec.rb
|
312
310
|
- spec/features/datastreams/show.html.erb_spec.rb
|
@@ -366,6 +364,7 @@ files:
|
|
366
364
|
- spec/internal/public/favicon.ico
|
367
365
|
- spec/internal/script/rails
|
368
366
|
- spec/internal/spec/fixtures/files/descMetadata.xml
|
367
|
+
- spec/internal/spec/fixtures/files/hydra.jpg
|
369
368
|
- spec/spec_helper.rb
|
370
369
|
homepage: http://projecthydra.org
|
371
370
|
licenses:
|
@@ -398,6 +397,7 @@ test_files:
|
|
398
397
|
- spec/factories/fcrepo_admin_factories.rb
|
399
398
|
- spec/factories/user_factories.rb
|
400
399
|
- spec/features/associations/index.html.erb_spec.rb
|
400
|
+
- spec/features/datastreams/content.html.erb_spec.rb
|
401
401
|
- spec/features/datastreams/edit.html.erb_spec.rb
|
402
402
|
- spec/features/datastreams/index.html.erb_spec.rb
|
403
403
|
- spec/features/datastreams/show.html.erb_spec.rb
|
@@ -457,4 +457,5 @@ test_files:
|
|
457
457
|
- spec/internal/public/favicon.ico
|
458
458
|
- spec/internal/script/rails
|
459
459
|
- spec/internal/spec/fixtures/files/descMetadata.xml
|
460
|
+
- spec/internal/spec/fixtures/files/hydra.jpg
|
460
461
|
- spec/spec_helper.rb
|
@@ -1,38 +0,0 @@
|
|
1
|
-
<% unless ds_is_current_version? %>
|
2
|
-
<li>
|
3
|
-
<%= render :partial => 'version', :locals => {:datastream => datastream} %>
|
4
|
-
</li>
|
5
|
-
<li>
|
6
|
-
<%= link_to t("fcrepo_admin.nav.items.current_version"), fcrepo_admin.object_datastream_path(object, datastream.dsid) %>
|
7
|
-
</li>
|
8
|
-
<% end %>
|
9
|
-
<li>
|
10
|
-
<%= link_to_unless_current t("fcrepo_admin.datastream.nav.items.summary"), fcrepo_admin.object_datastream_path(object, datastream.dsid, datastream_params) %>
|
11
|
-
</li>
|
12
|
-
<% unless datastream.new? %>
|
13
|
-
<% if ds_content_is_text? %>
|
14
|
-
<li>
|
15
|
-
<%= link_to_unless_current t("fcrepo_admin.datastream.nav.items.content"), fcrepo_admin.content_object_datastream_path(object, datastream.dsid, datastream_params) %>
|
16
|
-
</li>
|
17
|
-
<% end %>
|
18
|
-
<li>
|
19
|
-
<%= link_to t("fcrepo_admin.datastream.nav.items.download"), fcrepo_admin.download_object_datastream_path(object, datastream.dsid, datastream_params) %>
|
20
|
-
</li>
|
21
|
-
<% end %>
|
22
|
-
<% if ds_is_current_version? %>
|
23
|
-
<% if ds_content_is_editable? && can?(:edit, object) %>
|
24
|
-
<li>
|
25
|
-
<%= link_to_unless_current t("fcrepo_admin.datastream.nav.items.edit"), fcrepo_admin.edit_object_datastream_path(object, datastream.dsid) %>
|
26
|
-
</li>
|
27
|
-
<% end %>
|
28
|
-
<% if can?(:upload, object) %>
|
29
|
-
<li>
|
30
|
-
<%= link_to_unless_current t("fcrepo_admin.datastream.nav.items.upload"), fcrepo_admin.upload_object_datastream_path(object, datastream.dsid) %>
|
31
|
-
</li>
|
32
|
-
<% end %>
|
33
|
-
<% end %>
|
34
|
-
<% unless datastream.new? %>
|
35
|
-
<li>
|
36
|
-
<%= link_to_unless_current t("fcrepo_admin.datastream.nav.items.history"), fcrepo_admin.history_object_datastream_path(object, datastream.dsid) %>
|
37
|
-
</li>
|
38
|
-
<% end %>
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<li class="dropdown">
|
2
|
-
<%= link_to fcrepo_admin.object_datastreams_path(object), :class => "dropdown-toggle", :id => "dLabel", :role => "button", :'data-toggle' => "dropdown", :'data-target' => "#" do %>
|
3
|
-
<%= t("fcrepo_admin.object.nav.items.datastreams") %>
|
4
|
-
<b class="caret"></b>
|
5
|
-
<% end %>
|
6
|
-
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
|
7
|
-
<% object.datastreams.keys.each do |dsid| %>
|
8
|
-
<li>
|
9
|
-
<%= link_to dsid, fcrepo_admin.object_datastream_path(object, dsid) %>
|
10
|
-
</li>
|
11
|
-
<% end %>
|
12
|
-
</ul>
|
13
|
-
</li>
|
@@ -1,19 +0,0 @@
|
|
1
|
-
<li>
|
2
|
-
<%= link_to_unless_current t("fcrepo_admin.object.nav.items.summary"), fcrepo_admin.object_path(object) %>
|
3
|
-
</li>
|
4
|
-
<li>
|
5
|
-
<%= link_to_unless_current t("fcrepo_admin.object.nav.items.datastreams"), fcrepo_admin.object_datastreams_path(object) %>
|
6
|
-
</li>
|
7
|
-
<% if object_has_permissions? && can?(:permissions, object) %>
|
8
|
-
<li>
|
9
|
-
<%= link_to_unless_current t("fcrepo_admin.object.nav.items.permissions"), fcrepo_admin.permissions_object_path(object) %>
|
10
|
-
</li>
|
11
|
-
<% end %>
|
12
|
-
<li>
|
13
|
-
<%= link_to_unless_current t("fcrepo_admin.object.nav.items.associations"), fcrepo_admin.object_associations_path(object) %>
|
14
|
-
</li>
|
15
|
-
<% if object_is_auditable? && can?(:audit_trail, object) %>
|
16
|
-
<li>
|
17
|
-
<%= link_to_unless_current t("fcrepo_admin.object.nav.items.audit_trail"), fcrepo_admin.audit_trail_object_path(object) %>
|
18
|
-
</li>
|
19
|
-
<% end %>
|