Display show more for experiment description if there are more than 2 lines [SCI-9096]

This commit is contained in:
Martin Artnik 2023-08-29 17:03:34 +02:00
parent 1f382be2ca
commit d6ffb326d1

View file

@ -74,7 +74,7 @@
<div class="description-text">
<%= custom_auto_link(experiment.description, team: current_team) %>
</div>
<% if experiment.description.present? && experiment.description.length > Constants::EXPERIMENT_LONG_DESCRIPTION %>
<% if experiment.description.present? && (experiment.description.length > Constants::EXPERIMENT_LONG_DESCRIPTION || experiment.description.count("\n") > 2) %>
<%= link_to t('experiments.card.more'),
experiment_path(experiment),
class: 'more-button experiment-action-link',