user_block.html.twig 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. {% import '@ChamiloTheme/Macros/box.html.twig' as macro %}
  2. {% autoescape false %}
  3. <div class="sidebar-avatar">
  4. {% set profile_body %}
  5. {{ social_avatar_block }}
  6. <div class="name">
  7. {{ user.complete_name }}
  8. </div>
  9. <div class="email">
  10. <a href="{{ _p.web }}main/messages/new_message.php">
  11. <img src="{{ "instant_message.png" | icon }}" alt="{{ "Email" | get_lang }}">
  12. {{ user.email}}
  13. </a>
  14. </div>
  15. <ul class="list-user-data">
  16. {% if show_full_profile %}
  17. {% set skype_account = '' %}
  18. {% set linkedin_url = '' %}
  19. {% for extra in user.extra %}
  20. {% if extra.value.getField().getVariable() == 'skype' %}
  21. {% set skype_account = extra.value.getValue() %}
  22. {% endif %}
  23. {% if extra.value.getField().getVariable() == 'linkedin_url' %}
  24. {% set linkedin_url = extra.value.getValue() %}
  25. {% endif %}
  26. {% endfor %}
  27. {% if 'allow_show_skype_account'|api_get_setting == 'true' and not skype_account is empty %}
  28. <li class="item">
  29. <a href="skype:{{ skype_account }}?chat">
  30. <span class="fa fa-skype fa-fw" aria-hidden="true"></span> {{ 'Skype'|get_lang }}
  31. </a>
  32. </li>
  33. {% endif %}
  34. {% if 'allow_show_linkedin_url'|api_get_setting == 'true' and not linkedin_url is empty %}
  35. <li class="item">
  36. <a href="{{ linkedin_url }}" target="_blank">
  37. <span class="fa fa-linkedin fa-fw" aria-hidden="true"></span> {{ 'LinkedIn'|get_lang }}
  38. </a>
  39. </li>
  40. {% endif %}
  41. {% endif %}
  42. {% if chat_enabled == 1 %}
  43. {% if user.user_is_online_in_chat != 0 %}
  44. {% if user_relation == user_relation_type_friend %}
  45. <li class="item">
  46. <a onclick="javascript:chatWith('{{ user.id }}', '{{ user.complete_name }}', '{{ user.user_is_online }}','{{ user.avatar_small }}')" href="javascript:void(0);">
  47. <img src="{{ "online.png" | icon }}" alt="{{ "Online" | get_lang }}">
  48. {{ "Chat" | get_lang }} ({{ "Online" | get_lang }})
  49. </a>
  50. </li>
  51. {# else #}
  52. {# <img src="{{ "offline.png" | icon }}" alt="{{ "Online" | get_lang }}"> #}
  53. {# {{ "Chat" | get_lang }} ({{ "Offline" | get_lang }}) #}
  54. {% endif %}
  55. {% endif %}
  56. {% endif %}
  57. </ul>
  58. {% endset %}
  59. {{ macro.panel("Profile" | get_lang, profile_body ) }}
  60. </div>
  61. {% endautoescape %}