templates\site\news\show.html.twig line 1

Open in your IDE?
  1. {% extends 'layouts/site_page.html.twig' %}
  2. {% block title %} {% if lang == 'en' %} {{ news.titreEn }} {% else %} {{ news.titre }} {% endif %} : Orishas-finance{% endblock %}
  3. {% block meta %}
  4.     <meta name="description"
  5.           content="{{ news.titre }}...Lire cet article sur Orishas-fiance">
  6.     <meta property="og:title" content="{{ news.titre }}">
  7.     <meta property="og:description"
  8.           content="{{ news.titre }}...Lire cet article sur Orishas-fiance">
  9.     {% if news.image %}
  10.         <meta property="og:image" content="https://www.orishas-finance.com{{ asset("uploads/news/#{news.getImage()}") }}">
  11.     {% else %}
  12.         <meta property="og:image" content="https://www.orishas-finance.com/uploads/news/defaultnews.jpg">
  13.     {% endif %}
  14.     <meta property="og:url" content="https://www.orishas-finance.com/actualite/{{ news.id }}">
  15.     <meta name="twitter:card" content="summary_large_image">
  16. {% endblock %}
  17. {% block css %}
  18.     <link rel="stylesheet" href="{{ asset('assets/common/daterangepicker/daterangepicker.css') }}">
  19.     <link rel="stylesheet" href="{{ asset('assets/common/select2/css/select2.min.css') }}">
  20.     <link rel="stylesheet" href="{{ asset('assets/common/select2-bootstrap4-theme/select2-bootstrap4.min.css') }}">
  21.     <link rel="stylesheet" href="{{ asset('assets/common/flag-icon-css/css/flag-icon.min.css') }}">
  22. {% endblock %}
  23. {% block body %}
  24.     <style>
  25.         .c-alert__text {
  26.             font-size: 14px;
  27.             font-weight: 500;
  28.             line-height: 1.25;
  29.             display: inline-block;
  30.             margin: 0;
  31.             padding-top: 1px;
  32.             padding-top: .1rem;
  33.             width: calc(100% - 20px);
  34.         }
  35.     </style>
  36.     <section class="jumbotron text-white of-page-header position-relative">
  37.         <div class="container text-center mb-4">
  38.             <h4 class="display-5 font-weight-bold">NEWS FINANCIÈRES</h4>
  39.             <p class="font-italic mb-0">Nous agrégeons les sources d’informations financières spécifiques Régionales et
  40.                 Internationales.
  41.                 Info Générale, Economique, Marchés Forex-Comodities- Actions-Obligataires-Taux, Vieille règlementaire
  42.                 etc.</p>
  43.         </div>
  44.         <div class="of-header-fixed-bottom">
  45.             <nav>
  46.                 <ol class="breadcrumb mb-0">
  47.                     <li class="breadcrumb-item"><a href="{{ path('site_home') }}"><i class="fa fa-home"></i></a></li>
  48.                     <li class="breadcrumb-item"><a href="{{ path('site_news') }}">News financières</a></li>
  49.                     <li class="breadcrumb-item active">Détail</li>
  50.                 </ol>
  51.             </nav>
  52.         </div>
  53.     </section>
  54.     <div class="pl-3 pr-3">
  55.         <section class="row mt-4">
  56.             <div class="col-md-9">
  57.                 <div class="row">
  58.                       <div class="col-md-12">
  59.                         {% if lang == 'en' %}
  60.                             <a class="of-simple-tab" href="?lang=fr"><i class="flag-icon flag-icon-fr"></i> Version Française</a>
  61.                         {% else %}
  62.                             <a class="of-simple-tab" href="?lang=en"><i class="flag-icon flag-icon-gb"></i> English Version</a>
  63.                         {% endif %}
  64.                         <hr>
  65.                     </div>
  66.                     <div class="col-md-12">
  67.                         <h3>
  68.                             {% if lang == 'en' %}
  69.                                 {{ news.titreEn }}
  70.                             {% else %}
  71.                                 {{ news.titre }}
  72.                             {% endif %}
  73.                         </h3>
  74.                         <div class="card-header mb-2">
  75.                             <div class="row">
  76.                                 <div class="col-md-2 small"><i
  77.                                             class="fa fa-calendar-alt"></i> {{ news.date? news.date|date('d/m/Y'):'-' }}
  78.                                 </div>
  79.                                 {% if news.source %}
  80.                                     <div class="col-md-4 small">Source : <b>{{ news.source }}</b></div>{% endif %}
  81.                                 <div class="col-md-6 small">{{(lang == 'en')? "Categories":"Catégories"}}:
  82.                                     {% for categorie in news.type %}
  83.                                         <span class="of-slide-cat">{{ (lang == 'en')? categorie.libelleEn : categorie.libelle }}</span>
  84.                                     {% endfor %}
  85.                                 </div>
  86.                             </div>
  87.                         </div>
  88.                         <div class="col-md-12 mb-2 text-center">
  89.                             {# <div class="btn-group btn-group-sm mx-auto" role="group">
  90.                                  <button class="btn btn-sm btn-outline-primary">Partager</button>
  91.                                  <button class="btn btn-sm btn-outline-info">retwitter</button>
  92.                                  <button class="btn btn-sm btn-outline-secondary">linkedIn</button>
  93.                              </div>#}
  94.                             <!-- ShareThis BEGIN -->
  95.                             <div class="mx-auto">
  96.                                 <div class="sharethis-inline-share-buttons"></div>
  97.                             </div>
  98.                             <!-- ShareThis END -->
  99.                             <div class="btn-group btn-group-sm mx-auto" role="group2">
  100.                                 <a href="#" id="export-pdf" class="btn btn-sm btn-outline-info"><i
  101.                                             class="fa fa-print"></i> imprimer</a>
  102.                             </div>
  103.                         </div>
  104.                         <div class="">
  105.                             <div class="of-slide-wrapper clearfix mx-auto w-70">
  106.                                 <a href="#commentaire">
  107.                                     <i class="fas fa-comment" title="commenter cet article" style="color: var(--color-primary); font-size:30px"></i>
  108.                                     </a>
  109.                                         {% if news.image %}
  110.                                             <div class="of-slide-header">
  111.                                                 <img src="{{ asset("uploads/news/#{news.getImage()}") }}"
  112.                                                      alt="{% if lang == 'en' %} {{ news.titreEn }} {% else %} {{ news.titre }} {% endif %}" class="img-fluid rounded-0"/>
  113.                                             </div>
  114.                                         {% endif %}
  115.                                         {% if news.titreimage %}
  116.                                             <div class="of-slide-caption">
  117.                                                 <p class="white-text mb-1 text-truncate" title="{{ news.titreimage }}">
  118.                                                     {{ news.titreimage }}
  119.                                                 </p>
  120.                                             </div>
  121.                                         {% endif %}
  122.                             </div>
  123.                         </div>
  124.                         <div class="card-body text-justify of-news-body">
  125.                             <div class="border-secondary bg-light p-2 mb-4">
  126.                             {% if lang == 'en' %}
  127.                                 <p class="pb-0 text-lg font-weight-bold">Enjoy a simplified experience</p>
  128.                                 Find all the economic and financial information on our Orishas Direct application to download on
  129.                                 <a href="https://play.google.com/store/apps/details?id=com.orishasfinance.app" target="_blank">Play Store</a>
  130.                             {% else %}
  131.                                 <p class="pb-0 text-lg font-weight-bold">Profitez d'une expérience simplifiée</p>
  132.                                 Retrouvez toute l'information économique et financière sur notre application Orishas Direct à Télécharger sur
  133.                                 <a href="https://play.google.com/store/apps/details?id=com.orishasfinance.app" target="_blank">Play Store</a>
  134.                             {% endif %}
  135.                             </div>
  136.                             {% if lang == 'en' %}
  137.                                 {{ news.descriptionEn|raw }}
  138.                             {% else %}
  139.                                 {{ news.description|raw }}
  140.                             {% endif %}
  141.                         </div>
  142.                         {% if lang == 'en' %}
  143.                             <div>
  144.                                 <span class="border-secondary bg-lightbluey p-2 mb-4 ml-3"> Provided by AWS Translate</span>
  145.                             </div>
  146.                         {% endif %}
  147.                         <div id="commentaire">
  148.                             <div class="card-body text-justify of-news-body">
  149.                                 <hr>
  150.                                 <diV class="block block-gray ">
  151.                                     <h3 class="block-title">
  152.                                         <span>
  153.                                             {% if(nbnews>1) %}
  154.                                                 {{ nbnews }} COMMENTAIRES
  155.                                             {% elseif nbnews is null %}
  156.                                                 0 COMMENTAIRE
  157.                                             {% else %}
  158.                                                 {{ nbnews }} COMMENTAIRE
  159.                                             {% endif %}
  160.                                             </span>
  161.                                     </h3>
  162.                                 </div>
  163.                                 {% if app.user %}
  164.                                     {% for commentaire in commentaires %}
  165.                                         <!-- Media top -->
  166.                                         <div class="media">
  167.                                             <img src=" {% if commentaire.user.avatar %} {{ asset('uploads/users/#{commentaire.user.getAvatar()}') }} {% else %} {{ asset('uploads/users/user_300px.png') }}{% endif %} "
  168.                                                  class="mr-3 mt-3 rounded-circle" style="width:40px">
  169.                                             <div class="media-body">
  170.                                                 <span style="color: #003883;font-weight: bold;">{{ commentaire.user.prenom }}
  171.                                                     {{ commentaire.user.nom }}</span> <i style="color: #003883">posté
  172.                                                     le {{ commentaire.createAt|date('d/m/Y . H:i') }}
  173.                                                 </i>
  174.                                                 <p style="font-size: 0.8rem;"> {{ commentaire.message }}</p>
  175.                                             </div>
  176.                                         </div>
  177.                                         <hr>
  178.                                     {% endfor %}
  179.                                     <div class="border-top mt-4">
  180.                                         <div class="d-flex justify-content-center">
  181.                                             {{ knp_pagination_render(commentaires) }}
  182.                                         </div>
  183.                                     </div>
  184.                                     {{ form_start(form) }}
  185.                                     <div class="form-group">
  186.                                         {{ form_row(form.message) }}
  187.                                     </div>
  188.                                     <button type="submit" class="btn btn-primary">Poster <i
  189.                                                 class="fa fa-paper-plane"></i></button>
  190.                                     {{ form_end(form) }}
  191.                                 {% else %}
  192.                                     <div class="alert alert-primary" role="alert">
  193.                                         <i class="c-alert__icon-state / c-icon c-icon--alert-warning"></i>
  194.                                         <p class="c-alert__text">
  195.                                             Vous devez être membre pour ajouter un commentaire.
  196.                                             <br>
  197.                                             Vous êtes déjà membre ?
  198.                                             <a href="{{ path('app_login') }}" title="Connectez-vous" class=""
  199.                                                data-authentication-required="member">Connectez-vous</a>
  200.                                             <br>
  201.                                             Pas encore membre ?
  202.                                             <a href="{{ path('app_register') }}" title="Devenez membre gratuitement"
  203.                                                class="">Devenez membre gratuitement</a>
  204.                                         </p>
  205.                                     </div>
  206.                                     {% for commentaire in commentaires %}
  207.                                         <!-- Media top -->
  208.                                         <div class="media">
  209.                                             <img src=" {% if commentaire.user.avatar %} {{ asset("uploads/users/#{commentaire.user.getAvatar()}") }} {% else %} {{ asset('uploads/users/user_300px.png') }}{% endif %} "
  210.                                                  class="mr-3 mt-3 rounded-circle" style="width:40px">
  211.                                             <div class="media-body">
  212.     <span style="color: #003883;font-weight: bold;">{{ commentaire.user.prenom }}
  213.         {{ commentaire.user.nom }}</span> <i style="color: #003883">posté
  214.                                                     le {{ commentaire.createAt|date('d/m/Y . H:i') }}
  215.                                                 </i>
  216.                                                 <p style="font-size: 0.8rem;"> {{ commentaire.message }}</p>
  217.                                             </div>
  218.                                         </div>
  219.                                         <hr>
  220.                                     {% endfor %}
  221.                                 {% endif %}
  222.                             </div>
  223.                         </div>
  224.                         <div class="block block-green mb-5">
  225.                             <h3 class="block-title"><span>Dans la même rubrique</span></h3>
  226.                             <div class="card-body">
  227.                                 {% for news in others %}
  228.                                     <div class="col-md-12 border-bottom mt-2">
  229.                                         <div class="media">
  230.                                             <div class="media-left of-news-ima-caption pb-0">
  231.                                                 <div class="of-img-hoverable">
  232.                                                     <a href="{{ path('site_news_show',{'id': news.id}) }}">
  233.                                                         <img class="media-object w-100"
  234.                                                              src="{{ (news.image)?asset("uploads/news/#{news.getImage()}"):asset("uploads/news/defaultnews.jpg") }}"
  235.                                                              alt="">
  236.                                                     </a>
  237.                                                 </div>
  238.                                             </div>
  239.                                             <div class="media-body">
  240.                                                 <p class="m-0">
  241.                                                     <small class="badge badge-info">
  242.                                                         <i class="fa fa-calendar-alt"></i> {{ news.date|date('d/m/Y') }}
  243.                                                     </small> -
  244.                                                     {% for types in news.type %}
  245.                                                         <small class="badge badge-success"> {{ types.libelle }} </small>
  246.                                                     {% endfor %}
  247.                                                     {% if news.premium %}  <small
  248.                                                             class="fa fa-lock text-muted"></small> {% endif %}
  249.                                                 </p>
  250.                                                 <h6 class="media-heading">
  251.                                                     <a href="{{ path('site_news_show',{'id': news.id}) }}"
  252.                                                        class="of-news-title">{{ news.titre }}</a>
  253.                                                 </h6>
  254.                                             </div>
  255.                                         </div>
  256.                                     </div>
  257.                                 {% endfor %}
  258.                             </div>
  259.                         </div>
  260.                     </div>
  261.                 </div>
  262.             </div>
  263.             <div class="col-md-3 mb-2">
  264.                 <div class="sticky-top">
  265.                     <div class="block block-primary mb-5">
  266.                         <h3 class="block-title"><span>Voir aussi</span></h3>
  267.                         <div class="row">
  268.                             {% for relate in related %}
  269.                                 <div class="col-6 col-md-12">
  270.                                     <div class="item card mb-2">
  271.                                         <div class="of-img-hoverable h-200">
  272.                                             <img src="{{ (relate.image)?asset("uploads/news/#{relate.getImage()}"):asset("uploads/news/defaultnews.jpg") }}"
  273.                                                  class="card-img-top" alt="{{ relate.titre }}">
  274.                                         </div>
  275.                                         <div class="card-body">
  276.                                             <p><small class="text-muted"><i
  277.                                                             class="fa fa-calendar-alt"></i> {{ relate.date|date('d/m/Y') }}
  278.                                                 </small> -
  279.                                                 {% for types in relate.type %}
  280.                                                     <small class="of-slide-cat"> {{ types.libelle }} </small>
  281.                                                 {% endfor %}
  282.                                             </p>
  283.                                             <h6 class="card-title text-truncate"><a
  284.                                                         href="{{ path('site_news_show',{'id': relate.id}) }}"
  285.                                                         title="{{ relate.titre }}">{{ relate.titre }}</a></h6>
  286.                                         </div>
  287.                                     </div>
  288.                                 </div>
  289.                             {% endfor %}
  290.                         </div>
  291.                     </div>
  292.                     <div class="block block-gray mb-5 d-none d-md-block d-lg-block mb-2">
  293.                         <h3 class="block-title"><span>Publicité</span></h3>
  294.                         <img src="{{ asset('assets/site/images/pub-1.png') }}" alt="" class="img-responsive w-100">
  295.                     </div>
  296.                 </div>
  297.             </div>
  298.         </section>
  299.     </div>
  300. {% endblock %}
  301. {% block scripts %}
  302.     <script>(function(w,d, s, id) {if(typeof(w.webpushr)!=='undefined') return;w.webpushr=w.webpushr||function(){(w.webpushr.q=w.webpushr.q||[]).push(arguments)};var js, fjs = d.getElementsByTagName(s)[0];js = d.createElement(s); js.id = id;js.async=1;js.src = "https://cdn.webpushr.com/app.min.js";fjs.parentNode.appendChild(js);}(window,document, 'script', 'webpushr-jssdk'));webpushr('setup',{'key':'BMtEewNU-73-Okp-AyhCiqZMJD0WMUuzECrqHYgEGdNt0NcU00fdS_pXwo4Jy1WzDl4m_lhH-G_uXbX0-xvODlI' });</script>
  303.     <script type="text/javascript" src="{{ asset('assets/common/daterangepicker/moment.min.js') }}"></script>
  304.     <script src="{{ asset('assets/common/daterangepicker/daterangepicker.js') }}"></script>
  305.     <script src="{{ asset('assets/common/select2/js/select2.full.min.js') }}"></script>
  306.     <script>
  307.         $(document).ready(function () {
  308.             $('#close-news-modal').on('click', function (e) {
  309.                 e.preventDefault();
  310.                 setCookie('newsModalDisplay', 24, 1);
  311.                 $('#news-modal').modal('hide');
  312.             });
  313.             {% if not app.user %}
  314.             $cook = getCookie('newsModalDisplay');
  315.             if ($cook != 24) {
  316.                 setTimeout(function () {
  317.                     $('#news-modal').modal('show');
  318.                 }, 1500);
  319.             }
  320.             {% endif %}
  321.             //Export
  322.             $('#export-pdf').on('click', function (e) {
  323.                 e.preventDefault();
  324.                 var loc = window.location.href.replace('/actualite', '/export/news');
  325.                 //console.log(loc);
  326.                 window.open(loc, "Orishas Export", "fullscreen=no,location=no");
  327.             })
  328.         })
  329.     </script>
  330. {% endblock %}