{title help="Transitions"}{tr}Transitions{/tr}{/title} {tabset} {tab name="{tr}Subset Selection{/tr}"}

{tr}Subset Selection{/tr}

{tr}Type{/tr}
{if $prefs.feature_categories eq 'y'}
{/if}
{if $prefs.feature_categories eq 'y'}
{tr}Category Selection{/tr} {$cat_tree}
{/if}
{tr}Group Selection{/tr}
{tr}Press Enter for each group{/tr}

{tr}At least two elements are required to create transitions. Additional tabs appear once the selection is completed.{/tr}

{jq} var blocks = $('#transition-group-selection, #transition-category-selection'); $(':radio[name=transition_mode]').change( function( e ) { if( $(this).prop('checked') ) { blocks.hide(); blocks.filter( '#transition-' + $(this).val() + '-selection' ).show(); } } ).change(); $('#transition-group-auto') .tiki('autocomplete','groupname') .keypress( function( e ) { if( e.which !== 13 ) { return; } e.preventDefault(); if( $(this).val() === '' ) { return; } $('#transition-group-list').append( $('
  • ').text( $(this).val() ) .append( $('').val( $(this).val() ) ) .append( $('{{icon name=remove class=removeitem}}') ) ); $(this).val(''); } ); $('#transition-group-list .removeitem').on( 'click', function( e ) { $(this).parent().remove(); } ); {/jq} {/tab} {if $available_states|@count > 0} {tab name="{tr}Transitions{/tr}"}

    {tr}Transitions{/tr}

    {* former add_dracula() *} {$headerlib->add_jsfile('lib/dracula/raphael-min.js', true)} {$headerlib->add_jsfile('lib/dracula/graffle.js', true)} {$headerlib->add_jsfile('lib/dracula/graph.js', true)}
    {tr}Draw Transition Diagram{/tr} {jq} $('#graph-draw').click( function( e ) { $(this).hide(); $('#graph-canvas').drawGraph(); return false; } ); {/jq}
    {* table-responsive class cuts off css drop-down menus *} {foreach from=$transitions item=trans} {foreachelse} {/foreach}
    {tr}Label{/tr} {tr}From{/tr} {tr}To{/tr} {tr}Guards{/tr}
    {$trans.name|escape} {$trans.from_label|escape} {if $trans.preserve}{tr}preserved{/tr}{/if} {$trans.to_label|escape} {self_link transitionId=$trans.transitionId action=edit cookietab=4}{$trans.guards|@count|escape}{/self_link} {actions} {strip} {permission_link mode=text type=transition id=$trans.transitionId title=$trans.name} {self_link transitionId=$trans.transitionId action=edit cookietab=3 _menu_text='y' _menu_icon='y' _icon_name='edit'} {tr}Edit{/tr} {/self_link} {self_link transitionId=$trans.transitionId action=remove _icon_name="remove" _menu_text='y' _menu_icon='y'} {tr}Remove{/tr} {/self_link} {/strip} {/actions}
    {tr}No transitions{/tr}
    {/tab} {tab name="{tr}New / Edit{/tr}"}
    {if $selected_transition}

    {tr _0=$selected_transition.name}Edit %0{/tr} ({tr}Create new{/tr})

    {else}

    {tr}New transition{/tr}

    {/if}
    {tr}General{/tr}
    {tr}From{/tr} {foreach from=$available_states item=label key=value}
    {/foreach}
    {tr}To{/tr} {foreach from=$available_states item=label key=value}
    {/foreach}
    {/tab} {if $selected_transition} {tab name="{tr}Guards{/tr}"}

    {tr}Guards{/tr}

    {foreach from=$guards item=guard key=key} {foreachelse} {/foreach}
    {tr}Type{/tr} {tr}Count{/tr} {tr}Members{/tr} {tr}Actions{/tr}
    {$guard.type|escape} {$guard.count|escape}
      {foreach from=$guard.members item=name}
    • {$name|escape}
    • {/foreach}
    {self_link transitionId=$selected_transition.transitionId action=removeguard guard=$key cookietab=4} {icon name='remove'} {/self_link}
    {tr}No guards on this transition.{/tr}

    {tr}New Guard{/tr}

    {tr}General{/tr}
    {tr}States{/tr} {foreach from=$available_states item=label key=value}
    {/foreach}
    {/tab} {/if} {/if} {/tabset}