Skip to content

Commit

Permalink
Merge pull request #4301 from ExpressionEngine/bug/7.x/add-move-actio…
Browse files Browse the repository at this point in the history
…n-to-main-file-listing

Resolved #4291 where the move action was missing from the all files listing
  • Loading branch information
bryannielsen committed May 21, 2024
2 parents b62fca7 + 06250b1 commit f6a9d75
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function renderTableCell($data, $field_id, $file)
'class' => 'js-copy-url-button',
'title' => lang('copy_link'),
);
if (ee('Permission')->can('edit_files') && ee()->uri->segment(3) == 'directory') {
if (ee('Permission')->can('edit_files')) {
$toolbar['move'] = array(
'href' => '',
'title' => lang('move'),
Expand Down
4 changes: 3 additions & 1 deletion system/ee/ExpressionEngine/View/files/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
'text' => lang('copy_link'),
// 'attrs' => ' data-action="copy-link"'
];
if (ee('Permission')->can('edit_files') && ee()->uri->segment(3) == 'directory') {
if (ee('Permission')->can('edit_files')) {
$options[] = [
'value' => "move",
'text' => lang('move'),
Expand Down Expand Up @@ -140,6 +140,8 @@
$moveChoices[$key] = $vars;
}
$selected = $dir_id . '.' . (int) ee('Request')->get('directory_id');
} else {
$moveChoices = $uploadLocationsAndDirectoriesDropdownChoices;
}
$modal_vars = array(
'name' => 'modal-confirm-move-file',
Expand Down

0 comments on commit f6a9d75

Please sign in to comment.