Part of lp.answers.browser.questiontarget View In Hierarchy
Known subclasses: lp.answers.browser.person.PersonSearchQuestionsView, lp.answers.browser.question.SearchAllQuestionsView, lp.answers.browser.questiontarget.QuestionCollectionByLanguageView, lp.answers.browser.questiontarget.QuestionCollectionMyQuestionsView, lp.answers.browser.questiontarget.QuestionCollectionNeedAttentionView
This view provides a search form to filter the displayed questions.
Method | template | The template to render the presentation. |
Method | render | See LaunchpadView . |
Method | page_title | Heading to display above the search results. |
Method | display_target_column | Return True when the context has question targets to display. |
Method | setUpFields | See LaunchpadFormView . |
Method | setUpWidgets | See LaunchpadFormView . |
Method | createLanguageField | Create a field to choose a set of languages. |
Method | validate | Validate hook. |
Method | status_title_map | Return a dictionary mapping set of statuses to their title. |
Method | context_is_project | Return True when the context is a project. |
Method | unspoken_languages | Return a formatted string of unspoken question languages. |
Method | empty_listing_message | Message shown when there is no questions matching the filter. |
Method | getDefaultFilter | Hook for subclass to provide a default search filter. |
Method | search_text | Search text used by the filter. |
Method | status_filter | Set of statuses to filter the search with. |
Method | context_question_languages | Return the set of ILanguages used by this context's questions. |
Method | show_language_control | Whether to render Language control, or not at all. |
Method | matching_faqs_count | Return the FAQs matching the same keywords. |
Method | matching_faqs_url | Return the URL to use to display the list of matching FAQs. |
Method | search_action | Action executed when the user clicked the search button. |
Method | searchResults | Return the questions corresponding to the search. |
Method | display_sourcepackage_column | We display the source package column only on distribution. |
Method | formatSourcePackageName | Format the source package name related to question. |
Method | can_configure_answers | Can the user configure answers for the IQuestionTarget . |
Inherited from UserSupportLanguagesMixin:
Method | user_support_languages | The set of user support languages. |
Inherited from LaunchpadFormView:
Method | __init__ | Undocumented |
Method | initialize | Undocumented |
Method | extendFields | Allow subclasses to extend the form fields. |
Method | help_links | Dictionary mapping field names to help links. |
Method | adapters | Provide custom adapters for use when setting up the widgets. |
Method | action_url | Set the default action URL for the form. |
Method | has_available_actions | Does the view have any available actions that will render? |
Method | initial_values | Override this in your subclass if you want any widgets to have |
Method | addError | Add a form wide error. |
Method | getFieldError | Get the error associated with a particular field. |
Method | setFieldError | Set the error associated with a particular field. |
Static Method | validate_none | Do not do any validation. |
Method | validate_widgets | Validate the named form widgets. |
Method | error_count | Undocumented |
Method | ajax_failure_handler | Called by the form if validate() finds any errors. |
Method | validate_cancel | Noop validation in case we cancel. |
Method | focusedElementScript | Helper function to construct the script element content. |
Method | isSingleLineLayout | Undocumented |
Method | isMultiLineLayout | Undocumented |
Method | isCheckBoxLayout | Undocumented |
Method | showOptionalMarker | Should the (Optional) marker be shown? |
Method | _processNotifications | Add any notification messages to the response headers. |
Method | _abort | Abort the form edit. |
Method | _validate | Check all widgets and perform any custom validation. |
Subclasses can redefine this property to choose their own template.
Create a specialized vocabulary based on the user's preferred languages. If the user is anonymous, the languages submited in the browser's request will be used.
This validation method checks that a valid status is submitted.
This is used to compute dynamically the page heading and empty listing messages.
The string summarizes the questions that are in languages that no answer contact speaks. The string takes the form of an inline list with links to see the questions for each language: '_Hungarian_ (2), _Romanian_ (1)'. An empty string is returned when all questions are in a language spoken by the answer contacts.
This method is relevant to QuestionTargets. Subclasses of this View that want to list unspoken languages for other objects must provide their own implementation.
When the QuestionTarget has questions in only one language, and that language is among the user's languages, we do not render the language control because there are no choices to be made.
Saves the user submitted search parameters in an instance attribute.