Extends
- Backbone.View
Members
className :string
The HTML classes to use for this view's element
Type:
- string
- Source:
collection :AccessPolicy
The AccessPolicy collection that is displayed in this View
Type:
- Source:
events :Object
The events this view will listen to and the associated function to call.
Type:
- Object
- Source:
resourceType :string
The type of object/resource that this AccessPolicy is for.
Type:
- string
- Source:
Example
"dataset", "portal", "data file"
template :Underscore.Template
References to templates for this view. HTML files are converted to Underscore.js templates
Type:
- Underscore.Template
- Source:
type :string
The type of View this is
Type:
- string
- Source:
Methods
addAccessRule(accessRule)
Adds the given AccessRule model to the AccessPolicy collection associated with this view
Parameters:
Name | Type | Description |
---|---|---|
accessRule |
AccessRule | The AccessRule to add |
- Source:
addEmptyRow()
Render a row with input elements for adding a new AccessRule
- Source:
checkForOwners(accessRuleModel)
Checks that there is at least one owner of this resource, and displays a warning message if not.
Parameters:
Name | Type | Description |
---|---|---|
accessRuleModel |
AccessRule |
- Source:
handleRemove(e)
Checks that there is at least one owner of this resource, and displays a warning message if not.
Parameters:
Name | Type | Description |
---|---|---|
e |
Event |
- Source:
initialize(options)
Creates a new AccessPolicyView
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | A literal object with options to pass to the view |
- Source:
render()
Renders this view
- Source:
renderHelpText()
Renders help text for the form in this view
- Source:
renderPublicToggle()
Renders a public/private toggle that toggles the public readability of the given resource.
- Source:
save()
Saves the AccessPolicy associated with this view
- Source:
showOwnerWarning()
Displays a warning message in this view that the object needs at least one owner.
- Source:
showRightsholder()
Adds an AccessRuleView that represents the rightsHolder of the object.
The rightsHolder needs to be handled specially because it's not a regular access rule in the system metadata.
- Source:
showSaveProgress(dataONEObject)
Show visual cues in this view to show the user the status of the system metadata update.
Parameters:
Name | Type | Description |
---|---|---|
dataONEObject |
DataONEObject | The object being updated |
- Source:
showUnauthorized()
Adds messaging to this view to tell the user they are unauthorized to change the AccessPolicy
of this object(s)
- Source:
togglePrivacy()
Toggles the public-read AccessRule for this resource
- Source: