== 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
This project is at an early stage of development. It should be considered experimental and not ready for production deployment.
=== Requirements
fcrepo_admin is designed for installation on hydra-head 6.0.0 or higher.
See https://github.com/projecthydra/hydra-head/wiki/Installation-Prerequisites.
=== Installation
(In the future, we hope to automate some of these tasks with a generator.)
* Add to gemfile
gem 'fcrepo_admin'
Then bundle install
* Run the Blacklight and Hydra generators (if this is a new Rails app, not an existing Hydra head)
rails g blacklight --devise
rails g hydra:head -f
rake db:migrate
rails g hydra:jetty # if you need a development copy of jetty with solr and fedora
* Mount the engine
In config/routes.rb add this line:
mount FcrepoAdmin::Engine => '/admin', :as=> 'fcrepo_admin'
You may replace '/admin'
with any mount point (except perhaps '/catalog'
),
including '/'
. All routes include objects
as a subpath.
* Extend the SolrDocument model
In app/models/solr_document.rb add this line:
use_extension FcrepoAdmin::SolrDocumentExtension
(This may only be necessary if customizing the catalog show page as indicated below.)
* Add Javascript
In app/assets/javascripts/application.js add this line:
//= require bootstrap-tab
* Add CSS
In app/assets/stylesheets/application.css add this line:
//= require fcrepo_admin/fcrepo_admin
* Customize catalog show page (optional)
If you would like to add Fedora object information to the catalog show page,
copy the partial app/views/catalog/_show_default.html.erb
from the Blacklight
gem to your application, then add to the bottom of the file:
<%= render :partial => 'fcrepo_admin/catalog/show', :locals => {:document => document} %>
Use Blacklight's config options in CatalogController to control the basic content on the show page
(HTML title, page title, and list of the fields/values at the top of the page).
=== 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.