Activity tags
hypha.apply.activity.templatetags.activity_tags
¶
display_activity_author
¶
Creates a formatted author string based on the activity and viewer role.
Parameters:
Returns:
-
str
βA string with the formatted author depending on the user role (ie. a
-
str
βcomment from staff viewed by an applicant will return the org name).
Source code in hypha/apply/activity/templatetags/activity_tags.py
user_can_see_related
¶
Source code in hypha/apply/activity/templatetags/activity_tags.py
display_for
¶
Source code in hypha/apply/activity/templatetags/activity_tags.py
visibility_options
¶
Gets all visibility choices for the specified user
Parameters:
Returns:
-
str
βA JSON string of visibility options
Source code in hypha/apply/activity/templatetags/activity_tags.py
visibility_display
¶
Creates a formatted visibility string with visibility string and user.
Parameters:
-
visibility
(str
) βA visibility string (likely a constant from activity models)
-
user
βUser
to be shown the formatted string
Returns:
-
str
βA formatted visibility string (ie. "ACME team" if visibility is "team"
-
str
βand user is applicant or "all" if visibility is "all").
Source code in hypha/apply/activity/templatetags/activity_tags.py
display_name_for_email
¶
Gets a user's display name when being used in an email
Primarily used to hide staff identities
Args:
user: the User
to get the display name for
context: the context provided by the template
Returns:
str: the display name to be used to address the user in question
Source code in hypha/apply/activity/templatetags/activity_tags.py
source_type
¶
Formats source type For a given source type containing "submission", this will be converted to "Submission" (ie. "application submission" -> "Submission"). Args: value: the source type to be formatted Returns: A source type string with a capitalized first letter