fairdm.contrib.contributors.plugins.overview#
What the person and organization overview pages work out from a contributor.
A contributor holds contributions on other records rather than carrying contributions of its own, so these
pages share the record overview skeleton (overview/page.html) and its cards but not
RecordOverviewPlugin. Everything counted or listed is limited to the records the viewer can
open, so a profile never names a private record.
Module Contents#
Classes#
Lays out the person and organization overview pages. |
API#
- class Overview(**kwargs)#
Bases:
fairdm.core.plugins.OverviewPluginLays out the person and organization overview pages.
What a contributor has done, who it works with and what its record is missing are worked out by the models. This class picks what each page shows, in what order and how much of it, and supplies the page’s own wording.
Attributes: collaborators_shown: How many faces the Frequent collaborators card draws. records_shown: How many projects, and how many datasets, their cards list. member_slots: How many places the Members card has, the “+n” entry included.
Initialization
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- url_path#
None
- extra_views#
None
- collaborators_shown#
18
- records_shown#
5
- member_slots#
10
- get_template_names()#
Draw the person or the organization page.
- get_context_data(**kwargs)#
Add everything the person or organization page draws.
- get_breadcrumbs()#
Lead the trail with the list of people or of organizations.
- get_record_card(entries, active=None)#
Shape a Projects or Datasets card: active records first, then the most recent.
Args: entries:
{"record", "owned"}dicts, one per record. active: Says whether a record counts as active, or None when the type has no such state.Returns: The entries to show, how many more there are, and the total.
- get_readiness(items, title, about, badge)#
Shape a checklist for
c-card.readiness, with the page’s wording.
The keys both pages and the shared skeleton read.
- get_person_context()#
Everything the person page draws.
- get_organization_context()#
Everything the organization page draws.