user_block.tpl 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  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. <!-- TYPE USER PROFILE -->
  17. {% if user.status == 5 %}
  18. <div class="avatar-icon">
  19. {% if user.has_certificates %}
  20. <img src="{{ _p.web_img }}icons/svg/identifier_graduated.svg" width="32px" height="32px">
  21. {% else %}
  22. <img src="{{ _p.web_img }}icons/svg/identifier_student.svg" width="32px" height="32px">
  23. {% endif %}
  24. </div>
  25. {% elseif user.status == 1 or user.status == 17 %}
  26. <div class="avatar-icon">
  27. {% if user.is_admin %}
  28. <img src="{{ _p.web_img }}icons/svg/identifier_admin.svg" width="32px" height="32px">
  29. {% else %}
  30. <img src="{{ _p.web_img }}icons/svg/identifier_teacher.svg" width="32px" height="32px">
  31. {% endif %}
  32. </div>
  33. {% endif %}
  34. <!-- END TYPE PROFILE -->
  35. {% if show_language_flag %}
  36. <!-- LM -->
  37. <div class="avatar-lm">
  38. {% if user.language %}
  39. {% if user.language.code == 'fr' %}
  40. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/fr.svg" width="36px">
  41. {% elseif user.language.code == 'de' %}
  42. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/de.svg" width="36px">
  43. {% elseif user.language.code == 'es' %}
  44. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/es.svg" width="36px">
  45. {% elseif user.language.code == 'it' %}
  46. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/it.svg" width="36px">
  47. {% elseif user.language.code == 'pl' %}
  48. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/pl.svg" width="36px">
  49. {% endif %}
  50. {% endif %}
  51. </div>
  52. <!-- END LM -->
  53. <!-- LC -->
  54. <div class="avatar-lc">
  55. {% for item in extra_info %}
  56. {% if item.variable == 'langue_cible' %}
  57. {% if item.value == 'French2' %}
  58. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/fr.svg" width="36px">
  59. {% elseif item.value == 'German2' %}
  60. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/de.svg" width="36px">
  61. {% elseif item.value == 'Spanish' %}
  62. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/es.svg" width="36px">
  63. {% elseif item.value == 'Italian' %}
  64. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/it.svg" width="36px">
  65. {% elseif item.value == 'Polish' %}
  66. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/pl.svg" width="36px">
  67. {% elseif item.value == 'English' %}
  68. <img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/gb.svg" width="36px">
  69. {% endif %}
  70. {% endif %}
  71. {% endfor %}
  72. </div>
  73. <!-- END LC -->
  74. {% endif %}
  75. </div>
  76. {# Ofaj #}
  77. <ul class="list-user-data">
  78. <li class="item item-name">
  79. <h5>{{ user.complete_name }} </h5>
  80. </li>
  81. {% if _u.is_admin == 1 %}
  82. <li class="item">
  83. <a href="{{ _p.web }}main/admin/user_edit.php?user_id={{ user.id }}">
  84. <img src="{{ "edit.png" | icon }}" alt="{{ "Edit" | get_lang }}">
  85. </a>
  86. </li>
  87. {% endif %}
  88. {% if show_full_profile %}
  89. {% if user.email %}
  90. <li class="item">
  91. <a href="{{ _p.web }}main/messages/new_message.php">
  92. <img src="{{ "instant_message.png" | icon }}" alt="{{ "Email" | get_lang }}">
  93. <div class="email-overflow">{{ user.email }}</div>
  94. </a>
  95. </li>
  96. {% endif %}
  97. {% if vcard_user_link %}
  98. <li class="item">
  99. <a href="{{ vcard_user_link }}">
  100. <img src="{{ "vcard.png" | icon(16) }}" alt="{{ "BusinessCard" | get_lang }}" width="16" height="16">
  101. {{ "BusinessCard" | get_lang }}
  102. </a>
  103. </li>
  104. {% endif %}
  105. {% set skype_account = '' %}
  106. {% set linkedin_url = '' %}
  107. {% for extra in user.extra %}
  108. {% if extra.value.getField().getVariable() == 'skype' %}
  109. {% set skype_account = extra.value.getValue() %}
  110. {% endif %}
  111. {% if extra.value.getField().getVariable() == 'linkedin_url' %}
  112. {% set linkedin_url = extra.value.getValue() %}
  113. {% endif %}
  114. {% endfor %}
  115. {% if 'allow_show_skype_account'|api_get_setting == 'true' and not skype_account is empty %}
  116. <li class="item">
  117. <a href="skype:{{ skype_account }}?chat">
  118. <span class="fa fa-skype fa-fw" aria-hidden="true"></span> {{ 'Skype'|get_lang }}
  119. </a>
  120. </li>
  121. {% endif %}
  122. {% if 'allow_show_linkedin_url'|api_get_setting == 'true' and not linkedin_url is empty %}
  123. <li class="item">
  124. <a href="{{ linkedin_url }}" target="_blank">
  125. <span class="fa fa-linkedin fa-fw" aria-hidden="true"></span> {{ 'LinkedIn'|get_lang }}
  126. </a>
  127. </li>
  128. {% endif %}
  129. {% endif %}
  130. {% if chat_enabled == 1 %}
  131. {% if user.user_is_online_in_chat != 0 %}
  132. {% if user_relation == user_relation_type_friend %}
  133. <li class="item">
  134. <a onclick="javascript:chatWith('{{ user.id }}', '{{ user.complete_name }}', '{{ user.user_is_online }}','{{ user.avatar_small }}')" href="javascript:void(0);">
  135. <img src="{{ "online.png" | icon }}" alt="{{ "Online" | get_lang }}">
  136. {{ "Chat" | get_lang }} ({{ "Online" | get_lang }})
  137. </a>
  138. </li>
  139. {% endif %}
  140. {% endif %}
  141. {% endif %}
  142. <dl class="list-info">
  143. {% for item in extra_info %}
  144. {% if item.variable != 'langue_cible' %}
  145. <dt>{{ item.label }}:</dt>
  146. <dd>{{ item.value }}</dd>
  147. {% endif %}
  148. {% endfor %}
  149. </dl>
  150. {% if not profile_edition_link is empty %}
  151. <li class="item">
  152. <a class="btn btn-default btn-sm btn-block" href="{{ profile_edition_link }}">
  153. <em class="fa fa-edit"></em>{{ "EditProfile" | get_lang }}
  154. </a>
  155. </li>
  156. {% endif %}
  157. </ul>
  158. </div>
  159. </div>
  160. </div>
  161. </div>
  162. </div>