fcrepo_admin 0.3.5 → 0.4.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.
Files changed (67) hide show
  1. checksums.yaml +7 -0
  2. data/HISTORY.rdoc +6 -0
  3. data/README.rdoc +42 -20
  4. data/app/controllers/fcrepo_admin/associations_controller.rb +7 -0
  5. data/app/controllers/fcrepo_admin/objects_controller.rb +2 -1
  6. data/app/helpers/fcrepo_admin/associations_helper.rb +5 -0
  7. data/app/views/fcrepo_admin/associations/_associations.html.erb +26 -0
  8. data/app/views/fcrepo_admin/associations/index.html.erb +1 -0
  9. data/app/views/fcrepo_admin/associations/show.html.erb +11 -0
  10. data/app/views/fcrepo_admin/catalog/_document.html.erb +6 -0
  11. data/app/views/fcrepo_admin/datastreams/_content.html.erb +4 -3
  12. data/app/views/fcrepo_admin/datastreams/_context_nav.html.erb +9 -0
  13. data/app/views/fcrepo_admin/datastreams/_context_nav_items.html.erb +21 -0
  14. data/app/views/fcrepo_admin/datastreams/{_datastreams.html → _datastreams.html.erb} +16 -3
  15. data/app/views/fcrepo_admin/datastreams/_profile.html.erb +9 -10
  16. data/app/views/fcrepo_admin/datastreams/content.html.erb +1 -0
  17. data/app/views/fcrepo_admin/datastreams/index.html.erb +1 -4
  18. data/app/views/fcrepo_admin/datastreams/show.html.erb +1 -14
  19. data/app/views/fcrepo_admin/objects/_context_nav.html.erb +9 -0
  20. data/app/views/fcrepo_admin/objects/_context_nav_datastreams.html.erb +13 -0
  21. data/app/views/fcrepo_admin/objects/_context_nav_items.html.erb +19 -0
  22. data/app/views/fcrepo_admin/objects/_direct_permissions.html.erb +8 -0
  23. data/app/views/fcrepo_admin/objects/_inherited_permissions.html.erb +23 -0
  24. data/app/views/fcrepo_admin/objects/_permissions_list.html.erb +18 -0
  25. data/app/views/fcrepo_admin/objects/{_permissions_row.html.erb → _permissions_list_item.html.erb} +0 -0
  26. data/app/views/fcrepo_admin/objects/_properties.html.erb +6 -5
  27. data/app/views/fcrepo_admin/objects/permissions.html.erb +5 -0
  28. data/app/views/fcrepo_admin/objects/show.html.erb +3 -46
  29. data/app/views/layouts/fcrepo_admin/datastreams.html.erb +2 -2
  30. data/app/views/layouts/fcrepo_admin/objects.html.erb +1 -1
  31. data/config/locales/fcrepo_admin.en.yml +24 -4
  32. data/config/routes.rb +7 -2
  33. data/lib/fcrepo_admin.rb +4 -1
  34. data/lib/fcrepo_admin/ability.rb +18 -0
  35. data/lib/fcrepo_admin/controller/associations_controller_behavior.rb +49 -0
  36. data/lib/fcrepo_admin/controller/catalog_controller_behavior.rb +9 -0
  37. data/lib/fcrepo_admin/controller/controller_behavior.rb +49 -0
  38. data/lib/fcrepo_admin/controller/datastreams_controller_behavior.rb +21 -28
  39. data/lib/fcrepo_admin/controller/objects_controller_behavior.rb +7 -32
  40. data/lib/fcrepo_admin/helpers/associations_helper_behavior.rb +23 -0
  41. data/lib/fcrepo_admin/helpers/datastreams_helper_behavior.rb +7 -10
  42. data/lib/fcrepo_admin/helpers/fcrepo_admin_helper_behavior.rb +5 -10
  43. data/lib/fcrepo_admin/helpers/objects_helper_behavior.rb +0 -36
  44. data/lib/fcrepo_admin/version.rb +1 -1
  45. data/spec/controllers/associations_controller_spec.rb +34 -0
  46. data/spec/controllers/datastreams_controller_spec.rb +14 -12
  47. data/spec/controllers/objects_controller_spec.rb +6 -6
  48. data/spec/factories/fcrepo_admin_factories.rb +10 -6
  49. data/spec/features/associations/index.html.erb_spec.rb +28 -0
  50. data/spec/features/datastreams/edit.html.erb_spec.rb +1 -1
  51. data/spec/features/datastreams/index.html.erb_spec.rb +12 -0
  52. data/spec/features/datastreams/show.html.erb_spec.rb +1 -1
  53. data/spec/features/datastreams/upload.html.erb_spec.rb +1 -1
  54. data/spec/features/objects/audit_trail.html.erb_spec.rb +1 -1
  55. data/spec/features/objects/permissions.html.erb_spec.rb +19 -0
  56. data/spec/features/objects/show.html.erb_spec.rb +7 -30
  57. data/spec/internal/app/models/ability.rb +1 -1
  58. data/spec/internal/app/models/admin_policy.rb +3 -0
  59. data/spec/internal/app/models/collection.rb +14 -0
  60. data/spec/internal/app/models/item.rb +15 -0
  61. data/spec/internal/app/models/{content_model.rb → part.rb} +2 -1
  62. metadata +65 -73
  63. data/app/views/fcrepo_admin/datastreams/_datastream_nav.html.erb +0 -18
  64. data/app/views/fcrepo_admin/objects/_more_info.html.erb +0 -6
  65. data/app/views/fcrepo_admin/objects/_permissions.html.erb +0 -12
  66. data/app/views/fcrepo_admin/objects/_permissions_header.html.erb +0 -7
  67. data/lib/fcrepo_admin/datastream_ability.rb +0 -22
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 037b085bbd970e56f0258962a525d716e7126de3
4
+ data.tar.gz: b5198489fc6a71de84f2ccd823d9f9b989aa4ea4
5
+ SHA512:
6
+ metadata.gz: 58d1033182af3051b5115b6d812bcbf5f04a52ed082e2feb1f3deb47a1eaf9f14fd564bd0e4966aa2d0d6da40587d778cbe00341398edad8d596562a7fe5afe7
7
+ data.tar.gz: 0fa62de534dd7ce460a2dec042f3fd8e0c291443dc8a426d8c1c44fde9cc53195faea74c26cd2115a1e5db1d504d088c408d3d12adbe82e29458f5f36e9eaf80
data/HISTORY.rdoc CHANGED
@@ -1,3 +1,9 @@
1
+ === 0.4.0
2
+
3
+ * Feature: Display object's associations.
4
+ * Require inclusion of CanCan action aliases in application's Ability class.
5
+ * Tabbed object show view ("summary") replaced with separate views.
6
+
1
7
  === 0.3.5
