Initial commit
This commit is contained in:
@@ -0,0 +1,153 @@
|
||||
{{#ifEqual mode 'openNewTab'}}
|
||||
{{#if value}}
|
||||
<a href="{{url}}" class="btn btn-{{style}} {{buttonSize}}" title="{{title}}" target="_blank">
|
||||
{{#if iconLeft}}
|
||||
<span class="{{iconLeft}}"></span>
|
||||
{{/if}}
|
||||
{{#if buttonLabel}}
|
||||
<span> {{buttonLabel}} </span>
|
||||
{{/if}}
|
||||
{{#if iconRight}}
|
||||
<span class="{{iconRight}}"></span>
|
||||
{{/if}}
|
||||
</a>
|
||||
{{else}}
|
||||
{{#if valueIsSet}}
|
||||
<span class="none-value">{{translate 'None'}}</span>
|
||||
{{else}}
|
||||
<span class="loading-value">...</span>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/ifEqual}}
|
||||
|
||||
{{#ifEqual mode 'openUrl'}}
|
||||
{{#if value}}
|
||||
<a href="{{url}}" class="btn btn-{{style}} {{buttonSize}}" title="{{title}}">
|
||||
{{#if iconLeft}}
|
||||
<span class="{{iconLeft}}"></span>
|
||||
{{/if}}
|
||||
{{#if buttonLabel}}
|
||||
<span> {{buttonLabel}} </span>
|
||||
{{/if}}
|
||||
{{#if iconRight}}
|
||||
<span class="{{iconRight}}"></span>
|
||||
{{/if}}
|
||||
</a>
|
||||
{{else}}
|
||||
{{#if valueIsSet}}
|
||||
<span class="none-value">{{translate 'None'}}</span>
|
||||
{{else}}
|
||||
<span class="loading-value">...</span>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/ifEqual}}
|
||||
|
||||
{{#ifEqual mode 'openPopup'}}
|
||||
{{#if value}}
|
||||
<button class="btn btn-{{style}} {{buttonSize}}" title="{{title}}" data-action="open-popup">
|
||||
{{#if iconLeft}}
|
||||
<span class="{{iconLeft}}"></span>
|
||||
{{/if}}
|
||||
{{#if buttonLabel}}
|
||||
<span> {{buttonLabel}} </span>
|
||||
{{/if}}
|
||||
{{#if iconRight}}
|
||||
<span class="{{iconRight}}"></span>
|
||||
{{/if}}
|
||||
</button>
|
||||
{{else}}
|
||||
{{#if valueIsSet}}
|
||||
<span class="none-value">{{translate 'None'}}</span>
|
||||
{{else}}
|
||||
<span class="loading-value">...</span>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/ifEqual}}
|
||||
|
||||
{{#ifEqual mode 'openModal'}}
|
||||
{{#if value}}
|
||||
<button class="btn btn-{{style}} {{buttonSize}}" title="{{title}}" data-action="open-modal">
|
||||
{{#if iconLeft}}
|
||||
<span class="{{iconLeft}}"></span>
|
||||
{{/if}}
|
||||
{{#if buttonLabel}}
|
||||
<span> {{buttonLabel}} </span>
|
||||
{{/if}}
|
||||
{{#if iconRight}}
|
||||
<span class="{{iconRight}}"></span>
|
||||
{{/if}}
|
||||
</button>
|
||||
{{else}}
|
||||
{{#if valueIsSet}}
|
||||
<span class="none-value">{{translate 'None'}}</span>
|
||||
{{else}}
|
||||
<span class="loading-value">...</span>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/ifEqual}}
|
||||
|
||||
{{#ifEqual mode 'openEspoModal'}}
|
||||
{{#if value}}
|
||||
<button class="btn btn-{{style}} {{buttonSize}}" title="{{title}}" data-action="espo-modal">
|
||||
{{#if iconLeft}}
|
||||
<span class="{{iconLeft}}"></span>
|
||||
{{/if}}
|
||||
{{#if buttonLabel}}
|
||||
<span> {{buttonLabel}} </span>
|
||||
{{/if}}
|
||||
{{#if iconRight}}
|
||||
<span class="{{iconRight}}"></span>
|
||||
{{/if}}
|
||||
</button>
|
||||
{{else}}
|
||||
{{#if valueIsSet}}
|
||||
<span class="none-value">{{translate 'None'}}</span>
|
||||
{{else}}
|
||||
<span class="loading-value">...</span>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/ifEqual}}
|
||||
|
||||
{{#ifEqual mode 'quickCreate'}}
|
||||
{{#if value}}
|
||||
<button class="btn btn-{{style}} {{buttonSize}}" title="{{title}}" data-action="quick-create">
|
||||
{{#if iconLeft}}
|
||||
<span class="{{iconLeft}}"></span>
|
||||
{{/if}}
|
||||
{{#if buttonLabel}}
|
||||
<span> {{buttonLabel}} </span>
|
||||
{{/if}}
|
||||
{{#if iconRight}}
|
||||
<span class="{{iconRight}}"></span>
|
||||
{{/if}}
|
||||
</button>
|
||||
{{else}}
|
||||
{{#if valueIsSet}}
|
||||
<span class="none-value">{{translate 'None'}}</span>
|
||||
{{else}}
|
||||
<span class="loading-value">...</span>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/ifEqual}}
|
||||
|
||||
{{#ifEqual mode 'runEspoWorkflow'}}
|
||||
{{#if value}}
|
||||
<button class="btn btn-{{style}} {{buttonSize}}" title="{{title}}" data-action="run-workflow">
|
||||
{{#if iconLeft}}
|
||||
<span class="{{iconLeft}}"></span>
|
||||
{{/if}}
|
||||
{{#if buttonLabel}}
|
||||
<span> {{buttonLabel}} </span>
|
||||
{{/if}}
|
||||
{{#if iconRight}}
|
||||
<span class="{{iconRight}}"></span>
|
||||
{{/if}}
|
||||
</button>
|
||||
{{else}}
|
||||
{{#if valueIsSet}}
|
||||
<span class="none-value">{{translate 'None'}}</span>
|
||||
{{else}}
|
||||
<span class="loading-value">...</span>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/ifEqual}}
|
||||
@@ -0,0 +1,12 @@
|
||||
<input
|
||||
type="text"
|
||||
class="main-element form-control"
|
||||
placeholder="{{placeholder}}"
|
||||
data-name="{{name}}"
|
||||
value="{{value}}"
|
||||
{{#if params.maxLength}} maxlength="{{params.maxLength}}"{{/if}}
|
||||
autocomplete="espo-{{name}}"
|
||||
{{#if noSpellCheck}}
|
||||
spellcheck="false"
|
||||
{{/if}}
|
||||
>
|
||||
105
client/custom/modules/link-button/res/templates/fields/list.tpl
Normal file
105
client/custom/modules/link-button/res/templates/fields/list.tpl
Normal file
@@ -0,0 +1,105 @@
|
||||
{{#ifEqual mode 'openNewTab'}}
|
||||
{{#if value}}
|
||||
<a href="{{url}}" class="btn btn-{{style}} label-md" style="height:24px" title="{{title}}" target="_blank">
|
||||
{{#if iconLeft}}
|
||||
<span class="{{iconLeft}}"></span>
|
||||
{{/if}}
|
||||
{{#if buttonLabel}}
|
||||
<span> {{buttonLabel}} </span>
|
||||
{{/if}}
|
||||
{{#if iconRight}}
|
||||
<span class="{{iconRight}}"></span>
|
||||
{{/if}}
|
||||
</a>
|
||||
{{/if}}
|
||||
{{/ifEqual}}
|
||||
{{#ifEqual mode 'openUrl'}}
|
||||
{{#if value}}
|
||||
<a href="{{url}}" class="btn btn-{{style}} label-md" style="height:24px" title="{{title}}">
|
||||
{{#if iconLeft}}
|
||||
<span class="{{iconLeft}}"></span>
|
||||
{{/if}}
|
||||
{{#if buttonLabel}}
|
||||
<span> {{buttonLabel}} </span>
|
||||
{{/if}}
|
||||
{{#if iconRight}}
|
||||
<span class="{{iconRight}}"></span>
|
||||
{{/if}}
|
||||
</a>
|
||||
{{/if}}
|
||||
{{/ifEqual}}
|
||||
{{#ifEqual mode 'openPopup'}}
|
||||
{{#if value}}
|
||||
<button class="btn btn-{{style}} label-md" style="height:24px" title="{{title}}" data-action="open-popup">
|
||||
{{#if iconLeft}}
|
||||
<span class="{{iconLeft}}"></span>
|
||||
{{/if}}
|
||||
{{#if buttonLabel}}
|
||||
<span> {{buttonLabel}} </span>
|
||||
{{/if}}
|
||||
{{#if iconRight}}
|
||||
<span class="{{iconRight}}"></span>
|
||||
{{/if}}
|
||||
</button>
|
||||
{{/if}}
|
||||
{{/ifEqual}}
|
||||
{{#ifEqual mode 'openModal'}}
|
||||
{{#if value}}
|
||||
<button class="btn btn-{{style}} label-md" style="height:24px" title="{{title}}" data-action="open-modal">
|
||||
{{#if iconLeft}}
|
||||
<span class="{{iconLeft}}"></span>
|
||||
{{/if}}
|
||||
{{#if buttonLabel}}
|
||||
<span> {{buttonLabel}} </span>
|
||||
{{/if}}
|
||||
{{#if iconRight}}
|
||||
<span class="{{iconRight}}"></span>
|
||||
{{/if}}
|
||||
</button>
|
||||
{{/if}}
|
||||
{{/ifEqual}}
|
||||
{{#ifEqual mode 'openEspoModal'}}
|
||||
{{#if value}}
|
||||
<button class="btn btn-{{style}} label-md" style="height:24px" title="{{title}}" data-action="espo-modal">
|
||||
{{#if iconLeft}}
|
||||
<span class="{{iconLeft}}"></span>
|
||||
{{/if}}
|
||||
{{#if buttonLabel}}
|
||||
<span> {{buttonLabel}} </span>
|
||||
{{/if}}
|
||||
{{#if iconRight}}
|
||||
<span class="{{iconRight}}"></span>
|
||||
{{/if}}
|
||||
</button>
|
||||
{{/if}}
|
||||
{{/ifEqual}}
|
||||
{{#ifEqual mode 'quickCreate'}}
|
||||
{{#if value}}
|
||||
<button class="btn btn-{{style}} label-md" style="height:24px" title="{{title}}" data-action="quick-create">
|
||||
{{#if iconLeft}}
|
||||
<span class="{{iconLeft}}"></span>
|
||||
{{/if}}
|
||||
{{#if buttonLabel}}
|
||||
<span> {{buttonLabel}} </span>
|
||||
{{/if}}
|
||||
{{#if iconRight}}
|
||||
<span class="{{iconRight}}"></span>
|
||||
{{/if}}
|
||||
</button>
|
||||
{{/if}}
|
||||
{{/ifEqual}}
|
||||
{{#ifEqual mode 'runEspoWorkflow'}}
|
||||
{{#if value}}
|
||||
<button class="btn btn-{{style}} label-md" style="height:24px" title="{{title}}" data-action="run-workflow">
|
||||
{{#if iconLeft}}
|
||||
<span class="{{iconLeft}}"></span>
|
||||
{{/if}}
|
||||
{{#if buttonLabel}}
|
||||
<span> {{buttonLabel}} </span>
|
||||
{{/if}}
|
||||
{{#if iconRight}}
|
||||
<span class="{{iconRight}}"></span>
|
||||
{{/if}}
|
||||
</button>
|
||||
{{/if}}
|
||||
{{/ifEqual}}
|
||||
@@ -0,0 +1 @@
|
||||
<iframe class="link-button-modal" title="URL Preview" src="{{url}}" width="100%" height="100%" frameborder="0"></iframe>
|
||||
Reference in New Issue
Block a user