@PublicApi
public interface InaccessibleProjectTypeDialogDataProvider
In order to generate a fully functional project type warning on the page, you need to:
- Call shouldDisplayInaccessibleWarning(ApplicationUser, Project)
to find out
the project type(s) for which you need to generate the warning icon.
- For each project type that needs a warning attached, generate an DOM element with the class "project-type-warning-icon-{key}" (where key is the key of the project type that the warning corresponds to)
- Call provideData(WebResourceAssembler, ApplicationUser, Project)
or
InaccessibleProjectTypeDialogDataProvider#provideResourcesMultipleProjects(WebResourceAssembler, ApplicationUser, ProjectTypeKey...)
(depending
on whether only one project is displayed on the page or several)
- Require the jira.webresources:project-type-warning web-resource
- From the client side: require the "jira/project/types/warning/dialog" AMD module and call "init" on the returned JavaScript object.
Modifier and Type | Method and Description |
---|---|
void |
provideData(com.atlassian.webresource.api.assembler.WebResourceAssembler assembler,
ApplicationUser user,
Project project)
Provides the data needed to render the dialog attached to the warning symbols displayed for the project type of the given project.
|
boolean |
shouldDisplayInaccessibleWarning(ApplicationUser user,
Project project)
Indicates whether the inaccessible project type warning should be displayed or not, on a page that is displaying a single project.
|
boolean shouldDisplayInaccessibleWarning(ApplicationUser user, Project project)
user
- The user for which we are performing the check.project
- The project with the type for which we will display the warningvoid provideData(com.atlassian.webresource.api.assembler.WebResourceAssembler assembler, ApplicationUser user, Project project)
This method should be used when the warning symbols are displayed on a page that is displaying a single project, since the messages of the dialogs will have nouns in singular form.
assembler
- The assembler to be used to provide the datauser
- The user for which the warning dialog will be renderedproject
- The keys of the project types for which the warning dialogs will be renderedCopyright © 2002-2019 Atlassian. All Rights Reserved.