2
8
 
3
9
  * Requires active-fedora 6.1.
data/README.rdoc CHANGED
@@ -33,14 +33,27 @@ See https://github.com/projecthydra/hydra-head/wiki/Installation-Prerequisites.
33
33
 
34
34
  In config/routes.rb add this line:
35
35
 
36
- mount FcrepoAdmin::Engine => '/admin', :as=> 'fcrepo_admin'
36
+ mount FcrepoAdmin::Engine => '/', :as=> 'fcrepo_admin'
37
37
 
38
- You may replace <code>'/admin'</code> with any mount point (except perhaps <code>'/catalog'</code>),
39
- including <code>'/'</code>. All routes include <code>objects</code> as a subpath.
38
+ You may use any mount point (except perhaps <code>'/catalog'</code>).
39
+ All routes include <code>objects</code> as a subpath.
40
40
 
41
- * Add Javascript
41
+ * Add CanCan action aliases (version >= 0.4.0)
42
+
43
+ In your Ability class (app/models/ability.rb) include the FcrepoAdmin::Ability module, for example:
44
+
45
+ class Ability
46
+ include Hydra::Ability
47
+ include Hydra::PolicyAwareAbility
48
+ include FcrepoAdmin::Ability
49
+ end
50
+
51
+ FcrepoAdmin::Ability defines action aliases for permissions which are enforced on (ActiveFedora::Base) objects.
52
+ If your application defines action aliases, please check FcrepoAdmin::Ability for conflicts as aliases are global.
53
+
54
+ * Add Javascript (not required for version >= 0.4.0)
42
55
 
