diff options
Diffstat (limited to 'ishtar_common/templates')
| -rw-r--r-- | ishtar_common/templates/base.html | 35 | ||||
| -rw-r--r-- | ishtar_common/templates/ishtar/blocks/shortcut_menu.html | 24 | ||||
| -rw-r--r-- | ishtar_common/templates/ishtar/blocks/window_nav.html | 7 |
3 files changed, 41 insertions, 25 deletions
diff --git a/ishtar_common/templates/base.html b/ishtar_common/templates/base.html index 47ea61594..703644a35 100644 --- a/ishtar_common/templates/base.html +++ b/ishtar_common/templates/base.html @@ -14,12 +14,14 @@ <script language="javascript" type="text/javascript" src="{{JQUERY_URL}}?ver={{VERSION}}"></script> <script language="javascript" type="text/javascript" src="{{JQUERY_UI_URL}}jquery-ui.js?ver={{VERSION}}"></script> <script language="javascript" type="text/javascript" src="{{JQUERY_UI_URL}}ui/i18n/jquery.ui.datepicker-{{COUNTRY}}.js?ver={{VERSION}}"></script> + <script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/chosen/chosen.jquery.min.js?ver={{VERSION}}"></script> <script language="javascript" type="text/javascript" src="{{STATIC_URL}}/js/prettyPhoto/js/jquery.prettyPhoto.js?ver={{VERSION}}"></script> <script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/i18n/grid.locale-{{COUNTRY}}.js?ver={{VERSION}}"></script> <script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/jquery.jqGrid.min.js?ver={{VERSION}}"></script> <script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/grid.tbltogrid.js?ver={{VERSION}}"></script> <script language="javascript" type="text/javascript" src="{{STATIC_URL}}/js/ishtar.js?ver={{VERSION}}"></script> <link type="text/css" href="{{JQUERY_UI_URL}}jquery-ui.css?ver={{VERSION}}" rel="stylesheet" /> + <link type="text/css" href="{{STATIC_URL}}js/chosen/chosen.min.css?ver={{VERSION}}" rel="stylesheet" /> <link rel="stylesheet" href="{{STATIC_URL}}/font-awesome/css/font-awesome.min.css?ver={{VERSION}}" /> <link rel="stylesheet" href="{{STATIC_URL}}/js/prettyPhoto/css/prettyPhoto.css?ver={{VERSION}}" /> <link rel="stylesheet" href="{{STATIC_URL}}media/ui.jqgrid.css?ver={{VERSION}}" /> @@ -28,6 +30,9 @@ {% include "blocks/extra_head.html" %} {% block extra_head %} {% endblock %} + <script type='text/javascript'> + var shortcut_url = '{% url "shortcut-menu" %}'; + </script> </head> <body{% if current_theme%} id='{{current_theme}}'{%endif%}> <div id="header"> @@ -64,31 +69,8 @@ <a href='{% url "start" %}' id="logo"> {% if APP_NAME %}<p id="app_name">{{APP_NAME}}</p>{%endif%} </a> - {% if not reminders %}<div id="context_menu"> - {% block context %}{% if current_menu %} - <form method="post" action="{% url 'update-current-item' %}"> - <fieldset> - <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. New created and modified items are auto-pin.' %}"></i> - <table id='current_items'> - {% for lbl, model_name, main_cls, items in current_menu %} - <tr> - <td><label for="current_{{model_name}}">{{lbl}}</label></td> - <td> - <select class='{{main_cls}}' id='current_{{model_name}}'> - <option class='normal' value=''>--</option> - {% for val, label, selected, cls in items %}<option{% if cls %} class='{{cls}}'{% endif %} value='{{val}}'{% if selected %} selected="selected"{% endif %}>{% ifequal cls 'basket' %} {% endifequal %}{% ifequal cls 'green' %} {% endifequal %}{% ifequal cls 'orange' %} {% endifequal %}{% ifequal cls 'red' %} {% endifequal %}{{label}}</option> - {% endfor %}</select> - </td>{% with 'show-'|add:model_name as model_url%} - <td><a href='#' onclick='load_current_window("{% url model_url 0 %}", "{{model_name}}");' class='display_details'><i class="fa fa-info-circle" aria-hidden="true"></i></a></td> - {% endwith %} - </tr> - {% endfor %} - </table> - </fieldset> - </form> - {% endif %}{% endblock %} - </div>{% endif %} -{% if reminders %}<fieldset id='reminder'><legend>{% trans "Current items" %}</legend> + {% if not reminders %}<div id="context_menu"></div> + {% else %}<fieldset id='reminder'><legend>{% trans "Current items" %}</legend> {% for lbl, value in reminders %} <p><strong class='lbl'>{{lbl}}{% trans ":"%}</strong> <span class='value'>{{value}}</span></p> {% endfor %} @@ -128,6 +110,9 @@ <p class='progress-detail progress-4'>{% trans "Time to take another coffee?" %} <i class="fa fa-coffee" aria-hidden="true"></i></p> </div> </div> + <div id='message'> + <div class='information'><i class="fa fa-info-circle" aria-hidden="true"></i> <span class='content'></span></div> + </div> </body> </html> diff --git a/ishtar_common/templates/ishtar/blocks/shortcut_menu.html b/ishtar_common/templates/ishtar/blocks/shortcut_menu.html new file mode 100644 index 000000000..29c975e79 --- /dev/null +++ b/ishtar_common/templates/ishtar/blocks/shortcut_menu.html @@ -0,0 +1,24 @@ +{% load i18n %} +{% load url from future%} +{% if current_menu %} +<form method="post" action="{% url 'update-current-item' %}"> +<fieldset> +<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> +<table id='current_items'> +{% for lbl, model_name, main_cls, items in current_menu %} +<tr> + <td><label for="current_{{model_name}}">{{lbl}}</label></td> + <td> + <select class='{{main_cls}} chosen-select' id='current_{{model_name}}'> + <option class='normal' value=''>--</option> + {% for val, label, selected, cls in items %}<option{% if cls %} class='{{cls}}'{% endif %} value='{{val}}'{% if selected %} selected="selected"{% endif %}>{% ifequal cls 'basket' %} {% endifequal %}{% ifequal cls 'green' %} {% endifequal %}{% ifequal cls 'orange' %} {% endifequal %}{% ifequal cls 'red' %} {% endifequal %}{{label}}</option> + {% endfor %}</select> + </td>{% with 'show-'|add:model_name as model_url%} + <td><a href='#' onclick='load_current_window("{% url model_url 0 %}", "{{model_name}}");' class='display_details'><i class="fa fa-info-circle" aria-hidden="true"></i></a></td> + {% endwith %} +</tr> +{% endfor %} +</table> +</fieldset> +</form> +{% endif %} diff --git a/ishtar_common/templates/ishtar/blocks/window_nav.html b/ishtar_common/templates/ishtar/blocks/window_nav.html index 13069b1eb..c0d1ba9fe 100644 --- a/ishtar_common/templates/ishtar/blocks/window_nav.html +++ b/ishtar_common/templates/ishtar/blocks/window_nav.html @@ -42,6 +42,13 @@ <i class="fa fa-pencil fa-stack-1x fa-inverse"></i> </span> </a>{% endif %} + {% if pin_action %} + <span class='pin-action' onclick='$.get("{% url 'pin' item.SLUG item.pk %}", function(){load_shortcut_menu(); display_info("{% trans 'Item pined in your shortcut menu.' %}")});' title="{% trans 'Pin' %}"> + <span class="fa-stack fa-lg"> + <i class="fa fa-circle fa-stack-2x"></i> + <i class="fa fa-thumb-tack fa-stack-1x fa-inverse"></i> + </span> + </span>{% endif %} <a class='badge' href='{% url show_url item.pk "odt" %}' title='{% trans "Export as OpenOffice.org file"%}'>ODT</a> <a class='badge' href='{% url show_url item.pk "pdf" %}' title='{% trans "Export as PDF file"%}'>PDF</a> </div> <hr class='clear'> |
