diff --git a/app/assets/images/default-site-logo.png b/app/assets/images/default-site-logo.png
new file mode 100644
index 0000000..56bef4b
Binary files /dev/null and b/app/assets/images/default-site-logo.png differ
diff --git a/app/controllers/admin/role_statuses_controller.rb b/app/controllers/admin/role_statuses_controller.rb
index d18d00e..1c95e2b 100644
--- a/app/controllers/admin/role_statuses_controller.rb
+++ b/app/controllers/admin/role_statuses_controller.rb
@@ -42,8 +42,11 @@ class Admin::RoleStatusesController < OrbitMemberController
end
def toggle
- @role_status.disable = @role_status.disable ? false : true
- @role_status.save!
+ role_status = RoleStatus.find(params[:role_status_id]) rescue nil
+ if !role_status.nil?
+ role_status.disable = role_status.disable ? false : true
+ role_status.save!
+ end
render action: :index
end
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index b64a895..193a990 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -20,10 +20,13 @@ module ApplicationHelper
header_file = File.join('../templates', "#{@key}", "/home/header.html.erb")
header_file_html = render :file => header_file
header = Nokogiri::HTML(header_file_html, nil, "UTF-8")
+ site_logo = header.css("img[src='{{logo_url}}']")[0]
+ site_logo.remove if site.site_logo.url.nil?
sub_menu_html = site.sub_menu
html = header.to_s
- html = html.gsub("{{site_name}}",(site.title rescue ""))
- html = html.gsub("%7B%7Blogo_url%7D%7D",(site.site_logo.url.nil? ? "/assets/site-logo.png" : site.site_logo.url))
+ t = site.title rescue ""
+ html = html.gsub("{{site_name}}",(site.display_title_in_frontend ? t : ""))
+ html = html.gsub("%7B%7Blogo_url%7D%7D",(site.site_logo.url.nil? ? "/assets/default-site-logo.png" : site.site_logo.url))
if site.sitemap_menu_in_header
sitemap = Page.find_by_key(:sitemap).name rescue "Sitemap"
sub_menu_html = sub_menu_html + "#{sitemap}"
diff --git a/app/models/attribute_value.rb b/app/models/attribute_value.rb
index 38316eb..dd6fbbf 100644
--- a/app/models/attribute_value.rb
+++ b/app/models/attribute_value.rb
@@ -46,7 +46,7 @@ class AttributeValue
def get_field_value
if (self.attribute_field.markup.eql?("text_field") || self.attribute_field.markup.eql?("text_area"))
- field_value = self.value[I18n.locale]
+ field_value = self.value[I18n.locale].gsub("\r\n","
")
elsif (self.attribute_field.markup.eql?("select") || self.attribute_field.markup.eql?("radio_button"))
field_value = self.attribute_field.markup_value["#{self.value}"][I18n.locale] rescue nil
elsif self.attribute_field.markup.eql?("address")
diff --git a/app/models/member_profile_field_value.rb b/app/models/member_profile_field_value.rb
index 4ae345f..0a72a2b 100644
--- a/app/models/member_profile_field_value.rb
+++ b/app/models/member_profile_field_value.rb
@@ -22,7 +22,7 @@ class MemberProfileFieldValue
index.nil? ? self["val"] : self["val"][index]
# self.member_profile_field.get_data[:cross_lang] ? Hash[VALID_LOCALES.collect{|lang| [lang,self[lang.to_sym]]}] : self["val"] #if !self.member_profile_field.get_data[:cross_lang]
else
- self.member_profile_field.get_data["cross_lang"] =="true" ? self["val"] : Hash[site.valid_locales.collect{|lang| [lang,self[lang.to_sym]]}]
+ self.member_profile_field.get_data["cross_lang"] =="true" ? self["val"].gsub("\r\n","
") : Hash[site.valid_locales.collect{|lang| [lang,self[lang.to_sym].gsub("\r\n","
")]}]
end
when 'select','radio_button','address'
self["val"]
diff --git a/app/models/site.rb b/app/models/site.rb
index f58d7ba..7a54f66 100644
--- a/app/models/site.rb
+++ b/app/models/site.rb
@@ -31,6 +31,7 @@ class Site
field :mobile_bar_color, :type => Array, :default=>[]
field :phone_number, :type => Array,:default=>[]
field :title_always_on, :type => Boolean, :default => false
+ field :display_title_in_frontend, :type => Boolean, :default => true
field :sitemap_menu_in_header, :type => Boolean, :default => false
field :enable_terms_of_use, :type => Boolean, :default => false
field :search,:type => Hash
diff --git a/app/views/admin/role_statuses/_index.html.erb b/app/views/admin/role_statuses/_index.html.erb
index 9ef07b8..53e7bac 100644
--- a/app/views/admin/role_statuses/_index.html.erb
+++ b/app/views/admin/role_statuses/_index.html.erb
@@ -12,5 +12,22 @@
<%= render :partial => 'role_status', :collection => @role_statuses %>
-
+
diff --git a/app/views/admin/role_statuses/_role_status.html.erb b/app/views/admin/role_statuses/_role_status.html.erb
index 09e0925..56cb7a6 100644
--- a/app/views/admin/role_statuses/_role_status.html.erb
+++ b/app/views/admin/role_statuses/_role_status.html.erb
@@ -13,7 +13,7 @@
<% end %>
-