user_block.tpl 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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. {% if _u.is_admin == 1 %}
  11. <div class="pull-right">
  12. <a class="btn btn-default btn-sm btn-social-edit" title="{{ "Edit"|get_lang }}" href="{{ _p.web }}main/admin/user_edit.php?user_id={{ user.id }}">
  13. <i class="fa fa-pencil" aria-hidden="true"></i>
  14. </a>
  15. </div>
  16. {% endif %}
  17. </h4>
  18. </div>
  19. <div id="sn-avatar-one" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="heading-sn">
  20. <div class="panel-body">
  21. <div class="area-avatar">
  22. {{ social_avatar_block }}
  23. {% if user.icon_status %}
  24. <!-- User icon -->
  25. <div class="avatar-icon">
  26. {{ user.icon_status_medium }}
  27. </div>
  28. <!-- End user icon -->
  29. {% endif %}
  30. {% if show_language_flag %}
  31. <!-- Language flag -->
  32. <div class="avatar-lm">
  33. {% if user.language %}
  34. {% if user.language.code == 'fr' %}
  35. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/fr.svg" width="36px">
  36. {% elseif user.language.code == 'de' %}
  37. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/de.svg" width="36px">
  38. {% elseif user.language.code == 'es' %}
  39. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/es.svg" width="36px">
  40. {% elseif user.language.code == 'it' %}
  41. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/it.svg" width="36px">
  42. {% elseif user.language.code == 'pl' %}
  43. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/pl.svg" width="36px">
  44. {% endif %}
  45. {% endif %}
  46. </div>
  47. <!-- End language flag -->
  48. <!-- Language cible -->
  49. <div class="avatar-lc">
  50. {% for item in extra_info %}
  51. {% if item.variable == 'langue_cible' %}
  52. {% if item.value == 'French2' %}
  53. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/fr.svg" width="36px">
  54. {% elseif item.value == 'German2' %}
  55. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/de.svg" width="36px">
  56. {% elseif item.value == 'Spanish' %}
  57. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/es.svg" width="36px">
  58. {% elseif item.value == 'Italian' %}
  59. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/it.svg" width="36px">
  60. {% elseif item.value == 'Polish' %}
  61. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/pl.svg" width="36px">
  62. {% elseif item.value == 'English' %}
  63. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/gb.svg" width="36px">
  64. {% endif %}
  65. {% endif %}
  66. {% endfor %}
  67. </div>
  68. <!-- End language cible -->
  69. {% endif %}
  70. </div>
  71. {# Ofaj #}
  72. <ul class="list-user-data">
  73. <li class="item item-name">
  74. <h5>{{ user.complete_name }} </h5>
  75. </li>
  76. {% if show_full_profile %}
  77. {% if user.email %}
  78. <li class="item">
  79. <a href="{{ _p.web }}main/messages/new_message.php">
  80. {{ "sn-message.png"|img(22, "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. {{ "vcard.png"|img(22, "BusinessCard" | get_lang) }}
  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>