File "services.twig"

Full Path: /home/cananyalcin/public_html/core/temp/client/yeti/services.twig
File size: 15.92 KB
MIME-type: text/html
Charset: utf-8

{% include 'header.twig' %}
{% if user['auth'] %}

<div class="app-content">
        <!-- page-content -->
        <div class="container-fluid">

            <section class="services-list mt-4">
                <div class="d-card">
                    <div class="d-card-body p0">
						<div class="row">
							<div class="col-md-2 col-12">
								<div class="input-group-btn open">
								   <button type="button" class="btn btn-primary btn-block dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="padding: 10px 15px; font-size: 14px">{{lang["smmspot.services.filter.button.title"]}}</button>
								   <ul class="dropdown-menu">
									 <li><a href="javascript:void(0);" onclick="javascript:filterService('All')">{{lang["smmspot.services.filter.item.1"]}}</a></li>	
									  {% for category in serviceCategory %}
									 <li><a href="javascript:void(0);" onclick="javascript:filterService('{{ category["category_name"] }}')">{{ category["category_name"] }}</a></li>
									  {% endfor%} 	
								   </ul>
								</div>
							</div>
							<div class="col-md-10 col-12">
								<div class="services-search">
									<input type="text" id="serv-inp" class="ss-input" placeholder="{{lang["smmspot.services.search"]}}">
								</div>
							</div>
						</div>

                        <div class="dash-list mt-4">
                            <table id="serv-table" class="table results table-mobile-cards">
                                <thead>
                                    <tr>
                                        <th>{{ lang['services.id'] }}</th>
                                        <th>{{ lang['services.name'] }}</th>
                                        <th>{{ lang['services.price'] }}</th>
                                        <th>{{ lang['services.min'] }}</th>
                                        <th>{{ lang['services.max'] }}</th>
										{% if avarageTime %}
                                        <th>{{ lang['services.avarage'] }}</th>
										{% endif %}
                                        <th>{{ lang['neworder.description'] }}</th>
                                    </tr>
                                </thead>
                                <tbody>
								{% for category in serviceCategory %}
                                    <tr class="services-header" data-category="{{ category["category_name"] }}">
                                        <td colspan="7">
                                            <div class="services-title">
                                                {{ category["category_name"] }}
                                            </div>
                                        </td>
                                    </tr>
									{% for service in category['services'] %}
                                    <tr class="table-mobile-card serviceData" data-category="{{ category["category_name"] }}">
                                        <td data-title="ID">{{ service["service_id"] }}</td>
                                        <td data-title="Service" class="pm-ikon">{{ service["service_name"] }}</td>
                                        <td data-title="1000 Number">    {{ currency["symbol"]  }}  {{ service['service_price'] *currency["value"]   }}</td>
                                        <td data-title="Minimum" class="text-success">{{ service["service_min"] }}</td>
                                        <td data-title="Maksimum" class="text-danger">{{ service["service_max"] }}</td>
										{% if avarageTime %}
                                        <td data-title="Ortalama Süre">{{ service["service_speed"] }}</td>
										{% endif %}
                                        <td>
                                            <a class="sDetayBtn" data-toggle="modal" data-target="#servisDetay{{ service["service_id"] }}">
                                                  Details
                                            </a>
											<div class="modal fade" id="servisDetay{{ service["service_id"] }}">
												<div class="modal-dialog">
													<div class="modal-content">

														<!-- Modal Header -->
														<div class="modal-header">
															<h4 class="modal-title">{{ service["service_name"] }}</h4>
														</div>

														<!-- Modal body -->
														<div class="modal-body">
															{{ service["service_description"] }}		  
														</div>
														  <div class="modal-footer">
															  <button type="button" class="btn btn-sm btn-danger" data-dismiss="modal">{{lang['close']}}</button>
															  <a href="{{ site['url'] }}/?select_service_id={{ service['service_id'] }}&category_id={{category['category_id']}}" class="btn btn-sm btn-primary">{{ lang['smmspot.services.buy.service.button'] }}</a>
														  </div>
													</div>
												</div>
											</div> 
                                        </td>
                                    </tr>
                                  {% endfor%}	
								{% endfor%}	
                                </tbody>
                            </table>
                        </div><!-- dash-list -->
                    </div>
                </div>
            </section>
        </div><!-- container end -->
    </div><!-- app-content -->

      </div>

