-
Notifications
You must be signed in to change notification settings - Fork 57
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
EZP-29729: As an editor, I want to have access to all my drafts #684
Conversation
Nice one @adamwojs, will there be link from dashboard to this as well when there is more then 10 drafts? |
Yes, this is the idea. |
|
||
{% block content %} | ||
<div class="row align-items-stretch ez-main-row"> | ||
<section class="container mt-4"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, Could you please add offset px-5
for consistency with the rest of views with tables
Hi @adamwojs this would be the icon for drafts view. |
DatasetFactory $datasetFactory, | ||
FormFactory $formFactory, | ||
SubmitHandler $submitHandler, | ||
int $defaultPaginationLimit) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
int $defaultPaginationLimit) | |
int $defaultPaginationLimit | |
) { |
new ArrayAdapter($contentDraftsDataset->getContentDrafts()) | ||
); | ||
$pagination->setMaxPerPage($this->defaultPaginationLimit); | ||
$pagination->setCurrentPage(min(max($currentPage, 1), $pagination->getNbPages())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we care that the user entered ex. -1 as page number, maybe we should inform him about the wrong page number?
@@ -88,6 +89,7 @@ public function mapConfig(array &$scopeSettings, $currentScope, ContextualizerIn | |||
'content_policy_limit', | |||
'notification_limit', | |||
'user_settings_limit', | |||
'my_drafts_limit', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have content_draft_limit
and my_drafts_limit
. We should operate with one name, like in above.
</thead> | ||
<tbody> | ||
{% if pager.count is same as(0) %} | ||
<tr> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing indentation
</td> | ||
</tr> | ||
{% else %} | ||
{% for row in pager.currentPageResults %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing indentation
|
||
{% if pager.haveToPaginate %} | ||
<div class="row justify-content-center align-items-center mb-2 mt-2 ez-pagination__spacing"> | ||
<span class="ez-pagination__text"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CS
); | ||
|
||
return [ | ||
'id' => implode(':', [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this could be a Value Object, maybe in lib/UI/Value/Content
?
PR updated according to @mikadamczyk suggestions. |
@adamwojs can we proceed with QA here? |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- If user doesn't have Content/Versionread policy
Drafts
tab on Dashboard is hidden. But on user menuDrafts
are still displayed.
PR updated according to @barbaragr suggestions 😉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great :)
The only place when as an editor I can go back go to the editing of new content item draft is a "Dashboard" > "Me" > "Drafts". Unfortunately, this is not possible when I have more than 10 drafts at once.
This PR solves this issue by adding "My drafts" list in the user context menu (similar to the legacy administration panel).
Checklist:
$ composer fix-cs
)