Skip to content

Primaryactions tags

hypha.apply.funds.templatetags.primaryactions_tags

register module-attribute

register = Library()

should_display_primary_actions_block

should_display_primary_actions_block(user, submission)
Source code in hypha/apply/funds/templatetags/primaryactions_tags.py
@register.filter
def should_display_primary_actions_block(user, submission):
    review_primary_action_displayed = submission.can_review(user) and (
        submission.in_internal_review_phase or submission.in_external_review_phase
    )
    view_determination_action_displayed = submission.is_finished

    if review_primary_action_displayed or view_determination_action_displayed:
        return True
    else:
        return False

show_progress_button

show_progress_button(user, submission)
Source code in hypha/apply/funds/templatetags/primaryactions_tags.py
@register.simple_tag
def show_progress_button(user, submission):
    return bool(list(submission.get_actions_for_user(user)))