src/Bidcoz/Bundle/CoreBundle/Resources/views/Layout/layout.html.twig line 1

Open in your IDE?
  1. {% extends '@BidcozCore/Layout/base.html.twig' %}
  2. {% block doctype %}<!DOCTYPE html>{% endblock %}
  3. {% if organization is defined %}
  4.     {% set theme = organization.theme %}
  5.     {% if campaign is defined and campaign is not null %}
  6.         {% set theme = campaign.theme %}
  7.     {% endif %}
  8. {% endif %}
  9. {% block theme %}
  10.     {{ parent() }}
  11.     {% set showBidcozImage = true %}
  12.     {% if organization is defined %}
  13.         {# Utilize primary, secondary, and tertiary styles #}
  14.         {% include '@BidcozManage/Theme/css.html.twig' %}
  15.         {# Utilize google fonts for theme #}
  16.         {% include '@BidcozCore/Layout/Fonts/index.html.twig' with { theme: theme } %}
  17.         {% if theme.logo is defined %}
  18.             {% set showBidcozImage = false %}
  19.             <link rel="shortcut icon" href="{{ vich_uploader_asset(theme.logo, 'file') }}" />
  20.         {% endif %}
  21.     {% else %}
  22.         {% block homepageStylesheets '' %}
  23.     {% endif %}
  24.     {% if showBidcozImage %}
  25.         <link rel="shortcut icon" href="/icon.png" />
  26.     {% endif %}
  27. {% endblock %}
  28. {% block bodyClass %}{{- theme is defined ? 'theme-' ~ theme.themeName : 'bidcoz' }}{% block homepageClass '' %}{{ organization is defined or campaign is defined ? '' : ' no-campaign'}}{% endblock %}
  29. {% block body %}
  30.     <div class="bounds d-flex flex-column">
  31.         {% block homepagePreloader '' %}
  32.         {% set beforeAlertsContent = block('beforeAlerts')|trim %}
  33.         {% set alertsContent = block('alerts')|trim %}
  34.         {% set afterAlertsContent = block('afterAlerts')|trim %}
  35.         {% set beforeContentHTML = block('beforeContent')|trim %}
  36.         {% block header %}
  37.             {% include '@BidcozCore/Layout/Blocks/header.html.twig' with {
  38.                 hasSidebar: block('sidebar') is defined,
  39.                 isToolkit: false
  40.             } %}
  41.         {% endblock %}
  42.         <!-- This section is for notifications for the user to take action on. -->
  43.         <div class="notifications-container">
  44.             <div class="notifications-close">
  45.                 <i class="fas fa-times"></i>
  46.             </div>
  47.             <h4 class="mt-2">Notifications</h4>
  48.             {% if beforeAlertsContent or alertsContent or afterAlertsContent %}
  49.                 {% block beforeAlerts '' %}
  50.                 {% block alerts %}
  51.                     {% set route = app.request.get('_route') %}
  52.                     {% if route != 'account_campaign_purchases' and is_logged_in() and campaign is defined and campaign is not null %}
  53.                         {% set expiringPurchases = user_campaign_expiring_purchases(app.user, campaign) %}
  54.                         {% if expiringPurchases|length %}
  55.                             <div class="alert warning d-flex flex-column">
  56.                                 <div class="message flex-grow-1 mb-2">
  57.                                     You have <b>{{ expiringPurchases|length }}</b> item(s) expiring soon.
  58.                                 </div>
  59.                                 <a href="{{ path('account_campaign_purchases', campaignParams ) }}" class="btn btn-warning btn-sm w-100">Checkout</a>
  60.                             </div>
  61.                         {% endif %}
  62.                     {% endif %}
  63.                     {% if is_granted('IS_IMPERSONATOR') %}
  64.                         <div class="alert info exit-impersonation d-flex">
  65.                             <div class="message flex-grow-1">
  66.                                 <a href="{{ path('admin_index', {'_switch_user': '_exit'}) }}">Exit impersonation</a>
  67.                             </div>
  68.                         </div>
  69.                     {% endif %}
  70.                 {% endblock %}
  71.                 {% block afterAlerts '' %}
  72.             {% else %}
  73.                 You have no notifications at this time.
  74.             {% endif %}
  75.         </div>
  76.         <!-- This section is for help content for the user to read. -->
  77.         <div class="help-container">
  78.             <div class="help-container-close">
  79.                 <i class="fas fa-times"></i>
  80.             </div>
  81.             <h4 class="mt-2">Help</h4>
  82.             <div class="alert alert-warning">
  83.                 <h6 class="title text-white mb-2"></h6>
  84.                 <div class="message text-white flex-grow-1">
  85.                     No help article for this section.
  86.                 </div>
  87.             </div>
  88.         </div>
  89.         <!-- This section is for toast notifications to make users aware of a successful
  90.              or failed https request. -->
  91.         {% block toast %}
  92.             <div class="toast-container">
  93.                 {% set close = true %}
  94.                 {% include '@BidcozCore/Layout/Blocks/alerts.html.twig' %}
  95.             </div>
  96.         {% endblock %}
  97.         <!--
  98.         <div class="toast-container">
  99.             {# block toast %}
  100.                 {% if numMessages > 0 %}
  101.                     {% include '@BidcozCore/Layout/Blocks/alerts.html.twig' %}
  102.                 {% endif %}
  103.             {% endblock #}
  104.         </div>
  105.         -->
  106.         {% if beforeContentHTML %}
  107.             <div class="container pre-content">
  108.                 {% block beforeContent '' %}
  109.             </div>
  110.         {% endif %}
  111.         <div class="container homepage-intro">
  112.             {% block homepageIntro '' %}
  113.         </div>
  114.         <div class="layout-container d-flex flex-column flex-grow-1 content" role="main">
  115.             <div class="container" role="main">
  116.                 {% set _sidebar = block('sidebar') is defined ? block('sidebar')|trim : '' %}
  117.                 {% set _internal_sidebar = block('internal_sidebar') is defined ? block('internal_sidebar')|trim %}
  118.                 <div class="row{{ _sidebar ? ' sidebar-row' : '' }}">
  119.                     {% if _internal_sidebar %}
  120.                         <div class="col-sm-12 col-lg-4 col-xl-3 sidebar">
  121.                             {{ _internal_sidebar|raw }}
  122.                         </div>
  123.                     {% endif %}
  124.                     {% set content_class = '' %}
  125.                     {% if _sidebar %}
  126.                         {% set content_class = 'col-lg-8' %}
  127.                     {% endif %}
  128.                     {% if _internal_sidebar %}
  129.                         {% set content_class = 'col-lg-8 col-xl-9' %}
  130.                     {% endif %}
  131.                     <div class="col-sm-12 {{ content_class }} main-content">
  132.                         {% block content '' %}
  133.                         {% block homepageSponsorships '' %}
  134.                     </div>
  135.                     {% if _sidebar %}
  136.                         <div class="col-sm-12 col-lg-4 sidebar">
  137.                             {{ _sidebar|raw }}
  138.                         </div>
  139.                     {% endif %}
  140.                 </div>
  141.             </div>
  142.             {% if block('sponsorships')|trim %}
  143.                 <div class="container sponsorships-container">
  144.                     {% block sponsorships '' %}
  145.                 </div>
  146.             {% endif %}
  147.         </div>
  148.         <div id="primary-modal" class="modal">
  149.             <div class="modal-close">
  150.                 {% include '@BidcozCore/Components/icon.html.twig' with { icon: 'close' } %}
  151.             </div>
  152.             <div class="modal-content mx-auto">
  153.                 <!-- content to be populated via http request -->
  154.             </div>
  155.         </div>
  156.         {% if not is_logged_in() %}
  157.             {% set loginPath = campaign is defined ? path('campaign_login_user', { orgSlug: organization.slug, campaignSlug: campaign.slug }) : '/login' %}
  158.             <div id="login-modal" class="modal" data-url="{{ loginPath }}">
  159.                 <div class="modal-dialog">
  160.                     <div class="modal-content mx-auto">
  161.                         <div class="modal-close float-right">
  162.                             {% include '@BidcozCore/Components/icon.html.twig' with { icon: 'close' } %}
  163.                         </div>
  164.                         <div class="modal-html">
  165.                             <!-- Load login content here via http request -->
  166.                         </div>
  167.                     </div>
  168.                 </div>
  169.             </div>
  170.             {% set registerPath = campaign is defined ? path('campaign_register_user', { orgSlug: organization.slug, campaignSlug: campaign.slug }) : '/register' %}
  171.             {% set currentRoute = app.request.attributes.get('_route') %}
  172.             {% if currentRoute != 'campaign_register_user' %}
  173.                 <div id="register-modal" class="modal py-0 py-md-5" data-url="{{ registerPath }}">
  174.                     <div class="modal-dialog">
  175.                         <div class="modal-content mx-auto p-0 position-relative">
  176.                             <div class="modal-close position-absolute" style="right: 1rem; top: 1rem; z-index: 1;">
  177.                                 {% include '@BidcozCore/Components/icon.html.twig' with { icon: 'close' } %}
  178.                             </div>
  179.                             <div class="modal-html mx-n3">
  180.                                 <!-- Load registration content here via http request -->
  181.                             </div>
  182.                         </div>
  183.                     </div>
  184.                 </div>
  185.             {% endif %}
  186.         {% endif %}
  187.         {% block trial '' %}
  188.         {% block contentBottom '' %}
  189.         {% block tour '' %}
  190.         {% block shareButtons '' %}
  191.         {% block footer %}
  192.             {% include '@BidcozCore/Layout/Blocks/footer.html.twig' %}
  193.         {% endblock %}
  194.         {% include '@BidcozCore/Layout/Blocks/user.html.twig' %}
  195.     </div>
  196. {% endblock %}
  197. {% block stylesheets %}
  198.     {% if campaign is defined and campaign is not null %}
  199.         {% if item is defined and item is not null %}
  200.             {% set imageUrl = item.primaryImage is defined and item.primaryImage.image is defined ? vich_uploader_asset(item.primaryImage.image, 'file') : '' %}
  201.             {% set imageWidth = 400 %}
  202.         {% else %}
  203.             {% if campaign.logo is defined and campaign.logo is not null %}
  204.                 {% set imageUrl = vich_uploader_asset(campaign.logo, 'file') %}
  205.                 {% set imageWidth = 320 %}
  206.             {% else %}
  207.                 {% set imageUrl = 'img/default_logo_campaign.png' %}
  208.                 {% set imageWidth = 320 %}
  209.             {% endif %}
  210.         {% endif %}
  211.         {# Hack for St. Henry - Remove #}
  212.         {% if campaign.slug == 'walk-a-thon2018' and campaign.organization.slug == 'sainthenryschoolhs' %}
  213.             {% set imageUrl = 'https://s3.us-east-2.amazonaws.com/bidcoz-images/sainthenryschoolhs/st_henry.png' %}
  214.             {% set imageWidth = 533 %}
  215.         {% endif %}
  216.         {% set ogImageUrl = asset(imageUrl)|replace({' ': '%20'}) %}
  217.         {% if 'https' in ogImageUrl %}
  218.             <meta property="og:image:secure_url" content="{{ ogImageUrl }}" />
  219.         {% else %}
  220.             <meta property="og:image:url" content="{{ ogImageUrl }}" />
  221.         {% endif %}
  222.         <meta property="og:image:width" content="{{ imageWidth }}" />
  223.         <meta property="og:type" content="website" />
  224.         <meta property="og:title" content="{{ campaign.name }}" />
  225.         <meta property="og:description" content="{{ campaign.description }}" />
  226.         <meta property="og:url" content="{{ app.request.schemeAndHttpHost ~ app.request.requestUri }}" />
  227.     {% endif %}
  228.     <link rel="stylesheet" href="/components/jquery-ui/themes/base/all.css">
  229.     <link rel="stylesheet" href="/components/datetimepicker/jquery.datetimepicker.css">
  230.     <link rel="stylesheet" href="/components/datatables.net-bs/css/dataTables.bootstrap.min.css">
  231.     <link rel="stylesheet" href="/components/datatables.net-buttons-bs/css/buttons.bootstrap.min.css">
  232.     <link rel="stylesheet" href="/components/jReject/css/jquery.reject.css">
  233.     <link rel="stylesheet" href="/components/lightbox2/dist/css/lightbox.css">
  234.     <link rel="stylesheet" href="/components/colorpicker/jquery.colorpicker.css">
  235.     <link href="//fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic" rel="stylesheet" type="text/css">
  236.     <link href="//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
  237.     <link rel="stylesheet" href="/components/hint.css/hint.min.css">
  238.     <link rel="stylesheet" href="/components/intl-tel-input/build/css/intlTelInput.min.css">
  239.     <style>
  240.         .iti{ width: 100%;}
  241.         .iti__flag { z-index: 4; }
  242.         .intl-tel-input {
  243.             display: table-cell;
  244.         }
  245.         .intl-tel-input .selected-flag {
  246.             z-index: 4;
  247.         }
  248.         .intl-tel-input .country-list {
  249.             z-index: 5;
  250.         }
  251.         .input-group .intl-tel-input .form-control {
  252.               border-radius: 4px 0 0 4px;
  253.         }
  254.         .iti .intl-phone { padding-left: 55px!important; }
  255.     </style>
  256.     {% if organization is defined or campaign is defined %}
  257.         <link rel="stylesheet" href="/css/admin.css">
  258.     {% else %}
  259.         <link rel="stylesheet" href="/css/manage.css">
  260.     {% endif %}
  261.     <!-- <link rel="stylesheet" href="/css/common.css"> -->
  262. {% endblock %}
  263. {% block javascripts %}
  264.     <!--
  265.     <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
  266.     -->
  267.     <script src="/components/jquery/dist/jquery.js" type="text/javascript"></script>
  268.     <script src="/components/jquery-ui/jquery-ui.js" type="text/javascript"></script>
  269.     <script src="/components/bootstrap/dist/js/bootstrap.min.js" type="text/javascript"></script>
  270.     <script src="/components/tinymce/tinymce.min.js?v=1" type="text/javascript"></script>
  271.     <script src="/components/jquery.countdown/dist/jquery.countdown.js" type="text/javascript"></script>
  272.     <script src="/components/jcarousel/dist/jquery.jcarousel.min.js" type="text/javascript"></script>
  273.     <script src="/components/datetimepicker/jquery.datetimepicker.js" type="text/javascript"></script>
  274.     <script src="/components/devbridge-autocomplete/dist/jquery.autocomplete.min.js" type="text/javascript"></script>
  275.     <script src="/components/datatables.net/js/jquery.dataTables.min.js" type="text/javascript"></script>
  276.     <script src="/components/datatables.net-bs/js/dataTables.bootstrap.min.js" type="text/javascript"></script>
  277.     <script src="/components/datatables.net-buttons/js/dataTables.buttons.min.js" type="text/javascript"></script>
  278.     <script src="/components/datatables.net-buttons/js/buttons.print.min.js" type="text/javascript"></script>
  279.     <script src="/components/datatables.net-buttons/js/buttons.html5.min.js" type="text/javascript"></script>
  280.     <script src="/components/datatables.net-buttons-bs/js/buttons.bootstrap.min.js" type="text/javascript"></script>
  281.     <script src="/components/datatables.net-select/js/dataTables.select.min.js" type="text/javascript"></script>
  282.     <script src="/components/jReject/js/jquery.reject.js" type="text/javascript"></script>
  283.     <script src="/components/lightbox2/dist/js/lightbox.min.js" type="text/javascript"></script>
  284.     <script src="/components/colorpicker/jquery.colorpicker.js" type="text/javascript"></script>
  285.     <script src="/components/colorpicker/i18n/jquery.ui.colorpicker-nl.js"></script>
  286.     <script src="/components/colorpicker/parts/jquery.ui.colorpicker-rgbslider.js"></script>
  287.     <script src="/components/colorpicker/parts/jquery.ui.colorpicker-memory.js"></script>
  288.     <script src="/components/moment/min/moment.min.js"></script>
  289.     <script src="/components/moment-timezone/builds/moment-timezone-with-data.min.js"></script>
  290.     <script src="/components/responsive-bootstrap-toolkit/dist/bootstrap-toolkit.min.js"></script>
  291.     <script src="/components/intl-tel-input/build/js/intlTelInput.min.js"></script>
  292.     <script src="/js/plugins/jquery.browser.mobile.js" type="text/javascript"></script>
  293.     <script src="/js/main.js?v=11" type="text/javascript"></script>
  294.     {% if stripe.publishable_key and not is_logged_in() %}
  295.         {% include '_credit_card_js.html.twig' with { doNotSubmit: true } %}
  296.     {% endif %}
  297. {% endblock %}