@include('nn_site.partials.header')

    <section class="section projects publics">
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    <div class="projects-ul">
                        <ul>
                            <li {{!isset($slug) ? 'class=active':''}}><a href="{{fullUrl('publications')}}" title="{{$translate->all}}">{{$translate->all}}</a></li>
                            @foreach($pubpages as $pubpage)
                            <li {{($slug == $pubpage->slug)? 'class=active':''}}><a href="{{fullUrl('publications/'.$pubpage->slug)}}" title="{{$pubpage->name}}">{{$pubpage->name}}</a></li>
                            @endforeach
                        </ul>
                        <!--<div class="selec">-->
                        <!--    <select name="" onChange="location.href=this.value" id="publics" class="select">-->
                        <!--    <option value="{{fullUrl('publications/'.$slug)}}">{{$translate->choosePublication}}</option>-->
                        <!--        @foreach($category as $c)-->
                               
                        <!--        <option value="{{fullUrl('publications/'.($slug ? $slug .'/' : '') .'?category='.$c->id)}}" {{(request()->get('category') && request()->get('category') == $c->id)? 'selected':""}}>{{$c->name}}</option>-->
                        <!--        @endforeach-->
                      
                        <!--    </select>-->
                            <!-- /#.select -->
                        <!--</div>-->
                        <!-- /.selec -->
                    </div>
                    <!-- /.projects-ul -->
                </div>
                <!-- /.col-md-12 -->

                @foreach($publications as $pub)
                    <div class="col-md-6">
                        <div class="public-item">
                            <div class="public-item__date">
                                <p>{{formatDate($pub->created_at,$pub->sDate)}}{{$translate->yearSymbol}}</p>
                                <span>
                                    <a nohref>{{isset($menu_items) ? $menu_items->where('slug', ($pub->collection_id == 3 ? 'articles' : 'dissertations'))->first()->name : $menu_item->name}}</a>
                                </span>
                            </div>
                            <!-- /.public-item__date -->
                            <h2>
                                <a href="{{ fullUrl('publication/'.$pub->slug) }}" title="{{$pub->name}}">{{$pub->name}}
                                </a> </h2>
                            <div class="public-item__author">
                                <!--<p>{{$pub->catname}}</p>-->
                                <h3><span>{{$translate->author}}:&nbsp;</span> {{$pub->description}}</h3>
                            </div>
                            <!-- /.public-item__author -->
                        </div>
                    </div>
                @endforeach
              
                <div class="col-md-12 mt-4">
                    <!-- Pagination -->
                    @include('nn_site.partials.pager',['items'=>$publications, 'slug'=>'publications/'.$slug. (request()->route('category') ? '/'. request()->route('category') : '')])
                </div>
            </div>
            <!-- /.row -->
        </div>
        <!-- /.container -->
    </section>
    <!-- /.section projects -->
    @include('nn_site.partials.footer')
