README.rdoc in fcrepo_admin-0.4.0 vs README.rdoc in fcrepo_admin-0.4.1

- old
+ new

@@ -1,20 +1,20 @@ -== Hydra Administrative Tool for a Fedora Repository += Hydra Administrative Tool for a Fedora Repository A Rails engine providing an administrative interface to a Fedora Commons repository built on the Hydra project framework. -=== Status +== Status This project should be considered *experimental* and not ready for production deployment. Versions earlier than 1.0 may change API and/or UI without notice or regard for backward compatibility. -=== Requirements +== Requirements fcrepo_admin is designed for installation on hydra-head 6.0 or higher (requires active-fedora 6.1 or higher). See https://github.com/projecthydra/hydra-head/wiki/Installation-Prerequisites. -=== Installation +== Installation (In the future, we hope to automate some of these tasks with a generator.) * Add to gemfile @@ -73,69 +73,73 @@ To enable access to the Fedora audit trail data through the fcrepo_admin UI, include the ActiveFedora::Auditable mixin in your ActiveFedora models: include ActiveFedora::Auditable -=== Overriding fcrepo_admin behaviors +== Overriding fcrepo_admin behaviors The following are examples of possible customizations. This list is not necessarily exhaustive. -* Helpers +=== Helpers - Override objects helpers by creating app/helpers/fcrepo_admin/objects_helper.rb with this content: +Override objects helpers by creating app/helpers/fcrepo_admin/objects_helper.rb with this content: module FcrepoAdmin::ObjectsHelper include FcrepoAdmin::Helpers::ObjectsHelperBehavior - # override and/or add methods here + # override methods here end - In particular you may want to override #object_title. +In particular you may want to override #object_title. - The contents of the object context navigation menu can be customized by overriding #object_context_nav_items, - or by copying and modifying the partial fcrepo_admin/objects/context_nav_items. +Override datastreams helpers by creating app/helpers/fcrepo_admin/datastreams_helper.rb with this content: - Override datastreams helpers by creating app/helpers/fcrepo_admin/datastreams_helper.rb with this content: - module FcrepoAdmin::DatastreamsHelper include FcrepoAdmin::Helpers::DatastreamsHelperBehavior - # override and/or add methods here + # override methods here end - The contents of the datastream context navigation menu can be customized by overriding #datastream_context_nav_items, - or by copying and modifying the partial fcrepo_admin/datastreams/context_nav_items. +=== Context Navigation Menus -* Controllers +The contents of the object context navigation menu can be customized by overriding the #object_context_nav_items +helper method, or by copying and modifying the partial fcrepo_admin/objects/context_nav_items. - To override/extend the objects controller, create app/controllers/fcrepo_admin/objects_controller.rb: +The contents of the datastream context navigation menu can be customized by overriding the +#datastream_context_nav_items helper method, or by copying and modifying the partial fcrepo_admin/datastreams/context_nav_items. - module FcrepoAdmin - class ObjectsController < CatalogController - include FcrepoAdmin::Controller::ObjectsControllerBehavior - # add your customizations - end - end +=== Controllers - NOTE: This controller subclasses CatalogController, not ApplicationController. +To override or extend controller behaviors, please consult Rails engine documentation and guides, such as +http://edgeguides.rubyonrails.org/engines.html. - To override/extend the datastreams controller, create app/controllers/fcrepo_admin/datastreams_controller.rb: +IMPORTANT: If you add a non-RESTful action to a controller, you will probably have to add a CanCan action alias +to your Ability class. For this, you can use Hydra's #custom_permissions callback: - module FcrepoAdmin - class DatastreamsController < ApplicationController - include FcrepoAdmin::Controller::DatastreamsControllerBehavior - # add your customizations + class Ability + include Hydra::Ability + include Hydra::PolicyAwareAbility + include FcrepoAdmin::Ability + + def custom_permissions + alias_action :my_method, :to => :read end - end -=== Contributing + end +== Internationalization (i18n) + +An effort has been made to support i18n on headings, menus, etc. See https://github.com/projecthydra/fcrepo-admin/blob/master/config/locales/fcrepo_admin.en.yml +for the keys and consult the Rails documentation on how to provide your own translations or alternate text values. + +== Contributing + * Consider first posting to hydra-tech@googlegroups.com with a question or bug report, or submit an issue to the Github issue tracker at https://github.com/projecthydra/fcrepo-admin/issues. * Fork the git repository, create a feature branch, make your changes, and submit a pull request. It is preferable for all changes to be made in one commit, if possible. Thanks! -=== License +== License See the LICENSE file in the root directory of the project for copyright and license information. Licenses for code copied from other projects will be included in source files as required.