{% extends "modules/tmpl/default.html.twig" %}
{% block module_content %}
{% set custom_html = '' %}
{% set count = 0 %}
{% if module.data is empty and module.no_content_message is defined and module.no_content_message %}
<div
style="text-align:center;">
{#No content found.#}
{{ module.no_content_message }}
</div>
{% endif %}
{% for c in module.data %}
<div class="row mb-3">
{% if c.getType == constant("App\\Entity\\Content::CLASSIFIED") %}
{% if custom_html == '' %}
{% set custom_html = '<hr /><a href="/our-listings">View All Listings</a>' %}
{% endif %}
<div class="col-md-12 mb-2">
<a href="{{ c.getURL() }}">
<div>
<div class="m-0 module-subtitle">{{ c.getTitle()|raw }}</div>
<span style="color: #696969;">{{ c.getContentMetaValueByKey("_job_location") }}</span>
<i class="fa fa-caret-right"></i>
<span style="color: #696969;">{{ c.getContentMetaValueByKey("_company_name") }}</span>
<i class="fa fa-caret-right"></i>
{% set type = c.getSecondaryCategoriesByTaxonomy("job_listing_type") %}
{% if type is not empty %}
{% if 1 < type | length %}
<span style="color: #696969;">Multiple</span>
{% else %}
<span style="color: #696969;">{{ type[0].getTitle()|raw }}</span>
{% endif %}
{% endif %}
</div>
</a>
</div>
{% else %}
{% if (c.getFeaturedImageTag() and (module.show_images is not defined or (module.show_images is defined and module.show_images == "yes"))) %}
{# or (c.type == 15 and (module.show_hub_categories is not defined or (module.show_images is defined and module.show_hub_categories == "yes"))) #}
{% if module.class is defined and 'full-image' in module.class %}
<div class="col-md-{{ module.col_image is defined ? module.col_image : '12' }} col-image">
{% else %}
<div class="col-md-{{ module.col_image is defined ? module.col_image : '3' }} col-image">
{% endif %}
<a href="{{ c.getURL() }}">
{{ c.getFeaturedImageTag()|raw }}
</a>
{% if c.type == 15 and module.show_hub_categories is not defined or (module.show_images is defined and module.show_hub_categories == "yes") %}
{% set resourceTypes = c.getSecondaryCategoriesByTaxonomy("resource-type") %}
{% set industryType = c.getSecondaryCategoriesByTaxonomy("industry") | first %}
{#{% set presentedBys = c.getSecondaryCategoriesByTaxonomy("rcs-content-provider") %}#}
{% set presentedBys = c.getCustomers() %}
{% set accessLevel = c.getSecondaryCategoriesByTaxonomy("access-level") | first %}
<ul class="hubitems" style="padding-left: 15px; font-size: .9em;">
{% if resourceTypes is not empty %}
<li>
<strong>
<em>Resource Type:</em>
</strong>
{% for resourceType in resourceTypes %}
<br/><a href="{{ resourceType.getURL() }}">{{ resourceType.getTitle()|raw }}</a>
{% endfor %}
</li>
{% endif %}
{% if industryType is not empty %}
<li>
<strong>
<em>Industry:</em>
</strong>
<br/><a href="{{ industryType.getURL() }}">{{ industryType.getTitle()|raw }}</a>
</li>
{% endif %}
{% if presentedBys is not empty %}
<li>
<strong>
<em>Presented By:</em>
</strong>
{% for customer in presentedBys %}
{% if customer.getDirectoryContent() %}
<br/><a href="/directory/{{ customer.getDirectoryContent().getSlug() }}/content/15" title="{{ customer.getTitle() }}">{{ customer.getTitle() }}</a>
{% endif %}
{% endfor %}
</li>
{% endif %}
{% if accessLevel is not empty %}
<li>
<strong>
<em>Access Level:</em>
</strong>
<br/><a href="{{ accessLevel.getURL() }}">{{ accessLevel.getTitle()|raw }}</a>
</li>
{% endif %}
</ul>
{% endif %}
</div>
{% if module.class is defined and 'first-image' in module.class %}
<div class="col-md-12 col-text">
{% elseif module.class is defined and 'full-image' in module.class %}
<div class="col-md-12 col-text">
{% else %}
<div class="col-md-{{ module.col_text is defined ? module.col_text : '9' }} col-text">
{% endif %}
{#
{% elseif c.getType == constant("App\\Entity\\Content::WEBINAR") and (module.show_images is not defined or (module.show_images is defined and module.show_images == "yes")) %}
{% set m = module.media[count] %}
<div class="col-md-{{ module.col_image is defined ? module.col_image : '3' }} col-image">
<a href="{{ c.getURL() }}">
{{ m.getImageTag()|raw }}
</a>
</div>
<div class="col-md-{{ module.col_text is defined ? module.col_text : '9' }} col-text">
#}
{% else %}
<div class="col-md-{{ module.col_text is defined ? module.col_text : '12' }} col-text">
{% endif %}
{% if module.show_titles is not defined or (module.show_titles is defined and module.show_titles == "yes") %}
<div class="module-subtitle m-0">
{% if module.link_titles is not defined or (module.link_titles is defined and module.link_titles == "yes") %}
{% if module.type == 7 %}
<a href="/event/{{c.getSlug()}}">
{% else %}
<a href="{{ c.getURL() }}">
{% endif %}
{% endif %}
{{ c.getTitle()|raw }}
{% if module.link_titles is not defined or (module.link_titles is defined and module.link_titles == "yes") %}
</a>
{% endif %}
</div>
{% endif %}
{% if c.getType() == 10 %}
<i>{{ c.getAuthor() }}</i>
{% endif %}
{% if module.show_dates is not defined or (module.show_dates is defined and module.show_dates == "yes") %}
{% if (c.getType() == 7 or c.getIsEvent()) and (module.event_show_only_start_date is not defined or (module.event_show_only_start_date is defined and module.event_show_only_start_date == "no")) %}
{# Events, get date range #}
<i>{{ c.getEventStartDate() | date | rcsDateFormat }}
{% if c.getEventEndDate() > c.getEventStartDate() %}
-
{{ c.getEventEndDate()| date | rcsDateFormat }}
{% endif %}
</i>
{% else %}
{#<i>{{ c.getPublishedAt() | date("F jS \\a\\t g:ia") }}</i>#}
{#<i>{{ c.getPublishedAt() | date("F j, Y \\a\\t g:i A") |replace({"AM": "A.M.", "PM": "P.M."}) }}</i>#}
<i>
{{ c.getPublishedAt() | date | rcsDateFormat }}
</i>
{% endif %}
{% endif %}
{% if module.show_dates is defined and module.show_dates == "expires" %}
{#<i>{{ c.getExpiresAt() | date("F jS \\a\\t g:ia") }}</i>#}
<i>
{{ c.getExpiresAt() | date | rcsDateFormat }}
</i>
{% endif %}
{% if c.getType() == 3 %}
{# Classifieds #}
{% set location = c.getContentMetaByKey("_job_location") %}
{% set company = c.getContentMetaByKey("_company_name") %}
{% if location is not empty %}
<i>
<a href="{{ c.getURL() }}"> {{ location.getMetavalue() }}</a>
</i>
{% endif %}
{% if location is not empty and company is not empty%}
•
{% endif %}
{% if company is not empty %}
<i>
<a href="{{ c.getURL() }}">{{ company.getMetavalue() }}</a>
</i>
{% endif %}
{% endif %}
{% if module.show_full is defined and module.show_full == "yes" %}
<div class="my-3">{{ c.getContentFull()|wordpress|raw }}</div>
{# the hub link types - TODO - find better place for these exceptions #}
{% if c.getType() == constant("App\\Entity\\Content::THE_HUB") %}
{% set videoLink = c.getContentMetaValueByKey("rcs_learning_center_video") %}
{% if videoLink is not empty %}
<p>
<a href="{{ videoLink }}">
<i class="fa fa-play-circle"></i>
Click here to view the video.</a>
</p>
{% endif %}
{% endif %}
{% else %}
{% if module.show_intros is not defined or (module.show_intros is defined and module.show_intros == "yes") %}
{% set intro_length = module.intro_length is defined ? module.intro_length : 50 %}
<div class="my-3">
<span class="sideintrocontent">{{ c.getIntroText(intro_length)|raw }}</span>
{% endif %}
{% if module.show_readmores is not defined or (module.show_readmores is defined and module.show_readmores == "yes") %}
<a href="{{ c.getURL() }}" aria-label="{{ c.getTitle() }}">
{% if module.readmore_text is defined %}
{{ module.readmore_text }}
{% else %}
Re<i></i>ad Mo<i></i>re
{% endif %}
</a>
{% endif %}
{% if module.show_intros is not defined or (module.show_intros is defined and module.show_intros == "yes") %}
</div>
{% endif %}
{% endif %}
{% if (module.show_social is defined and module.show_social == "yes") or (module.class is defined and ("featured-single" in module.class or "featured-single-full" in module.class)) %}
<hr style="margin: 1.5rem 0 .5rem; width: 25%;">
<p class="share-this">Share this:</p>
<a class="social-share-facebook no-track" href="https://www.facebook.com/sharer.php?u={{ app.request.getSchemeAndHttpHost() ~ c.getURL() }}" aria-label="Share on Facebook">
<i class="fa fa-facebook"></i>
</a>
<a class="social-share-twitter no-track" href="https://twitter.com/intent/tweet?via=roofcoffeeshop&url={{ app.request.getSchemeAndHttpHost() ~ c.getURL() }}" aria-label="Share on Twitter">
<i class="fa fa-twitter"></i>
</a>
<a class="social-share-linkedin no-track" href="https://www.linkedin.com/shareArticle?mini=true&url={{ app.request.getSchemeAndHttpHost() ~ c.getURL() }}" aria-label="Share on LinkedIn">
<i class="fa fa-linkedin"></i>
</a>
<a class="social-share-pinterest no-track" href="https://www.pinterest.com/pin/create/button/?url={{ app.request.getSchemeAndHttpHost() ~ c.getURL() }}" aria-label="Share on Pinterest">
<i class="fa fa-pinterest-p"></i>
</a>
{% endif %}
</div>
{% endif %}
{% set count = count + 1 %}
</div>
{% endfor %}
{% if module.visit_link is defined and module.total > 0 %}
<hr/>
<a href="{{ module.visit_link }}" class="module-visit-link">
{% if module.visit_text is defined %}
{{ module.visit_text }}
{% else %}
View All
{% endif %}
»
</a>
{% endif %}
{% if custom_html %}
{{ custom_html | raw }}
{% set custom_html = '' %}
{% endif %}
{% if module.pagination is defined %}
<hr/>
<div class="paginate">
{% if 1 < module.page %}
<a class="float-right" href="{{ meta.root }}?p={{ module.page - 1 }}">Newer Posts »</a>
{% endif %}
{% if module.limit is defined and module.limit < module.total %}
<a href="{{ meta.root }}?p={{ module.page + 1 }}">« Older Posts</a>
{% endif %}
</div>
{% endif %}
{% endblock %}