{% else %}
    <div class="home-head outside">
        <div class="home-head-bg"></div>
	
        <div class="home-head-content">
            <div class="container" style="position: relative;">
                <div class="row">
                </div>
            </div>
        </div>
    </div>

    <div class="hs-area mb-5">
        <div class="container">
            <section class="services-list mt-4">
                <div class="d-card">
                    <div class="d-card-body p0">
						<div class="row">
							<div class="col-md-2 col-12">
								<div class="input-group-btn open">
								   <button type="button" class="btn btn-primary btn-block dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="padding: 10px 15px; font-size: 14px">  {{lang["smmspot.services.filter.button.title"]}}</button>
								   <ul class="dropdown-menu">
									 <li><a href="javascript:void(0);" onclick="javascript:filterService('All')">{{lang["smmspot.services.filter.item.1"]}}</a></li>	
									  {% for category in serviceCategory %}
									 <li><a href="javascript:void(0);" onclick="javascript:filterService('{{ category["category_name"] }}')">{{ category["category_name"] }}</a></li>
									  {% endfor%} 	
								   </ul>
								</div>
							</div>
							<div class="col-md-10 col-12">
								<div class="services-search">
									<input type="text" id="serv-inp" class="ss-input" placeholder="{{lang["smmspot.services.search"]}}">
								</div>
							</div>
						</div>

                        <div class="dash-list mt-4">
                            <table id="serv-table" class="table results table-mobile-cards">
                                <thead>
                                    <tr>
                                        <th>{{ lang['services.id'] }}</th>
                                        <th>{{ lang['services.name'] }}</th>
                                        <th>{{ lang['services.price'] }}</th>
                                        <th>{{ lang['services.min'] }}</th>
                                        <th>{{ lang['services.max'] }}</th>
										{% if avarageTime %}
                                        <th>{{ lang['services.avarage'] }}</th>
										{% endif %}
                                        <th>{{ lang['neworder.description'] }}</th>
                                    </tr>
                                </thead>
                                <tbody>
								{% for category in serviceCategory %}
                                    <tr class="services-header" data-category="{{ category["category_name"] }}">
                                        <td colspan="7">
                                            <div class="services-title">
                                                {{ category["category_name"] }}
                                            </div>
                                        </td>
                                    </tr>
									{% for service in category['services'] %}
                                    <tr class="table-mobile-card serviceData" data-category="{{ category["category_name"] }}">
                                        <td data-title="ID">{{ service["service_id"] }}</td>
                                        <td data-title="Service" class="pm-ikon">{{ service["service_name"] }}</td>
                                        <td data-title="1000 Number">    {{ currency["symbol"]  }}  {{ service['service_price'] *currency["value"]   }}</td>
                                        <td data-title="Minimum" class="text-success">{{ service["service_min"] }}</td>
                                        <td data-title="Maksimum" class="text-danger">{{ service["service_max"] }}</td>
										{% if avarageTime %}
                                        <td data-title="Ortalama Süre">{{ service["service_speed"] }}</td>
										{% endif %}
                                        <td>
                                            <a class="sDetayBtn" data-toggle="modal" data-target="#servisDetay{{ service["service_id"] }}">
                                                Details
                                            </a>
											<div class="modal fade" id="servisDetay{{ service["service_id"] }}">
												<div class="modal-dialog">
													<div class="modal-content">

														<!-- Modal Header -->
														<div class="modal-header">
															<h4 class="modal-title">{{ service["service_name"] }}</h4>
														</div>

														<!-- Modal body -->
														<div class="modal-body">
															{{ service["service_description"] }}		  
														</div>
														  <div class="modal-footer">
															  <button type="button" class="btn btn-sm btn-danger" data-dismiss="modal">Close</button>
															  <a href="/tickets" class="btn btn-sm btn-primary">Yardım</a>
														  </div>
													</div>
												</div>
											</div> 
                                        </td>
                                    </tr>
                                  {% endfor%}	
								{% endfor%}	
                                </tbody>
                            </table>
                        </div><!-- dash-list -->
                    </div>
                </div>
            </section>
        </div>
	 </div>  
{% endif %}
  
<script>


