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 / user_author_patch.rb @ 1430:04cc33a44d4c

History | View | Annotate | Download (587 Bytes)

1
require_dependency 'user'
2

    
3
module Bibliography
4
  module UserAuthorPatch
5
    def self.included(base)
6
      base.send(:include, InstanceMethods)
7
      extend ClassMethods
8

    
9
    end #self.included
10

    
11
    module ClassMethods
12
    end
13

    
14
    module InstanceMethods
15

    
16
      def institution
17
        unless self.ssamr_user_detail.nil?
18
          institution_name = self.ssamr_user_detail.institution_name
19
        else
20
          institution_name = "No Institution Set"
21
        end
22
        return institution_name
23
      end
24

    
25
    end #InstanceMethods
26

    
27
  end #UserPublicationsPatch
28
end #RedmineBibliography