Revision 1397:bf2db886a543 plugins/redmine_bibliography/app
| plugins/redmine_bibliography/app/models/authorship.rb | ||
|---|---|---|
| 44 | 44 |
# using default setter (attr_writer) |
| 45 | 45 |
|
| 46 | 46 |
if self.author.nil? |
| 47 |
@search_author_class = ""
|
|
| 47 |
aclass = ""
|
|
| 48 | 48 |
else |
| 49 |
@search_author_class = "Author"
|
|
| 49 |
aclass = "Author"
|
|
| 50 | 50 |
end |
| 51 | 51 |
|
| 52 |
@search_author_class |
|
| 52 |
@search_author_class || aclass
|
|
| 53 | 53 |
end |
| 54 | 54 |
|
| 55 | 55 |
# def search_author_class=(search_author_class) |
| ... | ... | |
| 58 | 58 |
|
| 59 | 59 |
def search_author_id |
| 60 | 60 |
if self.author.nil? |
| 61 |
"xxx" |
|
| 61 |
authid = "xxx"
|
|
| 62 | 62 |
else |
| 63 |
author_id |
|
| 63 |
authid = author_id
|
|
| 64 | 64 |
end |
| 65 |
|
|
| 66 |
@search_author_id || authid |
|
| 65 | 67 |
end |
| 66 | 68 |
|
| 67 | 69 |
def search_author_tie |
| 68 | 70 |
if self.author.nil? |
| 69 |
return false
|
|
| 71 |
auth_tie = false
|
|
| 70 | 72 |
else |
| 71 |
return true
|
|
| 73 |
auth_tie = true
|
|
| 72 | 74 |
end |
| 73 | 75 |
|
| 76 |
@search_author_tie || auth_tie |
|
| 74 | 77 |
end |
| 75 | 78 |
|
| 76 | 79 |
def name |
Also available in: Unified diff