package templates // ShareRow is a single share grant shown in the UI, for either a calendar // or an address book (Kind distinguishes them for form targets). type ShareRow struct { ResourceName string SharedWith string Permission string // "read" or "write" } // ResourceCard describes one of the user's own calendars/address books // plus who it's currently shared with. type ResourceCard struct { Kind string // "calendar" or "addressbook" Name string Shares []ShareRow } // SharedWithMeItem describes a resource another user has shared with the // current user. type SharedWithMeItem struct { Kind string Owner string Name string Permission string } templ Dashboard(username string, resources []ResourceCard, sharedWithMe []SharedWithMeItem) { @Layout("Dashboard", username) {