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
#!/usr/bin/env ruby | |
require 'json' | |
require 'rest_client' | |
# point this to your AS backend | |
BACKEND_URL = "http://localhost:8089" | |
TOKEN = { "X-ArchivesSpace-Session" => JSON.parse( RestClient.post "#{BACKEND_URL}/users/admin/login", { password: 'admin'} )["session"] } | |
# Directory to dump JSON files |
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 file to : | |
plugins/local/public/views/site/_branding.html.erb to override logo in | |
https://github.com/hudmol/archivesspace/blob/master/public/app/views/site/_branding.html.erb | |
%> | |
<h1> | |
<%= image_tag "#{AppConfig[:frontend_prefix]}assets/cuhk/cuhk_logo.png", :alt => I18n.t("brand.title") %> | |
</h1> |
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
This was the developer challenge project submitted by Chris Fitzpatrick (ArchivesSpace ) | |
and Leila Belle Sterman ( Montana St. University ) at Open Repositories 2014. | |
This is a proof of concept to show how to develop an ArchivesSpace plugin that interacts | |
with a repository (Fedora 4, in this situation ) and workflow manager ( in this case, https://trello.com/ ). | |
The basic process is that adding a Digital Object will also update a Trello board with a | |
card, possibly indicating someone to perform a scanning operation. When file versions | |
are associated to the digital object, the content will be uploaded to Fedora 4 and | |
Trello will be updated, possibly indicating that digitization has been completed. |
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
require 'json' | |
require 'rest_client' | |
require 'csv' | |
# this is a script to bulk delete locations in ArchivesSpace. | |
# To run this, you should have a recent version of ruby installed ( like > 1.9.3 ). | |
# Then, add the rest_client gem by using the command `gem install rest_client` | |
# To invoke the script, run simply run it with no parameters |
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
#!/usr/bin/env ruby | |
require 'json' | |
require 'rest_client' | |
require "highline/import" | |
# point this to your AS backend | |
BACKEND_URL = "http://localhost:8089" | |
TOKEN = { "X-ArchivesSpace-Session" => JSON.parse( RestClient.post "#{BACKEND_URL}/users/admin/login", { password: 'admin'} )["session"] } |
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/views/shared/_header_repository.html.erb %> | |
<=# just removes the links to classification %> | |
<div class="container repository-header"> | |
<div class="navbar"> | |
<div class="navbar-inner"> | |
<div class="container"> | |
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-repository-collapse"> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> |
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
<% | |
title = I18n.t("search_results.title") if title.nil? | |
%> | |
<div class="row-fluid"> | |
<div class="span3"> | |
<%= render_aspace_partial :partial => "search/filter" %> | |
</div> | |
<div class="span9"> | |
<div class="record-pane"> |
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/backend/controllers/reports.rb | |
class ArchivesSpaceService < Sinatra::Base | |
ReportManager.registered_reports.each do |uri_suffix, opts| | |
Endpoint.get("/repositories/:repo_id/reports/#{uri_suffix}") | |
.description(opts[:description]) | |
.params(*(opts[:params] << ReportHelper.report_formats << ["repo_id", :repo_id])) | |
.permissions([]) |
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 file to plugins/local/frontend/controllers/aspace_forms_helper.rb | |
module AspaceFormHelper | |
COMBOBOX_MIN_LIMIT = 50 # if a <select> has equal or more options than this value, output a combobox | |
class FormContext | |
def initialize(name, values_from, parent) |
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 file to plugins/local/frontend/controllers/form_fix_controller.rb | |
# Obviously not a controller, but the naming convention is used to make sure that | |
# it loads. | |
# | |
module AspaceFormHelper | |
class FormContext | |
def label_and_date(name, opts = {}) |
OlderNewer