Skip to content

Commit

Permalink
Aktivitet: Deltagerliste sorteret efter navn, og betalingsinfo m HTML…
Browse files Browse the repository at this point in the history
… formattering
  • Loading branch information
mhewel committed Aug 31, 2023
1 parent c01490d commit f6dedcd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions members/admin/activity_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ class ActivityParticipantInline(admin.TabularInline):
"person",
"note",
"photo_permission",
"payment_info_text",
"payment_info_html",
)
readonly_fields = fields
can_delete = False

def get_queryset(self, request):
return ActivityParticipant.objects.all()
return ActivityParticipant.objects.all().order_by("person")


class ActivityUnionListFilter(admin.SimpleListFilter):
Expand Down
5 changes: 5 additions & 0 deletions members/models/activityparticipant.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ def payment_info_text(self):

payment_info_text.short_description = "Betalingsinfo"

def payment_info_html(self):
return self.payment_info(True)

payment_info_html.short_description = "Betalingsinfo"

def payment_info(self, format_as_html: bool):
if format_as_html:
html_error_pre = "<span style='color:red'><b>"
Expand Down

0 comments on commit f6dedcd

Please sign in to comment.