2017-09-26 12:50:09 +00:00
{ { extends "../../_layouts/default" } }
{ { block style ( ) } }
< link rel = "stylesheet" href = "/codemirror/codemirror.css?v=5.30" >
{ { end } }
{ { block script ( ) } }
< script src = "/codemirror/codemirror.js?v=5.30" > < / script >
< script src = "/codemirror/mode/yaml.js?v=5.30" > < / script >
< script > var editor = CodeMirror . fromTextArea ( document . getElementById ( "txt-content" ) , { lineNumbers : true } ) ; < / script >
{ { end } }
{ { block body ( ) } }
< section class = "hero is-info" >
< div class = "hero-body" >
< div class = "container has-text-centered" >
2017-10-12 09:30:21 +00:00
< h1 class = "title is-2 is-uppercase" > { { i18n ( "stack.title" ) } } < / h1 >
< h2 class = "subtitle is-5" > { { i18n ( "stack.description" ) } } < / h2 >
2017-09-26 12:50:09 +00:00
< / div >
< / div >
< div class = "hero-foot" >
< div class = "container" >
< nav class = "tabs is-boxed" >
< ul >
< li >
2017-10-12 09:30:21 +00:00
< a href = "/stack/task/" > { { i18n ( "menu.stack.task" ) } } < / a >
2017-09-26 12:50:09 +00:00
< / li >
< li class = "is-active" >
2017-10-12 09:30:21 +00:00
< a href = "/stack/archive/" > { { i18n ( "menu.stack.archive" ) } } < / a >
2017-09-26 12:50:09 +00:00
< / li >
< / ul >
< / nav >
< / div >
< / div >
< / section >
< div class = "container" >
< nav class = "breadcrumb has-succeeds-separator is-small is-marginless" aria - label = "breadcrumbs" >
< ul >
2017-10-12 09:30:21 +00:00
< li > < a href = "/" > { { i18n ( "menu.dashboard" ) } } < / a > < / li >
< li > < a href = "/stack/archive/" > { { i18n ( "menu.stack.archive" ) } } < / a > < / li >
< li class = "is-active" > < a > { { i18n ( "menu.edit" ) } } < / a > < / li >
2017-09-26 12:50:09 +00:00
< / ul >
< / nav >
< / div >
< section class = "hero is-small is-light" >
< div class = "hero-body" >
< div class = "container" >
< h2 class = "title is-2" >
{ { . Archive . Name } }
< / h2 >
< / div >
< / div >
< / section >
< nav class = "navbar has-shadow" >
< div class = "container" >
< div class = "navbar-brand" >
2017-10-12 09:30:21 +00:00
< a class = "navbar-item is-tab" href = "/stack/archive/{{.Archive.ID}}/detail" > { { i18n ( "menu.detail" ) } } < / a >
< a class = "navbar-item is-tab is-active" href = "/stack/archive/{{.Archive.ID}}/edit" > { { i18n ( "menu.edit" ) } } < / a >
2017-09-26 12:50:09 +00:00
< / div >
< / div >
< / nav >
< section class = "section" >
< div class = "container" >
< form method = "post" action = "update" data - form = "ajax-json" data - url = "/stack/archive/" >
< input name = "id" value = "{{ .Archive.ID }}" type = "hidden" >
< div class = "field" >
2017-10-12 09:30:21 +00:00
< label class = "label" > { { i18n ( "field.name" ) } } < / label >
2017-09-26 12:50:09 +00:00
< div class = "control" >
< input name = "name" class = "input" value = "{{ .Archive.Name }}" type = "text" placeholder = "" data - v - rule = "native;regex" data - v - arg - regex = "^[a-z0-9_-]+$" data - v - msg - regex = "Name can contain only letters, digits, '_' and '-'." required >
< / div >
< / div >
< div class = "field" >
< label class = "label" > Content < / label >
< div class = "control" >
< textarea id = "txt-content" name = "content" class = "textarea code" rows = "20" placeholder = "Compose file content" data - v - rule = "native" required > { { . Archive . Content } } < / textarea >
< / div >
< / div >
< div class = "field is-grouped" >
< div class = "control" >
2017-10-12 09:30:21 +00:00
< button type = "submit" class = "button is-primary" > { { i18n ( "button.submit" ) } } < / button >
2017-09-26 12:50:09 +00:00
< / div >
< div class = "control" >
2017-10-12 09:30:21 +00:00
< a href = "/stack/archive/" class = "button is-link" > { { i18n ( "button.cancel" ) } } < / a >
2017-09-26 12:50:09 +00:00
< / div >
< / div >
< / form >
< / div >
< / section >
{ { end } }