itflow-org / itflow

Free and open-source web application for MSPs. Unifies IT documentation, ticketing, invoicing.
https://itflow.org
GNU General Public License v3.0
525 stars 143 forks source link

client_logins uri limit with ellipsis #958

Closed ssteeltm closed 2 months ago

ssteeltm commented 2 months ago

limits long uri that may break lines in table

example: image

it put ellipsis on the displayed long uri

johnnyq commented 2 months ago

nice work and deff needed for those long URIs however we have a PHP function for this already in the functions.php

function truncate($text, $chars)
{
    if (strlen($text) <= $chars) {
        return $text;
    }
    $text = $text . " ";
    $text = substr($text, 0, $chars);
    $lastSpacePos = strrpos($text, ' ');
    if ($lastSpacePos !== false) {
        $text = substr($text, 0, $lastSpacePos);
    }
    return $text . "...";
}

Please update your pull request to use the function, and thank you for your commitment to ITFlow

sonarcloud[bot] commented 2 months ago

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

johnnyq commented 2 months ago

awesome looks good reeling in