mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
user popover: Display text as link for URL custom field.
In user profile popover, for URL type custom field display text as link in popover, so user can easily click on link directly.
This commit is contained in:
committed by
Tim Abbott
parent
1c14e0166c
commit
4049a08b88
@@ -191,6 +191,7 @@ function show_user_profile(element, user) {
|
||||
|
||||
profile_field.name = field.name;
|
||||
profile_field.is_user_field = false;
|
||||
profile_field.is_link = field_type === field_types.URL.id;
|
||||
if (field_value) {
|
||||
if (field_type === field_types.DATE.id) {
|
||||
profile_field.value = moment(field_value).format(localFormat);
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
<div class="pill-container not-editable" data-field-id="{{this.id}}">
|
||||
<div class="input" contenteditable="false" style="display: none;"></div>
|
||||
</div>
|
||||
{{else if this.is_link}}
|
||||
<a href={{this.value}} target="_blank" class="user-profile-modal-field-value">{{this.value}}</a>
|
||||
{{else}}
|
||||
<div class="user-profile-modal-field-value">{{this.value}}</div>
|
||||
{{/if}}
|
||||
|
||||
Reference in New Issue
Block a user