<?php Yii::app()->clientScript->scriptMap = array('jquery.js'=>false);?>
* 图片后面为到期时间，空表示永久勋章
<br/>
<?php
    $form = $this->beginWidget('CActiveForm', array(
            'id' => 'medals',
            'htmlOptions' => array(
                'class' => 'form',
            ),
        )
    );
?>

<?php if (array() !== $medals):?>
    <?php foreach ($medals as $medal):?>
        <?php echo ++$i;?> <?php echo CHtml::image($medal['image']);?> <?php $this->widget('zii.widgets.jui.CJuiDatePicker', array('name'=>'medal_'.$medal['id'], 'value'=>$medal['expire'] ? date('Y-m-d', $medal['expire']) : '', 'language' => 'zh_cn', 'options' => array('dateFormat'=>'yy-mm-dd')));?> <?php echo $medal['title'];?> <br/><br/>
    <?php endforeach;?>
    <?php echo CHtml::hiddenField('post', 1);?>
    <?php echo CHtml::ajaxSubmitButton('保存', '', array('success'=>'js:function(status){ if (1 == status) {$.fancybox.close();}}')); ?>
<?php endif;?>

<?php $this->endWidget();?>