6-1-3
建立區塊的樣板檔
您沒有觀看影片的權限
請先登入,登入後,確認您的權限後,即可觀看影片。
- 區塊樣板檔一律放至於
templates/blocks
下
- 由於
'template' => 'action_list.tpl'
,所以建立 templates\blocks\action_list.tpl
,如:
<ul class="list-group">
<{foreach from=$block item=action}>
<li class="list-group-item">
<span class="badge badge-info"><{$action.action_date|substr:0:-3}></span>
<small>名額<{$action.number}>人,已報名<{$action.signup|@count}>人</small>
<div>
<{if $action.enable && $action.number > $action.signup|@count && $xoops_isuser && $action.end_date|strtotime >= $smarty.now}>
<i class="fa fa-check text-success" data-toggle="tooltip" title="報名中" aria-hidden="true"></i>
<{else}>
<i class="fa fa-times text-danger" data-toggle="tooltip" title="無法報名" aria-hidden="true"></i>
<{/if}>
<a href="<{$xoops_url}>/modules/tad_signup/index.php?id=<{$action.id}>"><{$action.title}></a>
</div>
</li>
<{/foreach}>
</ul>
- 列表群組 (List group) 請參考 https://bootstrap.hexschool.com/docs/4.2/components/list-group/
- 至此可更新模組並安裝區塊
link to https://github.com/tadlearn/tad_signup/commit/f08df25b0615506094615bf1e30232e63907dcef \