ADD admim statistics url

This commit is contained in:
jasder 2021-06-11 11:21:44 +08:00
parent a695600b52
commit d2340e30cb
2 changed files with 14 additions and 1 deletions

View File

@ -438,4 +438,14 @@ module ApplicationHelper
return nil if str.blank?
Base64.decode64 str
end
def render_admin_statistics_item
url = Rails.application.config_for(:configuration)["admin_statistics_url"]
return if url.blank?
content_tag(:li) do
sidebar_item(url, "数据统计", icon: 'bar-chart', controller: 'root')
end
end
end

View File

@ -42,8 +42,11 @@
<% end %>
</li>
<li>
<%= sidebar_item('/admins/sidekiq', '定时任务', icon: 'bell', controller: 'root') %>
<%= sidebar_item('/admins/sidekiq', '定时任务', icon: 'bell', controller: 'root') %>
</li>
<%= render_admin_statistics_item %>
<li><%= sidebar_item('/', '返回主站', icon: 'sign-out', controller: 'root') %></li>
</ul>
</nav>