workpage.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: Administrator
  5. * Date: 2017/3/17 0017
  6. * Time: 上午 10:52
  7. */
  8. use yii\helpers\Url;
  9. use yii\widgets\LinkPager;
  10. $this->title = '我的工地';
  11. ?>
  12. <?php if(!empty($models)):?>
  13. <?php foreach($models as $mo):?>
  14. <li>
  15. <div class="left">
  16. <a href="<?=Url::toRoute(['building/worklist','id'=>$mo->id])?>"><img src="<?=empty($mo->all->pic)?"":Yii::getAlias('@imgdomain').'/'.$mo->all->pic?>" alt=""></a>
  17. </div>
  18. <div class="center">
  19. <h2><a href="<?=Url::toRoute(['building/worklist','id'=>$mo->id])?>"><?=isset($mo->name)?$mo->name:""?></a></h2>
  20. <p>
  21. <a href="#"><?=$mo->layout?></a>
  22. <a href="#"><?=isset($mo->acreage)?$mo->acreage:""?>㎡</a>
  23. <a href="#"><?=$mo->style?></a>
  24. </p>
  25. <p><?=isset($mo->designer->realname)?$mo->designer->realname:""?>&nbsp;设计师</p>
  26. </div>
  27. <div class="right">
  28. <div class="weui-cell weui-cell_switch">
  29. <div class="weui-cell__ft">
  30. <label for="<?='switchCP'.$mo->id?>" class="weui-switch-cp">
  31. <input id="<?='switchCP'.$mo->id?>" class="weui-switch-cp__input" buildingid="<?=$mo->id?>" buildingposted="<?=$mo->posted?>" type="checkbox" <?=$mo->posted==\common\models\Building::POSTED_YES?"checked='checked'":"" ?>>
  32. <div class="weui-switch-cp__box"></div>
  33. </label>
  34. </div>
  35. </div>
  36. </div>
  37. </li>
  38. <?php endforeach?>
  39. <?php endif?>