<% if 'venue_management_contracts' == params[:action] %>

<%= @venue_management.title %>

<% end %> <% @table_fields.each do |f| %> <%= thead(f) %> <% end %> <% @contracts.each do |contract| %> <% if 'venue_management_contracts' != params[:action] %> <% end %> <% end %>
<%= contract.venue_management_main.title %> <% case_no = (contract.case_no.nil? ? t(:empty) : contract.case_no) %> <%= link_to case_no, (@venue_management_page_url.blank? ? "#" : "/#{I18n.locale}"+@venue_management_page_url+"/#{case_no.to_s.strip}-#{contract.id}?method=show_contract"), :target => '_self' %>
<%= contract.display_tags %> <%= contract.display_contractors %> <%= "#{contract.early_rent} / #{contract.operation_rent}" %> <%= contract.display_royalty %> <%= "#{contract.contract_start_date} / #{contract.contract_end_date}" %> <%= contract.deposit_amount_type_exp_date %> <%= contract.renewal_permission.present? ? t("vm_contract.renewal.#{contract.renewal_permission}") : t("vm_contract.renewal.false") %> <%= contract.display_other_commitment %> <%= contract.display_note %>
<% filter_url = request.fullpath.split("?")[1..-1].join("?") %> <% if @venue_management.present? %> <% filter_url.blank? ? (filter_url += "id=#{@venue_management.id}") : (filter_url += "&id=#{@venue_management.id}") %>
<%= content_tag :div, class: "pagination-centered" do %> <%= paginate(@contracts) %>
<%= link_to content_tag(:i, nil, class: "fa fa-download") + " " + t('venue_management.export'), export_admin_venue_management_contracts_path(:format=>'xlsx')+"#{(filter_url.blank? ? '' : ('?'+filter_url))}", class: "btn btn-primary", target: '_blank' %> <% if can_edit_or_delete?(@venue_management) %> <%= link_to content_tag(:i, nil, class: "icons-plus") + " " + t(:add), new_admin_venue_management_contract_path(id: @venue_management.id), class: "btn btn-primary" %> <% end %>
<% end %>
<% else %> <%= content_tag :div, class: "bottomnav clearfix" do (content_tag(:div, class: "pagination-centered") do paginate(@contracts) end) + ('
'.html_safe + link_to(content_tag(:i, nil, class: "fa fa-download") + " " + t('venue_management.export'), export_admin_venue_management_contracts_path(:format=>'xlsx')+"#{(filter_url.blank? ? '' : ('?'+filter_url))}", class: "btn btn-primary", target: '_blank') + '
'.html_safe) end %> <% end %>