Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix relative timestamp and alignment in deleted items list #727

Merged
merged 1 commit into from
Nov 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1288,10 +1288,16 @@ input.input-inline {
.board-detail__deleted-list__item {
display: flex;
flex-direction: row;
justify-content: space-between;

* {
flex-basis: 20%;
flex-basis: 44px;
}

.title {
flex-grow: 2;
}
.live-relative-timestamp {
flex-grow: 1;
}
}

Expand Down
41 changes: 19 additions & 22 deletions templates/part.board.sidebarView.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,33 +122,30 @@

</div>

<div id="board-detail-deleted-stacks" class="tab deletedStacksTabView" ng-if="params.tab==2">
<div id="board-detail-deleted-stacks" class="tab deletedStacksTabView" ng-if="params.tab==2">
<h3><?php p($l->t('Deleted stacks')); ?></h3>
<ul class='board-detail__deleted-list'>
<li class='board-detail__deleted-list__item' ng-repeat="deletedStack in stackservice.deleted">
<span class="icon icon-deck"></span>
<span>{{deletedStack.title}}</span>
<span>{{deletedStack.deletedAt | relativeDateFilter }}</span>
<a ng-click="stackUndoDelete(deletedStack)">
<span class="icon icon-history"></span>
</a>
</li>
</ul>
<ul class='board-detail__deleted-list'>
<li class='board-detail__deleted-list__item' ng-repeat="deletedStack in stackservice.deleted">
<span class="icon icon-deck"></span>
<span class="title">{{deletedStack.title}}</span>
<span class="live-relative-timestamp" data-timestamp="{{ deletedStack.deletedAt*1000 }}">{{deletedStack.deletedAt | relativeDateFilter }}</span>
<a ng-click="stackUndoDelete(deletedStack)"><span class="icon icon-history"></span></a>
</li>
</ul>

<h3><?php p($l->t('Deleted cards')); ?></h3>

<ul class='board-detail__deleted-list'>
<li class='board-detail__deleted-list__item' ng-repeat="deletedCard in cardservice.deleted">
<span class="icon icon-deck"></span>
<span>{{deletedCard.title}}</span>
<span>{{stackservice.tryAllThenDeleted(deletedCard.stackId).title}}</span>
<span>{{deletedCard.deletedAt | relativeDateFilter }}</span>
<a ng-click="cardOrCardAndStackUndoDelete(deletedCard)">
<span class="icon icon-history"></span>
</a>
</li>
</ul>
</div>
<li class='board-detail__deleted-list__item' ng-repeat="deletedCard in cardservice.deleted">
<span class="icon icon-deck"></span>
<span class="title">{{deletedCard.title}} ({{stackservice.tryAllThenDeleted(deletedCard.stackId).title}})</span>
<span class="live-relative-timestamp" data-timestamp="{{ deletedCard.deletedAt*1000 }}">{{deletedCard.deletedAt | relativeDateFilter }}</span>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the live-relative-timestamp functionality new?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a class the Nextcloud server uses to update the relative timestamp regularly.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was there any mistake with the previous implementation except for not using this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All fine. 😉

<a ng-click="cardOrCardAndStackUndoDelete(deletedCard)">
<span class="icon icon-history"></span>
</a>
</li>
</ul>
</div>

<div id="board-detail-activity" class="tab activityTabView" ng-if="isTimelineEnabled() && params.tab==4">
<activity-component ng-if="boardservice.getCurrent()" type="deck_board" element="boardservice.getCurrent()"></activity-component>
Expand Down