Changeset 1685

Show
Ignore:
Timestamp:
03/05/10 11:00:47 (5 months ago)
Author:
klemens
Message:

ullAdmin: added user select box

Location:
trunk/plugins/ullCorePlugin
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/plugins/ullCorePlugin/i18n/common.de.xml

    r1632 r1685  
    941941</trans-unit> 
    942942 
     943<trans-unit id="20002"> 
     944<source>User selection</source> 
     945<target>Benutzerauswahl</target> 
     946</trans-unit> 
     947 
    943948 
    944949<trans-unit id="20007"> 
  • trunk/plugins/ullCorePlugin/lib/form/ullUserFilterForm.php

    r1335 r1685  
    88     
    99    $this->getWidget('search')->setAttribute('title', __('Searches for name, username, email, location and department', null, 'ullCoreMessages')); 
     10     
     11    $c = new ullColumnConfiguration; 
     12    $c 
     13      ->setOption('entity_classes', array('UllUser')) 
     14      ->setOption('show_search_box', true) 
     15      ->setWidgetOption('add_empty', true) 
     16      ->setWidgetAttribute('onchange', 'submit()') 
     17      ->setValidatorOption('required', false) 
     18    ; 
     19    $widget = new ullMetaWidgetUllEntity($c, $this); 
     20    $widget->addToFormAs('id'); 
     21     
     22    $this->widgetSchema->setLabels(array( 
     23      'id' => __('User selection', null, 'common'), 
     24    ));       
    1025  } 
    1126} 
  • trunk/plugins/ullCorePlugin/modules/ullAdmin/templates/indexSuccess.php

    r1531 r1685  
    8181     
    8282    <div id="tc_search"> 
    83       <div class="tc_box color_medium_bg"> 
    84         <?php echo form_tag('ullUser/list'); ?> 
     83      <?php echo form_tag('ullUser/list'); ?> 
     84        <div class="tc_box color_medium_bg"> 
    8585        <table> 
    8686          <tr> 
     
    100100          </tr> 
    101101          </table> 
    102         </form>       
    103       </div> 
    104       <div class="tc_box_with_bottom_spacer color_light_bg"> 
    105         <?php echo ull_link_to(__('Advanced search', null, 'common'), 'ullUser/search') ?> 
    106       </div> 
     102               
     103        </div> 
     104        <div class="tc_box_with_bottom_spacer color_light_bg"> 
     105          <?php echo ull_link_to(__('Advanced search', null, 'common'), 'ullUser/search') ?> 
     106        </div> 
     107         
     108        <div class="tc_box_with_bottom_spacer color_medium_bg"> 
     109          <?php echo $form['id']->renderLabel() ?><br /> 
     110          <?php echo $form['id']->render() ?><?php echo submit_image_tag(ull_image_path('search'), array('class' => 'tc_search_quick_top_img')) ?> 
     111        </div>       
     112       
    107113      <!--  
    108114      <div class="tc_search_tag_top color_medium_bg"><h3>Tags</h3></div> 
    109115      <div class="tc_search_tag_bottom color_light_bg"><br /><br /><br /><br />tba<br /></div> 
    110116      --> 
     117      </form> 
    111118    </div> 
    112119     
  • trunk/plugins/ullCorePlugin/modules/ullUser/lib/BaseUllUserActions.class.php

    r1676 r1685  
    7272    //the columns with a dash if the matching boolean is false 
    7373    $this->q->getDoctrineQuery()->addSelect('x.*,'); 
     74     
     75    //filter per entity 
     76    if ($id = $this->filter_form->getValue('id')) 
     77    { 
     78      $this->q->addWhere('x.id = ?', $id); 
     79      $this->user = Doctrine::getTable('UllUser')->findOneById($id); 
     80       
     81      $this->ull_filter->add('filter[id]', __('Owner', null, 'common') . ': ' . $this->user); 
     82    } 
     83    else 
     84    { 
     85      $this->user = null; 
     86    }        
    7487  } 
    7588