app/helpers/application_helper.rb
# rubocop:disable Metrics/MethodLength
# Admin view left hand navigation content
disable Metrics/MethodLength
Admin view left hand navigation content
disable Metrics / MethodLength Admin view left hand navigation content
def admin_links_for(community)
    links = [
      {
        :topic => :general,
        :text => t("admin.communities.getting_started.getting_started"),
        :icon_class => icon_class("openbook"),
        :path => admin_getting_started_guide_path,
        :name => "getting_started_guide"
      },
      {
        :id => "admin-support-link",
        :topic => :general,
        :text => t("admin.left_hand_navigation.support"),
        :icon_class => icon_class("help"),
        :path => "mailto:#{APP_CONFIG.support_email}",
        :name => "support",
        :data_uv_trigger => "contact"
      }
    ]
    if APP_CONFIG.external_plan_service_in_use
      links << {
        :topic => :general,
        :text => t("admin.left_hand_navigation.subscription"),
        :icon_class => icon_class("credit_card"),
        :path => admin_plan_path,
        :name => "plan",
      }
    end
    links << {
      :topic => :general,
      :text => t("admin.left_hand_navigation.preview"),
      :icon_class => icon_class("eye"),
      :path => homepage_without_locale_path(big_cover_photo: true, locale: nil),
      :name => "preview",
    }
    links += [
      {
        :topic => :manage,
        :text => t("admin.communities.manage_members.manage_members"),
        :icon_class => icon_class("community"),
        :path => admin_community_community_memberships_path(@current_community, sort: "join_date", direction: "desc"),
        :name => "manage_members"
      },
      {
        :topic => :manage,
        :text => t("admin.emails.new.send_email_to_members"),
        :icon_class => icon_class("send"),
        :path => new_admin_community_email_path(:community_id => @current_community.id),
        :name => "email_members"
      },
      {
        :topic => :manage,
        :text => t("admin.communities.edit_details.invite_people"),
        :icon_class => "ss-adduser",
        :path => new_invitation_path,
        :name => "invite_people"
      },
      {
        :topic => :manage,
        :text => t("admin.communities.transactions.transactions"),
        :icon_class => icon_class("coins"),
        :path => admin_community_transactions_path(@current_community, sort: "last_activity", direction: "desc"),
        :name => "transactions"
      },
      {
        :topic => :configure,
        :text => t("admin.communities.edit_details.community_details"),
        :icon_class => "ss-page",
        :path => admin_details_edit_path,
        :name => "tribe_details"
      },
      {
        :topic => :configure,
        :text => t("admin.communities.edit_details.community_look_and_feel"),
        :icon_class => "ss-paintroller",
        :path => admin_look_and_feel_edit_path,
        :name => "tribe_look_and_feel"
      },
      {
        :topic => :configure,
        :text => t("admin.communities.new_layout.new_layout"),
        :icon_class => icon_class("layout"),
        :path => admin_new_layout_path,
        :name => "new_layout"
      }
    ]
    links += [
      {
        :topic => :configure,
        :text => t("admin.communities.topbar.topbar"),
        :icon_class => icon_class("topbar_menu"),
        :path => admin_topbar_edit_path,
        :name => "topbar"
      }
    ]
    if APP_CONFIG.show_landing_page_admin
      links << {
        :topic => :configure,
        :text => t("admin.landing_page.landing_page"),
        :icon_class => icon_class("home"),
        :path => admin_landing_page_path,
        :name => "landing_page",
      }
    end
    links += [
      {
        :topic => :configure,
        :text => t("admin.categories.index.listing_categories"),
        :icon_class => icon_class("list"),
        :path => admin_categories_path,
        :name => "listing_categories"
      },
      {
        :topic => :configure,
        :text => t("admin.custom_fields.index.listing_fields"),
        :icon_class => icon_class("form"),
        :path => admin_custom_fields_path,
        :name => "listing_fields"
      }
    ]
    links << {
      :topic => :configure,
      :text => t("admin.listing_shapes.index.listing_shapes"),
      :icon_class => icon_class("order_types"),
      :path => admin_listing_shapes_path,
      :name => "listing_shapes"
    }
    if PaypalHelper.paypal_active?(@current_community.id)
      links << {
        :topic => :configure,
        :text => t("admin.communities.paypal_account.paypal_admin_account"),
        :icon_class => icon_class("payments"),
        :path => admin_paypal_preferences_path(),
        :name => "paypal_account"
      }
    end
    links << {
      :topic => :configure,
      :text => t("admin.communities.stripe_payment_gateway.stripe_payment_gateway"),
      :icon_class => icon_class("payments"),
      :path => payment_gateways_admin_community_path(@current_community),
      :name => "payment_gateways"
    }
    links << {
      :topic => :configure,
      :text => t("admin.communities.social_media.social_media"),
      :icon_class => icon_class("social_media"),
      :path => social_media_admin_community_path(@current_community),
      :name => "social_media"
    }
    links << {
      :topic => :configure,
      :text => t("admin.communities.analytics.analytics"),
      :icon_class => icon_class("analytics"),
      :path => analytics_admin_community_path(@current_community),
      :name => "analytics"
    }
    links << {
      :topic => :configure,
      :text => t("admin.communities.edit_text_instructions.edit_text_instructions"),
      :icon_class => icon_class("edit"),
      :path => edit_text_instructions_admin_community_path(@current_community),
      :name => "text_instructions"
    }
    links << {
      :topic => :configure,
      :text => t("admin.left_hand_navigation.emails_title"),
      :icon_class => icon_class("mail"),
      :path => edit_welcome_email_admin_community_path(@current_community),
      :name => "welcome_email"
    }
    links << {
      :topic => :configure,
      :text => t("admin.communities.settings.settings"),
      :icon_class => icon_class("settings"),
      :path => admin_settings_path,
      :name => "admin_settings"
    }
    links
  end
