Show CDS State
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"code.achtarmig.org/pas/ui/element"
|
||||
"code.achtarmig.org/pas/ui/element/boxedlist"
|
||||
"code.achtarmig.org/pas/ui/element/boxedlist/expander"
|
||||
"code.achtarmig.org/pas/ui/element/input"
|
||||
"code.achtarmig.org/pas/ui/element/option"
|
||||
"code.achtarmig.org/pas/ui/element/placeholder"
|
||||
"code.achtarmig.org/pas/ui/element/view"
|
||||
@@ -30,6 +31,22 @@ func results(v *view.Element, m *model.ResultsModel) element.ElementInterface {
|
||||
http.Redirect(w, r, "/cds?q="+url.QueryEscape(result.TechnicalName.String()), http.StatusSeeOther)
|
||||
return errors.New("redirect")
|
||||
}
|
||||
|
||||
p.HasSuffix = true
|
||||
input.New(p, "ReleaseState_"+result.TechnicalName.String(), input.TypeText, func(p *input.Element) {
|
||||
p.Shape = option.ShapePill
|
||||
p.MaxWidth = 6
|
||||
p.Disabled = true
|
||||
p.Justify = option.JustifyCenter
|
||||
|
||||
p.SetData(result.StateTitle.String())
|
||||
|
||||
if result.State == "RELEASED" {
|
||||
p.DisplayStyle = option.DisplayStyleSuccess
|
||||
} else {
|
||||
p.DisplayStyle = option.DisplayStyleError
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user