From a13fad749e8a75025bb13de87f0170e1ea9e462d Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Tue, 8 Dec 2015 16:18:44 -0500 Subject: Change the board import layout from a popup to a full page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit also removes the “import a single Trello card” as we couldn’t figure out some reasonable use case. We also create a new publication on the server to provide the minimal user profile informations required to display an avatar. --- client/components/import/import.jade | 51 ++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 19 deletions(-) (limited to 'client/components/import/import.jade') diff --git a/client/components/import/import.jade b/client/components/import/import.jade index 74b6ca13..816a0b45 100644 --- a/client/components/import/import.jade +++ b/client/components/import/import.jade @@ -1,39 +1,52 @@ -template(name="importPopup") - if error.get - .warning {{_ error.get}} +template(name="importHeaderBar") + h1 + a.back-btn(href="{{pathFor 'home'}}") + i.fa.fa-chevron-left + | {{_ 'import-board-title'}} + +template(name="import") + .wrapper + if error.get + .warning {{_ error.get}} + +Template.dynamic(template=currentTemplate) + +template(name="importTextarea") form - p: label(for='import-textarea') {{_ getLabel}} - textarea#import-textarea.js-import-json(placeholder="{{_ 'import-json-placeholder'}}" autofocus) + p: label(for='import-textarea') {{_ 'import-board-trello-instruction'}} + textarea.js-import-json(placeholder="{{_ 'import-json-placeholder'}}" autofocus) | {{jsonText}} - if membersMapping - div - a.show-mapping - | {{_ 'import-show-user-mapping'}} input.primary.wide(type="submit" value="{{_ 'import'}}") -template(name="mapMembersPopup") +template(name="importMapMembers") + h2 {{_ 'import-map-members'}} .map-members p {{_ 'import-members-map'}} .mapping-list each members - .mapping - a.source - div.full-name - = fullName - div.username + a.mapping-item.js-select-member(class="{{#if wekan}}filled{{/if}}") + .profile-source + .full-name= fullName + .username | ({{username}}) .wekan if wekan +userAvatar(userId=wekan._id) else - a.member.add-member.js-add-members + a.member.add-member i.fa.fa-plus + //- + Due to the way the flewbox layout is working, we need to set some + invisible items so that the last row items have a consistent width. + See http://jsfiddle.net/Ln4h3c4n/ for an minimal example of the issue. + .mapping-item.ghost-item + .mapping-item.ghost-item + .mapping-item.ghost-item + .mapping-item.ghost-item + .mapping-item.ghost-item form input.primary.wide(type="submit" value="{{_ 'done'}}") - template(name="addMemberPopup") - -template(name="mapMembersAddPopup") +template(name="importMapMembersAddPopup") .select-member p | {{_ 'import-user-select'}} -- cgit v1.2.3-1-g7c22 From b5ebbd2bf95eef6fdc4f7a5fdaf5ef4e3b4ec5b5 Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Sun, 31 Jan 2016 15:13:03 +0100 Subject: Simplify an internal data model used in the importer We used to save the whole user document in a internal data structure while we only needed the userId. --- client/components/import/import.jade | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'client/components/import/import.jade') diff --git a/client/components/import/import.jade b/client/components/import/import.jade index 816a0b45..e10072b4 100644 --- a/client/components/import/import.jade +++ b/client/components/import/import.jade @@ -23,14 +23,14 @@ template(name="importMapMembers") p {{_ 'import-members-map'}} .mapping-list each members - a.mapping-item.js-select-member(class="{{#if wekan}}filled{{/if}}") + a.mapping-item.js-select-member(class="{{#if wekanId}}filled{{/if}}") .profile-source .full-name= fullName .username | ({{username}}) .wekan - if wekan - +userAvatar(userId=wekan._id) + if wekanId + +userAvatar(userId=wekanId) else a.member.add-member i.fa.fa-plus -- cgit v1.2.3-1-g7c22