pkp / classic

An official theme for OJS 3.1.1+
GNU General Public License v2.0
11 stars 27 forks source link

Consider using truncate Smarty function #25

Open Vitaliy-1 opened 5 years ago

Vitaliy-1 commented 5 years ago

There are several places where a text is limited by symbol count, e.g.: https://github.com/pkp/classic/blob/master/templates/frontend/objects/issue_toc.tpl#L54

Consider using truncate instead of substr as a more native Smarty way

sssoz commented 5 years ago

@Vitaliy-1 Looking at this issue, but I am not quite sure I understand why there’s a condition for this particular case: https://github.com/pkp/classic/blob/a1a8090265b071cb0080ba7384897836b762fa18/templates/frontend/objects/issue_toc.tpl#L39

Since it is the issue TOC / detail page, shouldn’t there be only one way to display the issue description -- in full? There’s no need to truncate the text or display a 'more' button, just so we can keep it simple.