Actualiza a Redmine 3.4.13 con adaptaciones

Archivos del código base de Redmine que se modifican para personalizar
la composición de las páginas, el texto de bienvenida y la presentación
de algunos contenidos.
This commit is contained in:
Manuel Cillero 2020-07-04 00:02:11 +02:00
parent ecddcaf1d3
commit 723a54d68d
11 changed files with 311 additions and 31 deletions

View file

@ -18,11 +18,14 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
module SearchHelper
include ActionView::Helpers::SanitizeHelper
def highlight_tokens(text, tokens)
return text unless text && tokens && !tokens.empty?
re_tokens = tokens.collect {|t| Regexp.escape(t)}
regexp = Regexp.new "(#{re_tokens.join('|')})", Regexp::IGNORECASE
result = ''
text = strip_tags(text)
text.split(regexp).each_with_index do |words, i|
if result.length > 1200
# maximum length of the preview reached
@ -63,7 +66,7 @@ module SearchHelper
:all_words => params[:all_words], :scope => params[:scope], t => 1)
end
('<ul>'.html_safe +
links.map {|link| content_tag('li', link)}.join(' ').html_safe +
links.map {|link| content_tag('li', link)}.join(' ').html_safe +
'</ul>'.html_safe) unless links.empty?
end
end