43
- In app/assets/javascripts/application.js add this line:
56
+ In app/assets/javascripts/application.js add:
44
57
 
45
58
  //= require bootstrap-tab
46
59
 
@@ -52,19 +65,23 @@ See https://github.com/projecthydra/hydra-head/wiki/Installation-Prerequisites.
52
65
  module BlacklightHelper
53
66
  include Blacklight::BlacklightHelperBehavior # Default Blacklight behaviors
54
67
  include FcrepoAdmin::Helpers::BlacklightHelperBehavior # fcrepo_admin overrides
68
+ # additional customizations here, if any
55
69
  end
56
70
 
57
71
  * Add audit trail support (optional)
58
72
 
59
- To enable access to the Fedora audit trail data through the fcrepo_admin UI, add your ActiveFedora models:
73
+ To enable access to the Fedora audit trail data through the fcrepo_admin UI, include the
74
+ ActiveFedora::Auditable mixin in your ActiveFedora models:
60
75
 
61
76
  include ActiveFedora::Auditable
62
77
 
63
78
  === Overriding fcrepo_admin behaviors
64
79
 
65
- * Object views
80
+ The following are examples of possible customizations. This list is not necessarily exhaustive.
81
+
82
+ * Helpers
66
83
 
67
- Create app/helpers/fcrepo_admin/objects_helper.rb with this content:
84
+ Override objects helpers by creating app/helpers/fcrepo_admin/objects_helper.rb with this content:
68
85
 
69
86
  module FcrepoAdmin::ObjectsHelper
70
87
  include FcrepoAdmin::Helpers::ObjectsHelperBehavior
@@ -73,36 +90,32 @@ See https://github.com/projecthydra/hydra-head/wiki/Installation-Prerequisites.
73
90
 
74
91
  In particular you may want to override #object_title.
75
92
 
76
- The contents of the object context navigation menu can be customized by overriding #object_context_nav_items.
77
- It should return an array of [label, path] items suitable for use by link_to_unless_current:
78
-
79
- <%= link_to_unless_current label, path %>
93
+ The contents of the object context navigation menu can be customized by overriding #object_context_nav_items,
94
+ or by copying and modifying the partial fcrepo_admin/objects/context_nav_items.
80
95
 
81
- * Datastream views
82
-
83
- The contents of the datastream context navigation menu can be customized by overriding #datastream_context_nav_items.
84
- Create app/helpers/fcrepo_admin/datastreams_helper.rb with this content:
96
+ Override datastreams helpers by creating app/helpers/fcrepo_admin/datastreams_helper.rb with this content:
85
97
 
86
98
  module FcrepoAdmin::DatastreamsHelper
87
99
  include FcrepoAdmin::Helpers::DatastreamsHelperBehavior
88
100
  # override and/or add methods here
89
101
  end
90
102
 
91
- datastream_context_nav_items should return an array of [label, path] items suitable for use by link_to_unless_current:
92
-
93
- <%= link_to_unless_current label, path %>
103
+ The contents of the datastream context navigation menu can be customized by overriding #datastream_context_nav_items,
104
+ or by copying and modifying the partial fcrepo_admin/datastreams/context_nav_items.
94
105
 
95
106
  * Controllers
96
107
 
97
108
  To override/extend the objects controller, create app/controllers/fcrepo_admin/objects_controller.rb:
98
109
 
99
110
  module FcrepoAdmin
100
- class ObjectsController < ApplicationController
111
+ class ObjectsController < CatalogController
101
112
  include FcrepoAdmin::Controller::ObjectsControllerBehavior
102
113
  # add your customizations
103
114
  end
104
115
  end
105
116
 
117
+ NOTE: This controller subclasses CatalogController, not ApplicationController.
118
+
106
119
  To override/extend the datastreams controller, create app/controllers/fcrepo_admin/datastreams_controller.rb:
107
120
 
108
121
  module FcrepoAdmin
@@ -112,6 +125,15 @@ See https://github.com/projecthydra/hydra-head/wiki/Installation-Prerequisites.
112
125
  end
113
126
  end
114
127
 
