Commit 0cb8e7c1 authored by Brandonian's avatar Brandonian
Browse files

Re-added 'Content Revisions' page - fixed bug with mass change of states for...

Re-added 'Content Revisions' page - fixed bug with mass change of states for content, added updated column to table display
parent d37bd271
......@@ -20,3 +20,4 @@ Added state_flow_event_fired hook
Add more parameters to state_flow_invoke_event_handlers
#1332530: event's title in the UI
#1328684: drupal_alter in state_flow_load_state_machine instead of setting variable
Re-added 'Content Revisions' page - fixed bug with mass change of states for content, added updated column to table display
\ No newline at end of file
......@@ -139,6 +139,7 @@ function state_flow_admin_nodes() {
$header = array(
'title' => array('data' => t('Title'), 'field' => 'nr.title'),
'type' => array('data' => t('Type'), 'field' => 'n.type'),
'changed' => array('data' => t('Last Updated'), 'field' => 'nr.timestamp'),
'author' => t('Author'),
'status' => t('Status'),
);
......@@ -175,6 +176,7 @@ function state_flow_admin_nodes() {
),
),
'type' => check_plain(node_type_get_name($node)),
'changed' => format_date($node->changed),
'author' => theme('username', array('account' => $node)),
'status' => $state,
);
......
......@@ -42,6 +42,14 @@ function state_flow_menu() {
'file' => 'state_flow.pages.inc',
'type' => MENU_CALLBACK,
);
$items['admin/content/content-revisions'] = array(
'title' => 'Content Revisions',
'page callback' => 'drupal_get_form',
'page arguments' => array('state_flow_content_page'),
'access arguments' => array('administer content revisions'),
'type' => MENU_NORMAL_ITEM | MENU_LOCAL_TASK,
'file' => 'state_flow.admin.inc',
);
return $items;
}
......@@ -55,6 +63,9 @@ function state_flow_permission() {
'title' => t('Manage content workflow'),
'description' => t('Manage the content workflow pages and operations.'),
),
'administer content revisions' => array(
'title' => t('Administer content revisions'),
),
);
}
......@@ -695,7 +706,7 @@ function state_flow_node_revision_operation_change_state_batch_process($nodes, $
$info = array_shift($context['sandbox']['nodes']);
// Store result for post-processing in the finished callback.
$context['results'][] = state_flow_operation_change_helper($info, $updates);
$context['results'][] = state_flow_operation_change_helper($info, $updates['event']);
// Update our progress information.
$context['sandbox']['progress']++;
......
Markdown is supported
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