mirror of https://github.com/rancher/ui.git
89 lines
2.6 KiB
Handlebars
89 lines
2.6 KiB
Handlebars
{{#if title}}
|
|
<section class="header">
|
|
<h1>{{title}}</h1>
|
|
<div class="right-buttons">
|
|
{{#if showCopy}}
|
|
{{copy-to-clipboard
|
|
tooltipText=""
|
|
buttonText="copyToClipboard.tooltip"
|
|
clipboardText=value
|
|
class="with-clip"
|
|
}}
|
|
{{/if}}
|
|
{{#if showUpload}}
|
|
<button class="btn bg-link icon-btn" type="button" {{action "click" }}>
|
|
<i class="icon icon-upload text-small" />
|
|
<span>{{t "inputTextFile.tooltip"}}</span>
|
|
</button>
|
|
{{/if}}
|
|
{{#if showDownload}}
|
|
<button class="btn bg-link icon-btn" type="button" {{action "download" }}>
|
|
<i class="icon icon-download text-small" />
|
|
<span>{{t "generic.download"}}</span>
|
|
</button>
|
|
{{/if}}
|
|
</div>
|
|
|
|
</section>
|
|
{{else if (or showCopy showUpload showDownload)}}
|
|
<div class="text-right mb-20">
|
|
{{#if showCopy}}
|
|
{{copy-to-clipboard
|
|
tooltipText=""
|
|
buttonText="copyToClipboard.tooltip"
|
|
clipboardText=value
|
|
class="with-clip"
|
|
}}
|
|
{{/if}}
|
|
{{#if showUpload}}
|
|
<button class="btn bg-link icon-btn" type="button" {{action "click" }}>
|
|
<i class="icon icon-upload text-small" />
|
|
<span>{{t "inputTextFile.tooltip"}}</span>
|
|
</button>
|
|
{{/if}}
|
|
{{#if showDownload}}
|
|
<button class="btn bg-link icon-btn" type="button" {{action "download" }}>
|
|
<i class="icon icon-download text-small" />
|
|
<span>{{t "generic.download"}}</span>
|
|
</button>
|
|
{{/if}}
|
|
</div>
|
|
{{/if}}
|
|
|
|
<div class="row">
|
|
{{#if loading}}
|
|
<section class="row">
|
|
<div class="text-center">
|
|
<i class="icon icon-spinner icon-spin icon-3x"></i>
|
|
</div>
|
|
</section>
|
|
{{else}}
|
|
<div class="col span-12 m-0 p-0 codemirror-container" style="overflow: auto;">
|
|
{{ivy-codemirror
|
|
placeholder=placeholder
|
|
value=value
|
|
valueUpdated=(if valueUpdated valueUpdated (action (mut value)) )
|
|
isVisible=_isEditorVisible
|
|
options=(hash
|
|
autofocus=true
|
|
theme="monokai"
|
|
tabSize=2
|
|
lineNumbers=true
|
|
mode="yaml"
|
|
readOnly=(if (or (eq modalOpts.type "review") readOnly) true false)
|
|
gutters=gutters
|
|
lint=true
|
|
lineWrapping=true
|
|
viewportMargin=viewportMargin
|
|
extraKeys=(hash
|
|
Tab=tabReplacement
|
|
Shift-Tab=shiftTabReplacement
|
|
)
|
|
)
|
|
}}
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
{{yield "description"}}
|
|
<input type="file" accept="{{actualAccept}}" multiple={{multiple}} class="hide">
|