128
+ === Contributing
129
+
130
+ * Consider first posting to hydra-tech@googlegroups.com with a question or bug report, or submit an issue
131
+ to the Github issue tracker at https://github.com/projecthydra/fcrepo-admin/issues.
132
+ * Fork the git repository, create a feature branch, make your changes, and submit a pull request.
133
+ It is preferable for all changes to be made in one commit, if possible.
134
+
135
+ Thanks!
136
+
115
137
  === License
116
138
 
117
139
  See the LICENSE file in the root directory of the project for copyright and license information.
@@ -0,0 +1,7 @@
1
+ module FcrepoAdmin
2
+ # NOTE: This controller subclasses CatalogController, not ApplicationController
3
+ class AssociationsController < CatalogController
4
+ include FcrepoAdmin::Controller::CatalogControllerBehavior
5
+ include FcrepoAdmin::Controller::AssociationsControllerBehavior
6
+ end
7
+ end
@@ -1,5 +1,6 @@
1
1
  module FcrepoAdmin
2
- class ObjectsController < ApplicationController
2
+ class ObjectsController < CatalogController
3
+ include FcrepoAdmin::Controller::CatalogControllerBehavior
3
4
  include FcrepoAdmin::Controller::ObjectsControllerBehavior
4
5
  end
5
6
  end
@@ -0,0 +1,5 @@
1
+ module FcrepoAdmin
2
+ module AssociationsHelper
3
+ include FcrepoAdmin::Helpers::AssociationsHelperBehavior
4
+ end
5
+ end
@@ -0,0 +1,26 @@
1
+ <h3><%= t("fcrepo_admin.object.associations.title") %></h3>
2
+ <table class="table table-bordered table-condensed">
3
+ <thead>
4
+ <tr>
5
+ <th scope="col"><%= t("fcrepo_admin.object.associations.header.macro") %></th>
6
+ <th scope="col"><%= t("fcrepo_admin.object.associations.header.name") %></th>
7
+ <th scope="col"><%= t("fcrepo_admin.object.associations.header.target") %></th>
8
+ <th scope="col"><%= t("fcrepo_admin.object.associations.header.class_name") %></th>
9
+ <th scope="col"><%= t("fcrepo_admin.object.associations.header.property") %></th>
10
+ </tr>
11
+ </thead>
12
+ <tbody>
13
+ <% object.reflections.each_value do |association| %>
14
+ <tr>
15
+ <td><%= association.macro %></td>
16
+ <td><%= association.name %></td>
17
+ <td><%= link_to_target association %></td>
18
+ <td><%= association.class_name %></td>
19
+ <td>
20
+ <%= association.options[:property] %><% if association.options[:inbound] %> (inbound)<% end %>
21
+ </td>
22
+ </tr>
23
+ <% end %>
24
+ </tbody>
25
+ </table>
26
+
@@ -0,0 +1 @@
1
+ <%= render :partial => 'associations', :locals => {:object => @object} %>
@@ -0,0 +1,11 @@
1
+ <h3><%= t("fcrepo_admin.object.associations.title") %>: <%= @association.name %></h3>
2
+
3
+ <!-- <pre><%= @response %></pre> -->
4
+
5
+ <% unless @documents.blank? %>
6
+ <%= render_document_index @documents %>
7
+ <% else %>
8
+ <div class="alert">
9
+ No associated objects found.
10
+ </div>
11
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <% # container for a single doc -%>
2
+ <div class="document <%= render_document_class document %>">
3
+ <%= render :partial => 'document_header', :locals => { :document => document, :document_counter => document_counter } %>
4
+ <%# main container for doc partial view -%>
5
+ <%= render_document_partial document, :index %>
6
+ </div>
@@ -1,7 +1,8 @@
1
- <% if inline %>
1
+ <h4>Content</h4>
2
+ <% if ds_content_is_text? %>
2
3
  <pre class="prettyprint pre-scrollable"><%= datastream.content %></pre>
3
4
  <% else %>
4
- <p>
5
+ <div class="alert">
5
6
  <%= t("fcrepo_admin.datastream.content_not_text") %>.
6
- </p>
7
+ </div>
7
8
  <% end %>
