<?php $counter = 0 ?>

<?php slot('sidebar') ?>
<ul>
<?php foreach($lines as $line): ?>
  <?php if(isset($line['close'])): ?>
    <?php foreach($line['close'] as $dir): ?>
      </ul>
    <?php endforeach; ?>
  <?php endif; ?>
  <?php if(isset($line['open'])): ?>
    <?php foreach($line['open'] as $dir): $counter++ ?>
      <li class="folder">
        <?php echo link_to_function($dir, visual_effect('toggle_blind', $dir.$counter, array('duration' => 0.5))) ?>
      </li>
      <ul style="display:none;" id="<?php echo $dir.$counter ?>">
    <?php endforeach; ?>
  <?php endif; ?>
  <li class="file">
    <?php echo link_to_remote_pane_file($line['filename'], $line['path']) ?>
  </li>
<?php endforeach; ?>
</ul>
<?php end_slot() ?>

<div id="feedback">
  <?php if(isset($file)): ?>
  <h1>SF_ROOT_DIR/<?php echo $filename ?></h1>
  <?php echo $file ?>
  <?php endif; ?>
</div>
    <?php endforeach; ?>
    <?php endif; ?>
  </ul>

  <li class="category"><?php echo link_to_toggle('Controller', 'controller_links') ?></li>
  <ul id="controller_links" style="display:none">
    <?php if(isset($apps)): ?>
    <?php foreach ($apps as $app) : ?>
    <li class="category"><?php echo link_to_toggle($app, 'app_'.$app.'_controller') ?></li>
    <ul id="app_<?php echo $app ?>_controller">
      <?php foreach ($modules[$app] as $module): ?>
      <?php if(isset($module_actions[$app][$module])): ?>
      <li class="category"><?php echo link_to_toggle($module, 'app_'.$app.$module.'_controller') ?></li>
      <ul id="app_<?php echo $app.$module ?>_controller" style="display:none">          
        <?php foreach ($module_actions[$app][$module] as $action_name => $action_file): ?>
        <li class="file_action"><?php echo link_to_remote_pane_file(strtolower($action_name), 'apps/'.$app.'/modules/'.$module.'/actions/'.$action_file.'#function_execute'.$action_name) ?></li>
        <?php endforeach; ?>
      </ul>
      <?php else: ?>
      <li class="category empty"><?php echo $module ?></li>
      <?php endif; ?>
      <?php endforeach; ?>
    </ul>
    <?php endforeach; ?>
    <?php endif; ?>
  </ul>
 
 
</ul>
<?php end_slot() ?>