Update disucssion and numebrs to direct linking

This commit is contained in:
osaajani 2019-11-29 05:29:03 +01:00
parent 53fe0b11f3
commit 9dd53cec7d
11 changed files with 32 additions and 13 deletions

View file

@ -50,6 +50,18 @@ namespace controllers\internals;
return $phone_number_util->format($phone_number_o, \libphonenumber\PhoneNumberFormat::INTERNATIONAL);
}
/**
* Format a number and make a link to a discussion with this number
* @param string $number : Number to format and make a link for
* @return string : Link to the number
*/
public static function phone_link ($number)
{
$number_format = \controllers\internals\Tool::phone_format($number);
$url = \descartes\Router::url('Discussion', 'show', ['number' => $number]);
return '<a href="' . self::s($url, false, true, false) . '">' . self::s($number_format, false, true, false) . '</a>';
}
/**
* Cette fonction fait la correspondance entre un type d'evenement et une icone font awesome.
*