diff --git a/mayan/apps/appearance/templates/appearance/about.html b/mayan/apps/appearance/templates/appearance/about.html index e08ed9ae59..45e48452f6 100644 --- a/mayan/apps/appearance/templates/appearance/about.html +++ b/mayan/apps/appearance/templates/appearance/about.html @@ -3,6 +3,7 @@ {% load i18n %} {% load static %} +{% load appearance_tags %} {% load common_tags %} {% load smart_settings_tags %} @@ -59,6 +60,15 @@ {% smart_setting 'COMMON_PROJECT_TITLE' as setting_project_title %} {% project_information '__title__' as project_title %} + {% get_icon 'common.icons.icon_documentation' as icon_documentation %} + {% get_icon 'common.icons.icon_forum' as icon_forum %} + {% get_icon 'common.icons.icon_social_facebook' as icon_social_facebook %} + {% get_icon 'common.icons.icon_social_paypal' as icon_social_paypal %} + {% get_icon 'common.icons.icon_social_twitter' as icon_social_twitter %} + {% get_icon 'common.icons.icon_social_instagram' as icon_social_instagram %} + {% get_icon 'common.icons.icon_source_code' as icon_source_code %} + {% get_icon 'common.icons.icon_wiki' as icon_wiki %} +

{{ setting_project_title }}

{% if project_title != setting_project_title %} @@ -90,23 +100,39 @@

- {% project_information '__title__' %} is a free and open-source software brought to you with by Roberto Rosario and contributors. + {% blocktrans with project_title as project_title %} + {{ project_title }} is a free and open-source software brought to you with by Roberto Rosario and contributors. + {% endblocktrans %}

- It takes great effort to make {% project_information '__title__' %} as feature-rich as it is. We need all the help we can get! + {% blocktrans with project_title as project_title %} + It takes great effort to make {{ project_title }} as feature-rich as it is. We need all the help we can get! + {% endblocktrans %}

- If you use {% project_information '__title__' %} please consider making a donation + {% blocktrans with project_title as project_title and icon_social_paypal as icon_social_paypal%} + If you use {{ project_title }} please consider making a donation {{ icon_social_paypal }} + {% endblocktrans %}

- If you found a bug or got a feature idea, visit the forum or open a ticket in the GitLab repository . + {% blocktrans with icon_documentation as icon_documentation and icon_wiki as icon_wiki %} + For questions check the documentation {{ icon_documentation }} or the wiki {{ icon_wiki }}. + {% endblocktrans %} +

+ +

+ {% blocktrans with icon_forum as icon_forum and icon_source_code as icon_source_code %} + If you found a bug or got a feature idea, visit the forum {{ icon_forum }} or open a ticket in the source code repository {{ icon_source_code }}. + {% endblocktrans %}

- Spread the word. Talk to your friends and colleagues about how awesome {% project_information '__title__' %} is! - Follow us on Twitter , Facebook , or Instagram + {% blocktrans with project_title as project_title and icon_twitter as icon_twitter and icon_facebook as icon_facebook and icon_instagram as icon_instagram %} + Spread the word. Talk to your friends and colleagues about how awesome {{ project_title }} is! + Follow us on Twitter {{ icon_social_twitter }}, Facebook {{ icon_social_facebook }}, or Instagram {{ icon_social_instagram }} + {% endblocktrans %}

