PageRenderTime 45ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/usergroup/views/groups/view.php

https://github.com/yii-simon/yii-user-management
PHP | 52 lines | 35 code | 17 blank | 0 comment | 1 complexity | 9f3e81e1e7ac74c9974b85f77a4192d3 MD5 | raw file
  1. <? Yum::register('css/yum.css');
  2. $this->breadcrumbs=array(
  3. Yum::t('Usergroups')=>array('index'),
  4. $model->title,
  5. );
  6. ?>
  7. <h3> <? echo $model->title; ?> </h3>
  8. <p> <? echo $model->description; ?> </p>
  9. <?
  10. if($model->owner)
  11. printf('%s: %s',
  12. Yum::t('Owner'),
  13. CHtml::link($model->owner->username, array(
  14. '//profile/profile/view', 'id' => $model->owner_id)));
  15. printf('<h4> %s </h4>', Yum::t('Participants'));
  16. $this->widget('zii.widgets.CListView', array(
  17. 'dataProvider'=>$model->getParticipantDataProvider(),
  18. 'itemView'=>'_participant',
  19. ));
  20. ?>
  21. <div style="clear: both;"> </div>
  22. <?
  23. printf('<h3> %s </h3>', Yum::t('Messages'));
  24. $this->widget('zii.widgets.CListView', array(
  25. 'dataProvider'=>$model->getMessageDataProvider(),
  26. 'itemView'=>'_message',
  27. ));
  28. ?>
  29. <? echo CHtml::link(Yum::t('Write a message'), '', array(
  30. 'onClick' => "$('#usergroup_message').toggle(500)")); ?>
  31. <div style="display:none;" id="usergroup_message">
  32. <h3> <? echo Yum::t('Write a message'); ?> </h3>
  33. <? $this->renderPartial('_message_form', array('group_id' => $model->id)); ?>
  34. </div>
  35. <div style="clear: both;"> </div>