@extends('layouts.app')
@section('title')
{{$journal->title}}
@parent
@stop

@section('metatags')
@php
$image_file_name=$journal->image_file_name;
if(empty($image_file_name)) $image_file_name= 'no_image.jpg';
if(!(file_exists('images/bentham/'.$image_file_name))){
      $image_file_name = 'no_image.jpg';
}
  $image_url= 'http://'.$_SERVER['HTTP_HOST'].'/images/bentham/'.$image_file_name;
  $remchar =array('&lt;p&gt;','&lt;/p&gt;','"');//remove characters
  $txt_abstract=strip_tags(html_entity_decode($node_meta->description,ENT_NOQUOTES , 'UTF-8'));   


@endphp
    <meta name="description" content= "{{$node_meta->description}}" />
    <meta name="keywords" content="{{$node_meta->keywords}}"> 
	<meta name="pathi"   content="+{{Request::getPathInfo()}}" />
    <meta property="og:type"   content="website" /> 
    <meta property="og:title" content="{{html_entity_decode($journal->title)}}" />   
    <meta property="og:url" content="{{Request::url()}}" />
    <meta property="og:image" content="{{$image_url}}" />
    <meta property="og:description" content="{!!$txt_abstract!!}" />
    <meta property="og:site_name" content="https://{{$_SERVER['HTTP_HOST']}}" />
