{extends file="[shared]/menu.tpl"}

{block name="menu-items"}
    <li class="nav-header"><i class=" glyphicon glyphicon-book"></i><span>{translate_type type=$type}</span></li>
    <li><a href="javascript:nf('launch.php?s=menu.php&type=reportActivities', 'launch.php?s=list.php&amp;type=reportActivities');"><i class="glyphicon glyphicon-list"></i> <span>{'toolbar_list'|translate}</span></a></li>
    <li><a href="javascript:nf('launch.php?s=menu.php&type=reportActivities&hide_filter=true', 'launch.php?s=list.php&amp;type=reportActivitiesNotifications');"><i class="glyphicon glyphicon-list"></i> <span>{'toolbar_list_notifications'|translate}</span></a></li>
    <li><a href="javascript:nw('reportActivitiesNotifications', '0');"><i class="glyphicon glyphicon-plus"></i> <span>{'toolbar_add_notifications'|translate}</span></a></li>

   {if empty($hide_filter) || !$hide_filter}
    <li class="nav-header smaller"><i class="glyphicon glyphicon-filter"></i><span>{'filter'|translate}</span></li>
    <li>
        <ul class="nav-sub nav-pills">
            <form target="mainFrame" method="get" action="launch.php" class="form-inline">
                {insert_report_activities_filter}
                <input type="hidden" name="s" value="list.php">
                <input type="hidden" name="type" value="reportActivities" />
                <input type="submit" value="Hledat" class="btn btn-primary btn-sm" />
            </form>

            <script type="application/javascript">
                $('#search').on('keypress', 'input[type=text]', function(e){
                    if (e.key == "Enter")
                    {
                        var $this = $(this),
                            url = 'launch.php?s=list.php&type=reportActivities&'+$this.attr('name')+'='+encodeURIComponent($this.val());
                        nf(null, url);
                        return false;
                    }
                })
            </script>
        </ul>
    </li>
   {/if}
{/block}
