This commit is contained in:
BoHung Chiu 2021-10-20 11:33:40 +08:00
parent 8ff3540744
commit 6b2930860e
1 changed files with 6 additions and 2 deletions

View File

@ -23,11 +23,15 @@ 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>')
@file_text.insert(@indert_index , @patchfile_li_choices)
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\') %>">')
@file_text.insert(@indert_index , @patchfile_li)
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')