Revision 1081:b56a4c5afa35 vendor/plugins/redmine_bibliography/lib

View differences:

vendor/plugins/redmine_bibliography/lib/bibliography/projects_helper_patch.rb
1
module Bibliography
2
  module ProjectsHelperPatch
3

  
4
    def self.included(base) # :nodoc:
5
      base.send(:include, InstanceMethods)
6
      base.send(:include, PublicationsHelper)
7

  
8
      base.class_eval do
9
        unloadable
10
      end
11
    end
12

  
13
    module InstanceMethods
14
    end
15
  end
16
end
17

  
vendor/plugins/redmine_bibliography/lib/bibliography/user_author_patch.rb
1 1
require_dependency 'user'
2 2

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

  
9 9
    end #self.included
10
    
10

  
11 11
    module ClassMethods
12
    end  
13
    
12
    end
13

  
14 14
    module InstanceMethods
15 15

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

  
25 25
      def get_author_info
26 26
        # TODO: DELETE THIS METHOD??
27
        info = { 
27
        info = {
28 28
          :name_on_paper =>  self.name,
29 29
          :email => self.mail,
30 30
          :institution => "",
31 31
          :author_user_id => self.id,
32
          :is_user => "1"                    
32
          :is_user => "1"
33 33
        }
34 34

  
35 35
        if not self.ssamr_user_detail.nil?
36 36
          info[:institution]  = self.ssamr_user_detail.institution_name
37 37
        end
38 38

  
39
        return info        
39
        return info
40 40
      end
41
                
41

  
42 42
    end #InstanceMethods
43
    
43

  
44 44
  end #UserPublicationsPatch
45 45
end #RedmineBibliography

Also available in: Unified diff