Sha256: d7901b8bdf623876c041a93dc40b996ee22e581a63389082bbd06dbaa928917c
Contents?: true
Size: 1.35 KB
Versions: 29
Compression:
Stored size: 1.35 KB
Contents
# Rails view helpers for outputting standard Umlaut content included # in html <head>. Generally a layout will call #render_umlaut_head_content # to render all standard Umlaut <head> content in a future-compatible way. module Umlaut::HtmlHeadHelper # usually called in layout, render a link tag with opensearch auto-discovery def render_opensearch_link tag("link", :rel => "search", :type => "application/opensearchdescription+xml", :title => umlaut_config.opensearch_short_name, :href => url_for(:controller=>'open_search', :only_path=>false) ) end # used on non-js progress page, we need to refresh the page # if requested by presence of @meta_refresh_self ivar. # this method usually called in a layout. def render_meta_refresh if @meta_refresh_self tag( "meta", "http-equiv" => "refresh", "content" => @meta_refresh_self ) else "" end end # standard umlaut head content, may later include more # stuff, local/custom layouts should call this in HEAD # to get forwards-compatible umlaut standard head content def render_umlaut_head_content render_opensearch_link + render_meta_refresh end # String meant for use in <title> def umlaut_title_text umlaut_config.app_name + (@page_title ? " | #{@page_title}" : "") end end
Version data entries
29 entries across 29 versions & 1 rubygems