Removed early return from printable name method
This commit is contained in:
parent
0330e10943
commit
ecf767ee4f
1 changed files with 9 additions and 6 deletions
|
@ -13,14 +13,17 @@ module BrowseHelper
|
|||
if version
|
||||
name = t 'printable_name.with_version', :id => name, :version => object.version.to_s
|
||||
end
|
||||
# stop here if redacted to avoid giving away redacted version tags.
|
||||
return name if object.redacted?
|
||||
|
||||
# don't look at object tags if redacted, so as to avoid giving
|
||||
# away redacted version tag information.
|
||||
unless object.redacted?
|
||||
if object.tags.include? "name:#{I18n.locale}"
|
||||
name = t 'printable_name.with_name', :name => object.tags["name:#{I18n.locale}"].to_s, :id => name
|
||||
elsif object.tags.include? 'name'
|
||||
name = t 'printable_name.with_name', :name => object.tags['name'].to_s, :id => name
|
||||
end
|
||||
end
|
||||
|
||||
return name
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue