Fix bug.
This commit is contained in:
parent
8ff3540744
commit
6b2930860e
|
@ -23,12 +23,16 @@ end
|
|||
@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">')
|
||||
@indert_index = @file_text.index('</nav>')
|
||||
unless @indert_index.nil?
|
||||
@file_text.insert(@indert_index , @patchfile_li_choices)
|
||||
end
|
||||
end
|
||||
if !@file_text.include?('patchfile_li')
|
||||
@indert_index = @file_text.index('<li title="<%= t(\'site_info\') %>">')
|
||||
unless @indert_index.nil?
|
||||
@file_text.insert(@indert_index , @patchfile_li)
|
||||
end
|
||||
end
|
||||
begin
|
||||
f = File.open(dir_pwd+'/app/views/shared/_side_bar.html.erb','w')
|
||||
f.write(@file_text)
|
||||
|
|
Loading…
Reference in New Issue