Change Details
| trunk/www/extension/ezworkflowcollection/settings/browse.ini.append.php |
| 1 | <?php /* |
| 2 | |
| 3 | [BrowseSubTreeMultiplexer] |
| 4 | SelectionType=single |
| 5 | ReturnType=NodeID |
| 6 | StartNode=content |
| 7 | |
| 8 | |
| 9 | */ ?> |
| 0 | 10 | |
| 1 | 11 | + Id HeadURL |
| 2 | 12 | |
| trunk/www/extension/ezworkflowcollection/eventtypes/event/subtreemultiplexer/subtreemultiplexertype.php |
| 191 | 191 | } |
| 192 | 192 | } |
| 193 | 193 | |
| 194 | function customWorkflowEventHTTPAction( $http, $action, $workflowEvent ) |
| 195 | { |
| 196 | if ( $action === 'BrowseSubTreeMultiplexer' ) |
| 197 | { |
| 198 | $params = array( |
| 199 | 'action_name' => 'BrowseSubTreeMultiplexer', |
| 200 | 'from_page' => 'workflow/edit/' . $workflowEvent->attribute( 'workflow_id' ), |
| 201 | 'browse_custom_action' => array( |
| 202 | 'name' => 'CustomActionButton[' . $workflowEvent->attribute( 'id' ) . '_AfterBrowse]', |
| 203 | 'value' => '1' |
| 204 | ) |
| 205 | ); |
| 206 | $module = null; |
| 207 | $redirectURL = eZContentBrowse::browse( $params, $module ); |
| 208 | eZHTTPTool::redirect( $redirectURL ); |
| 209 | eZExecution::cleanExit(); |
| 210 | } |
| 211 | elseif ( $action === 'AfterBrowse' && !$http->hasPostVariable( 'BrowseCancelButton' ) ) |
| 212 | { |
| 213 | if ( $http->hasPostVariable( 'SelectedNodeIDArray' ) ) |
| 214 | { |
| 215 | $selection = $http->postVariable( 'SelectedNodeIDArray', array() ); |
| 216 | if ( isset( $selection[0] ) ) |
| 217 | { |
| 218 | $workflowEvent->setAttribute( 'data_int1', (int) $selection[0] ); |
| 219 | } |
| 220 | } |
| 221 | else |
| 222 | { |
| 223 | $workflowEvent->setAttribute( 'data_int1', '' ); |
| 224 | } |
| 225 | } |
| 226 | } |
| 227 | |
| 194 | 228 | } |
| 195 | 229 | |
| 196 | 230 | eZWorkflowEventType::registerEventType( SubTreeMultiplexerType::WORKFLOW_TYPE_STRING, 'subtreemultiplexertype' ); |
| 197 | 231 | |
| 198 | | ?> |
| 232 | ?> |
| trunk/www/extension/ezworkflowcollection/design/admin/templates/workflow/eventtype/edit/event_subtreemultiplexer.tpl |
| 8 | 8 | * @todo use node selector to pick up target subtree node |
| 9 | 9 | * @todo remove current workflow from target workflow list |
| 10 | 10 | *} |
| 11 | {def $target = cond( $event.target_subtree, |
| 12 | fetch( content, node, hash( 'node_id', $event.target_subtree ) ), |
| 13 | false() )} |
| 11 | 14 | <div class="block"> |
| 12 | 15 | |
| 13 | 16 | {* Subtree *} |
| 14 | | <div class="element"> |
| 17 | <div class="block"> |
| 15 | 18 | <label>{'Affected subtree'|i18n( 'extension/ezworkflowcollection' )}</label> |
| 16 | | <input type="text" name="WorkflowEvent_event_subtreemultiplexer_target_subtree_{$event.id}" size="10" value="{$event.target_subtree}"/> |
| 19 | <p> |
| 20 | {if $target|not()} |
| 21 | {'The subtree has not been selected yet, please use the following to choose a node.'|i18n( 'extension/ezworkflowcollection' )} |
| 22 | {else} |
| 23 | <a href={$target.url_alias|ezurl()}>{$target.name|wash()}</a> [{'Node id:'|i18n( 'extension/ezworkflowcollection' )} {$target.node_id}] |
| 24 | {/if} |
| 25 | </p> |
| 26 | <input type="hidden" name="WorkflowEvent_event_subtreemultiplexer_target_subtree_{$event.id}" size="10" value="{$event.target_subtree}"/> |
| 27 | <input type="submit" name="CustomActionButton[{$event.id}_BrowseSubTreeMultiplexer]" class="{cond( $target|not, 'defaultbutton ', '' )}button" value="{'Browse'|i18n( 'extension/ezworkflowcollection' )}" /> |
| 17 | 28 | </div> |
| 18 | 29 | |
| 19 | 30 | {* Workflow to run *} |
| 20 | | <div class="element"> |
| 31 | <div class="block"> |
| 21 | 32 | <label>{'Workflow to run'|i18n( 'design/admin/workflow/eventtype/edit' )}:</label> |
| 22 | 33 | {section show=$event.workflow_type.workflow_list} |
| 23 | 34 | <select name="WorkflowEvent_event_subtreemultiplexer_target_workflow_{$event.id}"> |
| 24 | 35 | |
Download the corresponding diff file