diff --git a/client/components/cards/resultCard.jade b/client/components/cards/resultCard.jade new file mode 100644 index 000000000..b1fabd9b6 --- /dev/null +++ b/client/components/cards/resultCard.jade @@ -0,0 +1,23 @@ +template(name="resultCard") + .result-card-wrapper + a.minicard-wrapper.card-title(href=card.absoluteUrl) + +minicard(this) + //= card.title + ul.result-card-context-list + li.result-card-context(title="{{_ 'board'}}") + +viewer + = getBoard.title + li.result-card-context.result-card-context-separator + = ' ' + | {{_ 'context-separator'}} + = ' ' + li.result-card-context(title="{{_ 'swimlane'}}") + +viewer + = getSwimlane.title + li.result-card-context.result-card-context-separator + = ' ' + | {{_ 'context-separator'}} + = ' ' + li.result-card-context(title="{{_ 'list'}}") + +viewer + = getList.title diff --git a/client/components/cards/resultCard.js b/client/components/cards/resultCard.js new file mode 100644 index 000000000..3b5da12cf --- /dev/null +++ b/client/components/cards/resultCard.js @@ -0,0 +1,11 @@ +Template.resultCard.helpers({ + userId() { + return Meteor.userId(); + }, +}); + +BlazeComponent.extendComponent({ + events() { + return [{}]; + }, +}).register('resultCard'); diff --git a/client/components/cards/resultCard.styl b/client/components/cards/resultCard.styl new file mode 100644 index 000000000..def39a4d3 --- /dev/null +++ b/client/components/cards/resultCard.styl @@ -0,0 +1,21 @@ +.result-card-list-wrapper + margin: 1rem + border-radius: 5px + padding: 1.5rem + padding-top: 0.75rem + display: inline-block + min-width: 250px + max-width: 350px + +.result-card-wrapper + margin-top: 0 + margin-bottom: 10px + +.result-card-context + display: inline-block + +.result-card-context-separator + font-weight: bold + +.result-card-context-list + margin-bottom: 0.7rem diff --git a/client/components/main/globalSearch.jade b/client/components/main/globalSearch.jade index 325ff80b7..a09c7fde8 100644 --- a/client/components/main/globalSearch.jade +++ b/client/components/main/globalSearch.jade @@ -29,28 +29,7 @@ template(name="globalSearch") span.global-search-error-messages | {{_ msg.tag msg.value }} each card in results - .global-search-card-wrapper - a.minicard-wrapper.card-title(href=card.absoluteUrl) - +minicard(card) - //= card.title - ul.global-search-context-list - li.global-search-context(title="{{_ 'board'}}") - +viewer - = card.getBoard.title - li.global-search-context.global-search-context-separator - = ' ' - | {{_ 'context-separator'}} - = ' ' - li.global-search-context(title="{{_ 'swimlane'}}") - +viewer - = card.getSwimlane.title - li.global-search-context - = ' ' - | {{_ 'context-separator'}} - = ' ' - li.global-search-context(title="{{_ 'list'}}") - +viewer - = card.getList.title + +resultCard(card) else .global-search-instructions h1 Search Operators