diff --git a/TODO.md b/TODO.md index 9a2bd186..da754e1e 100644 --- a/TODO.md +++ b/TODO.md @@ -454,3 +454,5 @@ mkhomedir_helper or create ssh homes with bash.rc and such # exclude from change list action, support for multiple exclusion # breadcrumbs https://orchestra.pangea.org/admin/domains/domain/?account_id=930 + +# SHow addresses on mailboxes (+add address) diff --git a/orchestra/contrib/accounts/admin.py b/orchestra/contrib/accounts/admin.py index f9f039e1..1918a8ff 100644 --- a/orchestra/contrib/accounts/admin.py +++ b/orchestra/contrib/accounts/admin.py @@ -188,11 +188,11 @@ class AccountAdminMixin(object): def display_active(self, instance): if not instance.is_active: - return '' % static('admin/img/icon-no.gif') + return '' % static('admin/img/icon-no.svg') elif not instance.account.is_active: msg = _("Account disabled") - return '' % (static('admin/img/icon-unknown.gif'), msg) - return '' % static('admin/img/icon-yes.gif') + return '' % (static('admin/img/inline-delete.svg'), msg) + return '' % static('admin/img/icon-yes.svg') display_active.short_description = _("active") display_active.allow_tags = True display_active.admin_order_field = 'is_active' diff --git a/orchestra/contrib/accounts/filters.py b/orchestra/contrib/accounts/filters.py index 91a10708..e1ccfa85 100644 --- a/orchestra/contrib/accounts/filters.py +++ b/orchestra/contrib/accounts/filters.py @@ -12,8 +12,6 @@ class HasMainUserListFilter(SimpleListFilter): return ( ('True', _("Yes")), ('False', _("No")), - ('account', _("Account disabled")), - ('object', _("Object disabled")), ) def queryset(self, request, queryset): @@ -23,10 +21,18 @@ class HasMainUserListFilter(SimpleListFilter): return queryset.filter(users__isnull=True).distinct() -class IsActiveListFilter(HasMainUserListFilter): +class IsActiveListFilter(SimpleListFilter): title = _("is active") parameter_name = 'active' + def lookups(self, request, model_admin): + return ( + ('True', _("Yes")), + ('False', _("No")), + ('account', _("Account disabled")), + ('object', _("Object disabled")), + ) + def queryset(self, request, queryset): if self.value() == 'True': return queryset.filter(is_active=True, account__is_active=True) diff --git a/orchestra/contrib/bills/admin.py b/orchestra/contrib/bills/admin.py index 28cc7bfd..d4604b39 100644 --- a/orchestra/contrib/bills/admin.py +++ b/orchestra/contrib/bills/admin.py @@ -74,7 +74,7 @@ class BillLineInline(admin.TabularInline): url = change_url(line) if sublines: content = '\n'.join(['%s: %s' % (sub.description, sub.total) for sub in sublines]) - img = static('admin/img/icon_alert.gif') + img = static('admin/img/icon-alert.svg') return '%s ' % (url, content, total, img) return '%s' % (url, total) display_total.short_description = _("Total") diff --git a/orchestra/contrib/domains/models.py b/orchestra/contrib/domains/models.py index ea123f48..8290b780 100644 --- a/orchestra/contrib/domains/models.py +++ b/orchestra/contrib/domains/models.py @@ -289,6 +289,7 @@ class Record(models.Model): SRV = 'SRV' TXT = 'TXT' SPF = 'SPF' + SOA = 'SOA' TYPE_CHOICES = ( (MX, "MX"), @@ -310,6 +311,7 @@ class Record(models.Model): TXT: (validate_ascii, validators.validate_quoted_record), SPF: (validate_ascii, validators.validate_quoted_record), SRV: (validators.validate_srv_record,), + SOA: (validators.validate_soa_record,), } domain = models.ForeignKey(Domain, verbose_name=_("domain"), related_name='records') diff --git a/orchestra/contrib/history/admin.py b/orchestra/contrib/history/admin.py index 073f38cd..430eb9aa 100644 --- a/orchestra/contrib/history/admin.py +++ b/orchestra/contrib/history/admin.py @@ -36,7 +36,7 @@ class LogEntryAdmin(admin.ModelAdmin): def display_message(self, log): edit = '' % { 'url': reverse('admin:admin_logentry_change', args=(log.pk,)), - 'img': static('orchestra/images/icon_changelink.gif'), + 'img': static('admin/img/icon-changelink.svg'), } if log.is_addition(): return _('Added "%(link)s". %(edit)s') % { diff --git a/orchestra/contrib/history/templates/admin/object_history.html b/orchestra/contrib/history/templates/admin/object_history.html index 379c27e9..9441b522 100644 --- a/orchestra/contrib/history/templates/admin/object_history.html +++ b/orchestra/contrib/history/templates/admin/object_history.html @@ -29,7 +29,7 @@