To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / plugins / redmine_bibliography / lib / bibliography / user_author_patch.rb @ 1286:d0d6bbe9f2e0
History | View | Annotate | Download (587 Bytes)
| 1 | 466:a7dc708d48a1 | luis | require_dependency 'user'
|
|---|---|---|---|
| 2 | |||
| 3 | module Bibliography |
||
| 4 | 1070:858f042e8d11 | luis | module UserAuthorPatch |
| 5 | 466:a7dc708d48a1 | luis | def self.included(base) |
| 6 | 1070:858f042e8d11 | luis | base.send(:include, InstanceMethods) |
| 7 | extend ClassMethods
|
||
| 8 | |||
| 9 | 466:a7dc708d48a1 | luis | end #self.included |
| 10 | 1070:858f042e8d11 | luis | |
| 11 | 483:cc267eb99115 | luis | module ClassMethods |
| 12 | 1070:858f042e8d11 | luis | end
|
| 13 | |||
| 14 | 483:cc267eb99115 | luis | module InstanceMethods |
| 15 | 518:b24091590b63 | luis | |
| 16 | 600:c3c1091639ad | luis | 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 | 1070:858f042e8d11 | luis | end
|
| 22 | return institution_name
|
||
| 23 | 600:c3c1091639ad | luis | end
|
| 24 | |||
| 25 | 483:cc267eb99115 | luis | end #InstanceMethods |
| 26 | 1070:858f042e8d11 | luis | |
| 27 | 466:a7dc708d48a1 | luis | end #UserPublicationsPatch |
| 28 | 567:5404f7dfb4b3 | chris | end #RedmineBibliography |