@@ -0,0 +1,9 @@
1
+ <div class="well">
2
+ <ul class="nav nav-list">
3
+ <li class="nav-header">
4
+ <%= datastream_context_nav_header %>
5
+ </li>
6
+ <%= datastream_context_nav_items %>
7
+ </ul>
8
+ </div>
9
+
@@ -0,0 +1,21 @@
1
+ <li>
2
+ <%= link_to_unless_current t("fcrepo_admin.datastream.nav.items.summary"), fcrepo_admin.object_datastream_path(object, datastream.dsid) %>
3
+ </li>
4
+ <% if ds_content_is_text? %>
5
+ <li>
6
+ <%= link_to_unless_current t("fcrepo_admin.datastream.nav.items.content"), fcrepo_admin.content_object_datastream_path(object, datastream.dsid) %>
7
+ </li>
8
+ <% end %>
9
+ <li>
10
+ <%= link_to_unless_current t("fcrepo_admin.datastream.nav.items.download"), fcrepo_admin.download_object_datastream_path(object, datastream.dsid) %>
11
+ </li>
12
+ <% if can_edit_datastream? && ds_content_is_editable? %>
13
+ <li>
14
+ <%= link_to_unless_current t("fcrepo_admin.datastream.nav.items.edit"), fcrepo_admin.edit_object_datastream_path(object, datastream.dsid) %>
15
+ </li>
16
+ <% end %>
17
+ <% if can_upload_datastream? %>
18
+ <li>
19
+ <%= link_to_unless_current t("fcrepo_admin.datastream.nav.items.upload"), fcrepo_admin.upload_object_datastream_path(object, datastream.dsid) %>
20
+ </li>
21
+ <% end %>
@@ -1,3 +1,4 @@
1
+ <h3><%= t("fcrepo_admin.datastreams.title") %></h3>
1
2
  <table class="table table-bordered table-condensed">
2
3
  <thead>
3
4
  <tr>
@@ -8,12 +9,24 @@
8
9
  </tr>
9
10
  </thead>
10
11
  <tbody>
11
- <% datastreams.reject { |dsid, ds| ds.profile.empty? }.each do |dsid, ds| %>
12
+ <% object.datastreams.each do |dsid, ds| %>
12
13
  <tr>
13
- <td><%= link_to dsid, fcrepo_admin.object_datastream_path(ds.pid, dsid) %></td>
14
+ <td>
15
+ <%=
16
+ link_to_unless ds.profile.empty?, dsid, fcrepo_admin.object_datastream_path(ds.pid, dsid) do |name|
17
+ name
18
+ end
19
+ %>
20
+ </td>
14
21
  <td><%= ds.profile["dsLabel"] %></td>
15
22
  <td><%= ds.profile["dsMIME"] %></td>
16
- <td><%= ds.profile["dsCreateDate"] %></td>
23
+ <td>
24
+ <% unless ds.profile.empty? %>
25
+ <%= ds.profile["dsCreateDate"] %>
26
+ <% else %>
27
+ [<%= t("fcrepo_admin.datastreams.not_persisted") %>]
28
+ <% end %>
29
+ </td>
17
30
  </tr>
18
31
  <% end %>
19
32
  </tbody>
