Cross Reference: sentence_helper.rb
xref
: /
ontohub
/
app
/
helpers
/
sentence_helper.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
module
SentenceHelper
def
format_for_view
(
sentence
)
if
sentence.display
_text
? &&
sentence.ontology.logic.name
==
'OWL'
sentence.display_text.gsub
(/<
([^>]*)
>/,
"<strong>\\1</strong>"
)
.
html_safe
else
"#{
sentence.text
}"
.
sub
(/\s%\(
#{
sentence.name
}\)%/, '')
end
end
def
link_to_sentence_origin
(
sentence
,
ontology
)
if
sentence.ontology
!=
ontology
t
(
'
sentences.sentence.defined
_in'
,
link
:
link_to
(
sentence.ontology
,
[
sentence.ontology.repository
,
sentence.ontology
])
)
end
end
end