{% endblock %} diff --git a/mayan/apps/appearance/templatetags/appearance_tags.py b/mayan/apps/appearance/templatetags/appearance_tags.py index 8a87d9aad7..62f3528bbb 100644 --- a/mayan/apps/appearance/templatetags/appearance_tags.py +++ b/mayan/apps/appearance/templatetags/appearance_tags.py @@ -19,3 +19,12 @@ def get_choice_value(field): @register.filter def get_form_media_js(form): return [form.media.absolute_path(path) for path in form.media._js] + + +@register.simple_tag +def get_icon(icon_path): + from django.utils.module_loading import import_string + icon_class = import_string(icon_path) + return icon_class.render() + #return [form.media.absolute_path(path) for path in form.media._js] + diff --git a/mayan/apps/common/apps.py b/mayan/apps/common/apps.py index cad1d5a3ff..60d0f5543f 100644 --- a/mayan/apps/common/apps.py +++ b/mayan/apps/common/apps.py @@ -23,11 +23,11 @@ from .handlers import ( user_locale_profile_session_config, user_locale_profile_create ) from .links import ( - link_about, link_check_version, link_code, link_current_user_details, + link_about, link_check_version, link_current_user_details, link_current_user_edit, link_current_user_locale_profile_edit, - link_documentation, link_forum, link_license, link_object_error_list_clear, - link_packages_licenses, link_setup, link_support, link_tools, - separator_user_label, text_user_label + link_license, link_object_error_list_clear, link_packages_licenses, + link_setup, link_support, link_tools, separator_user_label, + text_user_label ) from .literals import DELETE_STALE_UPLOADS_INTERVAL, MESSAGE_SQLITE_WARNING @@ -135,8 +135,7 @@ class CommonApp(MayanAppConfig): menu_about.bind_links( links=( - link_tools, link_setup, link_about, link_support, - link_documentation, link_forum, link_code, link_license, + link_tools, link_setup, link_about, link_license, link_packages_licenses, link_check_version ) ) diff --git a/mayan/apps/common/icons.py b/mayan/apps/common/icons.py index f23e4ba800..69e3b34c8c 100644 --- a/mayan/apps/common/icons.py +++ b/mayan/apps/common/icons.py @@ -6,7 +6,6 @@ icon_about = Icon(driver_name='fontawesome', symbol='info') icon_assign_remove_add = Icon(driver_name='fontawesome', symbol='plus') icon_assign_remove_remove = Icon(driver_name='fontawesome', symbol='minus') icon_check_version = Icon(driver_name='fontawesome', symbol='sync') -icon_code = Icon(driver_name='fontawesome', symbol='code-branch') icon_current_user_details = Icon(driver_name='fontawesome', symbol='user') icon_current_user_edit = Icon(driver_name='fontawesome', symbol='user') icon_current_user_locale_profile_details = Icon( @@ -43,9 +42,23 @@ icon_packages_licenses = Icon( icon_setup = Icon( driver_name='fontawesome', symbol='cog' ) +icon_social_facebook = Icon( + driver_name='fontawesomecss', css_classes='fab fa-facebook' +) +icon_social_instagram = Icon( + driver_name='fontawesomecss', css_classes='fab fa-instagram' +) +icon_social_paypal = Icon( + driver_name='fontawesomecss', css_classes='fab fa-paypal' +) +icon_social_twitter = Icon( + driver_name='fontawesomecss', css_classes='fab fa-twitter' +) +icon_source_code = Icon(driver_name='fontawesome', symbol='code-branch') icon_support = Icon( driver_name='fontawesome', symbol='phone' ) icon_tools = Icon( driver_name='fontawesome', symbol='wrench' ) +icon_wiki = Icon(driver_name='fontawesome', symbol='book') diff --git a/mayan/apps/common/links.py b/mayan/apps/common/links.py index dbd6734a8f..46244c48b3 100644 --- a/mayan/apps/common/links.py +++ b/mayan/apps/common/links.py @@ -7,11 +7,12 @@ from navigation import Link from navigation.classes import Separator, Text from .icons import ( - icon_about, icon_check_version, icon_code, icon_current_user_details, + icon_about, icon_check_version, icon_current_user_details, icon_current_user_edit, icon_current_user_locale_profile_details, icon_current_user_locale_profile_edit, icon_documentation, icon_forum, icon_license, icon_object_error_list_with_icon, - icon_packages_licenses, icon_setup, icon_support, icon_tools + icon_packages_licenses, icon_setup, icon_source_code, icon_support, + icon_tools ) from .permissions_runtime import permission_error_log_view from .utils import get_user_label_text @@ -60,10 +61,6 @@ link_current_user_locale_profile_edit = Link( text=_('Edit locale profile'), view='common:current_user_locale_profile_edit' ) -link_code = Link( - icon_class=icon_code, tags='new_window', text=_('Source code'), - url='https://gitlab.com/mayan-edms/mayan-edms' -) link_documentation = Link( icon_class=icon_documentation, tags='new_window', text=_('Documentation'), url='https://mayan.readthedocs.io/en/stable/' @@ -98,6 +95,10 @@ link_packages_licenses = Link( link_setup = Link( icon_class=icon_setup, text=_('Setup'), view='common:setup_list' ) +link_source_code = Link( + icon_class=icon_source_code, tags='new_window', text=_('Source code'), + url='https://gitlab.com/mayan-edms/mayan-edms' +) link_support = Link( icon_class=icon_support, tags='new_window', text=_('Support'), url='http://www.mayan-edms.com/providers/'