templates/content/tmpl/classified-listing.html.twig line 1

Open in your IDE?
  1. {% extends "1-col-sidebar.html.twig" %}
  2. {# single post #}
  3. {% block column %}
  4. <!-- here down to  -->
  5.             {% if site_code == constant("App\\Entity\\Content::SITE_RCS") %}
  6.                 {% include  "includes/curtain-ads/classified.html.twig" %}
  7.             {% elseif site_code == constant("App\\Entity\\Content::SITE_MCS") %}
  8.                 {% include  "includes/curtain-ads/classified-mcs.html.twig" %}
  9.             {% endif %}
  10. <!-- here -->
  11.     <h1 class="post-title" style="margin-bottom: 0">{{ content.title }}</h1>
  12.     
  13.     <div style="margin: 15px 0px 15px;">
  14.         <span class="job-type" style="margin-right: 25px;">{{ region }}</span>
  15.         {% if content_meta._job_location is defined and content_meta._job_location is not empty %}
  16.             <span class="location" style="margin-right: 25px;">
  17.                 <i class="fa fa-map-marker"></i>
  18.                 <a href="https://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=
  19.                 {{ content_meta._job_location|replace({' ': '+'}) }} "
  20.                 title="Click to view a Google Map" target="_blank">
  21.                      {{ content_meta._job_location }}
  22.                 </a>
  23.             </span>
  24.         {% endif %}
  25.         <span class="date-posted" style="margin-right: 25px;"><i class="fa fa-calendar"></i> Posted {{ post_age_format(date(content.publishedat|date).diff( date("now"))) }}</span>
  26.     </div>
  27.     <div class="row" style="margin: 20px 0 20px;">
  28.         {% if content.hasVideoMedia() %}
  29.             <div class="col-4">
  30.                 {{ content.getVideoMediaTag("","", autoplay)|raw }}
  31.             </div>
  32.             <div class="col-8">
  33.         {% elseif content.getFeaturedImageTag() is not empty %}
  34.             <div class="col-4">
  35.                 {{ content.getFeaturedImageTag("","")|raw }}
  36.             </div>
  37.             <div class="col-8">
  38.         {% else %}
  39.             <div class="col-12">
  40.         {% endif %}
  41.         
  42.             <strong style="font-size: 1.2em;">{{ content_meta._company_name }}</strong>
  43.             <span style="float: right;">
  44.                 {% if content_meta._company_phone is defined and content_meta._company_phone is not empty %}
  45.                     <a href="tel:{{ content_meta._company_phone }}" class="phone"><i class="fa fa-phone"></i> {{ content_meta._company_phone }}</a>&nbsp;&nbsp;&nbsp;
  46.                 {% endif %}
  47.                 {% if content_meta._company_website is defined and content_meta._company_website is not empty %}
  48.                     <a href="{{ content_meta._company_website|external_link }}"  class="website"><i class="fa fa-link"> </i>Website</a>
  49.                 {% endif %}
  50.             </span>
  51.             <div>{{ content.contentfull|wordpress|raw }}</div>
  52.             
  53.             {% set listing_file = content.getMediaGroupContainers() %}
  54.             {% if listing_file is defined and listing_file | length %}
  55.                 {# simply grab the first file for now - in the future we may add more files... #}
  56.                 {% set listing_file = listing_file[0].getMediaGroup() %}
  57.                 {% set listing_file = listing_file.getMediaGroupItems() %}
  58.                 {% set listing_file = listing_file[0].getMedia() %}
  59.             {% else %}
  60.                 {% set listing_file = false %}
  61.             {% endif %}
  62.             {% set listing_file_title = content.getContentMetaValueByKey("_file_title") %}
  63.             
  64.             {% if listing_file %}
  65.             <div class="row my-3">
  66.                 <div class="col-md-12">
  67.                     <a class="btn btn-secondary float-right" href="{{ listing_file.getURL() }}" >Download {{ listing_file_title ? listing_file_title : "File" }}</a>
  68.                 </div>
  69.             </div>
  70.             {% endif %}
  71.             <br>
  72.             <div>
  73.                 To reply to this listing, contact {{ content_meta._company_contact }} by clicking "Request More Information" and filling out the form below.
  74.             </div>
  75.         </div>
  76.     </div>
  77.     {#social share buttons#}
  78.     {% include "includes/social-share.html.twig" %}
  79.     
  80.     <div style="margin-bottom: 20px;margin-top: 20px">
  81.         <button class="button" href="" id="infoButton" style="padding: 15px;">Request More Information</button>
  82.     </div>
  83.     <div id="infoForm" style="display: none;">
  84.         <form method="post" action="{{ path('classified_request_info',
  85.             { 'contact_email' : content_meta._application, 'contact_name' : content_meta._company_contact, 'listing_title' : content.title }) }}" enctype="multipart/form-data">
  86.             <div class="row form-row">
  87.                 <div class="col-sm-6">
  88.                     <label class="form-label" for="fname">First Name</label>
  89.                     <input type="text" class="form-control" id="fname" name="fname" placeholder="First Name" required>
  90.                 </div>
  91.                 <div class="col-sm-6">
  92.                     <label class="form-label" for="lname">Last Name</label>
  93.                     <input type="text" class="form-control" id="lname" name="lname" placeholder="Last Name" required>
  94.                 </div>
  95.             </div>
  96.             <div class="row form-row">
  97.                 <div class="col-sm-6">
  98.                     <label class="form-label" for="email">Email</label>
  99.                     <input type="text" class="form-control" id="email" name="email" placeholder="Email Address" required>
  100.                 </div>
  101.             </div>
  102.             <div class="row form-row">
  103.                 <div class="col-sm-6">
  104.                     <label class="form-label" for="resume">Upload your Resumé</label>
  105.                     <input type="file" class="form-control-file" id="resume" name="resume">
  106.                 </div>
  107.             </div>
  108.             <div class="row form-row">
  109.                 <div class="col-12">
  110.                     <label class="form-label" for="message">Your Message</label>
  111.                     <textarea class="form-control" id="message" name="message" placeholder="Your Message" required></textarea>
  112.                 </div>
  113.             </div>
  114.             <div class="form-row g-recaptcha" data-sitekey="6LeEIlMUAAAAAGhdmJJLdJHPxaWx2GqBjber5n6B"></div>
  115.             <button type="submit" class="button">Submit</button>
  116.         </form>
  117.     </div>
  118.     <br>
  119.     <script>
  120.     $( "#infoButton" ).click(function() {
  121.         $( "#infoForm" ).toggle();
  122.     });
  123.     </script>
  124. {% endblock %}