Move information links from menu to the about view. Add template tag to import icons from the templates.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -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 %}
|
||||
|
||||
<div class="well">
|
||||
<h3 class="text-center">{{ setting_project_title }}</h3>
|
||||
{% if project_title != setting_project_title %}
|
||||
@@ -90,23 +100,39 @@
|
||||
<p class="text-center mayan-edms-logo"><span class="icon-mayan-edms-logo"></span> {% project_information '__title__' %}</p>
|
||||
|
||||
<p class="text-center">
|
||||
{% project_information '__title__' %} is a free and open-source software brought to you with <i class="fa fa-heart text-danger"></i> 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 <i class="fa fa-heart text-danger"></i> by Roberto Rosario and contributors.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
|
||||
<p class="text-center">
|
||||
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 %}
|
||||
</p>
|
||||
|
||||
<p class="text-center">
|
||||
If you use {% project_information '__title__' %} please <a class="new_window" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3PXN336XFXQNN">consider making a donation <i class="fab fa-paypal"></i></a>
|
||||
{% blocktrans with project_title as project_title and icon_social_paypal as icon_social_paypal%}
|
||||
If you use {{ project_title }} please <a class="new_window" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3PXN336XFXQNN">consider making a donation {{ icon_social_paypal }}</a>
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
|
||||
<p class="text-center">
|
||||
If you found a bug or got a feature idea, visit the <a class="new_window" href="https://forum.mayan-edms.com">forum <i class="far fa-life-ring"></i></a> or open a ticket in the <a class="new_window" href="https://gitlab.com/mayan-edms/mayan-edms">GitLab repository <i class="fab fa-gitlab"></i></a>.
|
||||
{% blocktrans with icon_documentation as icon_documentation and icon_wiki as icon_wiki %}
|
||||
For questions check the <a class="new_window" href="https://docs.mayan-edms.com">documentation {{ icon_documentation }}</a> or the <a class="new_window" href="https://wiki.mayan-edms.com">wiki {{ icon_wiki }}</a>.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
|
||||
<p class="text-center">
|
||||
{% 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 <a class="new_window" href="https://forum.mayan-edms.com">forum {{ icon_forum }}</a> or open a ticket in the <a class="new_window" href="https://gitlab.com/mayan-edms/mayan-edms">source code repository {{ icon_source_code }}</a>.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
<p class="text-center">
|
||||
Spread the word. Talk to your friends and colleagues about how awesome {% project_information '__title__' %} is!
|
||||
Follow us on <a class="new_window" href="https://twitter.com/mayanedms">Twitter <i class="fab fa-twitter"></i></a>, <a class="new_window" href="https://www.facebook.com/MayanEDMS/">Facebook <i class="fab fa-facebook"></i></a>, or <a class="new_window" href="https://www.instagram.com/mayan_edms/">Instagram <i class="fab fa-instagram"></i></a>
|
||||
{% 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 <a class="new_window" href="https://twitter.com/mayanedms">Twitter {{ icon_social_twitter }}</a>, <a class="new_window" href="https://www.facebook.com/MayanEDMS/">Facebook {{ icon_social_facebook }}</a>, or <a class="new_window" href="https://www.instagram.com/mayan_edms/">Instagram {{ icon_social_instagram }}</a>
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -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]
|
||||
|
||||
|
||||
@@ -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
|
||||
)
|
||||
)
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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/'
|
||||
|
||||
Reference in New Issue
Block a user