diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index ccc45df0e..a1aea4aeb 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -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 diff --git a/app/views/admins/shared/_sidebar.html.erb b/app/views/admins/shared/_sidebar.html.erb index ad53c661a..82553d9a0 100644 --- a/app/views/admins/shared/_sidebar.html.erb +++ b/app/views/admins/shared/_sidebar.html.erb @@ -42,8 +42,11 @@ <% end %>