33 lines
892 B
Python
33 lines
892 B
Python
from django.urls import reverse
|
|
|
|
import dashboard
|
|
from dashboard import Link
|
|
|
|
|
|
@dashboard.register
|
|
class MembershipworksDashboardFragment(dashboard.LinksCardDashboardFragment):
|
|
name = "MembershipWorks"
|
|
|
|
links = [
|
|
Link(
|
|
"Upcoming Events",
|
|
reverse("membershipworks:upcoming-events"),
|
|
permission="membershipworks.view_event",
|
|
tooltip="Generator for Wordpress posts",
|
|
),
|
|
Link(
|
|
"Event Report",
|
|
reverse("membershipworks:event-index-report"),
|
|
permission="membershipworks.view_event",
|
|
),
|
|
Link(
|
|
"Event Attendees",
|
|
reverse("membershipworks:event-attendees"),
|
|
permission="membershipworks.view_event",
|
|
),
|
|
]
|
|
|
|
@property
|
|
def visible(self) -> bool:
|
|
return self.request.user.has_perm("doorcontrol.view_hidevent")
|