diff --git a/mayan/apps/appearance/templates/appearance/base.html b/mayan/apps/appearance/templates/appearance/base.html index 23f1eccab3..29c3a819ea 100644 --- a/mayan/apps/appearance/templates/appearance/base.html +++ b/mayan/apps/appearance/templates/appearance/base.html @@ -399,6 +399,12 @@ $('td input:checkbox', table).prop('checked', checked); }); + $('a.new_window').click(function(event) { + event.preventDefault(); + var newWindow = window.open($(this).attr('href'), '_blank'); + newWindow.focus(); + }); + $('.alert button.close').click(function() { dismissAlert($(this).parent()); }); diff --git a/mayan/apps/appearance/templates/navigation/generic_link_instance.html b/mayan/apps/appearance/templates/navigation/generic_link_instance.html index 8c5132a8db..fa991e188e 100644 --- a/mayan/apps/appearance/templates/navigation/generic_link_instance.html +++ b/mayan/apps/appearance/templates/navigation/generic_link_instance.html @@ -1,5 +1,5 @@ {% if link.disabled %} - {% if link.icon %} {% endif %}{{ link.text }}{% if link.error %} - {{ link.error }}{% endif %}{% if horizontal %}{% if not forloop.last %} {% endif %}{% endif %} + {% if link.icon %} {% endif %}{{ link.text }}{% if link.error %} - {{ link.error }}{% endif %}{% if horizontal %}{% if not forloop.last %} {% endif %}{% endif %} {% else %} - {% if link.icon %} {% endif %}{{ link.text }}{% if link.error %} - {{ link.error }}{% endif %}{% if horizontal %}{% if not forloop.last %} {% endif %}{% endif %} + {% if link.icon %} {% endif %}{{ link.text }}{% if link.error %} - {{ link.error }}{% endif %}{% if horizontal %}{% if not forloop.last %} {% endif %}{% endif %} {% endif %} diff --git a/mayan/apps/appearance/templates/navigation/large_button_link.html b/mayan/apps/appearance/templates/navigation/large_button_link.html index 064abe302a..82a7d22995 100644 --- a/mayan/apps/appearance/templates/navigation/large_button_link.html +++ b/mayan/apps/appearance/templates/navigation/large_button_link.html @@ -1,5 +1,5 @@
- +
{{ link.text }}
diff --git a/mayan/apps/rest_api/links.py b/mayan/apps/rest_api/links.py index bee37954b0..3837d8509f 100644 --- a/mayan/apps/rest_api/links.py +++ b/mayan/apps/rest_api/links.py @@ -4,8 +4,11 @@ from django.utils.translation import ugettext_lazy as _ from navigation import Link -link_api = Link(icon='fa fa-plug', text=_('REST API'), view='rest_api:api-root') +link_api = Link( + icon='fa fa-plug', tags='new_window', text=_('REST API'), + view='rest_api:api-root' +) link_api_documentation = Link( - icon='fa fa-book', text=_('API Documentation'), + icon='fa fa-book', tags='new_window', text=_('API Documentation'), view='django.swagger.base.view' )