mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-20 16:37:48 +02:00
Update disucssion and numebrs to direct linking
This commit is contained in:
parent
53fe0b11f3
commit
9dd53cec7d
11 changed files with 32 additions and 13 deletions
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue