templates/pages/crew-detail.html.twig line 1

Open in your IDE?
  1. {% extends "base.html.twig" %}
  2. {% block title %}Rapper detail{% endblock %}
  3. {% block bodyClass %}rappersBody{% endblock %}
  4. {% import "components/profileMacros.html.twig" as profileMacros %}
  5. {# @var \App\Entity\Crew crew #}
  6. {% block body %}
  7.     <section id="profile" class="profile" style="background-color: #eee;">
  8.         <div class="container py-5">
  9.             <div class="row">
  10.                 <div class="col-lg-4">
  11.                     <div class="card mb-4">
  12.                         <div class="card-body text-center">
  13.                             <div class="profile-img-wrapper"  {% if crew.backgroundFileName!=null %} style="background: url('{{ asset('uploads/images/crews/'~crew.backgroundFileName) }}');" {% else %} style="background-image: url({{ asset('build/images/defaultBackground.png') }}); background-size: 102%; background-position: center center;" {% endif %} >
  14.                                 {% if crew.imageName!=null %}
  15.                                     <img src="{{ asset('uploads/images/crews/logos/'~crew.imageName) }}" alt="avatar" class="rounded-circle img-fluid" style="width: 200px;">
  16.                                 {% else %}
  17.                                     <img src="{{ asset('build/images/defaultAvatar.png') }}" alt="avatar" class="rounded-circle img-fluid" style="width: 200px;">
  18.                                 {% endif %}
  19.                             </div>
  20.                             <h5 class="my-3">{{ crew.name }}</h5>
  21.                             <p class="text-muted mb-4">{{ crew.city }}{% if crew.country %},{{ crew.country.shortName }}{% endif %}</p>
  22. {#                            {% if app.user and app.user.id != rapper.client.id %}#}
  23. {#                                <div class="d-flex justify-content-center mb-2">#}
  24. {#                                    <button type="button" class="js-follow-rapper btn btn-primary" data-id="{{ rapper.id }}">Follow</button>#}
  25. {#                                    <button type="button" class="btn btn-outline-primary ms-1">Message</button>#}
  26. {#                                </div>#}
  27. {#                            {% endif %}#}
  28.                         </div>
  29.                     </div>
  30.                 </div>
  31.                 <div class="col-lg-8">
  32.                     <div class="card mb-4">
  33.                         <div class="card-body">
  34.                             <div class="row">
  35.                                 <div class="col-sm-3">
  36.                                     <h6 class="mb-0">Crew Name</h6>
  37.                                 </div>
  38.                                 <div class="col-sm-9">
  39.                                     <p class="text-muted mb-0">{{ crew.name }}</p>
  40.                                 </div>
  41.                             </div>
  42.                             <hr>
  43.                             <div class="row">
  44.                                 <div class="col-sm-3">
  45.                                     <h6 class="mb-0">Crew members</h6>
  46.                                 </div>
  47.                                 <div class="col-sm-9">
  48.                                     <p class="text-muted mb-0">{{ crew.rappers | length }}</p>
  49.                                 </div>
  50.                             </div>
  51.                             <hr>
  52.                             <div class="row">
  53.                                 <div class="col-sm-3">
  54.                                     <h6 class="mb-0">Leaderboard position</h6>
  55.                                 </div>
  56.                                 <div class="col-sm-9">
  57.                                     <p class="text-muted mb-0">#{{ getCrewLeaderboardPosition(crew.id) }}</p>
  58.                                 </div>
  59.                             </div>
  60.                             <hr>
  61.                             <div class="row">
  62.                                 <div class="col-sm-3">
  63.                                     <h6 class="mb-0">Origin</h6>
  64.                                 </div>
  65.                                 <div class="col-sm-9">
  66.                                     <p class="text-muted mb-0">{{ crew.city }}{% if crew.country %},{{ crew.country.name }}{% endif %}</p>
  67.                                 </div>
  68.                             </div>
  69.                         </div>
  70.                     </div>
  71.                     <div class="row">
  72.                         <div class="col-lg-12">
  73.                             {% if crew.rappers|length > 0 %}
  74.                                 <table class="crew-members-list table table-responsive">
  75.                                     <thead>
  76.                                     <tr class="crew-member-item-head">
  77.                                         <th class="rapper-name">
  78.                                             <h6>Rapper</h6>
  79.                                         </th>
  80.                                         <th class="rapper-rank">
  81.                                             <h6>Rapper rank</h6>
  82.                                         </th>
  83.                                     </tr>
  84.                                     </thead>
  85.                                     <tbody>
  86.                                     {% for rapper in crew.rappers %}
  87.                                         <tr class="crew-member-item {% if crew.createdBy == rapper.client %}owner{% endif %}">
  88.                                             <td class="rapper-name">
  89.                                                 <a href="{{ path('rapperDetail',{id:rapper.id}) }}" class="{% if crew.createdBy == rapper.client %}text-white{% endif %}" > <p>{{ rapper.pseudoname }} {% if crew.createdBy == rapper.client %} (owner) {% endif %}</p></a>
  90.                                             </td>
  91.                                             <td class="rapper-rank">
  92.                                                 <a href="{{ path('rapperDetail',{id:rapper.id}) }}" class="{% if crew.createdBy == rapper.client %}text-white{% endif %}"> <p>{{ rapper.rank }}</p></a>
  93.                                             </td>
  94.                                         </tr>
  95.                                     {% endfor %}
  96.                                     </tbody>
  97.                                 </table>
  98.                             {% else %}
  99.                                 <div class="no-content-message">
  100.                                     <p>No crew members :(</p>
  101.                                 </div>
  102.                             {% endif %}
  103.                         </div>
  104.                     </div>
  105.                 </div>
  106.             </div>
  107.         </div>
  108.     </section>
  109. {% endblock %}