1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-22 14:49:42 +02:00

Provide UI to configure Trello connector

This commit is contained in:
HarveyKandola 2018-08-09 15:31:36 +01:00
parent 7206f721f4
commit 9987d29b7b
4 changed files with 715 additions and 701 deletions

File diff suppressed because one or more lines are too long

View file

@ -27,6 +27,10 @@ export default Component.extend(SectionMixin, NotifierMixin, TooltipMixin, {
boards: null, boards: null,
noBoards: false, noBoards: false,
appKey: "", appKey: "",
trelloConfigured: computed('config.board', function () {
return is.not.empty(this.get('appKey'));
}),
boardStyle: computed('config.board', function () { boardStyle: computed('config.board', function () {
let board = this.get('config.board'); let board = this.get('config.board');

View file

@ -4,7 +4,7 @@
<div class="col-12 mb-5"> <div class="col-12 mb-5">
{{#if session.isAdmin}} {{#if session.isAdmin}}
{{#link-to 'customize.integrations' class="btn btn-outline-secondary font-weight-bold"}} {{#link-to 'customize.integrations' class="btn btn-outline-secondary font-weight-bold"}}
Configire Jira Connector Configure Jira Connector
{{/link-to}} {{/link-to}}
{{else}} {{else}}
{{#unless authenticated}} {{#unless authenticated}}

View file

@ -2,34 +2,44 @@
tip="Trello is the visual way to manage your projects and organize anything (https://trello.com)" tip="Trello is the visual way to manage your projects and organize anything (https://trello.com)"
isDirty=(action 'isDirty') onCancel=(action 'onCancel') onAction=(action 'onAction')}} isDirty=(action 'isDirty') onCancel=(action 'onCancel') onAction=(action 'onAction')}}
{{#if authenticated}} {{#if trelloConfigured}}
{{#if noBoards}} {{#if authenticated}}
<p>You have no team boards to share - personal boards are never shown</p> {{#if noBoards}}
{{else}} <p>You have no team boards to share - personal boards are never shown</p>
<div class="form-group"> {{else}}
<label>Select Board</label> <div class="form-group">
{{ui-select id="boards-dropdown" content=boards action=(action 'onBoardChange') optionValuePath="id" optionLabelPath="name" selection=config.board}} <label>Select Board</label>
</div> {{ui-select id="boards-dropdown" content=boards action=(action 'onBoardChange') optionValuePath="id" optionLabelPath="name" selection=config.board}}
<div class="form-group">
<label for="airtable-embed-cod">Select Lists</label>
<div class="section-trello-board" style= {{boardStyle}}>
<div class="section-trello-board-title">{{config.board.name}}</div>
{{#each config.lists as |list|}}
<div class="section-trello-list" {{action 'onListCheckbox' list.id}}>
{{#if list.included}}
<i class="material-icons widget-checkbox checkbox-gray section-trello-list-checkbox">check_box</i>
{{else}}
<i class="material-icons widget-checkbox checkbox-gray section-trello-list-checkbox">check_box_outline_blank</i>
{{/if}}
<span class="trello-list-title">{{list.name}}</span>
</div>
{{/each}}
<div class="clearfix" />
</div> </div>
</div> <div class="form-group">
<label for="airtable-embed-cod">Select Lists</label>
<div class="section-trello-board" style= {{boardStyle}}>
<div class="section-trello-board-title">{{config.board.name}}</div>
{{#each config.lists as |list|}}
<div class="section-trello-list" {{action 'onListCheckbox' list.id}}>
{{#if list.included}}
<i class="material-icons widget-checkbox checkbox-gray section-trello-list-checkbox">check_box</i>
{{else}}
<i class="material-icons widget-checkbox checkbox-gray section-trello-list-checkbox">check_box_outline_blank</i>
{{/if}}
<span class="trello-list-title">{{list.name}}</span>
</div>
{{/each}}
<div class="clearfix" />
</div>
</div>
{{/if}}
{{else}}
<div class="btn btn-primary" {{action 'auth'}}>Authenticate</div>
{{/if}} {{/if}}
{{else}} {{else}}
<div class="btn btn-primary" {{action 'auth'}}>Authenticate</div> {{#if session.isGlobalAdmin}}
{{#link-to 'customize.integrations' class="btn btn-outline-secondary font-weight-bold"}}
Configure Trello Connector
{{/link-to}}
{{else}}
<p>Your Documize administrator needs to configure Trello before usage.</p>
{{/if}}
{{/if}} {{/if}}
{{/section/base-editor}} {{/section/base-editor}}