mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-20 06:08:35 +02:00
First version of the sieve plugin is over \o/ It needs more testing but all functionalities are implemented. Maybe some extra sieve extensions would be nice but I'll see that based on user feedback.
I also include some general refactoring in this commit. see #139
This commit is contained in:
@@ -3,7 +3,7 @@ from django.template.loader import render_to_string
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.core.urlresolvers import reverse
|
||||
from modoboa import admin
|
||||
from modoboa.lib import events, static_url
|
||||
from modoboa.lib import events, static_url, render_actions
|
||||
|
||||
register = template.Library()
|
||||
|
||||
@@ -141,19 +141,6 @@ def permissions_menu(user):
|
||||
return render_to_string('common/menu.html',
|
||||
{"entries" : entries, "user" : user})
|
||||
|
||||
def render_actions(actions):
|
||||
t = template.Template("""
|
||||
{% for a in actions %}
|
||||
<a href="{{ a.url }}" name="{{ a.name }}" class="{{ a.class }}" rel="{{ a.rel }}"
|
||||
{% if a.confirm %}onclick="return confirm('{{ a.confirm }}')"{% endif %}>
|
||||
<img src="{{ a.img }}" border="0" title="{{ a.title }}" />
|
||||
</a>
|
||||
{% endfor %}
|
||||
""")
|
||||
return t.render(template.Context({
|
||||
"actions" : actions
|
||||
}))
|
||||
|
||||
@register.simple_tag
|
||||
def domain_actions(user, domid):
|
||||
actions = [
|
||||
|
||||
Reference in New Issue
Block a user