{% load i18n xadmin_tags %}
<style>
    .bookmark-tab {
        padding: 15px;
    }
    .bookmark-tab:hover {
        text-decoration: none;
        background-color: #eee;
    }
</style>
<li class="dropdown bookmarks" style="display:inline-flex;white-space:nowrap;">
	<a id="{{ model_name }}drop-bookmark" class="dropdown-toggle bookmark-tab"  role="button" data-toggle="dropdown"
	   title="{% trans 'msg_all_saved_filters' %}" href="#" style="color:#333;">
		<i class="fa fa-book"></i> {{ bk_menu_title|truncatechars:9 }}<span class="caret"></span></a>
	<ul id="{{ model_name }}_bookmark_menu" class="dropdown-menu" role="menu">
		{% for bk in bk_bookmarks %}
			<li class="with_menu_btn">
				<a href="javascript:void(0)" class="filter-bk-link" title="{{ bk.title }}" data-filters="{{ bk.filters|base64_encode }}">
          <i class="fa fa-bookmark"></i> {{ bk.title }}
        </a>
			</li>
		{% empty %}
			<li><a class="mute">{% trans "bookmark_menu_noBookmarks" %}</a></li>
		{% endfor %}
		{% if has_add_permission_bookmark %}
			<li class="divider add-bookmark"></li>
			<li class="dropdown-submenu add-bookmark"><a href="#"><i class="fa fa-plus"></i> {% trans "bookmark_menu_newBookmark" %}</a>
				<div class="popover right dropdown-menu">
					<div class="arrow"></div>
					<div class="popover-content">
						<form id="{{ model_name }}_bk_form" class="bookmark_form" method="post" action="javascript:void(0);">
							{% csrf_token %}
							<input type="hidden" name="filters" value=""/>
							<input name="title" type="text" autocomplete="off" class="form-control bookmark_title_name" style="font-size: 12px;" placeholder="{% trans "bookmark_menu_enterBookmarkTitle" %}…"/>
							<input id="{{ model_name }}_bk_is_share" type="checkbox" name="is_share"/>
              <label for="{{ model_name }}_bk_is_share">{% trans 'bookmark_field_isShared' %}</label>
              <input type="button" id="{{ model_name }}_bk_submit" class="btn btn-success" data-action="{{ bk_post_url }}"
                  value="{% trans "bookmark_menu_saveBookmark" %}">
						</form>
					</div>
				</div>
			</li>
		{% endif %}
	</ul>
</li>