function ikon(opt) {
    var ikon = "";
    if (opt.indexOf("Instagram") >= 0) {
        ikon = "<span class=\"fs-ig\"><i class=\"fab fa-instagram\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("YouTube") >= 0) {
        ikon = "<span class=\"fs-yt\"><i class=\"fab fa-youtube\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Facebook") >= 0) {
        ikon = "<span class=\"fs-fb\"><i class=\"fab fa-facebook-square\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Youtube") >= 0) {
        ikon = "<span class=\"fs-yt\"><i class=\"fab fa-youtube\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Twitter") >= 0) {
        ikon = "<span class=\"fs-tw\"><i class=\"fab fa-twitter\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Google") >= 0) {
        ikon = "<span class=\"fs-gp\"><i class=\"fab fa-google-plus\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Swarm") >= 0) {
        ikon = "<span class=\"fs-fsq\"><i class=\"fab fa-forumbee\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Dailymotion") >= 0) {
        ikon = "<span class=\"fs-dm\"><i class=\"fab fa-hospital-o\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Periscope") >= 0) {
        ikon = "<span class=\"fs-pc\"><i class=\"fab fa-map-marker\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Soundcloud") >= 0) {
        ikon = "<span class=\"fs-sc\"><i class=\"fab fa-soundcloud\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Vine") >= 0) {
        ikon = "<span class=\"fs-vn\"><i class=\"fab fa-vine\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Spotify") >= 0) {
        ikon = "<span class=\"fs-sp\"><i class=\"fab fa-spotify\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Snapchat") >= 0) {
        ikon = "<span class=\"fs-snap\"><i class=\"fab fa-snapchat-square\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Pinterest") >= 0) {
        ikon = "<span class=\"fs-pt\"><i class=\"fab fa-pinterest-p\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("iTunes") >= 0) {
        ikon = "<span class=\"fs-apple\"><i class=\"fab fa-apple\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Müzik") >= 0) {
        ikon = "<span class=\"fs-music\"><i class=\"fab fa-music\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Vimeo") >= 0) {
        ikon = "<span class=\"fs-videmo\"><i class=\"fab fa-vimeo\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Ekşi") >= 0) {
        ikon = "<span class=\"fs-eksi\"><i class=\"fab fa-tint\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Telegram") >= 0) {
        ikon = "<span class=\"fs-telegram\"><i class=\"fab fa-telegram\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Twitch") >= 0) {
        ikon = "<span class=\"fs-twc\"><i class=\"fab fa-twitch\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Zomato") >= 0) {
        ikon = "<span class=\"fs-zom\"><i class=\"fab fa-cutlery\" aria-hidden=\"true\"></i> </span>";
	} else if (opt.indexOf("Amazon") >= 0) {
        ikon = "<span class=\"fs-amaz\"><i class=\"fab fa-amazon\" aria-hidden=\"true\"></i> </span>";
	} else if (opt.indexOf("Tumblr") >= 0) {
        ikon = "<span class=\"fs-tumb\"><i class=\"fab fa-tumblr-square\" aria-hidden=\"true\"></i> </span>";
	} else if (opt.indexOf("Yandex") >= 0) {
        ikon = "<span class=\"fs-yndx\"><i class=\"fab fa-yoast\" aria-hidden=\"true\"></i> </span>";
	} else if (opt.indexOf("Linkedin") >= 0) {
        ikon = "<span class=\"fs-lnk\"><i class=\"fab fa-linkedin\" aria-hidden=\"true\"></i> </span>";
	} else if (opt.indexOf("Yahoo") >= 0) {
        ikon = "<span class=\"fs-yahoo\"><i class=\"fab fa-yahoo\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("TikTok") >= 0) {
        ikon = "<span class=\"fs-tiktok\"><i class=\"fa fa-music\" aria-hidden=\"true\"></i> </span>";
    } else {
        ikon = "<span class=\"\"><i class=\"far fa-star\" aria-hidden=\"true\"></i> </span>  ";
    }
    return ikon;
}
  
$(document).ready(function() {

	$(".pm-ikon").each(function() {
				var ico = ikon($(this).text());
				$(this).html(ico + $(this).text() );
				console.log($(this).text());
		});	
});

</script>
<script>
      function filterService(category) {
        if (category == 'All')
          $('tbody tr.hidden').removeClass('hidden');
        else {
          $('tbody tr').addClass('hidden');
          $('tbody tr[data-category="' + category + '"]').removeClass('hidden');
        }
        removeEmptyCategory();
      }

      function removeEmptyCategory() {
        $('.services-header').each(function () {
            var next = $(this).next();
            var services = $(this).nextUntil('.services-header');
            var empty = true;
            services.each(function() {
              if (!$(this).hasClass('hidden')) empty = false;
            });
            if (empty) $(this).addClass('hidden');
        })
      }
</script>
{% include 'footer.twig' %}