Tables
hypha.apply.funds.tables
¶
SubmissionsTable
¶
Bases: Table
Base table for listing submissions, do not include admin data to this table
title
class-attribute
instance-attribute
¶
title = LinkColumn('funds:submissions:detail', text=render_title, args=[A('pk')], orderable=True, attrs={'td': {'class': 'js-title'}, 'a': {'data-tippy-content': lambda record: render_title(record), 'data-tippy-placement': 'top', 'class': "truncate inline-block w-[calc(100%-2rem)] after:content-[''] after:block"}})
submit_time
class-attribute
instance-attribute
¶
phase
class-attribute
instance-attribute
¶
phase = Column(verbose_name=gettext_lazy('Status'), order_by=('status'), attrs={'td': {'data-actions': render_actions, 'class': 'js-actions'}})
stage
class-attribute
instance-attribute
¶
fund
class-attribute
instance-attribute
¶
comments
class-attribute
instance-attribute
¶
last_update
class-attribute
instance-attribute
¶
Meta
¶
fields
class-attribute
instance-attribute
¶
row_attrs
class-attribute
instance-attribute
¶
row_attrs = {'class': make_row_class, 'data-record-id': lambda record: id, 'data-archived': lambda record: is_archive}
empty_text
class-attribute
instance-attribute
¶
render_user
¶
render_phase
¶
order_last_update
¶
get_column_class_names
¶
ReviewerSubmissionsTable
¶
Bases: SubmissionsTable
title
class-attribute
instance-attribute
¶
title = LinkColumn('funds:submissions:detail', text=render_title, args=[A('pk')], orderable=True, attrs={'td': {'class': 'js-title'}, 'a': {'data-tippy-content': lambda record: render_title(record), 'data-tippy-placement': 'top', 'class': "truncate inline-block w-[calc(100%-2rem)] after:content-[''] after:block"}})
submit_time
class-attribute
instance-attribute
¶
phase
class-attribute
instance-attribute
¶
phase = Column(verbose_name=gettext_lazy('Status'), order_by=('status'), attrs={'td': {'data-actions': render_actions, 'class': 'js-actions'}})
stage
class-attribute
instance-attribute
¶
fund
class-attribute
instance-attribute
¶
comments
class-attribute
instance-attribute
¶
last_update
class-attribute
instance-attribute
¶
Meta
¶
Bases: Meta
fields
class-attribute
instance-attribute
¶
row_attrs
class-attribute
instance-attribute
¶
row_attrs = {'class': make_row_class, 'data-record-id': lambda record: id, 'data-archived': lambda record: is_archive}
empty_text
class-attribute
instance-attribute
¶
render_user
¶
render_phase
¶
order_last_update
¶
get_column_class_names
¶
BaseAdminSubmissionsTable
¶
Bases: SubmissionsTable
title
class-attribute
instance-attribute
¶
title = LinkColumn('funds:submissions:detail', text=render_title, args=[A('pk')], orderable=True, attrs={'td': {'class': 'js-title'}, 'a': {'data-tippy-content': lambda record: render_title(record), 'data-tippy-placement': 'top', 'class': "truncate inline-block w-[calc(100%-2rem)] after:content-[''] after:block"}})
submit_time
class-attribute
instance-attribute
¶
phase
class-attribute
instance-attribute
¶
phase = Column(verbose_name=gettext_lazy('Status'), order_by=('status'), attrs={'td': {'data-actions': render_actions, 'class': 'js-actions'}})
stage
class-attribute
instance-attribute
¶
fund
class-attribute
instance-attribute
¶
comments
class-attribute
instance-attribute
¶
last_update
class-attribute
instance-attribute
¶
reviews_stats
class-attribute
instance-attribute
¶
reviews_stats = TemplateColumn(template_name='funds/tables/column_reviews.html', verbose_name=mark_safe('Reviews<div>Comp. <span class="counts-separator">/</span> Assgn.</div>'), orderable=False)
screening_status
class-attribute
instance-attribute
¶
Meta
¶
Bases: Meta
row_attrs
class-attribute
instance-attribute
¶
row_attrs = {'class': make_row_class, 'data-record-id': lambda record: id, 'data-archived': lambda record: is_archive}
empty_text
class-attribute
instance-attribute
¶
fields
class-attribute
instance-attribute
¶
fields = ('title', 'phase', 'stage', 'fund', 'round', 'lead', 'submit_time', 'last_update', 'screening_status', 'reviews_stats', 'organization_name')
render_user
¶
render_phase
¶
order_last_update
¶
get_column_class_names
¶
render_lead
¶
render_screening_status
¶
Source code in hypha/apply/funds/tables.py
AdminSubmissionsTable
¶
Bases: BaseAdminSubmissionsTable
Adds admin only columns to the submissions table
title
class-attribute
instance-attribute
¶
title = LinkColumn('funds:submissions:detail', text=render_title, args=[A('pk')], orderable=True, attrs={'td': {'class': 'js-title'}, 'a': {'data-tippy-content': lambda record: render_title(record), 'data-tippy-placement': 'top', 'class': "truncate inline-block w-[calc(100%-2rem)] after:content-[''] after:block"}})
submit_time
class-attribute
instance-attribute
¶
phase
class-attribute
instance-attribute
¶
phase = Column(verbose_name=gettext_lazy('Status'), order_by=('status'), attrs={'td': {'data-actions': render_actions, 'class': 'js-actions'}})
stage
class-attribute
instance-attribute
¶
fund
class-attribute
instance-attribute
¶
comments
class-attribute
instance-attribute
¶
last_update
class-attribute
instance-attribute
¶
reviews_stats
class-attribute
instance-attribute
¶
reviews_stats = TemplateColumn(template_name='funds/tables/column_reviews.html', verbose_name=mark_safe('Reviews<div>Comp. <span class="counts-separator">/</span> Assgn.</div>'), orderable=False)
screening_status
class-attribute
instance-attribute
¶
selected
class-attribute
instance-attribute
¶
selected = LabeledCheckboxColumn(accessor=A('pk'), attrs={'input': {'class': 'js-batch-select'}, 'th__input': {'class': 'js-batch-select-all'}})
Meta
¶
Bases: Meta
row_attrs
class-attribute
instance-attribute
¶
row_attrs = {'class': make_row_class, 'data-record-id': lambda record: id, 'data-archived': lambda record: is_archive}
empty_text
class-attribute
instance-attribute
¶
render_user
¶
render_phase
¶
order_last_update
¶
get_column_class_names
¶
render_lead
¶
render_screening_status
¶
Source code in hypha/apply/funds/tables.py
SummarySubmissionsTable
¶
Bases: BaseAdminSubmissionsTable
title
class-attribute
instance-attribute
¶
title = LinkColumn('funds:submissions:detail', text=render_title, args=[A('pk')], orderable=True, attrs={'td': {'class': 'js-title'}, 'a': {'data-tippy-content': lambda record: render_title(record), 'data-tippy-placement': 'top', 'class': "truncate inline-block w-[calc(100%-2rem)] after:content-[''] after:block"}})
submit_time
class-attribute
instance-attribute
¶
phase
class-attribute
instance-attribute
¶
phase = Column(verbose_name=gettext_lazy('Status'), order_by=('status'), attrs={'td': {'data-actions': render_actions, 'class': 'js-actions'}})
stage
class-attribute
instance-attribute
¶
fund
class-attribute
instance-attribute
¶
comments
class-attribute
instance-attribute
¶
last_update
class-attribute
instance-attribute
¶
reviews_stats
class-attribute
instance-attribute
¶
reviews_stats = TemplateColumn(template_name='funds/tables/column_reviews.html', verbose_name=mark_safe('Reviews<div>Comp. <span class="counts-separator">/</span> Assgn.</div>'), orderable=False)
screening_status
class-attribute
instance-attribute
¶
Meta
¶
Bases: Meta
fields
class-attribute
instance-attribute
¶
fields = ('title', 'phase', 'stage', 'fund', 'round', 'lead', 'submit_time', 'last_update', 'screening_status', 'reviews_stats', 'organization_name')
row_attrs
class-attribute
instance-attribute
¶
row_attrs = {'class': make_row_class, 'data-record-id': lambda record: id, 'data-archived': lambda record: is_archive}
empty_text
class-attribute
instance-attribute
¶
render_user
¶
render_phase
¶
order_last_update
¶
get_column_class_names
¶
render_lead
¶
render_screening_status
¶
Source code in hypha/apply/funds/tables.py
SummarySubmissionsTableWithRole
¶
Bases: BaseAdminSubmissionsTable
Adds Role Assigned to the 'Waiting for My Review' table
title
class-attribute
instance-attribute
¶
title = LinkColumn('funds:submissions:detail', text=render_title, args=[A('pk')], orderable=True, attrs={'td': {'class': 'js-title'}, 'a': {'data-tippy-content': lambda record: render_title(record), 'data-tippy-placement': 'top', 'class': "truncate inline-block w-[calc(100%-2rem)] after:content-[''] after:block"}})
submit_time
class-attribute
instance-attribute
¶
phase
class-attribute
instance-attribute
¶
phase = Column(verbose_name=gettext_lazy('Status'), order_by=('status'), attrs={'td': {'data-actions': render_actions, 'class': 'js-actions'}})
stage
class-attribute
instance-attribute
¶
fund
class-attribute
instance-attribute
¶
comments
class-attribute
instance-attribute
¶
last_update
class-attribute
instance-attribute
¶
reviews_stats
class-attribute
instance-attribute
¶
reviews_stats = TemplateColumn(template_name='funds/tables/column_reviews.html', verbose_name=mark_safe('Reviews<div>Comp. <span class="counts-separator">/</span> Assgn.</div>'), orderable=False)
screening_status
class-attribute
instance-attribute
¶
role_icon
class-attribute
instance-attribute
¶
Meta
¶
Bases: Meta
fields
class-attribute
instance-attribute
¶
fields = ('title', 'phase', 'stage', 'fund', 'round', 'lead', 'submit_time', 'last_update', 'screening_status', 'reviews_stats', 'organization_name')
row_attrs
class-attribute
instance-attribute
¶
row_attrs = {'class': make_row_class, 'data-record-id': lambda record: id, 'data-archived': lambda record: is_archive}
empty_text
class-attribute
instance-attribute
¶
render_user
¶
render_phase
¶
order_last_update
¶
get_column_class_names
¶
render_lead
¶
render_screening_status
¶
Source code in hypha/apply/funds/tables.py
render_role_icon
¶
Select2CheckboxWidgetMixin
¶
Select2MultipleChoiceFilter
¶
Select2ModelMultipleChoiceFilter
¶
Bases: Select2MultipleChoiceFilter
, ModelMultipleChoiceFilter
Source code in hypha/apply/funds/tables.py
StatusMultipleChoiceFilter
¶
Bases: Select2MultipleChoiceFilter
Source code in hypha/apply/funds/tables.py
SubmissionFilter
¶
Bases: FilterSet
Source code in hypha/apply/funds/tables.py
fund
class-attribute
instance-attribute
¶
fund = Select2ModelMultipleChoiceFilter(field_name='page', queryset=get_used_funds, label=gettext_lazy('Funds'))
round
class-attribute
instance-attribute
¶
round = Select2ModelMultipleChoiceFilter(queryset=get_used_rounds, label=gettext_lazy('Rounds'))
lead
class-attribute
instance-attribute
¶
lead = Select2ModelMultipleChoiceFilter(queryset=get_round_leads, label=gettext_lazy('Leads'))
screening_statuses
class-attribute
instance-attribute
¶
screening_statuses = Select2ModelMultipleChoiceFilter(queryset=get_screening_statuses, label=gettext_lazy('Screening'), null_label=gettext_lazy('No Status'))
reviewers
class-attribute
instance-attribute
¶
reviewers = Select2ModelMultipleChoiceFilter(queryset=get_all_reviewers, label=gettext_lazy('Reviewers'))
category_options
class-attribute
instance-attribute
¶
category_options = Select2MultipleChoiceFilter(choices=[], label=gettext_lazy('Category'), method='filter_category_options')
meta_terms
class-attribute
instance-attribute
¶
meta_terms = Select2ModelMultipleChoiceFilter(queryset=get_meta_terms, label=gettext_lazy('Terms'))
filters
instance-attribute
¶
Meta
¶
filter_category_options
¶
Filter submissions based on the category options selected.
In order to do that we need to first get all the category fields used in the submission.
And then use those category fields to filter submissions with their form_data.
Source code in hypha/apply/funds/tables.py
SubmissionFilterAndSearch
¶
Bases: SubmissionFilter
Source code in hypha/apply/funds/tables.py
fund
class-attribute
instance-attribute
¶
fund = Select2ModelMultipleChoiceFilter(field_name='page', queryset=get_used_funds, label=gettext_lazy('Funds'))
round
class-attribute
instance-attribute
¶
round = Select2ModelMultipleChoiceFilter(queryset=get_used_rounds, label=gettext_lazy('Rounds'))
lead
class-attribute
instance-attribute
¶
lead = Select2ModelMultipleChoiceFilter(queryset=get_round_leads, label=gettext_lazy('Leads'))
screening_statuses
class-attribute
instance-attribute
¶
screening_statuses = Select2ModelMultipleChoiceFilter(queryset=get_screening_statuses, label=gettext_lazy('Screening'), null_label=gettext_lazy('No Status'))
reviewers
class-attribute
instance-attribute
¶
reviewers = Select2ModelMultipleChoiceFilter(queryset=get_all_reviewers, label=gettext_lazy('Reviewers'))
category_options
class-attribute
instance-attribute
¶
category_options = Select2MultipleChoiceFilter(choices=[], label=gettext_lazy('Category'), method='filter_category_options')
meta_terms
class-attribute
instance-attribute
¶
meta_terms = Select2ModelMultipleChoiceFilter(queryset=get_meta_terms, label=gettext_lazy('Terms'))
filters
instance-attribute
¶
query
class-attribute
instance-attribute
¶
archived
class-attribute
instance-attribute
¶
Meta
¶
filter_category_options
¶
Filter submissions based on the category options selected.
In order to do that we need to first get all the category fields used in the submission.
And then use those category fields to filter submissions with their form_data.
Source code in hypha/apply/funds/tables.py
search_data_and_id
¶
SubmissionDashboardFilter
¶
Bases: FilterSet
Source code in hypha/apply/funds/tables.py
round
class-attribute
instance-attribute
¶
round = Select2ModelMultipleChoiceFilter(queryset=get_used_rounds, label=gettext_lazy('Rounds'))
fund
class-attribute
instance-attribute
¶
fund = Select2ModelMultipleChoiceFilter(field_name='page', queryset=get_used_funds, label=gettext_lazy('Funds'))
filters
instance-attribute
¶
Meta
¶
SubmissionReviewerFilterAndSearch
¶
Bases: SubmissionDashboardFilter
Source code in hypha/apply/funds/tables.py
round
class-attribute
instance-attribute
¶
round = Select2ModelMultipleChoiceFilter(queryset=get_used_rounds, label=gettext_lazy('Rounds'))
fund
class-attribute
instance-attribute
¶
fund = Select2ModelMultipleChoiceFilter(field_name='page', queryset=get_used_funds, label=gettext_lazy('Funds'))
filters
instance-attribute
¶
query
class-attribute
instance-attribute
¶
Meta
¶
RoundsTable
¶
ActiveRoundFilter
¶
Bases: Select2MultipleChoiceFilter
Source code in hypha/apply/funds/tables.py
OpenRoundFilter
¶
Bases: Select2MultipleChoiceFilter
Source code in hypha/apply/funds/tables.py
RoundsFilter
¶
Bases: FilterSet
fund
class-attribute
instance-attribute
¶
fund = Select2ModelMultipleChoiceFilter(queryset=get_used_funds, label=gettext_lazy('Funds'))
lead
class-attribute
instance-attribute
¶
lead = Select2ModelMultipleChoiceFilter(queryset=get_round_leads, label=gettext_lazy('Leads'))
active
class-attribute
instance-attribute
¶
active = ActiveRoundFilter(label=gettext_lazy('Active'))
round_state
class-attribute
instance-attribute
¶
round_state = OpenRoundFilter(label=gettext_lazy('Open'))
ReviewerLeaderboardFilterForm
¶
Bases: ModelForm
Form to "clean" a list of User objects to their PKs.
The Reviewer Leaderboard table is a list of User objects, however we also want the ability to filter down to N Users (reviewers). Django filter is converting the selected PKs to User objects, however we can't filter a User QuerySet with User objects. So this form converts back to a list of User PKs using the clean_reviewer method.
ReviewerLeaderboardFilter
¶
Bases: FilterSet
query
class-attribute
instance-attribute
¶
reviewer
class-attribute
instance-attribute
¶
reviewer = Select2ModelMultipleChoiceFilter(field_name='pk', label=gettext_lazy('Reviewers'), queryset=get_all_reviewers)
funds
class-attribute
instance-attribute
¶
funds = Select2ModelMultipleChoiceFilter(field_name='applicationsubmission__page', label=gettext_lazy('Funds'), queryset=get_used_funds)
rounds
class-attribute
instance-attribute
¶
rounds = Select2ModelMultipleChoiceFilter(field_name='applicationsubmission__round', label=gettext_lazy('Rounds'), queryset=get_used_rounds)
ReviewerLeaderboardTable
¶
ReviewerLeaderboardDetailTable
¶
Bases: Table
title
class-attribute
instance-attribute
¶
title = LinkColumn('funds:submissions:reviews:review', text=render_title, args=[A('submission_id'), A('pk')], orderable=True, verbose_name=gettext_lazy('Submission'), attrs={'td': {'class': 'js-title'}, 'a': {'data-tippy-content': lambda record: render_title(record), 'data-tippy-placement': 'top', 'class': 'truncate inline-block w-[calc(100%-2rem)] after:content-[] after:block'}})
Meta
¶
StaffAssignmentsTable
¶
Bases: Table
full_name
class-attribute
instance-attribute
¶
full_name = Column(linkify=render_reviewer_link, orderable=True, verbose_name=gettext_lazy('Staff'), attrs={'td': {'class': 'title'}})
Meta
¶
review_filter_for_user
¶
make_row_class
¶
render_actions
¶
render_title
¶
render_reviewer_link
¶
get_used_rounds
¶
get_used_rounds_from_dataset
¶
get_used_funds
¶
get_used_funds_from_dataset
¶
get_round_leads
¶
get_round_leads_from_dataset
¶
get_reviewers_from_dataset
¶
All assigned reviewers, not including Staff and Admin because we want a list of reviewers only