Documentation ¶
Index ¶
Constants ¶
View Source
const ( None = 0 Draft = 1 Suspended = 50 Published = 100 )
Status values valid in the status field added with status.ResourceStatus.
Variables ¶
This section is empty.
Functions ¶
func OptionsAll ¶
OptionsAll returns a list of options starting with a None option using the name passed in, which is useful for filter menus filtering on status.
Types ¶
type ResourceStatus ¶
type ResourceStatus struct {
Status int64
}
ResourceStatus adds a status field to resources.
func (*ResourceStatus) IsPublished ¶
func (r *ResourceStatus) IsPublished() bool
IsPublished returns true if this resource is published
func (*ResourceStatus) StatusDisplay ¶
func (r *ResourceStatus) StatusDisplay() string
StatusDisplay returns a string representation of the model status.
func (*ResourceStatus) StatusOptions ¶
func (r *ResourceStatus) StatusOptions() []helpers.Option
StatusOptions returns an array of statuses for a status select for this resource.
Click to show internal directories.
Click to hide internal directories.