Complete prefixing template tags with app names
Additionally remove unused template tags. Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
@@ -56,18 +56,18 @@
|
||||
{% endblock stylesheets %}
|
||||
|
||||
{% block content %}
|
||||
{% project_information '__build_string__' as build_number %}
|
||||
{% common_project_information '__build_string__' as build_number %}
|
||||
{% smart_setting 'COMMON_PROJECT_TITLE' as setting_project_title %}
|
||||
{% project_information '__title__' as project_title %}
|
||||
{% common_project_information '__title__' as project_title %}
|
||||
|
||||
{% get_icon 'mayan.apps.common.icons.icon_documentation' as icon_documentation %}
|
||||
{% get_icon 'mayan.apps.common.icons.icon_forum' as icon_forum %}
|
||||
{% get_icon 'mayan.apps.common.icons.icon_social_facebook' as icon_social_facebook %}
|
||||
{% get_icon 'mayan.apps.common.icons.icon_social_paypal' as icon_social_paypal %}
|
||||
{% get_icon 'mayan.apps.common.icons.icon_social_twitter' as icon_social_twitter %}
|
||||
{% get_icon 'mayan.apps.common.icons.icon_social_instagram' as icon_social_instagram %}
|
||||
{% get_icon 'mayan.apps.common.icons.icon_source_code' as icon_source_code %}
|
||||
{% get_icon 'mayan.apps.common.icons.icon_wiki' as icon_wiki %}
|
||||
{% appearance_get_icon 'mayan.apps.common.icons.icon_documentation' as icon_documentation %}
|
||||
{% appearance_get_icon 'mayan.apps.common.icons.icon_forum' as icon_forum %}
|
||||
{% appearance_get_icon 'mayan.apps.common.icons.icon_social_facebook' as icon_social_facebook %}
|
||||
{% appearance_get_icon 'mayan.apps.common.icons.icon_social_paypal' as icon_social_paypal %}
|
||||
{% appearance_get_icon 'mayan.apps.common.icons.icon_social_twitter' as icon_social_twitter %}
|
||||
{% appearance_get_icon 'mayan.apps.common.icons.icon_social_instagram' as icon_social_instagram %}
|
||||
{% appearance_get_icon 'mayan.apps.common.icons.icon_source_code' as icon_source_code %}
|
||||
{% appearance_get_icon 'mayan.apps.common.icons.icon_wiki' as icon_wiki %}
|
||||
|
||||
<div class="well">
|
||||
<h3 class="text-center">{{ setting_project_title }}</h3>
|
||||
@@ -79,25 +79,25 @@
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
{% endif %}
|
||||
<p class="text-center">{% trans 'Version' %} {% project_information '__version__' %}</p>
|
||||
<p class="text-center">{% trans 'Version' %} {% common_project_information '__version__' %}</p>
|
||||
{% if build_number %}
|
||||
<p class='text-center'>{% blocktrans with build_number as build_number %}Build number: {{ build_number }}{% endblocktrans %}</p>
|
||||
{% endif %}
|
||||
<p class="text-center">
|
||||
{% project_information '__description__' as project_description %}
|
||||
{% common_project_information '__description__' as project_description %}
|
||||
{% trans project_description %}
|
||||
</p>
|
||||
|
||||
<p class="text-center">
|
||||
<i class="fa fa-home"></i><a href="{% project_information '__website__' %}"> {% project_information '__website__' %}</a>
|
||||
<i class="fa fa-home"></i><a href="{% common_project_information '__website__' %}"> {% common_project_information '__website__' %}</a>
|
||||
</p>
|
||||
|
||||
<p class="text-center">
|
||||
{% project_information '__license__' as license_information %}
|
||||
{% common_project_information '__license__' as license_information %}
|
||||
{% trans 'Released under the license:' %} {% trans license_information %}
|
||||
</p>
|
||||
|
||||
<p class="text-center mayan-edms-logo"><span class="icon-mayan-edms-logo"></span> {% project_information '__title__' %}</p>
|
||||
<p class="text-center mayan-edms-logo"><span class="icon-mayan-edms-logo"></span> {% common_project_information '__title__' %}</p>
|
||||
|
||||
<p class="text-center">
|
||||
{% blocktrans with project_title as project_title %}
|
||||
@@ -160,7 +160,7 @@
|
||||
<div class="col-xs-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
{% project_information '__copyright__' %}
|
||||
{% common_project_information '__copyright__' %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
{% else %}
|
||||
<div class="col-xs-12">
|
||||
{% endif %}
|
||||
{% render_subtemplate subtemplate.name subtemplate.context as rendered_subtemplate %}
|
||||
{% common_render_subtemplate subtemplate.name subtemplate.context as rendered_subtemplate %}
|
||||
{{ rendered_subtemplate }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
@@ -77,13 +77,13 @@
|
||||
{% endif %}
|
||||
{% elif field|widget_type == 'select' %}
|
||||
{% if read_only %}
|
||||
{{ field|get_choice_value }}
|
||||
{{ field|appearance_get_choice_value }}
|
||||
{% else %}
|
||||
{% render_field field class+="form-control" %}
|
||||
{% endif %}
|
||||
{% elif field|widget_type == 'selectmultiple' %}
|
||||
{% if read_only %}
|
||||
{{ field|get_choice_value }}
|
||||
{{ field|appearance_get_choice_value }}
|
||||
{% else %}
|
||||
{% render_field field class+="form-control" %}
|
||||
{% endif %}
|
||||
@@ -119,7 +119,7 @@
|
||||
{% endif %}
|
||||
|
||||
<script>
|
||||
{% for script in form|get_form_media_js %}
|
||||
{% for script in form|appearance_get_form_media_js %}
|
||||
$.getScript('{{ script }}');
|
||||
{% endfor %}
|
||||
</script>
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
{% endif %}
|
||||
|
||||
{% for column in extra_columns %}
|
||||
<div class="text-center"><span class="list-extra-column-label">{{ column.name }}</span>: {{ object|object_property:column.attribute }}</div>
|
||||
<div class="text-center"><span class="list-extra-column-label">{{ column.name }}</span>: {{ object|common_object_property:column.attribute }}</div>
|
||||
{% endfor %}
|
||||
|
||||
{% if not hide_links %}
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
{% if source_column.help_text %}
|
||||
<span data-toggle="tooltip" data-placement="bottom" title="{{ source_column.help_text }}">
|
||||
{% get_icon icon_path='mayan.apps.navigation.icons.icon_source_column_help_text' %}
|
||||
{% appearance_get_icon icon_path='mayan.apps.navigation.icons.icon_source_column_help_text' %}
|
||||
</span>
|
||||
{% endif %}
|
||||
</span>
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
{% if source_column.help_text %}
|
||||
<span data-toggle="tooltip" data-placement="bottom" title="{{ source_column.help_text }}">
|
||||
{% get_icon icon_path='mayan.apps.navigation.icons.icon_source_column_help_text' %}
|
||||
{% appearance_get_icon icon_path='mayan.apps.navigation.icons.icon_source_column_help_text' %}
|
||||
</span>
|
||||
{% endif %}
|
||||
</span>
|
||||
@@ -117,7 +117,7 @@
|
||||
{% endif %}
|
||||
|
||||
{% for column in extra_columns %}
|
||||
<td>{{ object|object_property:column.attribute }}</td>
|
||||
<td>{{ object|common_object_property:column.attribute }}</td>
|
||||
{% endfor %}
|
||||
|
||||
{% if not hide_links %}
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
<div class="cols-xs-12">
|
||||
{% endif %}
|
||||
{% if subtemplate.form %}
|
||||
{% render_subtemplate subtemplate.name subtemplate.context as rendered_subtemplate %}
|
||||
{% common_render_subtemplate subtemplate.name subtemplate.context as rendered_subtemplate %}
|
||||
{{ rendered_subtemplate }}
|
||||
{% else %}
|
||||
{% render_subtemplate subtemplate.name subtemplate.context as rendered_subtemplate %}
|
||||
{% common_render_subtemplate subtemplate.name subtemplate.context as rendered_subtemplate %}
|
||||
{{ rendered_subtemplate }}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -44,6 +44,6 @@
|
||||
|
||||
{% include 'dynamic_search/search_box.html' %}
|
||||
|
||||
{% render_dashboard 'main' %}
|
||||
{% dashboards_render_dashboard 'main' %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% load navigation_tags %}
|
||||
{% load smart_settings_tags %}
|
||||
|
||||
{% load common_tags %}
|
||||
{% load navigation_tags %}
|
||||
{% load smart_settings_tags %}
|
||||
|
||||
{% spaceless %}
|
||||
<div class="panel-group" id="accordion-sidebar" role="tablist" aria-multiselectable="true">
|
||||
@@ -14,7 +12,7 @@
|
||||
{% for link in link_group.links %}
|
||||
{% with 'active' as li_class_active %}
|
||||
{% with ' ' as link_classes %}
|
||||
{% if link|get_type == "<class 'mayan.apps.navigation.classes.Menu'>" %}
|
||||
{% if link|common_get_type == "<class 'mayan.apps.navigation.classes.Menu'>" %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab" id="headingOne">
|
||||
<h4 class="panel-title">
|
||||
|
||||
@@ -7,13 +7,8 @@ from django.utils.translation import ugettext_lazy as _
|
||||
register = Library()
|
||||
|
||||
|
||||
@register.simple_tag
|
||||
def appearance_icon_render(icon_class, enable_shadow=False):
|
||||
return icon_class.render(extra_context={'enable_shadow': enable_shadow})
|
||||
|
||||
|
||||
@register.filter
|
||||
def get_choice_value(field):
|
||||
def appearance_get_choice_value(field):
|
||||
try:
|
||||
return dict(field.field.choices)[field.value()]
|
||||
except TypeError:
|
||||
@@ -23,10 +18,15 @@ def get_choice_value(field):
|
||||
|
||||
|
||||
@register.filter
|
||||
def get_form_media_js(form):
|
||||
def appearance_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):
|
||||
def appearance_get_icon(icon_path):
|
||||
return import_string(dotted_path=icon_path).render()
|
||||
|
||||
|
||||
@register.simple_tag
|
||||
def appearance_icon_render(icon_class, enable_shadow=False):
|
||||
return icon_class.render(extra_context={'enable_shadow': enable_shadow})
|
||||
|
||||
Reference in New Issue
Block a user