@@ -1,10 +1,9 @@
1
- <div id="fcrepo-admin-dsprofile">
2
- <table class="table table-bordered table-condensed table-striped">
3
- <% datastream.profile.each do |key, value| %>
4
- <tr>
5
- <th scope="row"><%= t("fcrepo_admin.datastream.profile.#{key}") %></th>
6
- <td><%= value.blank? ? " " : value %></td>
7
- </tr>
8
- <% end %>
9
- </table>
10
- </div>
1
+ <h4>Profile</h4>
2
+ <table class="table table-condensed table-striped" style="width: auto">
3
+ <% datastream.profile.each do |key, value| %>
4
+ <tr>
5
+ <th scope="row"><%= t("fcrepo_admin.datastream.profile.#{key}") %></th>
6
+ <td><%= value.blank? ? " " : value %></td>
7
+ </tr>
8
+ <% end %>
9
+ </table>
@@ -0,0 +1 @@
1
+ <%= render :partial => 'content', :locals => {:datastream => @datastream} %>
@@ -1,4 +1 @@
1
- <h1><%= @object.pid %></h1>
2
-
3
- <h3><%= t("fcrepo_admin.datastreams.title") %></h3>
4
- <%= render :partial => 'datastreams', :locals => {:datastreams => @object.datastreams} %>
1
+ <%= render :partial => 'datastreams', :locals => {:object => @object} %>
@@ -1,14 +1 @@
1
- <div class="tabbable">
2
- <ul class="nav nav-tabs">
3
- <li class="active"><a href="#tab1" data-toggle="tab"><%= t("fcrepo_admin.datastream.tabs.content") %></a></li>
4
- <li><a href="#tab2" data-toggle="tab"><%= t("fcrepo_admin.datastream.tabs.profile") %></a></li>
5
- </ul>
6
- <div class="tab-content">
7
- <div class="tab-pane active" id="tab1">
8
- <%= render :partial => 'content', :locals => {:datastream => @datastream, :inline => @inline} %>
9
- </div>
10
- <div class="tab-pane" id="tab2">
11
- <%= render :partial => 'profile', :locals => {:datastream => @datastream} %>
12
- </div>
13
- </div>
14
- </div>
1
+ <%= render :partial => 'profile', :locals => {:datastream => @datastream} %>
@@ -0,0 +1,9 @@
1
+ <div class="well">
2
+ <ul class="nav nav-list">
3
+ <li class="nav-header">
4
+ <%= object_context_nav_header %>
5
+ </li>
6
+ <%= object_context_nav_items %>
7
+ </ul>
8
+ </div>
9
+
@@ -0,0 +1,13 @@
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>
@@ -0,0 +1,19 @@
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 %>
@@ -0,0 +1,8 @@
1
+ <h4><%= t("fcrepo_admin.object.permissions.direct") %></h4>
2
+ <% if object_has_permissions? %>
3
+ <%= render :partial => 'permissions_list', :locals => {:permissions => object.permissions} %>
4
+ <% else %>
5
+ <div class="alert">
6
+ <%= t("fcrepo_admin.object.permissions.not_supported") %>: <%= object_type %>.
7
+ </div>
8
+ <% end %>
@@ -0,0 +1,23 @@
1
+ <h4><%= t("fcrepo_admin.object.permissions.inherited") %></h4>
2
+ <% unless admin_policy_enforcement_enabled? %>
3
+ <p class="alert">
4
+ <%= t("fcrepo_admin.object.apo.enforcement_disabled") %>.
5
+ </p>
6
+ <% end %>
7
+ <% if object_is_governable? %>
8
+ <div class="alert alert-info">
9
+ <% if object_is_governed_by %>
10
+ <%= t("fcrepo_admin.object.apo.governed_by") %>:
11
+ <%= link_to object_is_governed_by.pid, fcrepo_admin.object_path(object_is_governed_by) %>
12
+ <% else %>
13
+ <%= t("fcrepo_admin.object.apo.not_assigned") %>.
14
+ <% end %>
15
+ </div>
16
+ <% if object_is_governed_by %>
17
+ <%= render :partial => 'permissions_list', :locals => {:permissions => object_is_governed_by.default_permissions} %>
18
+ <% end %>
19
+ <% else %>
20
+ <p class="alert alert-info">
21
+ <%= t("fcrepo_admin.object.apo.relationship_undefined") %>: <%= object_type %>.
22
+ </p>
23
+ <% end %>
@@ -0,0 +1,18 @@
1
+ <% if permissions.empty? %>
2
+ <div class="alert">
3
+ <%= t("fcrepo_admin.object.permissions.no_permissions") %>
4
+ </div>
5
+ <% else %>
6
+ <table class="table table-bordered table-condensed table-autowidth" style="width: auto">
7
+ <thead>
8
+ <tr>
9
+ <th scope="col"><%= t("fcrepo_admin.object.permissions.header.type") %></th>
10
+ <th scope="col"><%= t("fcrepo_admin.object.permissions.header.name") %></th>
11
+ <th scope="col"><%= t("fcrepo_admin.object.permissions.header.access") %></th>
12
+ </tr>
13
+ </thead>
14
+ <tbody>
15
+ <%= render :partial => "permissions_list_item", :collection => permissions, :as => :permission %>
16
+ </tbody>
17
+ </table>
18
+ <% end %>