templates/components/campaign/avatar.html.twig line 1

Open in your IDE?
  1. {% set profile = profile is defined ? profile : user.profile %}
  2. {% set avatar = get_user_avatar(user) %}
  3. {% if userIsNotStudent is defined %}
  4.     {% set checkFundButton = userIsNotStudent or campaign.user.id == activeUserId  or app.user == null %}
  5. {% else %}
  6.     {% set checkFundButton = true %}
  7. {% endif %}
  8. <div class="box box-default lightgreen--border--color">
  9.     <div class="box-header with-border">
  10.         <h3 class="box-title break-long-words">{{ profile.fullName }}</h3>
  11.         <br>
  12.         <i>{{ profile.school.name }}</i>
  13.     </div>
  14.     <div class="box-body flex-center">
  15.         {% if avatar %}
  16.             <img src="{{ asset(avatar) }}" class="img-thumbnail">
  17.         {% else %}
  18.             <i class="fa fa-user img-thumbnail"></i>
  19.         {% endif %}
  20.     </div>
  21.     {% if campaign is defined %}
  22.         <div class="box-footer">
  23.             <div class="row flex-center">
  24.                 
  25.                 {% if is_granted(constant('FMT\\Application\\Voter\\CampaignVoter::CAN_FUND'), campaign) %}
  26.                     <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 actions-box">
  27.                         {% if checkFundButton %}
  28.                             <a href="{{ donate_user_link(user) }}"
  29.                                class="btn btn-primary btn-block no-padding-lr margin-bottom-10 btn-fix-text btn-fund-my-self fmt-lightgreen"
  30.                                title="{{ campaign|fund_student_name|trans({'%name%': profile.firstName}) }}"
  31.                             >
  32.                                 <b>{{ campaign|fund_student_name|trans({'%name%': profile.firstName})|upper }}</b>
  33.                             </a>
  34.                         {% endif %}
  35.                     </div>
  36.                 {% endif %}
  37.             </div>
  38.         </div>
  39.     {% endif %}
  40. </div>