Documentation ¶
Index ¶
- Variables
- func Setup(r *mux.Router, webPath string, c *config.Config, w *issuewatcher.Watcher)
- type Handler
- type HandlerFunc
- type Issue
- func (i *Issue) Actions() []template.HTML
- func (i *Issue) Date() string
- func (i *Issue) Errors() []apperr.Error
- func (i *Issue) IsOwned() bool
- func (i *Issue) JP2Files() []string
- func (i *Issue) LCCN() string
- func (i *Issue) Path(actionPath string) string
- func (i *Issue) TaskDescription() string
- func (i *Issue) Title() string
- func (i *Issue) ValidateMetadata()
- func (i *Issue) WorkflowExpiration() string
Constants ¶
This section is empty.
Variables ¶
var ( // Layout is the base template, cloned from the responder's layout, from // which all workflow pages are built Layout *tmpl.TRoot // DeskTmpl renders the main "workflow desk" page DeskTmpl *tmpl.Template // MetadataFormTmpl renders the form for entering metadata for an issue MetadataFormTmpl *tmpl.Template // ReportErrorTmpl renders the form for reporting errors on an issue ReportErrorTmpl *tmpl.Template // ReviewMetadataTmpl renders the view for reviewing metadata ReviewMetadataTmpl *tmpl.Template // RejectIssueTmpl renders the view for reporting an issue which is rejected by the reviewer RejectIssueTmpl *tmpl.Template // ViewIssueTmpl renders a read-only display of an issue ViewIssueTmpl *tmpl.Template )
Functions ¶
Types ¶
type Handler ¶
Handler is our version of http.Handler for sending extra context to workflow handlers
type HandlerFunc ¶
HandlerFunc represents workflow handlers with workflow-specific context
func MustHavePrivilege ¶
func MustHavePrivilege(priv *user.Privilege, f HandlerFunc) HandlerFunc
MustHavePrivilege replicates responder.MustHavePrivilege, but supports the workflow handler structure's needs
type Issue ¶
type Issue struct { *db.Issue MetadataAuthorLogin string // contains filtered or unexported fields }
Issue wraps the DB issue, and decorates it with display-friendly functions and dataentry-specific errors
func (*Issue) Actions ¶
Actions returns the action link HTML for each possible action the owner can take for this issue
func (*Issue) IsOwned ¶
IsOwned returns true if the owner ID is nonzero *and* the workflow owner expiration time has not passed
func (*Issue) TaskDescription ¶
TaskDescription returns a human-friendly explanation of the current place this issue is within the workflow
func (*Issue) ValidateMetadata ¶
func (i *Issue) ValidateMetadata()
ValidateMetadata checks all fields for validity and sets up i.validationErrors to describe anything wrong
func (*Issue) WorkflowExpiration ¶
WorkflowExpiration returns the date and time of "workflow expiration": when this item is no longer claimed by the workflow owner