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

Feature/batch edit media #1101

Merged
merged 13 commits into from
Apr 2, 2018
Merged

Conversation

Daniel-KM
Copy link
Contributor

Based on the previous pull request, a page to batch edit media like items and item sets.

@Daniel-KM Daniel-KM force-pushed the feature/batch_edit_media branch 2 times, most recently from bd3cce3 to 614bc64 Compare October 27, 2017 14:06
@Daniel-KM
Copy link
Contributor Author

Rebased.

@Daniel-KM Daniel-KM force-pushed the feature/batch_edit_media branch 3 times, most recently from 99ed8a3 to e94230f Compare November 6, 2017 11:10
@Daniel-KM
Copy link
Contributor Author

Rebased.

@Daniel-KM
Copy link
Contributor Author

Rebased.

@zerocrates zerocrates added this to the April 2 milestone Mar 19, 2018
continue;
}
$collectionAction = $this->has($key)
? $this->get($key)->getAttribute('data-collection-action')
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure of the purpose of data-collection-action here. It's not anywhere else in the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The main point of data-collection-action is to manage remove/replace/append choice automatically for modules.

@@ -31,19 +33,56 @@ $sortHeadings = [
<?php echo $this->sortSelector($sortHeadings); ?>
</div>

<form method="post" id="batch-form" class="disable-unsaved-warning">

<div id="page-actions">
Copy link
Member

Choose a reason for hiding this comment

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

I believe this div should be class="batch-inputs" not id="page-actions"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The initial pr was six month ago... Some water has flowed under the bridges. I fixed it with the new commits.

'options' => [
'label' => 'Set visibility', // @translate
'value_options' => [
'' => '[No change]', // @translate
Copy link
Member

Choose a reason for hiding this comment

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

"[No change]" should be set as default.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Id.

'options' => [
'label' => 'Set openness', // @translate
'value_options' => [
'' => '[No change]', // @translate
Copy link
Member

Choose a reason for hiding this comment

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

"[No change]" should be set as default.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Id.

}

// Set remaining elements according to attribute data-collection-action.
$processeds = [
Copy link
Member

Choose a reason for hiding this comment

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

Why does this array include values already included as "remove" in the code above?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See first comment.

* @return array Associative array of data to replace, to remove and to
* append.
*/
public function preprocessData()
Copy link
Member

Choose a reason for hiding this comment

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

I agree with the logic behind moving this code from the disparate controllers to here. Perhaps it would be better suited as an input filter, but this is workable if that's too much trouble.

Copy link
Contributor Author

@Daniel-KM Daniel-KM Mar 23, 2018

Choose a reason for hiding this comment

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

This pr is associated with two other ones, that have the same aim and the same code: #1100 and #1133. Of course, any of my pr can be improved, by anybody. I'm updating them too.

@Daniel-KM Daniel-KM force-pushed the feature/batch_edit_media branch 2 times, most recently from e120beb to 8336e2a Compare March 23, 2018 20:52
@jimsafley jimsafley merged commit 8336e2a into omeka:develop Apr 2, 2018
@Daniel-KM Daniel-KM deleted the feature/batch_edit_media branch April 3, 2018 05:13
@Daniel-KM
Copy link
Contributor Author

Thanks! Did you pass #1100 too?

@zerocrates
Copy link
Member

The rebasing and so on is confusing Github but yes, I believe we already have all of #1100 by virtue of those changes being part of this PR also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants