Sha256: 39d8632bb4a7900ab4d9ea1e44ebbda7b4ed9a82040ecdec63fa391cc68623a7

Contents?: true

Size: 1.7 KB

Versions: 31

Compression:

Stored size: 1.7 KB

Contents

module PublishMyData
  module SubnavigationHelper

    def submenu_link text, url, highlight_when
      unless (highlight_when.nil?) 
        css_class = highlight_when == @highlight_in_menu ? "pmd_selected" : ""
      end
      link_to text, url, class: css_class
    end

    def standard_menu_catalogue
      {
        title: "Catalogue",
        css_class: "pmd_nav_sub_catalogue",
        target: publish_my_data.datasets_path,
        highlight: "catalogue",
        items: [
          {
            title: "Datasets by theme",
            target: '/themes',
            highlight: "browse"
          }
        ]
      }
    end

    def standard_menu_tools
      {
        title: "Tools",
        css_class: "pmd_nav_sub_tools",
        target: publish_my_data.tools_path,
        highlight: "tools",
        items: [
          {
            title: "SPARQL endpoint",
            target: publish_my_data.sparql_endpoint_path,
            highlight: "endpoint"
          }
        ]
      }
    end

    def standard_menu_docs
      {
        title: "Documentation",
        css_class: "pmd_nav_sub_api",
        target: publish_my_data.api_docs_path,
        highlight: "documentation",
        items: []
      }
    end

    def standard_menu_pmd
      {
        title: "PublishMyData",
        css_class: "pmd_nav_sub_pmd",
        target: publish_my_data.about_pmd_path,
        highlight: "about pmd",
        items: [
          {
            title: "Source (Github)",
            target: "http://github.com/Swirrl/publish_my_data",
            highlight: nil
          },
          {
            title: "Swirrl.com",
            target: "http://swirrl.com",
            highlight: nil
          }
        ]
      }
    end

  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
publish_my_data-1.3.25 app/helpers/publish_my_data/subnavigation_helper.rb
publish_my_data-1.3.24 app/helpers/publish_my_data/subnavigation_helper.rb
publish_my_data-1.3.23 app/helpers/publish_my_data/subnavigation_helper.rb
publish_my_data-1.3.22 app/helpers/publish_my_data/subnavigation_helper.rb
publish_my_data-1.3.21 app/helpers/publish_my_data/subnavigation_helper.rb
publish_my_data-1.3.20 app/helpers/publish_my_data/subnavigation_helper.rb
publish_my_data-1.3.19 app/helpers/publish_my_data/subnavigation_helper.rb
publish_my_data-1.3.18 app/helpers/publish_my_data/subnavigation_helper.rb
publish_my_data-1.3.17 app/helpers/publish_my_data/subnavigation_helper.rb
publish_my_data-1.3.16 app/helpers/publish_my_data/subnavigation_helper.rb
publish_my_data-1.3.15 app/helpers/publish_my_data/subnavigation_helper.rb
publish_my_data-1.3.14 app/helpers/publish_my_data/subnavigation_helper.rb
publish_my_data-1.3.13 app/helpers/publish_my_data/subnavigation_helper.rb
publish_my_data-1.3.12 app/helpers/publish_my_data/subnavigation_helper.rb
publish_my_data-1.3.11 app/helpers/publish_my_data/subnavigation_helper.rb
publish_my_data-1.3.10 app/helpers/publish_my_data/subnavigation_helper.rb
publish_my_data-1.3.9 app/helpers/publish_my_data/subnavigation_helper.rb
publish_my_data-1.3.8 app/helpers/publish_my_data/subnavigation_helper.rb
publish_my_data-1.3.7 app/helpers/publish_my_data/subnavigation_helper.rb
publish_my_data-1.3.6 app/helpers/publish_my_data/subnavigation_helper.rb