diff options
Diffstat (limited to 'ishtar_common/templates/ishtar/blocks/advanced_shortcut_menu.html')
-rw-r--r-- | ishtar_common/templates/ishtar/blocks/advanced_shortcut_menu.html | 93 |
1 files changed, 49 insertions, 44 deletions
diff --git a/ishtar_common/templates/ishtar/blocks/advanced_shortcut_menu.html b/ishtar_common/templates/ishtar/blocks/advanced_shortcut_menu.html index cd7bf88f8..953b0ef40 100644 --- a/ishtar_common/templates/ishtar/blocks/advanced_shortcut_menu.html +++ b/ishtar_common/templates/ishtar/blocks/advanced_shortcut_menu.html @@ -1,49 +1,54 @@ +{% extends "ishtar/blocks/base_shortcut_menu.html" %} {% load i18n %} -{% if menu %} -<form method="post" action="{% url 'update-current-item' %}"> -<fieldset id='shortcut-menu'> -<span class="fa-stack short-menu-close"> - <i class="fa fa-circle fa-stack-2x"></i> - <i class="fa fa-times fa-stack-1x fa-inverse"></i> -</span> -<span class="fa-stack short-menu-open"> - <i class="fa fa-circle fa-stack-2x"></i> - <i class="fa fa-plus fa-stack-1x fa-inverse"></i> -</span> +{% block short_content %} <div class="short-menu-buttons btn-group" role="group"> - <button type="button" class="btn" id='short-menu-simple' title="{% trans 'Simple menu limited to your own items. Be careful only the last 100 items are displayed.' %}">{% trans "simple" %}</button> - <button type="button" class="btn btn-selected" id='short-menu-advanced' title="{% trans 'Advanced menu' %}">{% trans "advanced" %}</button> + <button type="button" class="btn btn-secondary" + id='short-menu-simple' title="{% trans 'Simple menu limited to your own items. Be careful only the last 100 items are displayed.' %}">{% trans "simple" %}</button> + <button type="button" class="btn btn-secondary active" id='short-menu-advanced' title="{% trans 'Advanced menu' %}">{% trans "advanced" %}</button> </div> -<div id='action_current_items'> -<p><i class="icon fa fa-thumb-tack fa-2x" aria-hidden="true" title="{% trans 'Pin an item in order to constrain default searches with this item. By default only your items are displayed. New created and modified items are auto-pin.' %}"></i></p> -<p> -<a href='' onclick='return activate_own_search();' class='activate_own_search{% if SHORTCUT_SEARCH == 'all' %} disabled{% endif %}'><i class="icon fa fa-user" aria-hidden="true" title="{% trans 'Search within my items' %}"></i></a> -<a href='' class='activate_all_search{% if SHORTCUT_SEARCH == 'own' %} disabled{% endif %}' onclick='return activate_all_search();'><i class="icon fa fa-users" aria-hidden="true" title="{% trans 'Search within all items' %}"></i></a> -</p> -<p> -<a href='' onclick='return load_shortcut_menu();' class='disabled'><i class="icon fa fa-2x fa-refresh" aria-hidden="true" title="{% trans 'Refresh menu' %}"></i></a> -</p> +<div id='action_current_items' class="btn-group" role="group"> + <button type="button" onclick='return activate_own_search();' + title="{% trans 'Search within my items' %}" + class='btn btn-secondary activate_own_search{% if SHORTCUT_SEARCH == "own" %} active{% endif %}'> + <i class="icon fa fa-user" aria-hidden="true"></i> + </button> + <button type="button" onclick='return activate_all_search();' + title="{% trans 'Search within all items' %}" + class='btn btn-secondary activate_all_search{% if SHORTCUT_SEARCH == "all" %} active{% endif %}'> + <i class="icon fa fa-users" aria-hidden="true"></i> + </button> + {% comment %} + <p> + <a href='' onclick='return load_shortcut_menu();' class='disabled'><i class="icon fa fa-2x fa-refresh" aria-hidden="true" title="{% trans 'Refresh menu' %}"></i></a> + </p> + {% endcomment %} </div> -<table id='current_items'> -{% for lbl, model_name, current, widget in menu %} -<tr> - <td><label for="current_{{model_name}}">{{lbl}}</label></td> - <td> - {{widget|safe}} - </td>{% with 'show-'|add:model_name as model_url%} - <td><a href='#' onclick='load_current_window("{% url model_url current %}", "{{model_name}}");' class='display_details'><i class="fa fa-info-circle" aria-hidden="true"></i></a></td> - <td><span class='disabled pin-action' onclick='$.get("{% url 'unpin' model_name %}", function(){load_shortcut_menu();});' title="{% trans 'Unpin' %}"> - <i class="fa fa-times"></i> - </span></td> - {% endwith %} -</tr> -{% endfor %} -</table> -</fieldset> -</form> -<script type='text/javascript'> +<p id='current_items'> + {% for lbl, model_name, current, widget in menu %} + <div class="form-group row"> + <label for="current_{{model_name}}" + class="col-sm-4 col-form-label">{{lbl}}</label> + <div class="col-sm-6"> + {{widget|safe}} + </div> + {% with 'show-'|add:model_name as model_url%} + <div class="col-sm-2"> + <a href='#' onclick='load_current_window("{% url model_url current %}", "{{model_name}}");' class='display_details'> + <i class="fa fa-info-circle" aria-hidden="true"></i> + </a> + <a href='#' + class='disabled pin-action text-danger' + onclick='$.get("{% url "unpin" model_name %}", function(){load_shortcut_menu();});' title="{% trans 'Unpin' %}"> + <i class="fa fa-times"></i> + </a> + </div> + {% endwith %} + </div> + </tr> + {% endfor %} +</p> +{% endblock %} + +{% block short_extrajs %} var advanced_menu = true; -{% if SHORTCUT_SHOW == 'off' %}var shortcut_menu_hide = true; -{% else %}var shortcut_menu_hide = false;{% endif %} -</script> -{% endif %} +{% endblock %} |