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:
Yashashvi Dave
2018-08-25 00:11:28 +05:30
committed by Tim Abbott
parent 1c14e0166c
commit 4049a08b88
2 changed files with 3 additions and 0 deletions

View File

@@ -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);

View File

@@ -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}}