mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-18 05:51:26 +02:00
see #103
This is almost over : * new informations available in misc. listings, * tables layout update.
This commit is contained in:
+4
-5
@@ -60,12 +60,11 @@ def domains(request):
|
||||
return HttpResponseRedirect(reverse(userprefs.views.preferences))
|
||||
|
||||
domains = Domain.objects.all()
|
||||
counters = {}
|
||||
for dom in domains:
|
||||
dom.mboxcounter = len(dom.mailbox_set.all())
|
||||
dom.mbalias_counter = len(Alias.objects.filter(mboxes__domain__pk=dom.id))
|
||||
deloptions = {"keepdir" : _("Do not delete domain directory")}
|
||||
return render_domains_page(request, "domains",
|
||||
domains=domains, counter=counters,
|
||||
domains=domains,
|
||||
deloptions=deloptions)
|
||||
|
||||
@login_required
|
||||
@@ -376,8 +375,8 @@ def delmailbox(request):
|
||||
@permission_required("admin.view_aliases")
|
||||
def mbaliases(request):
|
||||
if request.GET.has_key("domid"):
|
||||
aliases = Alias.objects.filter(mboxes__domain__id=request.GET["domid"]).distinct()
|
||||
if request.GET.has_key("mbid"):
|
||||
aliases = Alias.objects.filter(mboxes__domain__pk=request.GET["domid"]).distinct()
|
||||
elif request.GET.has_key("mbid"):
|
||||
aliases = Alias.objects.filter(mboxes__id=request.GET["mbid"]).distinct()
|
||||
else:
|
||||
aliases = Alias.objects.all()
|
||||
|
||||
@@ -74,12 +74,16 @@ div#footer {
|
||||
#content {
|
||||
position: fixed;
|
||||
overflow: auto;
|
||||
padding: 5px;
|
||||
/*padding: 5px;*/
|
||||
top: 130px;
|
||||
bottom: 35px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#subcontent {
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
#header {
|
||||
width: 100%;
|
||||
padding: 5px 0;
|
||||
@@ -267,7 +271,6 @@ table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
|
||||
tr.odd {
|
||||
background: white;
|
||||
}
|
||||
@@ -277,13 +280,13 @@ tr.even {
|
||||
}
|
||||
|
||||
th, td {
|
||||
height: 20px;
|
||||
line-height: 15px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
th {
|
||||
background: #CEDBEC;
|
||||
text-align: left;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
th.right {
|
||||
@@ -296,7 +299,6 @@ th.center, td.center {
|
||||
|
||||
td {
|
||||
border-bottom: 1px solid #C8D6E8;
|
||||
/*padding: 5px;*/
|
||||
}
|
||||
|
||||
tr.table-tr-selected {
|
||||
|
||||
@@ -16,19 +16,23 @@
|
||||
{% else %}
|
||||
<table id="objects_table">
|
||||
<tr>
|
||||
<th width="70px" class="center">{% trans "Actions" %}</th>
|
||||
<th>{% trans "Name" %}</th>
|
||||
<th width="150px">{% trans "Mailboxes" %}</th>
|
||||
<th width="50px">{% trans "Quota" %}</th>
|
||||
<th width="50px">{% trans "Enabled" %}</th>
|
||||
<th width="150px" class="center">{% trans "Domain aliases" %}</th>
|
||||
<th width="150px" class="center">{% trans "Mailboxes" %}</th>
|
||||
<th width="150px" class="center">{% trans "Mailbox aliases" %}</th>
|
||||
<th width="70px" class="center">{% trans "Quota" %}</th>
|
||||
<th width="70px" class="center">{% trans "Enabled" %}</th>
|
||||
<th width="70px" class="center">{% trans "Actions" %}</th>
|
||||
</tr>
|
||||
{% for dom in domains %}
|
||||
<tr class="{% cycle 'odd' 'even' %}" id="{{ dom.id }}">
|
||||
<td class="center">{% domain_actions user dom.id %}</td>
|
||||
<td>{{ dom.name }}</td>
|
||||
<td>{{ dom.mboxcounter }}</td>
|
||||
<td>{{ dom.quota }} {% trans "MB" %}</td>
|
||||
<td>{{ dom.enabled|yesno:_("yes,no") }}</td>
|
||||
<td class="center">{{ dom.domainalias_set.all|length }}</td>
|
||||
<td class="center">{{ dom.mailbox_set.all|length }}</td>
|
||||
<td class="center">{{ dom.mbalias_counter }}</td>
|
||||
<td class="center">{{ dom.quota }} {% trans "MB" %}</td>
|
||||
<td class="center">{{ dom.enabled|yesno:_("yes,no") }}</td>
|
||||
<td class="center">{% domain_actions user dom.id %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
@@ -8,17 +8,17 @@
|
||||
{% else %}
|
||||
<table id="objects_table">
|
||||
<tr>
|
||||
<th width="50px">{% trans "Actions" %}</th>
|
||||
<th width="150px">{% trans "Name" %}</th>
|
||||
<th width="200px">{% trans "Targeted domain" %}</th>
|
||||
<th width="75px">{% trans "Enabled" %}</th>
|
||||
<th>{% trans "Targeted domain" %}</th>
|
||||
<th width="70px" class="center">{% trans "Enabled" %}</th>
|
||||
<th width="70px" class="center">{% trans "Actions" %}</th>
|
||||
</tr>
|
||||
{% for domalias in domaliases %}
|
||||
<tr class="{% cycle 'odd' 'even' %}" id="{{ domalias.id }}">
|
||||
<td>{% domalias_actions user domalias.id %}</td>
|
||||
<td>{{ domalias.name }}</td>
|
||||
<td>{{ domalias.target.name }}</td>
|
||||
<td>{{ domalias.enabled|yesno }}</td>
|
||||
<td class="center">{{ domalias.enabled|yesno }}</td>
|
||||
<td class="center">{% domalias_actions user domalias.id %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
@@ -8,19 +8,21 @@
|
||||
{% else %}
|
||||
<table id="objects_table">
|
||||
<tr>
|
||||
<th width="80px">{% trans "Actions" %}</th>
|
||||
<th width="130px">{% trans "Name" %}</th>
|
||||
<th width="170px">{% trans "Address" %}</th>
|
||||
<th width="60px">{% trans "Quota" %}</th>
|
||||
<th width="50px">{{ "Enabled"|gender:"f" }}</th>
|
||||
<th>{% trans "Name" %}</th>
|
||||
<th>{% trans "Address" %}</th>
|
||||
<th width="150px" class="center">{% trans "Defined aliases" %}</th>
|
||||
<th width="70px" class="center">{% trans "Quota" %}</th>
|
||||
<th width="70px" class="center">{{ "Enabled"|gender:"f" }}</th>
|
||||
<th width="70px" class="center">{% trans "Actions" %}</th>
|
||||
</tr>
|
||||
{% for mb in mailboxes %}
|
||||
<tr class="{% cycle 'odd' 'even' %}" id="{{ mb.id }}">
|
||||
<td>{% mailbox_actions user mb %}</td>
|
||||
<td>{{ mb.name }}</td>
|
||||
<td>{{ mb.address }}@{{ mb.domain.name }}</td>
|
||||
<td>{{ mb.quota }} {% trans "MB" %}</td>
|
||||
<td>{{ mb.user.is_active|yesno:_("yes,no") }}</td>
|
||||
<td class="center">{{ mb.alias_set.all|length }}</td>
|
||||
<td class="center">{{ mb.quota }} {% trans "MB" %}</td>
|
||||
<td class="center">{{ mb.user.is_active|yesno:_("yes,no") }}</td>
|
||||
<td class="center">{% mailbox_actions user mb %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
@@ -8,21 +8,21 @@
|
||||
{% else %}
|
||||
<table id="objects_table">
|
||||
<tr>
|
||||
<th width="50px">{% trans "Actions" %}</th>
|
||||
<th width="150px">{% trans "Address" %}</th>
|
||||
<th width="200px">{% trans "Mailbox" %}</th>
|
||||
<th width="75px">{% trans "Enabled" %}</th>
|
||||
<th>{% trans "Address" %}</th>
|
||||
<th>{% trans "Mailbox" %}</th>
|
||||
<th width="70px" class="center">{% trans "Enabled" %}</th>
|
||||
<th width="70px" class="center">{% trans "Actions" %}</th>
|
||||
</tr>
|
||||
{% for alias in aliases %}
|
||||
<tr class="{% cycle 'odd' 'even' %}" id="{{ alias.id }}">
|
||||
<td>{% mbalias_actions user alias %}
|
||||
<td>{{ alias.full_address }}</td>
|
||||
<td>
|
||||
{% for mb in alias.mboxes.all %}
|
||||
{{ mb.full_address }}<br/>
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td>{{ alias.enabled|yesno }}</td>
|
||||
<td class="center">{{ alias.enabled|yesno }}</td>
|
||||
<td class="center">{% mbalias_actions user alias %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user