{% set config = repository('Plugin\\MypageFileupload42\\Entity\\MypageFileupload42Config').get %}
{% if config.mypage_fileupload_enable == 1 %}
<script>
$(function() {
$('#mypage_fileupload_list_area').appendTo($('.ec-orderRole__detail .ec-orderMails'));
});
</script>
<div id="mypage_fileupload_list_area">
<div class="ec-mypage_fileupload">
<div class="ec-rectHeading">
<h2>{{ 'アップロードファイル'|trans }}</h2>
</div>
<div>
<a class="ec-inlineBtn--top" href="{{ url('mypage_fileupload_new', {order_no: Order.order_no}) }}">{{ '新規追加'|trans }}</a>
</div>
<div>
<table class="table table-striped" style="width:100%;margin-bottom:30px;">
<thead>
<tr id="mypage_fileupload_list__list_header">
<th id="mypage_fileupload_list__header_mypage_fileupload_no">No.</th>
<th id="mypage_fileupload_list__header_mypage_fileupload_name">{{ 'ファイル名'|trans }}</th>
<th id="mypage_fileupload_list__header_url">{{ '登録日・更新日'|trans }}</th>
<th id="mypage_fileupload_list__header_menu_box">{{ '編集'|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 style="word-break: break-all;">
<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>
<a class="ec-inlineBtn" href="{{ url('mypage_fileupload', {id: MypageFileupload42.Id}) }}">{{ '編集'|trans }}</a>
</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
</div>
</div>
<div class="ec-mypage_fileupload">
<div class="ec-rectHeading">
<h2>{{ '店舗からのファイル'|trans }}</h2>
</div>
<div>
<table class="table table-striped" style="width:100%;margin-bottom:30px;">
<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_image">{{ 'ファイル名'|trans }}</th>
<th id="mypage_fileupload_list__header_url">{{ '登録日・更新日'|trans }}</th>
</tr>
</thead>
<tbody>
{% for MypageFileupload42 in AdminFileuploads %}
{% if Order.order_no == MypageFileupload42.order_no %}
<tr id="mypage_fileupload_list__item--{{ MypageFileupload42.Id }}">
<td>
{{ MypageFileupload42.Id }}
</td>
<td style="word-break: break-all;">
<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>
</tr>
<tr>
<td colspan="3" style="border-top:none;">
【メッセージ】
<div style="margin-bottom:10px;">
{{ MypageFileupload42.comment|raw|nl2br }}
</div>
</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{% endif %}