user_block.tpl 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <div class="sidebar-avatar">
  2. <div class="panel-group" id="sn-avatar" role="tablist" aria-multiselectable="true">
  3. <div class="panel panel-default">
  4. <div class="panel-heading" role="tab" id="heading-sn">
  5. <h4 class="panel-title">
  6. <a role="button" data-toggle="collapse" data-parent="#sn-avatar"
  7. href="#sn-avatar-one" aria-expanded="true" aria-controls="sn-avatar-one">
  8. {{ "Profile" | get_lang }}
  9. </a>
  10. </h4>
  11. </div>
  12. <div id="sn-avatar-one" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="heading-sn">
  13. <div class="panel-body">
  14. <div class="area-avatar">
  15. {{ social_avatar_block }}
  16. {% if user.icon_status %}
  17. <!-- User icon -->
  18. <div class="avatar-icon">
  19. {{ user.icon_status_medium }}
  20. </div>
  21. <!-- End user icon -->
  22. {% endif %}
  23. {% if show_language_flag %}
  24. <!-- Language flag -->
  25. <div class="avatar-lm">
  26. {% if user.language %}
  27. {% if user.language.code == 'fr' %}
  28. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/fr.svg" width="36px">
  29. {% elseif user.language.code == 'de' %}
  30. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/de.svg" width="36px">
  31. {% elseif user.language.code == 'es' %}
  32. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/es.svg" width="36px">
  33. {% elseif user.language.code == 'it' %}
  34. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/it.svg" width="36px">
  35. {% elseif user.language.code == 'pl' %}
  36. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/pl.svg" width="36px">
  37. {% endif %}
  38. {% endif %}
  39. </div>
  40. <!-- End language flag -->
  41. <!-- Language cible -->
  42. <div class="avatar-lc">
  43. {% for item in extra_info %}
  44. {% if item.variable == 'langue_cible' %}
  45. {% if item.value == 'French2' %}
  46. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/fr.svg" width="36px">
  47. {% elseif item.value == 'German2' %}
  48. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/de.svg" width="36px">
  49. {% elseif item.value == 'Spanish' %}
  50. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/es.svg" width="36px">
  51. {% elseif item.value == 'Italian' %}
  52. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/it.svg" width="36px">
  53. {% elseif item.value == 'Polish' %}
  54. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/pl.svg" width="36px">
  55. {% elseif item.value == 'English' %}
  56. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/gb.svg" width="36px">
  57. {% endif %}
  58. {% endif %}
  59. {% endfor %}
  60. </div>
  61. <!-- End language cible ->
  62. {% endif %}
  63. </div>
  64. {# Ofaj #}
  65. <ul class="list-user-data">
  66. <li class="item item-name">
  67. <h5>{{ user.complete_name }} </h5>
  68. </li>
  69. {% if _u.is_admin == 1 %}
  70. <li class="item">
  71. <a href="{{ _p.web }}main/admin/user_edit.php?user_id={{ user.id }}">
  72. <img src="{{ "edit.png" | icon }}" alt="{{ "Edit" | get_lang }}">
  73. </a>
  74. </li>
  75. {% endif %}
  76. {% if show_full_profile %}
  77. {% if user.email %}
  78. <li class="item">
  79. <a href="{{ _p.web }}main/messages/new_message.php">
  80. <img src="{{ "instant_message.png" | icon }}" alt="{{ "Email" | get_lang }}">
  81. <div class="email-overflow">{{ user.email }}</div>
  82. </a>
  83. </li>
  84. {% endif %}
  85. {% if vcard_user_link %}
  86. <li class="item">
  87. <a href="{{ vcard_user_link }}">
  88. <img src="{{ "vcard.png" | icon(16) }}" alt="{{ "BusinessCard" | get_lang }}" width="16" height="16">
  89. {{ "BusinessCard" | get_lang }}
  90. </a>
  91. </li>
  92. {% endif %}
  93. {% set skype_account = '' %}
  94. {% set linkedin_url = '' %}
  95. {% for extra in user.extra %}
  96. {% if extra.value.getField().getVariable() == 'skype' %}
  97. {% set skype_account = extra.value.getValue() %}
  98. {% endif %}
  99. {% if extra.value.getField().getVariable() == 'linkedin_url' %}
  100. {% set linkedin_url = extra.value.getValue() %}
  101. {% endif %}
  102. {% endfor %}
  103. {% if 'allow_show_skype_account'|api_get_setting == 'true' and not skype_account is empty %}
  104. <li class="item">
  105. <a href="skype:{{ skype_account }}?chat">
  106. <span class="fa fa-skype fa-fw" aria-hidden="true"></span> {{ 'Skype'|get_lang }}
  107. </a>
  108. </li>
  109. {% endif %}
  110. {% if 'allow_show_linkedin_url'|api_get_setting == 'true' and not linkedin_url is empty %}
  111. <li class="item">
  112. <a href="{{ linkedin_url }}" target="_blank">
  113. <span class="fa fa-linkedin fa-fw" aria-hidden="true"></span> {{ 'LinkedIn'|get_lang }}
  114. </a>
  115. </li>
  116. {% endif %}
  117. {% endif %}
  118. {% if chat_enabled == 1 %}
  119. {% if user.user_is_online_in_chat != 0 %}
  120. {% if user_relation == user_relation_type_friend %}
  121. <li class="item">
  122. <a onclick="javascript:chatWith('{{ user.id }}', '{{ user.complete_name }}', '{{ user.user_is_online }}','{{ user.avatar_small }}')" href="javascript:void(0);">
  123. <img src="{{ "online.png" | icon }}" alt="{{ "Online" | get_lang }}">
  124. {{ "Chat" | get_lang }} ({{ "Online" | get_lang }})
  125. </a>
  126. </li>
  127. {% endif %}
  128. {% endif %}
  129. {% endif %}
  130. <dl class="list-info">
  131. {% for item in extra_info %}
  132. {% if item.variable != 'langue_cible' %}
  133. <dt>{{ item.label }}:</dt>
  134. <dd>{{ item.value }}</dd>
  135. {% endif %}
  136. {% endfor %}
  137. </dl>
  138. {% if not profile_edition_link is empty %}
  139. <li class="item">
  140. <a class="btn btn-default btn-sm btn-block" href="{{ profile_edition_link }}">
  141. <em class="fa fa-edit"></em>{{ "EditProfile" | get_lang }}
  142. </a>
  143. </li>
  144. {% endif %}
  145. </ul>
  146. </div>
  147. </div>
  148. </div>
  149. </div>
  150. </div>