<!DOCTYPE html>
<html class="" lang="en">
<head  >

    {% include 'twig/common/header/include.twig' %}
    <script src="/dev/lib/handlebars-v4.0.10.js" type="text/javascript" charset="utf-8"></script>

</head>
<body class="" data-group="" data-page="profiles:show" data-project="">
{% include 'twig/common/body/script.twig' %}

<section class="has-sidebar page-layout max-sidebar">
    {% include 'twig/common/body/page-left.twig' %}

    <div class="page-layout page-content-body background-white">
{% include 'twig/common/body/header-content.twig' %}


<div class="page-with-sidebar">

    <div class="content-wrapper page-with-layout-nav page-with-sub-nav">
        <div class="alert-wrapper">
            <div class="flash-container flash-container-page">
            </div>
        </div>
            <div class="content padding-0" id="content-body">
                <div class="cover-block user-cover-block">
                    <div class="cover-controls">
                        <a class="btn btn-gray has-tooltip" title="编辑用户资料" aria-label="编辑用户资料" href="/user/profile_edit">
                            <i class="fa fa-pencil"></i>
                        </a>
                        <!--<a class="btn btn-gray has-tooltip" title="Subscribe" aria-label="Subscribe" href="/sven.atom?private_token=vyxEf937XeWRN9gDqyXk">
                            <i class="fa fa-rss"></i>
                        </a>-->
                    </div>
                    {% include 'twig/user/common-profile-header.twig' %}
                    <div class="scrolling-tabs-container">
                        <div class="fade-left">
                            <i class="fa fa-angle-left"></i>
                        </div>
                        <div class="fade-right">
                            <i class="fa fa-angle-right"></i>
                        </div>
                        {% set profile_nav='filters' %}
                        {% include  'twig/user/common-profile-nav.twig' %}
                    </div>
                </div>
                <div class="container-fluid">
                    <div class="content" id="content-body">
                        <div class="top-area">
                            <ul class="nav-links">
                                <li class="active">
                                    <a href="#">保存的过滤器</a>
                                </li>
                            </ul>
                        </div>
                        <div class="content-list">
                            <div class="table-holder">
                                <table class="table">
                                    <thead>
                                    <tr>
                                        <th class="js-pipeline-info pipeline-info" style="min-width:150px">过滤器名称</th>
                                        <th class="js-pipeline-info pipeline-info" style="min-width:150px">所属项目</th>
                                        <th class="js-pipeline-stages pipeline-info">过滤条件</th>
                                        <th class="pipeline-info" style="min-width:100px">操作</th>
                                    </tr>
                                    </thead>
                                    <tbody id="list_render_id">
                                    </tbody>
                                </table>
                            </div>
                            <div class="gl-pagination" id="pagination">

                            </div>
                        </div>

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

</div>

</section>

{% verbatim %}<script type="text/html"  id="list_tpl">
    {{#filters}}
        <tr class="commit">
            <td >
                <strong><a style="color: #1890ff;" href="/issue/main?fav_filter={{id}}">{{name}}</a> </strong>
            </td>
            <td  >
                {{make_project projectid}}
            </td>
            <td>
                <a style="color: #1890ff;" href="/issue/main?fav_filter={{id}}">{{filter}}</a>
            </td>
            <td  >
                <a class="list_for_delete btn btn-transparent  "  href="javascript:;" data-value="{{id}}" style="padding: 6px 2px;">
                    <i class="fa fa-trash"></i>
                    <span class="sr-only">删除</span>
                </a>

            </td>
        </tr>
    {{/filters}}
</script>{% endverbatim %}

<script src="/dev/js/handlebars.helper.js?v=<?=_version?>"></script>
<script src="/dev/js/user/filters.js?v=<?=_version?>"></script>
<script type="text/javascript">

    var _issueConfig = {
        "projects":<?=projects|json_encode()|raw?>
    };

    var $obi = null;
    $(function() {

        var options = {
            list_render_id:"list_render_id",
            list_tpl_id:"list_tpl",
            filter_form_id:"filter_form",
            filter_url:"/user/fetch_filters",
            delete_url:"/user/delete_filter",
            pagination_id:"pagination"

        }
        window.$obi = new UserFilters( options );
        window.$obi.fetchUserFilterss( );

    });

</script>

</body>
</html>

