mirror of
https://github.com/zulip/zulip.git
synced 2025-11-17 12:21:58 +00:00
activity: Add view to see the ledger entries for a customer plan.
Adds a link to the plan ledger view in the current plan information shown in the support views. Link is not shown if the plan is 100% sponsored, e.g., the Community plan. Adds a formatted header area to the activity table template so that it's easy to add useful information to these activity views.
This commit is contained in:
committed by
Tim Abbott
parent
704423787b
commit
d54ca85de2
@@ -42,11 +42,18 @@ class RemoteActivityPlanData:
|
||||
rate: str
|
||||
|
||||
|
||||
@dataclass
|
||||
class ActivityHeaderEntry:
|
||||
name: str
|
||||
value: str | Markup
|
||||
|
||||
|
||||
def make_table(
|
||||
title: str,
|
||||
cols: Sequence[str],
|
||||
rows: Sequence[Any],
|
||||
*,
|
||||
header: list[ActivityHeaderEntry] | None = None,
|
||||
totals: Any | None = None,
|
||||
stats_link: Markup | None = None,
|
||||
has_row_class: bool = False,
|
||||
@@ -58,7 +65,9 @@ def make_table(
|
||||
|
||||
rows = list(map(fix_row, rows))
|
||||
|
||||
data = dict(title=title, cols=cols, rows=rows, totals=totals, stats_link=stats_link)
|
||||
data = dict(
|
||||
title=title, cols=cols, rows=rows, header=header, totals=totals, stats_link=stats_link
|
||||
)
|
||||
|
||||
content = loader.render_to_string(
|
||||
"corporate/activity/activity_table.html",
|
||||
|
||||
Reference in New Issue
Block a user