:::

6-1-3 建立區塊的樣板檔

您沒有觀看影片的權限

您沒有觀看影片的權限

請先登入,登入後,確認您的權限後,即可觀看影片。

  1. 區塊樣板檔一律放至於 templates/blocks
  2. 由於 '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>

     

  3. 列表群組 (List group) 請參考 https://bootstrap.hexschool.com/docs/4.2/components/list-group/
  4. 至此可更新模組並安裝區塊

link to https://github.com/tadlearn/tad_signup/commit/f08df25b0615506094615bf1e30232e63907dcef \


:::

搜尋

QR Code 區塊

https%3A%2F%2Fwww.tad0616.net%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbsn%3D48%26tbdsn%3D1728

書籍目錄

展開 | 闔起

線上使用者

27人線上 (14人在瀏覽線上書籍)

會員: 0

訪客: 27

更多…