@php
$jbannerbg = public_path()."/images/jbannerbg/".strtolower($journal->subtitle)."-jbanner.jpg";
if(file_exists($jbannerbg)){
$jbannerimg = url('/')."/images/jbannerbg/".strtolower($journal->subtitle)."-jbanner.jpg";
}
else{
$jbannerimg = url('/')."/images/jbannerbg/journal-bg.jpg";
}
if(isset($section) && $section->count() > 0 && $page_name == "section-detail")
{
$journalsecbg = public_path()."/images/jbannersecbg/".strtolower($section_detail->js_code)."-jbanner.jpg";

if(file_exists($journalsecbg)){
$jbannersecimg = url('/')."/images/jbannersecbg/".strtolower($section_detail->js_code)."-jbanner.jpg";
}
else{
$jbannersecimg = url('/')."/images/jbannersecbg/ccs-7.jpg";
}
}

@endphp

<?php
if (isset($section) && $section->count() > 0 && $page_name == "section-detail") { ?>
  <style>
    :root {
      --journalbg: url("<?php echo $jbannersecimg; ?>");
    }
  </style>
<?php } else { ?>
  <style>
    :root {
      --journalbg: url("<?php echo $jbannerimg; ?>");
    }
  </style>
<?php } ?>



@if(isset($section) && $section->count() > 0 && $page_name == "section-detail")
<section id="journal-banner" class="section">
  @else
  <section id="journal-banner">
    @endif

    <div class="container">
      <div class="row">
        <div class="col-md-2 text-center text-md-left a-side positon-relative">

          <a href="/journal/{{$journal->journal_id}}/current-issue">

            @if(isset($journal->image_file_name) )

            <img src="{{'/images/bentham/'.$journal->image_file_name}}" width="160" height="211" class="img-fluid" alt="">

            @else

            <img src="/images/160x211.png" alt="profile pic">

            @endif

          </a>

          <div class="row mx-0 mt-2">
            <div class="col-auto col-md-auto p-0 pr-1">
              ISSN (Print):
            </div>
            <div class="col-auto col-md-auto p-0">
              {{$journal->issn}}
            </div>
          </div>
          <div class="row mx-0 mb-2">
            <div class="col-auto col-md-auto p-0 pr-1">
              ISSN (Online):
            </div>
            <div class="col-auto col-md-auto p-0">
              {{$journal->eissn}}
            </div>
          </div>

          @if($journal->flyer_link != "" && $journal->journal_status !=2)

          <!--a class="btn btn-outline-light btn-sm mt-3 btn-block" href="/journal/{{ $journal->journal_id }}/download_flyer/{{Crypt::encrypt(config('constants.admin.root_path').'JOURNALS/BEN/'.$journal->subtitle.'/'.$journal->flyer_link)}}" name="language_btn">Download PDF Flyer</a-->

          @if(isset(Auth::user()->id) && (Auth::user()->id == 615352 || Auth::user()->id == 487296 || Auth::user()->id == 632603))
          <a class="btn btn-outline-light btn-sm mt-3 btn-block" target="_blank" href="/journal/{{ $journal->journal_id }}/download_flyer" name="language_btn">Download PDF Flyer</a>
          @else
          <a class="btn btn-outline-light btn-sm mt-3 btn-block" target="_blank" href="/images/journal-flyer/{{ $journal->flyer_link}}" name="language_btn">Download PDF Flyer</a>
          @endif

          @endif

        </div>
        <div class="col-md-5 text-center text-md-left mt-4 mt-md-0">
          <h1 class="h3">{{$journal->title}} </h1>

          @if($journal->subtitle =="CPA")

          <a class="cpa-announcement h-auto" href="http://cpa.fargroups.com/about/submissions" target="_blank">
            <strong class="a-heading">Starting from Volume 21, CPA will be published by KeAi Publishing </strong>
            (The journal homepage is under construction)</a>

          @endif

          @if($journal->formerly_title && $journal->subtitle !="CPA")

          <p class="mb-2">{!! $journal->formerly_title !!} <i class="fas fa-external-link-alt d-inline fa-sm ml-1"></i></p>

          @endif

          @if(!empty($journal->org_impact_factor))
          <p class="mb-2"><strong>Impact Factor</strong>: {{$journal->org_impact_factor}}</p>
          @endif

          @if(!empty($main_indexing) && $main_indexing->indexing_occurrences > 1)
          <p class="mb-2"><strong>Indexed in:</strong> {{$main_indexing->indexing_title}}... <a href="/journal/{{$journal->journal_id}}/indexing-agency" class="text-white mt-2"><em><u>View all</u></em></a></p>
          @endif


          @if(isset($current_year_issue[0]->volume_id) && $journal->IsIssue == 1)
          <p class="mb-2">Volume {{$current_year_issue[0]->volume_name}} , Issues {{$current_year_issue[0]->total_no_of_issues}}, {{$current_year_issue[0]->year}}</p>

          @elseif(isset($current_year_issue[0]->volume_id) && ($journal->IsIssue == 0 || $journal->continues_publication_journal == 1))
          <p class="mb-2">Volume {{$current_year_issue[0]->volume_name}} , {{$current_year_issue[0]->year}}</p>

          @endif

          <!-- @if($journal->journal_status!='2' && $journal->IsOpenAccess == 2)
          <p><em>This journal supports open access</em></p>
          @endif -->

          <div class="btn-group">
            <a href="{{ URL::previous() }}" class="btn btn-outline-light btn-sm mr-1">Back</a>

            <a href="{{route('journal',$journal->journal_id)}}" class="btn btn-light btn-sm mr-1">Journal Home</a>

            @if($journal->subtitle =="CPA")
            <button type="button" class="btn btn-outline-light btn-sm mr-1" data-toggle="modal" data-target="#CPA">
              Call For Paper
            </button>

            @endif

            @if($journal->journal_status == 1 && $journal->subtitle !="CN" && $journal->subtitle !="CPA")
            <form action="{{url('call-for-papers')}}" method="POST">
              @CSRF
              <input type="hidden" name="search_journals[]" value="{{$journal->jms_jcode}}">

              <div id="call-paper" class="dropdown dropright font-14 p-0 m-0">
                <button class="btn btn-outline-light btn-sm mr-1 dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" data-display="static" aria-expanded="false">Call For Paper</button>

                <div class="dropdown-menu font-12 dropdown-menu-right dropdown-menu-lg-left" aria-labelledby="navbarCallForPapers">

                  <div class="row m-0 w-100">
                    <div class="px-1 col">
                      <h6 class="border-bottom text-white pb-2">Submission for General Articles</h6>
                      <a href="https://bentham.manuscriptpoint.com/submit/AbstractS/Journal/{{$journal->jms_jcode}}?utm_source=eurekaselect&utm_medium=website&utm_campaign=callforpaper&utm_term=unpaid&utm_content=link" target="_blank">Submit Abstract</a>
                      <a href="https://bentham.manuscriptpoint.com/journals/{{$journal->jms_jcode}}?utm_source=eurekaselect&utm_medium=website&utm_campaign=callforpaper&utm_term=unpaid&utm_content=link" target="_blank">Submit Manuscript</a>
                    </div>
                    <div class="px-1 col">
                      <h6 class="border-bottom text-white pb-2">Submit to Thematic Issues</h6>
                      <button type="submit" class="btn">Submit Manuscript to Thematic Issues</button>

                      <a href="https://bentham.manuscriptpoint.com/submit/Htproposal/journal/{{$journal->jms_jcode}}?utm_source=eurekaselect&utm_medium=website&utm_campaign=callforpaper&utm_term=unpaid&utm_content=link" target="_blank">Submit Thematic Issue Proposal</a>
                    </div>
                  </div>
                </div>
              </div>

            </form>
            @endif
          </div>

          @if(isset($page_name) && $page_name == 'Issue' && $DownloadAccess == false && $issue->price > 0)

          <a href="{{route('purchase_full_issue',$issue->issue_id)}}" class="btn btn-success btn-sm">Purchase Full Issue</a>

          @endif
          <br>
          @if($journal->journal_status !=2)
          @if($journal->jms_jcode == "CN")
          <!-- <a href="{{$journal->jms_link}}" class="btn btn-outline-light btn-sm mt-2" target="_blank">Submit Abstracts</a> -->
          @else
          <!-- <a href="https://bentham.manuscriptpoint.com/submit/AbstractS/Journal/{{$journal->jms_jcode}}" class="btn btn-outline-light btn-sm mt-2" target="_blank">Submit Abstracts</a> -->
          @endif
          <!-- <a href="{{$journal->jms_link}}" class="btn btn-outline-light btn-sm mt-2" target="_blank">Submit Manuscripts</a> -->
          @endif
          <!-- <br> -->
          @if($journal->journal_status == 1)
          <a href="/journal/{{ $journal->journal_id }}/institutional-members" class="btn btn-outline-light btn-sm mt-2">Institutional Members</a>
          @endif

          @if($journal->discount_offer)

          <p class="mt-4">{!! $journal->discount_offer !!} <i class="fas d-inline fa-sm ml-1"></i></p>

          @endif

        </div>
      </div>
    </div>
  </section>

  <!-- Modal -->

  <!-- Modal -->
  <div class="modal fade" id="CPA" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered modal-lg ">
      <div class="modal-content text-center">
        <div class="modal-header rounded">
          <h4 class="mx-auto text-center mb-0">Special Note</h4>
        </div>
        <div class="modal-body">

          <h6 class="mb-2 border-bottom pb-2">Submissions to this journal, after 09/09/2024, should be made to <a href="http://cpa.fargroups.com/about/submissions" target="_blank" class="btn btn-link p-0 text-siteblue">http://cpa.fargroups.com/about/submissions</a></h6>
          <h6 class="mt-3">To view your previous submissions,
            please access the Bentham submission system at (<a href="https://bentham.manuscriptpoint.com/" class="btn btn-link p-0 text-siteblue" target="_blank">https://bentham.manuscriptpoint.com/</a>).</h6>
        </div>
      </div>
    </div>
  </div>