@endsection
@section('content')

  <!----Banner Section Starts----> 
    @include('includes.journal_banner')
  <!----Banner Section Ends---->
  <!----Main Section Starts (where all content bodies exist)----> 
  <main id="journal">
    @php 
    $status=""; 
    @endphp
    <section>
		<div class="container">		
			<div class="row">

				@include('includes.ajax_volume')

				<div class="col-md-4 ji-links">

					 @php
					  	//readfile('https://benthamscience.com/journal/editor-service.php?journalID='.$journal->nid);
            			//readfile('https://benthamscience.com/journal/nobel-service.php?journalID='.$journal->nid);
       				 @endphp


					<div class="row">
						@if($journal->impact_factor)
						<div class="col-md mb-3 pr-md-1">
							<div class="card card-body bg-siteblue text-white text-center p-2">
								<span class="font-18 mb-2 pb-1 d-block border-bottom">Impact Factor</span>
								<span class="m-0 font-weight-bold">{!!$journal->impact_factor!!}</span>
								<a href="/journal-impacting-science" class="btn btn-sm btn-outline-light mt-1 font-14 py-1 ">Impact Factor Journals</a>
							</div>
						</div>
						@endif
						@if($journal->ScopusCiteScore && strtolower($journal->subtitle) != "mirna")
						<div class="col-md mb-3 pl-md-1">
							<div class="card card-body bg-siteblue text-white text-center p-2">
								<span class="font-18 mb-2 pb-1 d-block border-bottom">Scopus CiteScore:</span><strong class="h3 m-0 d-block pb-1">{{$journal->ScopusCiteScore}}</strong> 
								@if($journal->subtitle == "RAFNA")
								Recent Patents on Food, Nutrition & Agriculture
								@endif
								<a href="https://www.scopus.com/sourceid/{{$journal->ScopusCiteID}}" class="btn btn-sm btn-outline-light mt-1 font-14 py-1 mt-md-2 w-100" target="_blank">View Details</a>
							</div>
						</div>
						@endif
					</div>
					@if($journal->journal_status!='2')
					<div class="card mb-3">
						<div class="card-header">
						  <strong>Track Manuscript</strong>
						</div>
						<div class="card-body p-2">
						  <div class="input-group">
							<input type="text"  name="ref_number" id="ref_number" class="form-control" placeholder="Type manuscript code" aria-describedby="basic-addon2">
							<div class="input-group-append">
							  <button class="btn btn-secondary" type="button"
							  onclick="window.open('http://bentham.manuscriptpoint.com/search/Search/SearchGlobally/'+document.getElementById('ref_number').value,'new','toolbar=0 ,location=0, status=0, titlebar=0, scrollbars=yes, menubar=no,resize=no,width=800, height=600, top=50, left=150')">Track</button>
							</div>
						  </div>
						</div>
					  </div>
					  @endif
							
						@include('includes.journal_rightmenu_jinfo')
  
				            @if(count($subs_category) > 0)
					@if($journal->journal_status!='2')
				 			<a class="card card-body bg-siteblue d-block text-white text-left py-2" href="/subscribe-to-this-journal/{{ $journal->journal_id }}" target="_blank"><strong class="my-1 d-inline-block">Subscribe</strong> <i class="fas fa-bell float-right mt-1"></i></a>
					 		@endif	
					@endif
			        
			        @if($journal->journal_status!='2')    
			            <div class="btn-group btn-group-sm col mt-3 mb-3">
			            	<a target="_blank" href="https://www.facebook.com/BenthamSciencePublishers" class="btn btn-link text-dark"><i class="fab fa-facebook-f fa-2x"></i></a>
			            	<a target="_blank" href="https://www.linkedin.com/company/benthamscience" class="btn btn-link text-dark"><i class="fab fa-linkedin-in fa-2x"></i></a>
			            	<a target="_blank" href="https://twitter.com/BenthamScienceP" class="btn btn-link text-dark"><i class="fab fa-x-twitter fa-2x"></i></a>
			            	<?php
			            	/*
			            		$social_link='';
				            	$social_media_link = explode('|',$journal->social_media_link);
								$total = (count($social_media_link)-1);
								for($i=0 ;$i<$total ;$i++){
									if(!empty($social_media_link[$i])){
										$options = explode('^',$social_media_link[$i]);
										$type = $options[0];

										$external_link = $options[1];
										$icon = $options[2];
										if($type=='facebook'){
											$social_link .= '<a target="_blank" href="'.$external_link.'" class="btn btn-link text-dark"><i class="fab fa-facebook-f fa-2x"></i></a>';
										}if($type=='linkedin'){
											$social_link .= '<a target="_blank" href="'.$external_link.'" class="btn btn-link text-dark"><i class="fab fa-linkedin-in fa-2x"></i></a>';
										}if($type=='twitter'){
											$social_link .= '<a target="_blank" href="'.$external_link.'" class="btn btn-link text-dark"><i class="fab fa-twitter fa-2x"></i></a>';
										}
									}

									 //$social_link .= "<a href='$external_link' target=blank><img src='$icon'></a>";
								}
							*/			
			            	?>			              
			              <?php //echo $social_link;?>
			              <a href="/rss/xml/journal/<?php echo $journal->journal_id;?>"  target="_blank" class="btn btn-link text-dark"> <i class="fas fa-rss fa-2x"></i></a>
			            </div>
			      @endif      

						@if($journal->journal_status != 2)    
						@include('includes.journal_rightmenu')
						@endif  
						
				</div>
				
			</div>
		</div>
    </section>
    
  </main>
  
  <!----Main Section Starts---->
</div>
<script type="text/javascript">
  $(function () {
  $('[data-toggle="popover"]').popover()
})
</script>


<script type="text/javascript">
            $(document).ready(function(){ 
            $(".panel, .panel-title, .panel-heading, .panel-body, .ji-links div").removeAttr("style")

            $('.ji-links h3').replaceWith(function(){
    			return $("<strong />", {html: $(this).html()});
			});

            $(".panel").addClass("card mb-3");
            $(".panel-heading").addClass("card-header");
            $(".panel-body").addClass("card-body");
            $(".ji-links .card .col-xs-3").addClass("col-md-3");
            $(".ji-links .card .panel-body.card-body .btn-danger").addClass("btn-sm bg-siteblue border-0");
            $(".ji-links .card .panel-body.card-body .modal-header").addClass("d-inline");
            $(".ji-links .card .panel-body.card-body .modal-body").addClass("d-inline");
            
            });
        </script>
@endsection
