Add Activity Log tab for a workspace
This commit is contained in:
parent
8bd7de4f02
commit
bf22afa7af
@ -80,3 +80,17 @@ def workspace_reports(workspace_id):
|
||||
expiration_date=expiration_date,
|
||||
remaining_days=remaining_days,
|
||||
)
|
||||
|
||||
|
||||
@workspaces_bp.route("/workspaces/<workspace_id>/activity")
|
||||
def workspace_activity(workspace_id):
|
||||
workspace = Workspaces.get(g.current_user, workspace_id)
|
||||
Authorization.check_workspace_permission(
|
||||
g.current_user,
|
||||
workspace,
|
||||
# TODO: diff permission
|
||||
Permissions.VIEW_USAGE_DOLLARS,
|
||||
"view workspace reports",
|
||||
)
|
||||
|
||||
return render_template("workspaces/activity.html", workspace_name=workspace.name)
|
||||
|
@ -56,5 +56,14 @@
|
||||
) }}
|
||||
{% endif %}
|
||||
|
||||
<!-- TODO: diff permission -->
|
||||
{% if user_can(permissions.VIEW_USAGE_DOLLARS) %}
|
||||
{{ SidenavItem(
|
||||
("navigation.workspace_navigation.activity_log" | translate),
|
||||
href=url_for("workspaces.workspace_activity", workspace_id=workspace.id),
|
||||
active=request.url_rule.rule.startswith('/workspaces/<workspace_id>/activity')
|
||||
) }}
|
||||
{% endif %}
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
1
templates/workspaces/activity.html
Normal file
1
templates/workspaces/activity.html
Normal file
@ -0,0 +1 @@
|
||||
<h1>Activity Log for Workspace {{workspace_name}}</h1>
|
@ -202,6 +202,7 @@ navigation:
|
||||
add_new_member_label: Add New Member
|
||||
add_new_project_label: Add New Project
|
||||
budget_report: Budget Report
|
||||
activity_log: Activity Log
|
||||
members: Members
|
||||
projects: Projects
|
||||
task_orders: Task Orders
|
||||
|
Loading…
x
Reference in New Issue
Block a user