enju_biblio 0.1.0.pre6 → 0.1.0.pre7

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,7 +7,7 @@ class ImportRequest < ActiveRecord::Base
7
7
  validate :check_isbn
8
8
  #validate :check_imported, :on => :create
9
9
  #validates_uniqueness_of :isbn, :if => Proc.new{|request| ImportRequest.where("created_at > ?", 1.day.ago).collect(&:isbn).include?(request.isbn)}
10
- enju_ndl_search
10
+ enju_ndl_search if defined?(EnjuNdl)
11
11
 
12
12
  state_machine :initial => :pending do
13
13
  event :sm_fail do
data/app/models/item.rb CHANGED
@@ -3,7 +3,7 @@ class Item < ActiveRecord::Base
3
3
  attr_accessible :call_number, :item_identifier, :circulation_status_id,
4
4
  :checkout_type_id, :shelf_id, :include_supplements, :note, :url, :price,
5
5
  :acquired_at, :bookstore_id, :missing_since, :budget_type_id,
6
- :manifestation_id #,:exemplify_attributes
6
+ :manifestation_id, :library_id, :required_role_id #,:exemplify_attributes
7
7
  scope :on_shelf, where('shelf_id != 1')
8
8
  scope :on_web, where(:shelf_id => 1)
9
9
  scope :accepted_between, lambda{|from, to| includes(:accept).where('items.created_at BETWEEN ? AND ?', Time.zone.parse(from).beginning_of_day, Time.zone.parse(to).end_of_day)}
@@ -173,9 +173,9 @@ class Manifestation < ActiveRecord::Base
173
173
  end
174
174
 
175
175
  enju_manifestation_viewer
176
- enju_ndl_search
176
+ enju_ndl_search if defined?(EnjuNdl)
177
177
  #enju_amazon
178
- enju_oai
178
+ enju_oai if defined?(EnjuOai)
179
179
  #enju_nii
180
180
  #enju_export
181
181
 
@@ -0,0 +1,24 @@
1
+ atom_feed(:url => manifestations_url(:format => :atom),
2
+ "xmlns:opds" => "http://opds-spec.org/2010/catalog",
3
+ "xmlns:jepa" => "http://www.jepa.or.jp/xmlns/atomPhonetics/1.1"
4
+ ) do |feed|
5
+ feed.title t('manifestation.query_search_result', :query => @query, :library_group_name => @library_group.display_name.localize)
6
+ feed.updated(@manifestations.first ? @manifestations.first.created_at : Time.zone.now)
7
+ feed.link :rel => 'start', :href => manifestations_url(:format => :opds), :type => "application/atom+xml;profile=opds-catalog;kind=navigation"
8
+
9
+ @manifestations.each do |manifestation|
10
+ feed.entry(manifestation) do |entry|
11
+ entry.link :rel => "http://opds-spec.org/acquisition/borrow", :href => manifestation_url(manifestation), :type => 'text/html'
12
+ entry.title(manifestation.original_title)
13
+ if defined?(EnjuBookmark)
14
+ entry.content(manifestation.tags.join(' '), :type => 'html')
15
+ end
16
+
17
+ manifestation.creators.readable_by(current_user).each do |patron|
18
+ entry.author do |author|
19
+ author.name(patron.full_name)
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -4,9 +4,7 @@ require 'paper_trail'
4
4
  require 'paperclip'
5
5
  require 'state_machine'
6
6
  require 'validates_timeliness'
7
- require 'enju_oai'
8
7
  require 'has_scope'
9
- require 'enju_ndl'
10
8
  require 'dynamic_form'
11
9
  require 'simple_form'
12
10
  require 'resque_mailer'
@@ -1,3 +1,3 @@
1
1
  module EnjuBiblio
2
- VERSION = "0.1.0.pre6"
2
+ VERSION = "0.1.0.pre7"
3
3
  end