To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / plugins / redmine_bibliography / lib / bibliography / project_publications_patch.rb @ 1402:5cb7eeccede1

History | View | Annotate | Download (611 Bytes)

1
require_dependency 'project'
2

    
3
module Bibliography
4
  module ProjectPublicationsPatch
5
    def self.included(base)
6
          base.class_eval do
7
            has_and_belongs_to_many :publications, :uniq => true
8

    
9
            scope :name_or_homepage_like, lambda {|q|
10
              s = "%#{q.to_s.strip.downcase}%"
11
              {:conditions => ["LOWER(name) LIKE :s OR LOWER(homepage) LIKE :s", {:s => s}],
12
               :order => 'name'
13
              }
14
            }
15
          end
16
    end #self.included
17

    
18
    module ProjectMethods
19

    
20

    
21

    
22

    
23
    end #ProjectMethods
24
  end #ProjectPublicationsPatch
25
end #RedmineBibliography