in ui/plugin.js [27:108]
static get template() {
return Polymer.html`
<style include="shared-styles">
a.info {
float: right;
}
.condition-editor,
.condition-previewer {
margin: var(--spacing-s) 0;
padding: var(--spacing-s);
border: 1px dashed var(--border-color);
}
iron-icon {
cursor: pointer;
}
</style>
<div class="conditions-wrapper">
<span>
Startblock:
</span>
<gr-dropdown-list
id="ruleSelector"
value="[[selectedRule.id]]"
on-value-change="_handleSelectedRuleChange"
items="[[rules]]"
text="Add new conditions"
>
</gr-dropdown-list>
<template is="dom-if" if="[[!autoSubmitEnabled]]">
<gr-button link on-click="setUpAutoSubmit">Autosubmit</gr-button>
</template>
<a
href=""
target="_blank"
class="info"
>
<iron-icon
icon="gr-icons:help-outline"
title="read documentation"
></iron-icon>
</a>
</div>
<template is="dom-if" if="[[selectedRule.inputs]]">
<div class="condition-editor">
<template is="dom-repeat" items="[[selectedRule.inputs]]" as="input" index-as="inputIdx">
<template is="dom-if" if="[[_isTextType(input)]]">
<iron-input bind-value="{{input.value}}">
<input placeholder="[[input.placeholder]]" />
</iron-input>
</template>
<template is="dom-if" if="[[_isDropdownType(input)]]">
<gr-dropdown-list
data-idx$="[[inputIdx]]"
on-value-change="_handleRuleDropdownInputChanged"
items="[[_formatInputItems(input.items)]]"
text="[[input.placeholder]]"
>
</gr-dropdown-list>
</template>
</template>
<gr-button link on-click="_addSelectedRule">Add</gr-button>
</div>
</template>
<template is="dom-if" if="[[_computeShowPreview(configuredRules.length)]]">
<div class="condition-previewer">
<p>Added conditions:</p>
<template is="dom-repeat" items="[[configuredRules]]" as="rule" index-as="idx">
<p>
<span>[[rule]]</span>
<iron-icon
icon="gr-icons:close"
title="remove the rule"
data-idx$="[[idx]]"
on-click="removeRule"
></iron-icon>
</p>
</template>
<gr-button link on-click="_confirmRules">Set up</gr-button>
</div>
</template>
`;
}