Class: ConcertoWeather::Engine

Inherits:
Rails::Engine
  • Object
show all
Defined in:
lib/concerto_weather/engine.rb

Instance Method Summary collapse

Instance Method Details

#plugin_info(plugin_info_class) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/concerto_weather/engine.rb', line 9

def plugin_info(plugin_info_class)
  @plugin_info ||= plugin_info_class.new do 
    add_config("open_weather_map_api_key", "",
               value_type: "string",
               category: "API Keys",
               description: "OpenWeatherMap API Access Token. This token is used for obtaining weather information when adding weather content. http://openweathermap.org/appid")
  
    # Add owfont (open weather) icon set to application layout for content preview / browsing
    add_header_tags do
      stylesheet_link_tag "concerto_weather/application"
    end

    # Add owfont (open weather) icon set to concerto-frontend layout for weather content shown on screens
    add_view_hook "frontend/ScreensController", :concerto_frontend_plugins do 
      "#{ stylesheet_link_tag 'concerto_weather/application' }"
    end
    
  end
end