mirror of
https://github.com/wekan/wekan.git
synced 2025-12-15 23:10:13 +01:00
The idea is that by displaying card details in a sidebar stuck on the right of the screen, the mouse had to travel too much before interacting with it. I also don’t want to use the Trello solution (modal) on big screens, because I like the ability to interact with the selected card and with the board at the same time (like in a e-mail client). The solution introduced in this commit consist of opening the card detail in a column next to the minicard list. This commit also fix right sidebar members and labels drag and drop.
51 lines
2 KiB
Text
51 lines
2 KiB
Text
template(name="listBody")
|
|
.minicards.clearfix.js-minicards
|
|
if cards.count
|
|
+inlinedForm(autoclose=false position="top")
|
|
+addCardForm(listId=_id position="top")
|
|
each cards
|
|
.minicard.card.js-minicard(
|
|
class="{{#if isSelected}}is-selected{{/if}}")
|
|
a.minicard-details.clearfix.show(href=absoluteUrl)
|
|
if cover
|
|
.minicard-cover.js-card-cover(style="background-image: url({{cover.url}});")
|
|
if labels
|
|
.minicard-labels
|
|
each labels
|
|
.minicard-label(class="card-label-{{color}}" title="{{name}}")
|
|
.minicard-title= title
|
|
if members
|
|
.minicard-members.js-minicard-members
|
|
each members
|
|
+userAvatar(userId=this size="small" cardId="{{../_id}}")
|
|
.badges
|
|
if comments.count
|
|
.badge(title="{{_ 'card-comments-title' comments.count }}")
|
|
span.badge-icon.icon-sm.fa.fa-comment-o
|
|
.badge-text= comments.count
|
|
if description
|
|
.badge.badge-state-image-only(title=description)
|
|
span.badge-icon.icon-sm.fa.fa-align-left
|
|
if attachments.count
|
|
.badge
|
|
span.badge-icon.icon-sm.fa.fa-paperclip
|
|
span.badge-text= attachments.count
|
|
if currentUser.isBoardMember
|
|
+inlinedForm(autoclose=false position="bottom")
|
|
+addCardForm(listId=_id position="bottom")
|
|
else
|
|
if newCardFormIsVisible.get
|
|
a.open-card-composer.js-open-inlined-form
|
|
i.fa.fa-plus
|
|
| {{_ 'add-card'}}
|
|
|
|
template(name="addCardForm")
|
|
.minicard.js-composer
|
|
.minicard-labels.js-minicard-composer-labels
|
|
.minicard-details.clearfix
|
|
textarea.minicard-composer-textarea.js-card-title(autofocus)
|
|
= getCache
|
|
.minicard-members.js-minicard-composer-members
|
|
.add-controls.clearfix
|
|
button.primary.confirm(type="submit") {{_ 'add'}}
|
|
a.fa.fa-times.dark-hover.cancel.js-close-inlined-form
|