Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display telephone numbers as tel: links #8240

Closed
Bad-and-Mad opened this issue Oct 20, 2021 · 3 comments
Closed

Display telephone numbers as tel: links #8240

Bad-and-Mad opened this issue Oct 20, 2021 · 3 comments

Comments

@Bad-and-Mad
Copy link

Would you please include an HTML render function for telephone numbers that enables CTI functionality to be mapped in the address display?

We have implemented it like this, for example:

program/actions/contacts/show.php:

106:    public static function contact_details($attrib)
107-    {
108-        $rcmail = rcmail::get_instance();
109-
110-        // check if we have a valid result
111-        if (!self::$contact) {
112-            return false;
113-        }
114-
115-        $i_size       = !empty($attrib['size']) ? $attrib['size'] : 40;
116-        $short_labels = self::get_bool_attr($attrib, 'short-legend-labels');
117-
118-        $form = [
119-            'contact' => [
120-                'name'    => $rcmail->gettext('properties'),
121-                'content' => [
122-                    'email'   => ['size' => $i_size, 'render_func' => 'rcmail_action_contacts_show::render_email_value'],
123-                    // 'phone'   => ['size' => $i_size],
124-                    'phone'   => ['size' => $i_size, 'render_func' => 'rcmail_action_contacts_show::render_phone_value'],
125-                    'address' => [],
126-                    'website' => ['size' => $i_size, 'render_func' => 'rcmail_action_contacts_show::render_url_value'],
127-                    'im'      => ['size' => $i_size],
128-                ],
129-            ],

181:    public static function render_phone_value($phone)
182-    {
183-        return html::a(array(
184-                'href' => 'tel:' . $phone,
185-                'title' => 'use number...',
186-                'class' => 'url',
187-        ), rcube::Q($phone));
188-    }

@alecpl
Copy link
Member

alecpl commented Oct 20, 2021

I guess it makes sense also since we support mobile.

@alecpl alecpl changed the title HTML render function for telephone numbers Display telephone numbers as tel: links Oct 20, 2021
@alecpl alecpl added this to the later milestone Oct 20, 2021
@Bad-and-Mad
Copy link
Author

I would be very happy about such a solution, especially because of its use on cell phones.

thanks

@alecpl alecpl modified the milestones: later, 1.6-beta Oct 24, 2021
@alecpl
Copy link
Member

alecpl commented Oct 29, 2021

Implemented.

@alecpl alecpl closed this as completed Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants