{% set config = repository('Plugin\\MypageFileupload42\\Entity\\MypageFileupload42Config').get %}{% if config.mypage_fileupload_enable == 1 and Order.order_no is not empty %}{% block javascript %} <script> $(function() { $('#mypage_fileupload_list_area').appendTo($('.c-contentsArea__cols .c-contentsArea__primaryCol .c-primaryCol')); }); </script> <script> $(function() { // 削除モーダルのhrefとmessageの変更 $('#DeleteModalFileupload').on('shown.bs.modal', function(event) { var target = $(event.relatedTarget); // hrefの変更 $(this).find('[data-method="delete"]').attr('href', target.data('url')); // messageの変更 $(this).find('p.modal-message').text(target.data('message')); }); }); </script>{% endblock %} <div id="mypage_fileupload_list_area"> <div class="card rounded border-0 mb-4"> <div class="card-header"> <div class="row"> <div class="col-8"> <div class="d-inline-block"><span class="card-title">{{ 'アップロードファイル'|trans }}</div> </div> </div> </div> <div class="collapse show ec-cardCollapse"> <div class="card-body"> <div style="margin-bottom:10px;"> <a class="btn btn-ec-regular mr-2 add" href="{{ url('admin_order_mypage_fileupload_new', {order_no: Order.order_no}) }}">{{ '新規追加'|trans }}</a> </div> <table class="table table-striped"> <thead> <tr id="mypage_fileupload_list__list_header"> <th id="mypage_fileupload_list__header_mypage_fileupload_no">{{ 'No.'|trans }}</th> <th id="mypage_fileupload_list__header_mypage_fileupload_name">{{ 'ファイル名'|trans }}</th> <th id="mypage_fileupload_list__header_mypage_fileupload_date">{{ '登録日・更新日'|trans }}</th> <th id="mypage_fileupload_list__header_mypage_fileupload_first">{{ '初期送信'|trans }}</th> <th id="mypage_fileupload_list__header_mypage_fileupload_menu">{{ '編集'|trans }}</th> <th id="mypage_fileupload_list__header_mypage_fileupload_delete">{{ '削除'|trans }}</th> </tr> </thead> <tbody> {% for MypageFileupload42 in MypageFileupload42s %} {% if Order.order_no == MypageFileupload42.order_no %} <tr id="mypage_fileupload_list__item--{{ MypageFileupload42.Id }}"> <td> {{ MypageFileupload42.Id }} </td> <td> <a href="{{ asset(MypageFileupload42.mypage_fileupload_image, 'save_image') }}" target="_blank">{{ MypageFileupload42.mypage_fileupload_image }}</a> </td> <td> {{ '登録日'|trans }}:{{ MypageFileupload42.create_date|date("Y/m/d H:i:s") }} {% if MypageFileupload42.create_date != MypageFileupload42.update_date %} <br /> {{ '更新日'|trans }}:{{ MypageFileupload42.update_date|date("Y/m/d H:i:s") }} {% endif %} </td> <td> {% if MypageFileupload42.fixed == 2 %} {{ '管理画面'|trans }} {% elseif MypageFileupload42.fixed == 3 %} {{ 'マイページ'|trans }} {% endif %} </td> <td> <a class="ec-inlineBtn" href="{{ url('admin_order_mypage_fileupload', {id: MypageFileupload42.Id}) }}">{{ '編集'|trans }}</a> </td> <td> <a class="btn btn-ec-actionIcon" data-bs-toggle="modal" data-bs-target="#DeleteModalFileupload" data-url="{{ url('admin_order_mypage_fileupload_delete', {'id' : MypageFileupload42.id}) }}" data-message="{{ 'admin.common.delete_modal__message'|trans({ "%name%" : MypageFileupload42.mypage_fileupload_image }) }}"> <i class="fa fa-close fa-lg text-secondary"></i> </a> </td> </tr> {% endif %} {% endfor %} </tbody> </table> </div> </div> <!-- 削除モーダル --> <div class="modal fade" id="DeleteModalFileupload" tabindex="-1" role="dialog" aria-labelledby="DeleteModalFileupload" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title fw-bold"> {{ 'admin.common.delete_modal__title'|trans }} </h5> <button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Close"> </button> </div> <div class="modal-body text-start"> <p class="text-start modal-message"><!-- jsでメッセージを挿入 --></p> </div> <div class="modal-footer"> <button class="btn btn-ec-sub" type="button" data-bs-dismiss="modal"> {{ 'admin.common.cancel'|trans }} </button> <a class="btn btn-ec-delete" href="#" {{ csrf_token_for_anchor() }} data-method="delete" data-confirm="false"> {{ 'admin.common.delete'|trans }} </a> </div> </div> </div> </div> </div> </div>{% endif %}