Fix bug.
This commit is contained in:
parent
8ff3540744
commit
6b2930860e
|
@ -23,11 +23,15 @@ end
|
||||||
@file_text = File.read(dir_pwd+'/app/views/shared/_side_bar.html.erb').force_encoding('UTF-8')
|
@file_text = File.read(dir_pwd+'/app/views/shared/_side_bar.html.erb').force_encoding('UTF-8')
|
||||||
if !@file_text.include?('<div class="patchfile sub-nav-block icons-megaphone">')
|
if !@file_text.include?('<div class="patchfile sub-nav-block icons-megaphone">')
|
||||||
@indert_index = @file_text.index('</nav>')
|
@indert_index = @file_text.index('</nav>')
|
||||||
@file_text.insert(@indert_index , @patchfile_li_choices)
|
unless @indert_index.nil?
|
||||||
|
@file_text.insert(@indert_index , @patchfile_li_choices)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if !@file_text.include?('patchfile_li')
|
if !@file_text.include?('patchfile_li')
|
||||||
@indert_index = @file_text.index('<li title="<%= t(\'site_info\') %>">')
|
@indert_index = @file_text.index('<li title="<%= t(\'site_info\') %>">')
|
||||||
@file_text.insert(@indert_index , @patchfile_li)
|
unless @indert_index.nil?
|
||||||
|
@file_text.insert(@indert_index , @patchfile_li)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
begin
|
begin
|
||||||
f = File.open(dir_pwd+'/app/views/shared/_side_bar.html.erb','w')
|
f = File.open(dir_pwd+'/app/views/shared/_side_bar.html.erb','w')
|
||||||
|
|
Loading…
Reference in New Issue