Перейти к содержанию

Модуль:CTD: различия между версиями

м
нет описания правки
мНет описания правки
мНет описания правки
Строка 119: Строка 119:
-- Where 'userparam' consist of all the parameters that can not be fetched by symantic property:
-- Where 'userparam' consist of all the parameters that can not be fetched by symantic property:
-- * text = text to show; generally it is the original text of request
-- * text = text to show; generally it is the original text of request
-- * view = style of displaying information: подсказка, сноска, скобки
-- * view = style of displaying information: подсказка, сноска, скобки, текст
-- * type = type of term: понятие (по умолчанию), личность, выражение, литература, периодика / conception, person, expression, literature, periodical
-- * type = type of term: понятие (по умолчанию), личность, выражение, литература, периодика / conception, person, expression, literature, periodical
-- * style= серый / gray
-- * style= серый / gray
Строка 231: Строка 231:
text = '<span style="border-bottom: 1px dotted gray; cursor: help;" title="' .. description .. lifetime .. ' (БТС, ' .. term .. ').">' .. text .. '</span>'   
text = '<span style="border-bottom: 1px dotted gray; cursor: help;" title="' .. description .. lifetime .. ' (БТС, ' .. term .. ').">' .. text .. '</span>'   
end
end
if view == 'сноска' or view == 'сноска и подсказка' or view == 'подсказка и сноска' then
-- вид "сноска" и "текст" одинаковый; второй применяется в случаях, когда сноска указывается вручную, поэтому он повторяет вид "сноска", только без тега <ref>
if view == 'сноска' or view == 'сноска и подсказка' or view == 'подсказка и сноска'
  or view == 'текст' then
reference =  term_to_show .. origin .. '. – ' .. description .. ' ('.. ctd_title ..').'
reference =  term_to_show .. origin .. '. – ' .. description .. ' ('.. ctd_title ..').'
if not isempty(style) then  -- there is only one additional style for now, so ignore the value
if not isempty(style) then  -- there is only one additional style for now, so ignore the value
reference = '<span style="color: gray;">' .. reference ..'</span>'
reference = '<span style="color: gray;">' .. reference ..'</span>'
end
end
reference = '<ref>' .. reference ..'</ref>'
if not view == 'текст' then
reference = '<ref>' .. reference ..'</ref>'
end
end
end
if view == 'скобки' then
if view == 'скобки' then
if isempty(style) then
if isempty(style) then