fcrepo_admin 0.4.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -1,27 +0,0 @@
|
|
1
|
-
module FcrepoAdmin::Helpers
|
2
|
-
module FcrepoAdminHelperBehavior
|
3
|
-
|
4
|
-
def object_has_permissions?
|
5
|
-
@object.is_a?(Hydra::ModelMixins::RightsMetadata)
|
6
|
-
end
|
7
|
-
|
8
|
-
def object_context_nav_header
|
9
|
-
t("fcrepo_admin.object.nav.header")
|
10
|
-
end
|
11
|
-
|
12
|
-
def object_context_nav_items
|
13
|
-
render :partial => 'fcrepo_admin/objects/context_nav_items', :locals => {:object => @object}
|
14
|
-
end
|
15
|
-
|
16
|
-
def format_ds_profile_value(ds, key)
|
17
|
-
value = ds.profile[key]
|
18
|
-
case
|
19
|
-
when key == "dsSize" then number_to_human_size(value)
|
20
|
-
when key == "dsCreateDate" then value.strftime("%Y-%m-%dT%H:%M:%S.%LZ")
|
21
|
-
when key == "dsLocation" && (ds.external? || ds.redirect?) then link_to(value, value)
|
22
|
-
else value
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
end
|
27
|
-
end
|