diff --git a/app/controllers/admin/venue_management_contracts_controller.rb b/app/controllers/admin/venue_management_contracts_controller.rb
index de86848..6e8d568 100644
--- a/app/controllers/admin/venue_management_contracts_controller.rb
+++ b/app/controllers/admin/venue_management_contracts_controller.rb
@@ -30,6 +30,7 @@ class Admin::VenueManagementContractsController < Admin::VenueAdminController
'vm_contract.note',
]
@contracts = VenueManagementContract.order(updated_at: :desc).page(params[:page]).per(10)
+ @venue_management_page_url = Page.where(:module =>"venue_management").last.url rescue ""
end
def new
diff --git a/app/controllers/admin/venue_management_invitings_controller.rb b/app/controllers/admin/venue_management_invitings_controller.rb
index 3abd408..8424a3f 100644
--- a/app/controllers/admin/venue_management_invitings_controller.rb
+++ b/app/controllers/admin/venue_management_invitings_controller.rb
@@ -22,7 +22,14 @@ class Admin::VenueManagementInvitingsController < Admin::VenueAdminController
'vm_inviting.contractor_manager',
'vm_inviting.bid_result',
]
- @invitings = VenueManagementInviting.order(updated_at: :desc).page(params[:page]).per(10)
+ @tags = @module_app.tags
+ @filter_fields = {}
+ @filter_fields['vm_inviting.type'] = @tags.map{|t| {:title => t.name,:id => t.id} }
+ @invitings = VenueManagementInviting.with_tags(filters("tag")).order(updated_at: :desc).page(params[:page]).per(10)
+ @venue_management_page_url = Page.where(:module =>"venue_management").last.url rescue ""
+ if request.xhr?
+ render :partial => 'index'
+ end
end
def new
diff --git a/app/controllers/admin/venue_managements_controller.rb b/app/controllers/admin/venue_managements_controller.rb
index 04e2820..e1a76ce 100644
--- a/app/controllers/admin/venue_managements_controller.rb
+++ b/app/controllers/admin/venue_managements_controller.rb
@@ -56,6 +56,7 @@ class Admin::VenueManagementsController < Admin::VenueAdminController
@venue_management = VenueManagementMain.find(params[:id])
@venue_management_signups = VenueManagementSignup.where(:venue_management_main_id => params[:id])
+ @site_in_use_locales = Site.first.in_use_locales
filename = @venue_management.title.parameterize.underscore + "_export.xlsx"
respond_to do |format|
format.xlsx {
diff --git a/app/controllers/venue_managements_controller.rb b/app/controllers/venue_managements_controller.rb
index 678c6a2..e988270 100644
--- a/app/controllers/venue_managements_controller.rb
+++ b/app/controllers/venue_managements_controller.rb
@@ -71,11 +71,27 @@ class VenueManagementsController < ApplicationController
'time_now' => time_now,
'contribute_time_range' => VenueManagementMain.time_range(venue_management.contribute_start_date, venue_management.contribute_end_date),
'sign_up_time_range' => VenueManagementMain.time_range(venue_management.signup_start_date, venue_management.signup_end_date),
- 'venue_management_time_range' => VenueManagementMain.time_range(venue_management.venue_management_start_date, venue_management.venue_management_end_date)
+ 'venue_management_time_range' => VenueManagementMain.time_range(venue_management.venue_management_start_date, venue_management.venue_management_end_date),
+ 'params' => params
}
end
-
+ def show_inviting
+ params = OrbitHelper.params
+ venue_management_inviting = VenueManagementInviting.find(params[:uid]) rescue nil
+ {
+ 'venue_management_inviting' => venue_management_inviting,
+ 'params' => params
+ }
+ end
+ def show_contract
+ params = OrbitHelper.params
+ venue_management_contract = VenueManagementContract.find(params[:uid]) rescue nil
+ {
+ 'venue_management_contract' => venue_management_contract,
+ 'params' => params
+ }
+ end
def show
params = OrbitHelper.params
diff --git a/app/views/admin/venue_management_contracts/_index.html.erb b/app/views/admin/venue_management_contracts/_index.html.erb
index 8af69d2..e6ab6c7 100644
--- a/app/views/admin/venue_management_contracts/_index.html.erb
+++ b/app/views/admin/venue_management_contracts/_index.html.erb
@@ -19,7 +19,7 @@
<%= contract.venue_management_main.title %> |
<% end %>
- <%= link_to contract.case_no, admin_venue_management_contract_path(contract.id), :target => '_blank' %>
+ <%= link_to contract.case_no, (@venue_management_page_url.blank? ? "#" : "/#{I18n.locale}"+@venue_management_page_url+"/#{contract.case_no.strip}-#{contract.id}?method=show_contract"), :target => '_self' %>
|
<%= contract.vendor %> |
<%= "#{contract.contract_start_date} / #{contract.contract_end_date}" %> |
- <%= t("vm_contract.renewal.#{contract.renewal_permission}") if contract.renewal_permission.present? %> |
+ <%= contract.renewal_permission.present? ? t("vm_contract.renewal.#{contract.renewal_permission}") : t("vm_contract.renewal.false") %> |
<%= contract.note %> |
<% end %>
diff --git a/app/views/admin/venue_management_invitings/_index.html.erb b/app/views/admin/venue_management_invitings/_index.html.erb
index d5319eb..bddbc60 100644
--- a/app/views/admin/venue_management_invitings/_index.html.erb
+++ b/app/views/admin/venue_management_invitings/_index.html.erb
@@ -19,7 +19,7 @@
<%= inviting.venue_management_main.title %> |
<% end %>
- <%= link_to inviting.case_no, admin_venue_management_inviting_path(inviting.id), :target => '_blank' %>
+ <%= link_to inviting.case_no, (@venue_management_page_url.blank? ? "#" : "/#{I18n.locale}"+@venue_management_page_url+"/#{inviting.case_no.strip}-#{inviting.id}?method=show_inviting"), :target => '_self' %>
diff --git a/app/views/admin/venue_management_invitings/index.html.erb b/app/views/admin/venue_management_invitings/index.html.erb
index be82942..ce7e858 100644
--- a/app/views/admin/venue_management_invitings/index.html.erb
+++ b/app/views/admin/venue_management_invitings/index.html.erb
@@ -1,3 +1,4 @@
+<%= render_filter @filter_fields, "index_table" %>
<%= render 'index' %>
diff --git a/app/views/admin/venue_managements/export.xlsx.axlsx b/app/views/admin/venue_managements/export.xlsx.axlsx
index dcfadc5..493a51b 100644
--- a/app/views/admin/venue_managements/export.xlsx.axlsx
+++ b/app/views/admin/venue_managements/export.xlsx.axlsx
@@ -4,24 +4,37 @@ wb = xlsx_package.workbook
wb.add_worksheet(name: (@venue_management.title.to_s[0..27]+'...')) do |sheet|
- row = [t('venue_management_signup.signup_time')]
+ row = [t(:category)]
- row << t('venue_management_signup.name')
+ row << t('venue_management.manager')
- row << t('venue_management_signup.unit')
+ row << t('venue_management.contractor')
- row << t('venue_management_signup.tel')
+ row << t('venue_management.venue_management_start_date')
- row << t('venue_management_signup.phone')
+ row << t('venue_management.venue_management_end_date')
- row << t('venue_management_signup.fax')
+ row << t('venue_management.title')
row << t('venue_management_signup.address')
- row << t(:email)
-
- row << t('venue_management_signup.note')
+ row << t('venue_management.land_number')
+ row << t('venue_management.area')
+ row << t('venue_management.land_zoning')
+ row << t('venue_management.content')
+ row << t('venue_management.act_place')
+ row << t("link") # Seperate with ';'
+ @site_in_use_locales.each do |locale|
+ row << t("link") + " " + t("url_alt") + " - " + t(locale)
+ end
+ row << t("file_") # Seperate with ';' Example: http://www.example.com/images/example.png; http://www.example.com/images/example2.png"
+ @site_in_use_locales.each do |locale|
+ row << t("file_") + " " + t("description") + " - " + t(locale) #"Seperate with ';' with respective to the links in the link columns. Example : Great view; Nice potrait"
+ end
+ @site_in_use_locales.each do |locale|
+ row << t("file_") + " " + t("alternative") + " - " + t(locale) #"Seperate with ';' with respective to the links in the link columns. Example : example1; example2"
+ end
@venue_management.venue_management_signup_fields.asc(:_id).each do |rf|
if rf.can_muti_lang_input?
@site_in_use_locales.each do |l|
diff --git a/app/views/venue_managements/show_contract.html.erb b/app/views/venue_managements/show_contract.html.erb
new file mode 100644
index 0000000..641491c
--- /dev/null
+++ b/app/views/venue_managements/show_contract.html.erb
@@ -0,0 +1,117 @@
+<% # encoding: utf-8 %>
+<% @@session = session %>
+<%= yield %>
+<%
+ data = action_data
+ @venue_management_contract = data["venue_management_contract"]
+ @params = data['params']
+%>
+
+
+
+
+ <%= t('vm_contract.case_no') %> |
+ <%= @venue_management_contract.venue_management_inviting.case_no %> |
+
+
+ <%= t('vm_inviting.rents') %> |
+ <%= "#{@venue_management_contract.early_rent} / #{@venue_management_contract.operation_rent}" %> |
+
+
+ <%= t('vm_inviting.royalty') %> |
+ <%= @venue_management_contract.royalty %> |
+
+
+
+ <%= t('vm_inviting.house_tax_payer') %> |
+ <%= t("vm_inviting.enums.#{@venue_management_contract.house_tax_payer}") %> |
+
+
+ <%= t('vm_inviting.land_tax_payer') %> |
+ <%= t("vm_inviting.enums.#{@venue_management_contract.land_tax_payer}") %> |
+
+
+ <%= t('vm_contract.renewal_permission') %> |
+ <%= @venue_management_contract.renewal_permission.present? ? t("vm_contract.renewal.#{@venue_management_contract.renewal_permission}") : t("vm_contract.renewal.false") %> |
+
+
+ <%= t('vm_contract.start_end') %> |
+ <%= "#{@venue_management_contract.contract_start_date} ~ #{@venue_management_contract.contract_end_date}" %> |
+
+
+ <%= t('vm_contract.construction_start_end') %> |
+ <%= "#{@venue_management_contract.construction_start_date} ~ #{@venue_management_contract.construction_end_date}" %> |
+
+
+ <%= t('vm_contract.operation_start_end') %> |
+ <%= "#{@venue_management_contract.operation_start_date} ~ #{@venue_management_contract.operation_end_date}" %> |
+
+
+ <%= t('vm_contract.free_period_start_end') %> |
+ <%= "#{@venue_management_contract.free_period_start_date} ~ #{@venue_management_contract.free_period_end_date}" %> |
+
+
+ <%= t('vm_contract.sign_date') %> |
+ <%= @venue_management_contract.sign_date %> |
+
+
+ <%= t('vm_contract.handover_date') %> |
+ <%= @venue_management_contract.handover_date %> |
+
+
+ <%= t('vm_contract.deposit_payment_date') %> |
+ <%= @venue_management_contract.deposit_payment_date %> |
+
+
+ <%= t('vm_contract.deposit_type') %> |
+ <%= @venue_management_contract.deposit_type %> |
+
+
+ <%= t('vm_contract.deposit_exp_date') %> |
+ <%= @venue_management_contract.deposit_exp_date %> |
+
+
+ <%= t('vm_contract.insurance_type') %> |
+ <%= @venue_management_contract.insurance_type %> |
+
+
+ <%= t('vm_contract.insurance_payment_deadline') %> |
+ <%= @venue_management_contract.insurance_payment_deadline %> |
+
+
+ <%= t('vm_contract.insurance_payment_date') %> |
+ <%= @venue_management_contract.insurance_payment_date %> |
+
+
+ <%= t('vm_contract.other_commitment') %> |
+ <%= @venue_management_contract.other_commitment %> |
+
+
+ <%= t('vm_contract.note') %> |
+ <%= @venue_management_contract.note %> |
+
+ <% if !@venue_management_contract.venue_management_files.blank? %>
+
+ <%= t(:file_) %> |
+
+ <% @venue_management_contract.venue_management_files.map do |file| %>
+ <%= link_to (file.title.blank? ? File.basename(file.file.path) : file.title) , file.file.url, {:target => '_blank', :title => file.description} if file.file.file %>
+ <% end %>
+ |
+
+ <% end %>
+ <% if !@venue_management_contract.venue_management_links.blank? %>
+
+ <%= t(:link) %> |
+
+ <% @venue_management_contract.venue_management_links.map do |link| %>
+ <%= link_to (link.title.blank? ? link.url : link.title), link.url, :target => '_blank' %>
+ <% end %>
+ |
+
+ <% end %>
+
+
+
+
+<%= link_to t(:close), 'javascript:window.close();', :class => 'btn btn-primary' %>
diff --git a/app/views/venue_managements/show_data.html.erb b/app/views/venue_managements/show_data.html.erb
index 348bf14..7ce2ba0 100644
--- a/app/views/venue_managements/show_data.html.erb
+++ b/app/views/venue_managements/show_data.html.erb
@@ -9,6 +9,7 @@
@venue_management_time_range = data["venue_management_time_range"]
@contribute_time_range = data["contribute_time_range"]
@contribute_action = data["contribute_action"]
+ @params = data['params']
%>
@@ -88,5 +89,92 @@
+
+
+
+
+
+
+
+
+
+ <% @table_fields = [
+ 'vm_contract.case_no',
+ 'vm_contract.vendor',
+ 'vm_contract.start_end',
+ 'vm_contract.renewal_permission',
+ 'vm_contract.note',
+ ] %>
+ <% @table_fields.each do |th| %>
+ <%=t(th)%> |
+ <% end %>
+
+
+
+ <% @contracts = @venue_management.venue_management_contracts.to_a %>
+ <% @contracts.each do |contract| %>
+
+
+ <%= link_to contract.case_no, "/#{I18n.locale}"+@params[:url]+"/#{contract.case_no.strip}-#{contract.id}?method=show_contract" , :target => '_blank' %>
+ |
+ <%= contract.vendor %> |
+ <%= "#{contract.contract_start_date} / #{contract.contract_end_date}" %> |
+ <%= contract.renewal_permission.present? ? t("vm_contract.renewal.#{contract.renewal_permission}") : t("vm_contract.renewal.false") %> |
+ <%= contract.note %> |
+
+ <% end%>
+
+
+
+
+
+
+
+
+
+ <%
+ @table_fields = [
+ 'vm_inviting.case_no',
+ 'vm_inviting.publish_times',
+ 'vm_inviting.rents',
+ 'vm_inviting.royalty',
+ 'vm_inviting.house_tax_payer',
+ 'vm_inviting.land_tax_payer',
+ 'vm_inviting.contractor_manager',
+ 'vm_inviting.bid_result',
+ ]
+ @invitings = @venue_management.venue_management_invitings.to_a
+ %>
+
+
+
+ <% @table_fields.each do |th| %>
+ <%=t(th)%> |
+ <% end %>
+
+
+
+ <% @invitings.each do |inviting| %>
+
+
+ <%= link_to inviting.case_no, "/#{I18n.locale}"+@params[:url]+"/#{inviting.case_no.strip}-#{inviting.id}?method=show_inviting", :target => '_blank' %>
+ |
+ <%= inviting.publish_times %> |
+ <%= "#{inviting.early_rent} / #{inviting.operation_rent}" %> |
+ <%= inviting.royalty %> |
+ <%= t("vm_inviting.enums.#{inviting.house_tax_payer}") %> |
+ <%= t("vm_inviting.enums.#{inviting.land_tax_payer}") %> |
+ <%= inviting.contractor_manager %> |
+ <%= t("vm_inviting.enums.bid_result.#{inviting.bid_result}") %> |
+
+ <% end %>
+
+
+
+
+
<%= link_to t(:close), 'javascript:window.close();', :class => 'btn btn-primary' %>
diff --git a/app/views/venue_managements/show_inviting.html.erb b/app/views/venue_managements/show_inviting.html.erb
new file mode 100644
index 0000000..1436843
--- /dev/null
+++ b/app/views/venue_managements/show_inviting.html.erb
@@ -0,0 +1,76 @@
+<% # encoding: utf-8 %>
+<% @@session = session %>
+<%= yield %>
+<%
+ data = action_data
+ @venue_management_inviting = data["venue_management_inviting"]
+ @params = data['params']
+%>
+
+
+
+
+ <%= t('vm_inviting.type') %> |
+ <%= @venue_management_inviting.tags.map{|t| t.name}.join(" , ") %> |
+
+
+ <%= t('vm_inviting.case_no') %> |
+ <%= @venue_management_inviting.case_no %> |
+
+
+ <%= t('vm_inviting.publish_times') %> |
+ <%= @venue_management_inviting.publish_times %> |
+
+
+ <%= t('vm_inviting.rents') %> |
+ <%= "#{@venue_management_inviting.early_rent} / #{@venue_management_inviting.operation_rent}" %> |
+
+
+ <%= t('vm_inviting.royalty') %> |
+ <%= @venue_management_inviting.royalty %> |
+
+
+ <%= t('vm_inviting.house_tax_payer') %> |
+ <%= t("vm_inviting.enums.#{@venue_management_inviting.house_tax_payer}") %> |
+
+
+ <%= t('vm_inviting.land_tax_payer') %> |
+ <%= t("vm_inviting.enums.#{@venue_management_inviting.land_tax_payer}") %> |
+
+
+ <%= t('vm_inviting.contractor_manager') %> |
+ <%= @venue_management_inviting.contractor_manager %> |
+
+
+ <%= t('vm_inviting.bid_result') %> |
+ <%= t("vm_inviting.enums.bid_result.#{@venue_management_inviting.bid_result}") %> |
+
+
+ <%= t('vm_inviting.details') %> |
+ <%= @venue_management_inviting.details %> |
+
+ <% if !@venue_management_inviting.venue_management_files.blank? %>
+
+ <%= t(:file_) %> |
+
+ <% @venue_management_inviting.venue_management_files.map do |file| %>
+ <%= link_to (file.title.blank? ? File.basename(file.file.path) : file.title) , file.file.url, {:target => '_blank', :title => file.description} if file.file.file %>
+ <% end %>
+ |
+
+ <% end %>
+ <% if !@venue_management_inviting.venue_management_links.blank? %>
+
+ <%= t(:link) %> |
+
+ <% @venue_management_inviting.venue_management_links.map do |link| %>
+ <%= link_to (link.title.blank? ? link.url : link.title), link.url, :target => '_blank' %>
+ <% end %>
+ |
+
+ <% end %>
+
+
+
+
+<%= link_to t(:close), 'javascript:window.close();', :class => 'btn btn-primary' %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 7c5d01e..06f0281 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -184,10 +184,13 @@ en:
contract_end_date: Contract End
construction_start_date: Construction Start
construction_end_date: Construction End
+ construction_start_end: Construction Duration
operation_start_date: Operation Start
operation_end_date: Operation End
+ operation_start_end: Operation Duration
free_period_start_date: Free Period Start
free_period_end_date: Free Period End
+ free_period_start_end: Free Period Duration
renewal_permission: Renewal Permission
renewal:
'true': 'Yes'
diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml
index c4669a8..f1c178d 100644
--- a/config/locales/zh_tw.yml
+++ b/config/locales/zh_tw.yml
@@ -184,10 +184,13 @@ zh_tw:
contract_end_date: 契約期間結束
construction_start_date: 興建期間開始
construction_end_date: 興建期間結束
+ construction_start_end: 興建期間
operation_start_date: 營運期間開始
operation_end_date: 營運期間結束
+ operation_start_end: 營運期間
free_period_start_date: 免費期間開始
free_period_end_date: 免費期間結束
+ free_period_start_end: 免費期間
renewal_permission: 是否得續約
renewal:
'true': 是
|