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

EZP-30024: Simplifies object states table #816

Merged
merged 3 commits into from
Jan 31, 2019

Conversation

pawbuj
Copy link
Contributor

@pawbuj pawbuj commented Jan 30, 2019

Question Answer
Tickets EZP-30024 EZP-30055
Bug fix? no
New feature? yes
BC breaks? no
Tests pass? yes
Doc needed? no
License GPL-2.0

Simplifies object states table
ez platform 2019-01-30 10-59-02

Checklist:

  • Coding standards ($ composer fix-cs)
  • Ready for Code Review

@dew326
Copy link
Member

dew326 commented Jan 30, 2019

Can you add some screenshots?

@pawbuj
Copy link
Contributor Author

pawbuj commented Jan 30, 2019

done

<source>Identifier</source>
<target state="new">Identifier</target>
<note>key: tab.details.state_identifier</note>
</trans-unit>
<trans-unit id="69dea878e2926e6a40b3d4e79b1f723d0aa801c7" resname="tab.details.state_name">
<source>Name</source>
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be the same like target?

<note>key: tab.details.state_name</note>
</trans-unit>
<trans-unit id="5c08278a7b80c4aae97e5683688b5b55b5f5b37e" resname="tab.details.change_state">
<source>Name</source>
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't be Change state?

@@ -70,7 +70,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
return array_filter(
$this->objectStateService->loadObjectStates($objectStateGroup),
function (ObjectState $objectState) use ($contentInfo, $contentState) {
return $this->permissionResolver->canUser('state', 'assign', $contentInfo, [$objectState]) && $contentState->id !== $objectState->id;
Copy link
Contributor

Choose a reason for hiding this comment

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

@pawbuj I'm wondering why you had to remove && $contentState->id !== $objectState->id?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

there is an additional requirement ordered by @SylvainGuittard to display a list of all states

Copy link
Contributor

Choose a reason for hiding this comment

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

That is the main goal of this PR.
Users were confused to not see all the object states in the dropdown list. So we display all the states that the user has the rights to change

@pawbuj pawbuj force-pushed the EZP-30024_simplify_states_table branch from b72cbd3 to e9fc3a2 Compare January 30, 2019 11:40
@barbaragr barbaragr self-assigned this Jan 31, 2019
@lserwatka lserwatka merged commit 258e7e1 into master Jan 31, 2019
@lserwatka lserwatka deleted the EZP-30024_simplify_states_table branch January 31, 2019 14:01
konradoboza pushed a commit to konradoboza/ezplatform-admin-ui that referenced this pull request May 29, 2019
* EZP-30024: Simplifies object states table

* fixes translations

* changes color of the set button
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.