diff --git a/app/controllers/property_hires_controller.rb b/app/controllers/property_hires_controller.rb index d54eab1..a606650 100644 --- a/app/controllers/property_hires_controller.rb +++ b/app/controllers/property_hires_controller.rb @@ -170,8 +170,13 @@ class PropertyHiresController < ApplicationController params = OrbitHelper.params @property = Property.where(:uid => params[:uid]).first rescue nil page = OrbitHelper.page rescue Page.where(:page_id => params[:page_id]).first - back_url = (page.url + (params[:slug].present? ? "/#{params[:slug]}#{property.disable_content_page ? "?method=hire" : ""}" : "") rescue "#") - {"back_url"=>back_url} + back_button_text = I18n.t("property_hire.go_to_infos_page") + back_url = (page.url + (params[:slug].present? ? "/#{params[:slug]}" : "") rescue "#") + if @property.disable_content_page + back_url += "?method=hire" if params[:slug].present? + back_button_text = I18n.t("property_hire.back_to_hire_page") + end + {"back_url"=>back_url,"back_button_text"=>back_button_text} end def make_booking booking_p = booking_params diff --git a/app/views/property_hires/hire_success.html.erb b/app/views/property_hires/hire_success.html.erb index 4e1583f..9a9bf4e 100644 --- a/app/views/property_hires/hire_success.html.erb +++ b/app/views/property_hires/hire_success.html.erb @@ -1,8 +1,9 @@ <% data = action_data back_url = data["back_url"] + back_button_text = data["back_button_text"] %>

<%=t("property_hire.the_reservation_was_successfully_sent")%>

- <%=t("property_hire.go_to_infos_page")%> + <%=back_button_text%>
\ No newline at end of file diff --git a/config/locales/en.yml b/config/locales/en.yml index d8fd97c..73d6505 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -5,6 +5,7 @@ en: restful_actions: fields_display_order: "Fields display order" property_hire: + back_to_hire_page: "Back to Reserve Page" apply_default_time_settings: Apply default time settings default_time_settings: Default time settings the_reservation_was_successfully_sent: "The reservation was successfully sent!Please see email to get more information" diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index fdb564b..312e738 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -5,6 +5,7 @@ zh_tw: restful_actions: fields_display_order: "欄位顯示順序" property_hire: + back_to_hire_page: "回到預約頁面" apply_default_time_settings: 套用預設時段設定 default_time_settings: 預設時段設定 the_reservation_was_successfully_sent: "預約成功送出,請查看Email確認預約資訊!"