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.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/HISTORY.rdoc +10 -2
  3. data/README.rdoc +59 -14
  4. data/app/controllers/fcrepo_admin/datastreams_controller.rb +8 -46
  5. data/app/controllers/fcrepo_admin/objects_controller.rb +1 -1
  6. data/app/views/fcrepo_admin/datastreams/_alert.html.erb +4 -0
  7. data/app/views/fcrepo_admin/datastreams/_content.html.erb +1 -1
  8. data/app/views/fcrepo_admin/datastreams/_datastreams_list.html.erb +3 -3
  9. data/app/views/fcrepo_admin/datastreams/_profile.html.erb +4 -5
  10. data/app/views/fcrepo_admin/datastreams/content.html.erb +2 -1
  11. data/app/views/fcrepo_admin/datastreams/edit.html.erb +4 -3
  12. data/app/views/fcrepo_admin/datastreams/history.html.erb +3 -8
  13. data/app/views/fcrepo_admin/datastreams/index.html.erb +4 -1
  14. data/app/views/fcrepo_admin/datastreams/upload.html.erb +4 -3
  15. data/app/views/fcrepo_admin/objects/_direct_permissions.html.erb +1 -1
  16. data/app/views/fcrepo_admin/objects/_permissions_list.html.erb +1 -1
  17. data/app/views/fcrepo_admin/objects/permissions.html.erb +8 -2
  18. data/app/views/fcrepo_admin/shared/_context_nav.html.erb +2 -2
  19. data/app/views/layouts/fcrepo_admin/datastreams.html.erb +5 -7
  20. data/app/views/layouts/fcrepo_admin/objects.html.erb +1 -1
  21. data/config/locales/fcrepo_admin.en.yml +33 -22
  22. data/config/routes.rb +5 -2
  23. data/lib/fcrepo_admin.rb +51 -1
  24. data/lib/fcrepo_admin/decorators/active_fedora/base_decorator.rb +33 -0
  25. data/lib/fcrepo_admin/decorators/active_fedora/datastream_decorator.rb +35 -0
  26. data/lib/fcrepo_admin/engine.rb +6 -0
  27. data/lib/fcrepo_admin/helpers/datastreams_helper_behavior.rb +132 -8
  28. data/lib/fcrepo_admin/helpers/objects_helper_behavior.rb +47 -8
  29. data/lib/fcrepo_admin/version.rb +1 -1
  30. data/spec/controllers/datastreams_controller_spec.rb +53 -29
  31. data/spec/controllers/objects_controller_spec.rb +1 -1
  32. data/spec/features/datastreams/content.html.erb_spec.rb +7 -0
  33. data/spec/features/datastreams/edit.html.erb_spec.rb +1 -1
  34. data/spec/features/datastreams/index.html.erb_spec.rb +3 -3
  35. data/spec/features/datastreams/show.html.erb_spec.rb +44 -12
  36. data/spec/features/datastreams/upload.html.erb_spec.rb +1 -1
  37. data/spec/internal/app/models/item.rb +3 -0
  38. data/spec/internal/app/models/solr_document.rb +0 -2
  39. data/spec/internal/spec/fixtures/files/hydra.jpg +0 -0
  40. metadata +9 -8
  41. data/app/views/fcrepo_admin/datastreams/_context_nav.html.erb +0 -9
  42. data/app/views/fcrepo_admin/datastreams/_context_nav_items.html.erb +0 -38
  43. data/app/views/fcrepo_admin/objects/_context_nav.html.erb +0 -9
  44. data/app/views/fcrepo_admin/objects/_context_nav_datastreams.html.erb +0 -13
  45. data/app/views/fcrepo_admin/objects/_context_nav_items.html.erb +0 -19
  46. 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