This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RacEADConverter < EADConverter | |
def self.import_types(show_hidden = false) | |
[ | |
{ | |
:name => "rac_ead_xml", | |
:description => "Import RAC EAD records from an XML file" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add this plugin to plugins/local/backend/model/accession_converter.rb | |
# this plugin allows the CSV importer to have columns like date_3_label, date_3_expression, | |
# extent_2_type, extent_2_container_summary etc. | |
class AccessionConverter < Converter | |
# we alias the old configure method... | |
self.singleton_class.send(:alias_method,:old_configure, :configure) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# put this file in | |
# plugins/local/backend/model/converter.rb | |
# and restart aspace. | |
class Converter | |
# forcibly remove files in the event of an interruption | |
def remove_files | |
@batch.each_open_file_path do |path| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# plugins/local/frontend/controllers/application_controller.rb | |
# Obviously, not a application controller, but we just name it this to follow a convention. | |
class ApplicationController < ActionController::Base | |
end | |
module ApplicationHelper | |
def include_theme_css | |
css = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frontend/lib/tasks/rake_jruby_complete_patch.rake | |
# Icky to have to do this, but had trouble with the recursive calls to Rake | |
# running with jruby-complete.jar. | |
classpath = [File.join(Rails.root, "..", "common")] | |
classpath << Dir.glob(File.join(Rails.root, "..", "build", "jruby*complete*.jar")).first | |
$rake_cmd = ["java", | |
"-XX:MaxPermSize=128m", "-Xmx256m", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<tr class="document" class="<%= cycle("even","odd") %>"> | |
<td> | |
<%= link_to_document(document, :label => Blacklight.config[:show][:heading].to_sym, :counter => (counter + 1 + @response.params[:start].to_i)) %> | |
</td> | |
<td> | |
<% creator = get_person_from_role(document, "Creator") %> | |
<%= [creator[:last], creator[:first]].join(", ") unless creator.nil? %> | |
</td> | |
<td> | |
<%= DateTime.parse(document.get(:system_create_dt)).to_time %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% stylesheet_links << "../javascripts/date-picker/css/datepicker" %> | |
<% javascript_includes << infusion_javascripts(:default_no_jquery, :extras=>[:inline_editor_integrations], :debug=>true, :render_html=>false) %> | |
<% javascript_includes << "jquery.jeditable.mini" %> | |
<% javascript_includes << "date-picker/js/datepicker" %> | |
<% javascript_includes << "jquery.form.js" %> | |
<% javascript_includes << 'custom' %> | |
<% javascript_includes << "catalog/edit" %> | |
<% javascript_includes << "jquery.hydraMetadata.js" %> | |
<% javascript_includes << "/plugin_assets/fluid-infusion/infusion/components/undo/js/Undo.js" %> | |
<% javascript_includes << "jquery.notice.js" %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form id="document_metadata" action="<%= url_for(:action=>"update", :controller=>"assets", :content_type=>"hydra_tune")%>" method="post" data-resourceType="hydra_tune" accept-charset="utf-8"> | |
<fieldset id="title_fields"> | |
<legend>Title</legend> | |
<input id="content_type" type="hidden" name="content_type" value="hydra_audio" /> | |
<dl> | |
<dt> | |
<%= fedora_field_label("descMetadata", :title, "Title:") %> | |
</dt> | |
<dd class="title"> | |
<%= fedora_text_field(@document_fedora,"descMetadata", [:title], :multiple=>false) %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dl> | |
<% unless get_values_from_datastream(@document_fedora,"descMetadata", [:title]).empty? %> | |
<dt> | |
<%= fedora_field_label("descMetadata", [:title], "Title:") %> | |
</dt> | |
<dd class="title"> | |
<%= get_values_from_datastream(@document_fedora,"descMetadata", [:title]) %> | |
</dd> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# HydraTuneDS | |
class HydraTuneDS < ActiveFedora::NokogiriDatastream | |
set_terminology do |t| t.root(:path=>"dc", :xmlns=>"http://purl.org/dc/elements/1.1/", :schema=>"http://purl.org/dc/elements/1.1/") | |
t.title(:index_as=>[:searchable, :displayable, :facetable, :sortable], :required=>:true, :type=>:string ) | |
t.creator(:index_as=>[:searchable, :displayable, :facetable, :sortable], :required=>:true, :type=>:string) | |
end | |
def self.xml_template | |
builder = Nokogiri::XML::Builder.new do |xml| | |
xml.dc(:xmlns=>"http://purl.org/dc/elements/1.1/") { |