forked from saurabh/orbit4-5
fix orbit bar css for the software
This commit is contained in:
parent
8dac8273f7
commit
a440076916
|
@ -432,7 +432,8 @@ class PagesController < ApplicationController
|
|||
end
|
||||
@layout_html = render_to_string(@file)
|
||||
doc = Nokogiri::HTML(@layout_html, nil, "UTF-8")
|
||||
|
||||
head = doc.css("head")
|
||||
head[0].inner_html = head.inner_html + OrbitHelper.get_css_to_render_in_head
|
||||
@part_partials.each do |key, partial|
|
||||
html_string = ""
|
||||
partial.each do |p|
|
||||
|
|
|
@ -339,6 +339,18 @@ module OrbitHelper
|
|||
!$mobile.blank?
|
||||
end
|
||||
|
||||
def self.render_css_in_head(css=[])
|
||||
@css_to_render_in_head = css
|
||||
end
|
||||
|
||||
def self.get_css_to_render_in_head
|
||||
css_html = ""
|
||||
@css_to_render_in_head.each do |css|
|
||||
css_html = css_html + "<link rel='stylesheet' media='screen' href='/assets/#{css}'>\n"
|
||||
end
|
||||
return css_html
|
||||
end
|
||||
|
||||
# ===============================================================
|
||||
# Breadcrumbs
|
||||
# ===============================================================
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
<%# content_for :page_specific_css do -%>
|
||||
<% if params[:is_frontend_view] == "true" %>
|
||||
<% OrbitHelper.render_css_in_head(["basic/icon","lib/orbit_bar/orbit-bar"]) %>
|
||||
<% else %>
|
||||
<%= stylesheet_link_tag "basic/icon" %>
|
||||
<%= stylesheet_link_tag "lib/orbit_bar/orbit-bar" %>
|
||||
<%# end -%>
|
||||
<% end %>
|
||||
<div id="orbit-bar">
|
||||
<% if current_user.nil? %>
|
||||
<input type="checkbox" id="open-orbit-login">
|
||||
|
|
Loading…
Reference in New Issue