" <?php 
echo (isset($active_tab) and $active_tab == 'latest') ? 'class="active"' : '';
?>
 >
            EN SON
        </a>
    </li>
    <li>
        <a href="?<?php 
echo buildRelativeUrl('sort', 'popular');
?>
" <?php 
echo (isset($active_tab) and $active_tab == 'popular') ? 'class="active"' : '';
?>
>
            POPÜLER
        </a>
    </li>
    <li>
        <a href="?<?php 
echo buildRelativeUrl('sort', 'map');
?>
" <?php 
echo (isset($active_tab) and $active_tab == 'map') ? 'class="active"' : '';
?>
>
            HARİTA
        </a>
    </li>
</ul>
<?php

$btn_text = isset($text) ? $text : 'FİKİR <span class="extended">EKLE</span>';
$btn_class = isset($class) ? $class : 'btn btn-primary';
if ($role == 'user' || $role == 'public') {
    $loc_param = '';
    if (isset($_GET['location'])) {
        $loc_param = '?' . buildRelativeUrl('location', $_GET['location']);
    } else {
        if (isset($hood)) {
            $loc_param = '?' . buildRelativeUrl('location', $hood->name . ', ' . $hood->district->name . ', ' . $hood->district->city->name);
        }
    }
    $btn_link = $role == 'user' ? '/issues/new' . $loc_param : 'javascript:openDialog(\'dialog_login\')';
    ?>
<a href="{{ $btn_link }}" class="{{ $btn_class }}"><i class="ion ion-plus u-mr5"></i> {!! $btn_text !!}</a>
<?php 
}