From 6f397868ecd1924c223cc4e2f36d206ca3b4d259 Mon Sep 17 00:00:00 2001 From: saurabhbhatia Date: Mon, 9 Dec 2013 15:18:11 +0800 Subject: [PATCH] Added field for colour setting --- app/models/site.rb | 1 + app/views/admin/sites/responsive_setting.html.erb | 2 +- app/views/mobile/_header.mobile.erb | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/models/site.rb b/app/models/site.rb index a31e568a..757dd305 100644 --- a/app/models/site.rb +++ b/app/models/site.rb @@ -45,6 +45,7 @@ class Site field :google_analytics field :address field :phone_number, :type => Hash,:default=>{} + field :mobile_bar_color, :type => String field :mobile_on, :type => Boolean, :default => false diff --git a/app/views/admin/sites/responsive_setting.html.erb b/app/views/admin/sites/responsive_setting.html.erb index 10b7fe7d..007b5caa 100644 --- a/app/views/admin/sites/responsive_setting.html.erb +++ b/app/views/admin/sites/responsive_setting.html.erb @@ -35,7 +35,7 @@ <% if @site.mobile_icon.file.present? %> <%= image_tag( @site.mobile_icon, :size=>"120x120") rescue ''%> <% else %> - <%= image_tag "orbit-logo.png",:class => "pull-left upload-picture"%> + <%= image_tag asset_path('mobile/logo.png'),:class => "pull-left upload-picture"%> <% end %>
diff --git a/app/views/mobile/_header.mobile.erb b/app/views/mobile/_header.mobile.erb index f0120102..c874c196 100644 --- a/app/views/mobile/_header.mobile.erb +++ b/app/views/mobile/_header.mobile.erb @@ -1,6 +1,10 @@

+ <% if @site.mobile_icon.present?%> <%= image_tag( @site.mobile_icon, :size=>"120x120") rescue '' %> + <% else %> + <%= image_tag asset_path('mobile/logo.png')%> + <% end %>

<%= link_to mobile_dialog_language_path(:app => params[:app]), {:class => "ui-btn-right language", "data-iconpos" => "notext", "data-icon" => "search", "data-rel" => "dialog"} do %>