def admin_links_for ( community ) links = [ { :topic => :general , :text => t ( "admin.communities.getting_started.getting_started" ) , :icon_class => icon_class ( "openbook" ) , :path => admin_getting_started_guide_path , :name => "getting_started_guide" } , { :id => "admin-support-link" , :topic => :general , :text => t ( "admin.left_hand_navigation.support" ) , :icon_class => icon_class ( "help" ) , :path => "mailto:#{APP_CONFIG.support_email}" , :name => "support" , :data_uv_trigger => "contact" } ] if APP_CONFIG . external_plan_service_in_use links << { :topic => :general , :text => t ( "admin.left_hand_navigation.subscription" ) , :icon_class => icon_class ( "credit_card" ) , :path => admin_plan_path , :name => "plan" , } end links << { :topic => :general , :text => t ( "admin.left_hand_navigation.preview" ) , :icon_class => icon_class ( "eye" ) , :path => homepage_without_locale_path ( big_cover_photo : true , locale : nil ) , :name => "preview" , } links += [ { :topic => :manage , :text => t ( "admin.communities.manage_members.manage_members" ) , :icon_class => icon_class ( "community" ) , :path => admin_community_community_memberships_path ( @current_community , sort : "join_date" , direction : "desc" ) , :name => "manage_members" } , { :topic => :manage , :text => t ( "admin.emails.new.send_email_to_members" ) , :icon_class => icon_class ( "send" ) , :path => new_admin_community_email_path ( :community_id => @current_community . id ) , :name => "email_members" } , { :topic => :manage , :text => t ( "admin.communities.edit_details.invite_people" ) , :icon_class => "ss-adduser" , :path => new_invitation_path , :name => "invite_people" } , { :topic => :manage , :text => t ( "admin.communities.transactions.transactions" ) , :icon_class => icon_class ( "coins" ) , :path => admin_community_transactions_path ( @current_community , sort : "last_activity" , direction : "desc" ) , :name => "transactions" } , { :topic => :configure , :text => t ( "admin.communities.edit_details.community_details" ) , :icon_class => "ss-page" , :path => admin_details_edit_path , :name => "tribe_details" } , { :topic => :configure , :text => t ( "admin.communities.edit_details.community_look_and_feel" ) , :icon_class => "ss-paintroller" , :path => admin_look_and_feel_edit_path , :name => "tribe_look_and_feel" } , { :topic => :configure , :text => t ( "admin.communities.new_layout.new_layout" ) , :icon_class => icon_class ( "layout" ) , :path => admin_new_layout_path , :name => "new_layout" } ] links += [ { :topic => :configure , :text => t ( "admin.communities.topbar.topbar" ) , :icon_class => icon_class ( "topbar_menu" ) , :path => admin_topbar_edit_path , :name => "topbar" } ] if APP_CONFIG . show_landing_page_admin links << { :topic => :configure , :text => t ( "admin.landing_page.landing_page" ) , :icon_class => icon_class ( "home" ) , :path => admin_landing_page_path , :name => "landing_page" , } end links += [ { :topic => :configure , :text => t ( "admin.categories.index.listing_categories" ) , :icon_class => icon_class ( "list" ) , :path => admin_categories_path , :name => "listing_categories" } , { :topic => :configure , :text => t ( "admin.custom_fields.index.listing_fields" ) , :icon_class => icon_class ( "form" ) , :path => admin_custom_fields_path , :name => "listing_fields" } ] links << { :topic => :configure , :text => t ( "admin.listing_shapes.index.listing_shapes" ) , :icon_class => icon_class ( "order_types" ) , :path => admin_listing_shapes_path , :name => "listing_shapes" } if PaypalHelper . paypal_active? ( @current_community . id ) links << { :topic => :configure , :text => t ( "admin.communities.paypal_account.paypal_admin_account" ) , :icon_class => icon_class ( "payments" ) , :path => admin_paypal_preferences_path ( ) , :name => "paypal_account" } end links << { :topic => :configure , :text => t ( "admin.communities.stripe_payment_gateway.stripe_payment_gateway" ) , :icon_class => icon_class ( "payments" ) , :path => payment_gateways_admin_community_path ( @current_community ) , :name => "payment_gateways" } links << { :topic => :configure , :text => t ( "admin.communities.social_media.social_media" ) , :icon_class => icon_class ( "social_media" ) , :path => social_media_admin_community_path ( @current_community ) , :name => "social_media" } links << { :topic => :configure , :text => t ( "admin.communities.analytics.analytics" ) , :icon_class => icon_class ( "analytics" ) , :path => analytics_admin_community_path ( @current_community ) , :name => "analytics" } links << { :topic => :configure , :text => t ( "admin.communities.edit_text_instructions.edit_text_instructions" ) , :icon_class => icon_class ( "edit" ) , :path => edit_text_instructions_admin_community_path ( @current_community ) , :name => "text_instructions" } links << { :topic => :configure , :text => t ( "admin.left_hand_navigation.emails_title" ) , :icon_class => icon_class ( "mail" ) , :path => edit_welcome_email_admin_community_path ( @current_community ) , :name => "welcome_email" } links << { :topic => :configure , :text => t ( "admin.communities.settings.settings" ) , :icon_class => icon_class ( "settings" ) , :path => admin_settings_path , :name => "admin_settings" } links end
rubocop:disable Metrics/MethodLength
Admin view left hand navigation content
rubocop : disable Metrics / MethodLength Admin view left hand navigation content
community
<not_specific>