Commit fea33875 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:ambulance: fix(management) Reorder actions

Showing with 31 additions and 30 deletions
+31 -30
...@@ -185,33 +185,41 @@ class management ...@@ -185,33 +185,41 @@ class management
) )
); );
// Add export actions
$exportMenu = array();
foreach ($this->exporters as $action => $exporter) {
$exportMenu[] = new Action(
$action, $exporter['label'], $exporter['image'],
'0', 'export'
);
}
$this->registerAction( $this->registerAction(
new Action( new ActionSubMenu(
'edit', _('Edit'), 'geticon.php?context=actions&icon=document-edit&size=16', 'export', _('Export list'), 'geticon.php?context=actions&icon=document-export&size=16',
'+', 'editEntry' $exportMenu
) )
); );
$this->registerAction( $this->registerAction(
new Action( new Action(
'remove', _('Remove'), 'geticon.php?context=actions&icon=edit-delete&size=16', 'edit', _('Edit'), 'geticon.php?context=actions&icon=document-edit&size=16',
'+', 'removeRequested', '+', 'editEntry'
array('d')
) )
); );
if (!$this->skipCpHandler) { if (!$this->skipCpHandler) {
$this->registerAction( $this->registerAction(
new Action( new Action(
'copy', _('Copy'), 'geticon.php?context=actions&icon=edit-copy&size=16', 'cut', _('Cut'), 'geticon.php?context=actions&icon=edit-cut&size=16',
'+', 'copyPasteHandler', '+', 'copyPasteHandler',
array('r') array('dr')
) )
); );
$this->registerAction( $this->registerAction(
new Action( new Action(
'cut', _('Cut'), 'geticon.php?context=actions&icon=edit-cut&size=16', 'copy', _('Copy'), 'geticon.php?context=actions&icon=edit-copy&size=16',
'+', 'copyPasteHandler', '+', 'copyPasteHandler',
array('dr') array('r')
) )
); );
// TODO: disable paste when there is nothing to paste // TODO: disable paste when there is nothing to paste
...@@ -224,37 +232,30 @@ class management ...@@ -224,37 +232,30 @@ class management
); );
} }
$this->registerAction(
new Action(
'remove', _('Remove'), 'geticon.php?context=actions&icon=edit-delete&size=16',
'+', 'removeRequested',
array('d')
)
);
if (!self::$skipSnapshots && ($config->get_cfg_value('enableSnapshots') == 'TRUE')) { if (!self::$skipSnapshots && ($config->get_cfg_value('enableSnapshots') == 'TRUE')) {
$this->registerAction( $this->registerAction(
new Action( new Action(
'restore', _('Restore snapshot'), 'geticon.php?context=actions&icon=document-restore&size=16', 'snapshot', _('Create snapshot'), 'geticon.php?context=actions&icon=snapshot&size=16',
'*', 'restoreSnapshotDialog', '1', 'createSnapshotDialog'
array('w')
) )
); );
$this->registerAction( $this->registerAction(
new Action( new Action(
'snapshot', _('Create snapshot'), 'geticon.php?context=actions&icon=snapshot&size=16', 'restore', _('Restore snapshot'), 'geticon.php?context=actions&icon=document-restore&size=16',
'1', 'createSnapshotDialog' '*', 'restoreSnapshotDialog',
array('w')
) )
); );
} }
// Add export actions
$exportMenu = array();
foreach ($this->exporters as $action => $exporter) {
$exportMenu[] = new Action(
$action, $exporter['label'], $exporter['image'],
'0', 'export'
);
}
$this->registerAction(
new ActionSubMenu(
'export', _('Export list'), 'geticon.php?context=actions&icon=document-export&size=16',
$exportMenu
)
);
/* Actions from footer are not in any menus and do not need a label */ /* Actions from footer are not in any menus and do not need a label */
$this->registerAction(new HiddenAction('apply', 'applyChanges')); $this->registerAction(new HiddenAction('apply', 'applyChanges'));
$this->registerAction(new HiddenAction('save', 'saveChanges')); $this->registerAction(new HiddenAction('save', 'saveChanges'));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment