Changeset 1626

Show
Ignore:
Timestamp:
02/22/10 13:36:04 (5 months ago)
Author:
klemens
Message:

ullFlow: index: workflows are now ordered alphabetically

Location:
trunk/plugins
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/plugins/ullCorePlugin/modules/default/lib/BaseUllSidebarComponents.class.php

    r1211 r1626  
    44{ 
    55  public function executeSidebar(sfRequest $request) { 
    6     $this->flowApps = Doctrine::getTable('UllFlowApp')->findAll(); 
     6    $this->flow_apps = UllFlowAppTable::findAllOrderByName(); 
    77 
    88    if ($request->getParameter('module') == 'ullPhone') 
  • trunk/plugins/ullCorePlugin/modules/default/templates/_sidebar.php

    r1589 r1626  
    3737    <h3><?php echo __('Create', null, 'common') ?></h3> 
    3838    <ul class="sidebar_list"> 
    39     <?php foreach ($flowApps as $app): ?> 
     39    <?php foreach ($flow_apps as $app): ?> 
    4040      <li><?php echo ull_link_to($app->doc_label, 'ullFlow/create?app=' . $app->slug, 'ull_js_observer_confirm=true') ?></li> 
    4141    <?php endforeach ?> 
  • trunk/plugins/ullFlowPlugin/lib/model/doctrine/PluginUllFlowAppTable.class.php

    r1466 r1626  
    4545    return $q->execute()->getFirst(); 
    4646  } 
     47   
     48   
     49  /** 
     50   * Find all apps ordered by name 
     51   *  
     52   * @return Doctrine_Collection 
     53   */ 
     54  public static function findAllOrderByName()  
     55  { 
     56    $q = new UllQuery('UllFlowApp'); 
     57    $q 
     58      ->addSelect('Translation->label') 
     59      ->addSelect('Translation->doc_label') 
     60      ->addSelect('slug') 
     61      ->addOrderBy('Translation->label') 
     62      ->addWhere('Translation->lang = ?',  
     63        substr(sfContext::getInstance()->getUser()->getCulture(), 0, 2)) 
     64    ; 
     65       
     66    $result = $q->execute(); 
     67 
     68    return $result; 
     69  } 
    4770 
    4871} 
  • trunk/plugins/ullFlowPlugin/modules/ullFlow/lib/BaseUllFlowActions.class.php

    r1622 r1626  
    4646    else 
    4747    { 
    48       $this->apps = Doctrine::getTable('UllFlowApp')->findAll(); 
     48      $this->apps = UllFlowAppTable::findAllOrderByName(); 
    4949    } 
    5050