libextras renamed to lib_tags.

This commit is contained in:
Antoine Nguyen
2013-10-09 15:29:04 +02:00
parent eb43ee2c0a
commit f4b46cacfb
46 changed files with 53 additions and 51 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
{% load i18n core_tags libextras %}
{% load i18n core_tags lib_tags %}
<h2>{% trans "Information" %} <small>{% trans "Various information about Modoboa" %}</small></h2><hr>
<div class="alert alert-info">Modoboa <strong>{% get_version %}</strong> {% trans "is currently in use." %}</div>
+1 -1
View File
@@ -1,4 +1,4 @@
{% load i18n libextras %}{% load url from future %}
{% load i18n lib_tags %}{% load url from future %}
<h2>{% trans "Parameters" %} <small>{% trans "Configure Modoboa" %}</small></h2><hr />
<form id="settings_form" method="POST" action="{% url 'modoboa.core.views.admin.saveparameters' %}" class="form-horizontal">{% csrf_token %}
{% include "common/parameters.html" %}
@@ -1,5 +1,5 @@
{% extends "twocols.html" %}
{% load i18n libextras core_tags %}
{% load i18n lib_tags core_tags %}
{% block pagetitle %}{% trans "Modoboa settings" %}{% endblock %}
{% block html_head %}
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}admin/css/settings.css" />
+1 -1
View File
@@ -1,4 +1,4 @@
{% extends "twocols.html" %}{% load i18n core_tags libextras %}
{% extends "twocols.html" %}{% load i18n core_tags lib_tags %}
{% block pagetitle %}{% trans "Settings" %}{% endblock %}
{% block html_head %}
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}core/css/userprefs.css" />
@@ -1,4 +1,4 @@
{% load i18n libextras %}{% load url from future %}
{% load i18n lib_tags %}{% load url from future %}
<h2>{% trans "Profile" %} <small>{% trans "Update your personal information" %}</small></h2>
<hr>
<form class="form-horizontal" method="POST" action="{% url 'modoboa.core.views.user.profile' %}"
+7 -5
View File
@@ -232,11 +232,13 @@ def get_modoboa_logo():
@register.simple_tag
def extra_head_content(user):
tpl = Template("{% for sc in static_content %}{{ sc|safe }}{% endfor %}")
tpl = template.Template(
"{% for sc in static_content %}{{ sc|safe }}{% endfor %}"
)
return tpl.render(
Context(
dict(static_content=events.raiseQueryEvent("GetStaticContent", user))
)
template.Context({
'static_content': events.raiseQueryEvent("GetStaticContent", user)
})
)
@@ -245,7 +247,7 @@ def load_optionalmenu(user):
menu = events.raiseQueryEvent("UserMenuDisplay", "top_menu_middle", user)
return template.loader.render_to_string(
'common/menulist.html',
{"entries" : menu, "user" : user}
{"entries": menu, "user": user}
)
+1 -1
View File
@@ -108,7 +108,7 @@ def information(request, tplname="core/information.html"):
@login_required
@user_passes_test(lambda u: u.is_superuser)
def logs(request, tplname="core/logs.html"):
from modoboa.lib.templatetags.libextras import pagination_bar
from modoboa.lib.templatetags.lib_tags import pagination_bar
sort_order, sort_dir = get_sort_order(
request.GET, "date_created",
@@ -1,5 +1,5 @@
{% extends "common/generic_modal_form.html" %}
{% load libextras %}
{% load lib_tags %}
{% block formbody %}
{% render_field form.email %}
{% render_fields_group form "recipients" %}
@@ -1,4 +1,4 @@
{% load i18n libextras %}
{% load i18n lib_tags %}
{% render_field form.name %}
{% render_field_appended form.quota _("MB") %}
{% render_fields_group form "aliases" %}
@@ -1,4 +1,4 @@
{% load i18n libextras %}
{% load i18n lib_tags %}
{% render_field form.create_dom_admin %}
{% render_field_appended form.dom_admin_username "@" %}
{% render_field form.create_aliases %}
@@ -1,4 +1,4 @@
{% extends "admin/listing.html" %}{% load i18n admin_tags libextras %}
{% extends "admin/listing.html" %}{% load i18n admin_tags lib_tags %}
{% block pagetitle %}{% trans "Domains" %}{% endblock %}
{% block html_head %}
{{ block.super }}
@@ -1,4 +1,4 @@
{% extends "common/tabforms.html" %}{% load i18n libextras admin_tags %}
{% extends "common/tabforms.html" %}{% load i18n lib_tags admin_tags %}
{% block extratabs %}
<li class="{% if tabs.active_id == 'admins' %}active{% endif %}">
<a href="#admins" data-toggle="tab">{% trans "Administrators" %}</a>
@@ -1,4 +1,4 @@
{% load i18n libextras %}{% load url from future %}
{% load i18n lib_tags %}{% load url from future %}
<h2>{% trans "Forward" %} <small>{% trans "Automatically forward emails to another address" %}</small></h2>
<hr>
<form class="form-horizontal" method="POST" action="{% url 'modoboa.extensions.admin.views.user.forward' %}"
@@ -1,4 +1,4 @@
{% extends "admin/listing.html" %}{% load admin_tags libextras i18n %}{% load url from future %}
{% extends "admin/listing.html" %}{% load admin_tags lib_tags i18n %}{% load url from future %}
{% block pagetitle %}{% trans "Identities" %}{% endblock %}
{% block html_head %}
{{ block.super }}
@@ -1,4 +1,4 @@
{% load i18n admin_tags libextras %}
{% load i18n admin_tags lib_tags %}
<table id="{{ tableid }}" class="table {{ styles }}">
<thead>
<tr>
@@ -1,5 +1,5 @@
{% extends "common/generic_modal_form.html" %}
{% load libextras i18n %}
{% load lib_tags i18n %}
{% block formbody %}
<div class="alert alert-info">
<h4>{% trans "Help" %}</h4>
@@ -1,4 +1,4 @@
{% extends "admin/header.html" %}{% load i18n admin_tags libextras %}
{% extends "admin/header.html" %}{% load i18n admin_tags lib_tags %}
{% block html_head %}
{{ block.super }}
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/jquery.sortable.css" />
@@ -1,4 +1,4 @@
{% load libextras %}
{% load lib_tags %}
{% render_field form.email %}
{% include "common/generic_field.html" with field=form.quota help_display_mode="tooltip" appended_text=_("MB") activator=True activator_value=form.quota_act.value deactivate_if_empty=False activator_label=_("Use domain default value") %}
{% render_fields_group form "aliases" %}
@@ -1,4 +1,4 @@
{% extends "common/generic_modal_form.html" %}{% load libextras %}{% block formbody %}
{% extends "common/generic_modal_form.html" %}{% load lib_tags %}{% block formbody %}
{% render_field form.name %}
{% render_field_appended form.quota _("MB") %}
{% render_fields_group form "aliases" %}
@@ -1,2 +1,2 @@
{% load libextras %}
{% load lib_tags %}
{% render_fields_group form "domains" %}
@@ -1,4 +1,4 @@
{% load i18n libextras admin_tags %}
{% load i18n lib_tags admin_tags %}
<table class="table table-fixed">
<thead>
<tr>
@@ -5,7 +5,7 @@ from django.utils.translation import ugettext as _, ugettext_lazy
from django.core.urlresolvers import reverse
from modoboa.lib import events
from modoboa.lib.webutils import static_url, render_actions
from modoboa.lib.templatetags.libextras import render_link
from modoboa.lib.templatetags.lib_tags import render_link
register = template.Library()
+2 -2
View File
@@ -14,7 +14,7 @@ from modoboa.lib.webutils import (
)
from modoboa.lib.formutils import CreationWizard
from modoboa.lib.exceptions import PermDeniedException
from modoboa.lib.templatetags.libextras import pagination_bar
from modoboa.lib.templatetags.lib_tags import pagination_bar
from modoboa.extensions.admin.tables import DomainsTable
from modoboa.extensions.admin.lib import get_sort_order, get_listing_page
from modoboa.extensions.admin.exceptions import AdminError
@@ -111,7 +111,7 @@ def newdomain(request, tplname="common/wizard_forms.html"):
dict(status="ok", respmsg=_("Domain created"))
)
from modoboa.lib.templatetags.libextras import render_form
from modoboa.lib.templatetags.lib_tags import render_form
return ajax_simple_response(dict(
status="ko", stepid=data,
form=render_form(cwizard.steps[data]["form"])
+2 -2
View File
@@ -10,7 +10,7 @@ from modoboa.lib import parameters, events
from modoboa.lib.exceptions import PermDeniedException
from modoboa.lib.webutils import ajax_simple_response, _render_to_string
from modoboa.lib.formutils import CreationWizard
from modoboa.lib.templatetags.libextras import pagination_bar
from modoboa.lib.templatetags.lib_tags import pagination_bar
from modoboa.core.models import User
from modoboa.extensions.admin.models import Mailbox
from modoboa.extensions.admin.lib import (
@@ -160,7 +160,7 @@ def newaccount(request, tplname='common/wizard_forms.html'):
status="ok", respmsg=_("Account created")
))
from modoboa.lib.templatetags.libextras import render_form
from modoboa.lib.templatetags.lib_tags import render_form
return ajax_simple_response(dict(
status="ko", stepid=data,
form=render_form(cwizard.steps[data]["form"])
@@ -1,4 +1,4 @@
{% load i18n libextras %}
{% load i18n lib_tags %}
{% render_field form.bypass_virus_checks %}
{% render_field form.bypass_spam_checks %}
<div class="control-group">
@@ -1,4 +1,4 @@
{% load i18n libextras %}{% load url from future %}{% blocktrans count counter=total %}
{% load i18n lib_tags %}{% load url from future %}{% blocktrans count counter=total %}
{{ counter }} release request is pending for action.
{% plural %}
{{ counter }} release requests are pending for action.
@@ -1,4 +1,4 @@
<!DOCTYPE html>{% load i18n libextras amextras %}{% load url from future %}
<!DOCTYPE html>{% load i18n lib_tags amextras %}{% load url from future %}
<html lang="{{ LANGUAGE_CODE }}">
<head>
<meta charset="utf-8" />
@@ -1,4 +1,4 @@
{% load i18n libextras %}
{% load i18n lib_tags %}
<div class="well sidebar-nav">
<ul class="nav nav-list">
<li class="nav-header">{% trans "Resources usage" %}</li>{% for l in limits %}
@@ -1,4 +1,4 @@
{% load i18n libextras %}{% load url from future %}
{% load i18n lib_tags %}{% load url from future %}
<h2>{% trans "Auto-reply message" %} <small>{% trans "Define a message to automatically send when you are off" %}</small></h2>
<hr>
<form class="form-horizontal" method="POST"
@@ -1,5 +1,5 @@
{% extends "common/generic_modal_form.html" %}
{% load i18n libextras sfilters_tags %}
{% load i18n lib_tags sfilters_tags %}
{% block formbody %}
{% if oldname %}<input type="hidden" name="oldname" value="{{ oldname }}" />{% endif %}
{% render_field form.name %}
+1 -1
View File
@@ -270,7 +270,7 @@ class ImapEmail(Email):
@property
def headers_as_text(self):
return " ".join(self.headers_as_list())
return " ".join(self.headers_as_list)
def _find_content_charset(self, part):
for pos, elem in enumerate(part["params"]):
@@ -1,4 +1,4 @@
{% load i18n libextras %}{% load url from future %}
{% load i18n lib_tags %}{% load url from future %}
<form class="form-horizontal" method="POST" action="{{ posturl }}" id="composemail">{% csrf_token %}
<div id="compose-container">
<div id="mailheader" class="well">
@@ -1,4 +1,4 @@
{% extends "fixed.html" %}{% load i18n libextras %}{% load url from future %}
{% extends "fixed.html" %}{% load i18n lib_tags %}{% load url from future %}
{% block pagetitle %}Webmail{% endblock %}
{% block html_head %}
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}webmail/css/webmail.css" />
+1 -1
View File
@@ -14,7 +14,7 @@ from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _
from django.template import Template, RequestContext, Context
from django.template.loader import render_to_string
from templatetags.libextras import render_link
from templatetags.lib_tags import render_link
class Column(object):
+1 -1
View File
@@ -35,7 +35,7 @@ def _render_error(request, errortpl="error", user_context=None):
def render_actions(actions):
t = template.Template("""{% load libextras %}
t = template.Template("""{% load lib_tags %}
{% for a in actions %}{% render_link a %}{% endfor %}
""")
return t.render(template.Context(dict(actions=actions)))
+1 -1
View File
@@ -1,4 +1,4 @@
{% load libextras %}
{% load lib_tags %}
<div class="btn-toolbar {{ extraclasses }}">{% for entry in entries %}
<div class="btn-group">{% if entry.menu %}
<a class="btn dropdown-toggle" data-toggle="dropdown">{% if entry.img %}<i class="{{ entry.img}}"></i>{% endif %}{{ entry.label }}<span class="caret"></span></a>
+1 -1
View File
@@ -1,4 +1,4 @@
{% load i18n core_tags libextras %}
{% load i18n core_tags lib_tags %}
<div class="control-group {% if field.errors %}error{% endif %}"{% visirule field %}{% if hidden %}style="display: none"{% endif %}>
{% if field.label %}<label class="control-label" for="id_{{ field.html_name }}">{{ field.label }}</label>{% endif %}{% if help_display_mode == "tooltip" and field.help_text %}<a href="#" class="help pull-left" data-original-title="{% trans 'Help:' %} {{ field.label }}" data-content="{{ field.help_text }}" rel="popover">?</a>{% endif %}
<div class="controls spaced">
@@ -1,5 +1,5 @@
{% extends "common/generic_modal.html" %}
{% load libextras %}
{% load lib_tags %}
{% block modalbody %}
{% if error %}<div class="alert alert-error">{{ error }}</div>{% endif %}
<form class="form-horizontal" action="{{ action }}" enctype="{{ enctype }}"
+1 -1
View File
@@ -1,4 +1,4 @@
{% load i18n libextras %}
{% load i18n lib_tags %}
{% for entry in entries %}
{% if entry.separator %}
<li class="divider">&nbsp;</li>
+1 -1
View File
@@ -1,4 +1,4 @@
{% load libextras %}
{% load lib_tags %}
<div class="tabbable">
<ul class="nav nav-tabs">
{% for form in forms %}<li{% if forloop.first %} class="active"{% endif %}><a href="#{{ forloop.counter }}" data-toggle="tab">{{ form.label }}</a></li>
+1 -1
View File
@@ -1,5 +1,5 @@
{% extends "common/generic_modal.html" %}
{% load i18n libextras %}
{% load i18n lib_tags %}
{% block modalbody %}
<form id="{{ formid }}" class="form-horizontal" action="{{ action }}" method="POST">{% csrf_token %}
<ul class="nav nav-pills">{% for tab in tabs %}
+1 -1
View File
@@ -1,4 +1,4 @@
{% load i18n libextras %}
{% load i18n lib_tags %}
<div class="modal-header">
<a class="close" data-dismiss="modal">x</a>
<h3>{{ title }} / <small>{{ subtitle }}</small></h3>
+1 -1
View File
@@ -1,4 +1,4 @@
<!DOCTYPE html>{% load i18n core_tags libextras %}{% load url from future %}
<!DOCTYPE html>{% load i18n core_tags lib_tags %}{% load url from future %}
<html lang="{{ LANGUAGE_CODE }}">
<head>
<meta charset="utf-8" />
+1 -1
View File
@@ -1,4 +1,4 @@
<!DOCTYPE html>{% load i18n core_tags libextras %}{% load url from future %}
<!DOCTYPE html>{% load i18n core_tags lib_tags %}{% load url from future %}
<html lang="{{ LANGUAGE_CODE }}">
<head>
<meta charset="utf-8" />
+1 -1
View File
@@ -1,5 +1,5 @@
{% extends "fluid.html" %}
{% load libextras %}
{% load core_tags %}
{% block rowcontent %}
<div class="span2">{% block leftcol %}{% endblock %}</div>
<div class="span10">