list.pt 3.24 KB
<div metal:use-macro="load: ../layout-menu.pt">

    <div metal:fill-slot="content" i18n:domain="user">
        <h1 i18n:translate="">Agent</h1>

        <p tal:condition="not count" i18n:translate="">No agent found.</p>

        <table class="table table-striped table-hover" tal:condition="count">
            <thead>
                <tr>
                    <th i18n:translate="">No.</th>
                    <th i18n:translate="">ID</th>
                    <th i18n:translate="">Status</th>
                    <th i18n:translate="">Description</th>
                    <th i18n:translate="">Job</th>
                    <th i18n:translate="">Startup</th>
                    <th colspan="2"/>
                </tr>
            </thead>
            <tbody>
                <tr tal:repeat="agent agents">
                    <td tal:content="repeat.agent.number"/>
                    <td>
                        <span tal:replace="agent.id"/>
                        <span tal:replace="agent.jalur_ref.nama"/>
                        <span tal:condition="agent.modem">
                            <br/>
                            <span tal:replace="agent.modem.msisdn"/>
                        </span>
                    </td>
                    <td>
                        <span tal:replace="agent.status_ref.ket"/>
                        <span tal:condition="agent.modem">
                            <br/>
                            <span tal:replace="agent.modem.signal"/> %
                        </span>
                    </td>
                    <td>
                        <div tal:condition="agent.modem">
                          <span tal:condition="agent.modem.pulsa">
                            <span tal:replace="agent.modem.pulsa.request"/>
                            <span tal:condition="agent.modem.pulsa.tgl">
                                <span tal:replace="agent.modem.pulsa.tgl.strftime('%-d %B %Y %H:%M')"/>
                                <span tal:replace="agent.modem.pulsa.response">
                            </span>
                            <br/>
                          </span>
                          <span tal:condition="agent.modem.reply_for">
                            Pengirim SMS untuk
                            <span tal:repeat="mp agent.modem.reply_for">
                                <span tal:replace="mp.produk"/>
                            </span>
                            <br/>
                          </span>
                        </div>
                        <span tal:condition="agent.ket">
                            <span tal:replace="agent.ket"/>
                            <br/>
                        </span>
                    </td>
                    <td>
                        <span tal:replace="agent.lastjob.strftime('%-d %B %Y %H:%M:%S')"/>
                    </td>
                    <td>
                        <span tal:replace="agent.startup.strftime('%-d %B %Y %H:%M:%S')"/>
                    </td>
                    <td>
                        <a href="/agent/${agent.id}">Ubah</a>
                        <br/>
                        <a href="/agent/${agent.id}/delete">Hapus</a>
                    </td>
                </tr>
            </tbody>
        </table>

    </div>

</div>