templates/profile/widget/model_info.html.twig line 1

Open in your IDE?
  1. <div class="my-3 p-3 bg-white rounded">
  2.     {% if profile.user.birthdate %}
  3.     <div class="mt-3">
  4.         <label class="font-weight-bold mb-0">
  5.             {{ 'Age:'|trans({}, 'profile_widget') }}
  6.         </label>
  7.         <p class="text-muted">
  8.             {% set age = date().diff(date(profile.user.birthdate)).y %}
  9.             {{ age }}
  10.         </p>
  11.     </div>
  12.     {% endif %}
  13.     <div class="mt-3">
  14.         <label class="font-weight-bold mb-0">
  15.             {{ 'Gender:'|trans({}, 'profile_widget') }}
  16.         </label>
  17.         <p class="text-muted">
  18.             {#
  19.             {{ 'Not specified'|trans({}, 'profile') }}
  20.             {{ 'Male'|trans({}, 'profile') }}
  21.             {{ 'Female'|trans({}, 'profile') }}
  22.             #}
  23.             {{ profile.user.gender|replace({'_': ' '})|capitalize|trans({}, 'profile') }}
  24.         </p>
  25.     </div>
  26.     {% if profile.country %}
  27.     <div class="mt-3">
  28.         <label class="font-weight-bold mb-0">
  29.             {{ 'Country:'|trans({}, 'profile_widget') }}
  30.         </label>
  31.         <p class="text-muted">
  32.             {{ profile.country|country_name }}
  33.         </p>
  34.     </div>
  35.     {% endif %}
  36.     {% if profile.city %}
  37.     <div class="mt-3">
  38.         <label class="font-weight-bold mb-0">
  39.             {{ 'City:'|trans({}, 'profile_widget') }}
  40.         </label>
  41.         <p class="text-muted">
  42.             {{ profile.city }}
  43.         </p>
  44.     </div>
  45.     {% endif %}
  46.     {% if profile.languages|length %}
  47.     <div class="mt-3">
  48.         <label class="font-weight-bold mb-0">
  49.             {{ 'Languages:'|trans({}, 'profile_widget') }}
  50.         </label>
  51.         <p class="text-muted">
  52.             {{ profile.languages|map(l => l|language_name)|join(', ') }}
  53.         </p>
  54.     </div>
  55.     {% endif %}
  56.     <div class="mt-3">
  57.         <label class="font-weight-bold mb-0">
  58.             {{ 'Use of English:'|trans({}, 'profile_widget') }}
  59.         </label>
  60.         <p class="text-muted">
  61.             {{ profile.useEnglish|replace({'_': ' '})|capitalize|trans({}, 'profile') }}
  62.         </p>
  63.     </div>
  64.     <div class="mt-3">
  65.         <label class="font-weight-bold mb-0">
  66.             {{ 'Own location:'|trans({}, 'profile_widget') }}
  67.         </label>
  68.         <p class="text-muted">
  69.             {% if profile.ownLocation %}
  70.                 {{ 'Yes'|trans({}, 'core') }}
  71.             {% else %}
  72.                 {{ 'No'|trans({}, 'core') }}
  73.             {% endif %}
  74.         </p>
  75.     </div>
  76.     <div class="mt-3">
  77.         <label class="font-weight-bold mb-0">
  78.             {{ 'Transport:'|trans({}, 'profile_widget') }}
  79.         </label>
  80.         <p class="text-muted">
  81.             {#
  82.             {{ 'Not specified'|trans({}, 'profile') }}
  83.             {{ 'Public transport'|trans({}, 'profile') }}
  84.             {{ 'Own transport'|trans({}, 'profile') }}
  85.             #}
  86.             {{ profile.transport|replace({'_': ' '})|capitalize|trans({}, 'profile') }}
  87.         </p>
  88.     </div>
  89.     <div class="mt-3">
  90.         <label class="font-weight-bold mb-0">
  91.             {{ 'Ethnicity:'|trans({}, 'profile_widget') }}
  92.         </label>
  93.         <p class="text-muted">
  94.             {#
  95.             {{ 'Not specified'|trans({}, 'profile') }}
  96.             {{ 'European'|trans({}, 'profile') }}
  97.             {{ 'Asian'|trans({}, 'profile') }}
  98.             {{ 'Hispanic'|trans({}, 'profile') }}
  99.             {{ 'Arab'|trans({}, 'profile') }}
  100.             {{ 'African'|trans({}, 'profile') }}
  101.             #}
  102.             {{ profile.ethnicity|replace({'_': ' '})|capitalize|trans({}, 'profile') }}
  103.         </p>
  104.     </div>
  105.     {% if profile.height %}
  106.     <div class="mt-3">
  107.         <label class="font-weight-bold mb-0">
  108.             {{ 'Height:'|trans({}, 'profile_widget') }}
  109.         </label>
  110.         <p class="text-muted">
  111.             {{ profile.height }} cm
  112.         </p>
  113.     </div>
  114.     {% endif %}
  115.     {% if profile.weight %}
  116.     <div class="mt-3">
  117.         <label class="font-weight-bold mb-0">
  118.             {{ 'Weight:'|trans({}, 'profile_widget') }}
  119.         </label>
  120.         <p class="text-muted">
  121.             {{ profile.weight }} kg
  122.         </p>
  123.     </div>
  124.     {% endif %}
  125.     {% if profile.hips %}
  126.     <div class="mt-3">
  127.         <label class="font-weight-bold mb-0">
  128.             {{ 'Hips:'|trans({}, 'profile_widget') }}
  129.         </label>
  130.         <p class="text-muted">
  131.             {{ profile.hips }} cm
  132.         </p>
  133.     </div>
  134.     {% endif %}
  135.     {% if profile.waist %}
  136.     <div class="mt-3">
  137.         <label class="font-weight-bold mb-0">
  138.             {{ 'Waist:'|trans({}, 'profile_widget') }}
  139.         </label>
  140.         <p class="text-muted">
  141.             {{ profile.waist }} cm
  142.         </p>
  143.     </div>
  144.     {% endif %}
  145.     {% if profile.chest %}
  146.     <div class="mt-3">
  147.         <label class="font-weight-bold mb-0">
  148.             {{ 'Chest:'|trans({}, 'profile_widget') }}
  149.         </label>
  150.         <p class="text-muted">
  151.             {{ profile.chest }} cm
  152.         </p>
  153.     </div>
  154.     {% endif %}
  155.     <div class="mt-3">
  156.         <label class="font-weight-bold mb-0">
  157.             {{ 'Eyes:'|trans({}, 'profile_widget') }}
  158.         </label>
  159.         <p class="text-muted">
  160.             {#
  161.             {{ 'Not specified'|trans({}, 'profile') }}
  162.             {{ 'Blue'|trans({}, 'profile') }}
  163.             {{ 'Brown'|trans({}, 'profile') }}
  164.             {{ 'Black'|trans({}, 'profile') }}
  165.             {{ 'Grey'|trans({}, 'profile') }}
  166.             {{ 'Green'|trans({}, 'profile') }}
  167.             #}
  168.             {{ profile.eyes|replace({'_': ' '})|capitalize|trans({}, 'profile') }}
  169.         </p>
  170.     </div>
  171.     <div class="mt-3">
  172.         <label class="font-weight-bold mb-0">
  173.             {{ 'Hair color:'|trans({}, 'profile_widget') }}
  174.         </label>
  175.         <p class="text-muted">
  176.             {#
  177.             {{ 'Not specified'|trans({}, 'profile') }}
  178.             {{ 'Blonde'|trans({}, 'profile') }}
  179.             {{ 'Brown'|trans({}, 'profile') }}
  180.             {{ 'Black'|trans({}, 'profile') }}
  181.             {{ 'Grey'|trans({}, 'profile') }}
  182.             {{ 'Red'|trans({}, 'profile') }}
  183.             {{ 'Colored'|trans({}, 'profile') }}
  184.             #}
  185.             {{ profile.hairColor|replace({'_': ' '})|capitalize|trans({}, 'profile') }}
  186.         </p>
  187.     </div>
  188.     <div class="mt-3">
  189.         <label class="font-weight-bold mb-0">
  190.             {{ 'Hair length:'|trans({}, 'profile_widget') }}
  191.         </label>
  192.         <p class="text-muted">
  193.             {#
  194.             {{ 'Not specified'|trans({}, 'profile') }}
  195.             {{ 'Shaved'|trans({}, 'profile') }}
  196.             {{ 'Short'|trans({}, 'profile') }}
  197.             {{ 'Normal'|trans({}, 'profile') }}
  198.             {{ 'Long'|trans({}, 'profile') }}
  199.             {{ 'Very long'|trans({}, 'profile') }}
  200.             #}
  201.             {{ profile.hairLength|replace({'_': ' '})|capitalize|trans({}, 'profile') }}
  202.         </p>
  203.     </div>
  204.     <div class="mt-3">
  205.         <label class="font-weight-bold mb-0">
  206.             {{ 'Tattoos:'|trans({}, 'profile_widget') }}
  207.         </label>
  208.         <p class="text-muted">
  209.             {#
  210.             {{ 'Not specified'|trans({}, 'profile') }}
  211.             {{ 'None'|trans({}, 'profile') }}
  212.             {{ 'Small'|trans({}, 'profile') }}
  213.             {{ 'Very inked'|trans({}, 'profile') }}
  214.             #}
  215.             {{ profile.tattoos|replace({'_': ' '})|capitalize|trans({}, 'profile') }}
  216.         </p>
  217.     </div>
  218.     {% if owner %}
  219.     <a role="button" href="{{ path('profile_edit', {id: profile.id}) }}" class="btn btn-block btn-sm btn-primary">
  220.         {{ 'Edit info'|trans({}, 'profile_widget') }}
  221.     </a>
  222.     {% endif %}
  223. </div>