✏️ 正在编辑: anexos.phtml
路径:
/srv/systems_dir/yuppiecred/application/views/scripts/cliente/anexos.phtml
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<div id="anexos-contratos" style="margin: 5px"> <table> <thead> <tr class="top_list"> <th>Anexo</th> <th width="30"></th> <th width="30"></th> </tr> </thead> <tbody> <?php if (count($this->contratos) || count($this->propostas)): ?> <?php foreach ($this->contratos as $contrato) : ?> <?php $documento = new Model_ContratoAnexo(); $documentos = $documento->listar(array('contrato_id = ?' => $contrato['id'])); ?> <tr class="top_list"> <td colspan="3">Contrato: <a style="display: inline; color: #fff" href="<?php echo $this->url(array( 'controller' => 'contrato', 'action' => 'save', 'id' => $contrato['id'], 'cliente_id' => $contrato['cliente_id'] )) ?>"><?= $contrato['numero_contrato'] ?></a></td> </tr> <?php if (count($documentos)): ?> <?php foreach ($documentos as $registro): $anexoUrl = $this->linkDocumentacao($registro['arquivo']); ?> <tr type="<?php echo $registro['tipo']?>"> <td><?php echo !empty($registro['tipo']) ? $registro['tipo'] : 'Documento' ?></td> <td align="center"> <a style="text-decoration: none;" href="#" class="glyphicon-reg glyphicon-reg-picture" onclick="window.open('<?php echo $anexoUrl; ?>' );" title="Visualizar <?php echo $registro['tipo']?>"></a> </td> <td align="center"> <a href="<?php echo $this->url([ 'controller' => 'cliente', 'action' => 'delete-documento-cliente', 'id' => $registro['id'], 'contrato_id' => $registro['contrato_id'], 'cliente_id' => $contrato['cliente_id'], 'tab' => '4' ]); ?>" class="link_remove"></a> </td> </tr> <?php endforeach; ?> <?php else: ?> <tr> <td colspan="3">Nenhum anexo encontrato para este contrato</td> </tr> <?php endif; ?> <?php endforeach; ?> <?php foreach ($this->propostas as $proposta): ?> <?php $anexo = new Model_ContratoAnexo(); $anexos = $anexo->listar(array('contrato_id = ?' => $proposta['id'])); ?> <tr class="top_list"> <td colspan="3">Proposta: <a style="display: inline; color: #fff" href="<?php echo $this->url(array( 'controller' => 'proposta', 'action' => 'save', 'id' => $proposta['id'])) ?>"><?= $proposta['id'] ?></a></td> </tr> <?php if (count($anexos)): ?> <?php foreach ($anexos as $registro): $anexoUrl = $this->linkDocumentacao($registro['arquivo']); ?> <tr type="<?php echo $registro['tipo']?>"> <td><?php echo !empty($registro['tipo']) ? $registro['tipo'] : 'Documento' ?></td> <td align="center"> <a style="text-decoration: none;" href="#" class="glyphicon-reg glyphicon-reg-picture" onclick="window.open('<?php echo $anexoUrl; ?>' );" title="Visualizar <?php echo $registro['tipo']?>"></a> </td> <td align="center"> <a href="<?php echo $this->url([ 'controller' => 'cliente', 'action' => 'delete-documento-cliente', 'id' => $registro['id'], 'contrato_id' => $registro['contrato_id'], 'cliente_id' => $contrato['cliente_id'], 'tab' => '4' ]); ?>" class="link_remove"></a> </td> </tr> <?php endforeach; ?> <?php else: ?> <tr> <td colspan="3">Nenhum anexo encontrato para esta proposta</td> </tr> <?php endif; ?> <?php endforeach; ?> <?php else: ?> <tr> <td colspan="3">Nenhum resultado encontrato</td> </tr> <?php endif; ?> </tbody> </table> </div>
💾 保存文件
← 返回文件管理器