The makes the shortened titles commonly shown on browser tabs more
useful.
def opengraph_tags(title = nil)
tags = {
"og:site_name" => t("layouts.project_name.title"),
def opengraph_tags(title = nil)
tags = {
"og:site_name" => t("layouts.project_name.title"),
- "og:title" => [t("layouts.project_name.title"), title].compact.join(" | "),
+ "og:title" => [title, t("layouts.project_name.title")].compact.join(" | "),
"og:type" => "website",
"og:image" => image_url("osm_logo_256.png", :protocol => "http"),
"og:image:secure_url" => image_url("osm_logo_256.png", :protocol => "https"),
"og:type" => "website",
"og:image" => image_url("osm_logo_256.png", :protocol => "http"),
"og:image:secure_url" => image_url("osm_logo_256.png", :protocol => "https"),
<%= opengraph_tags(@title) %>
<% if flash[:piwik_goal] -%>
<%= tag("meta", :name => "piwik-goal", :content => flash[:piwik_goal]) %>
<%= opengraph_tags(@title) %>
<% if flash[:piwik_goal] -%>
<%= tag("meta", :name => "piwik-goal", :content => flash[:piwik_goal]) %>
<%= style_rules %>
<%= yield :head %>
<%= yield :auto_discovery_link_tag %>
<%= csrf_meta_tag %>
<%= style_rules %>
<%= yield :head %>
<%= yield :auto_discovery_link_tag %>
<%= csrf_meta_tag %>
- <title><%= t 'layouts.project_name.title' %><%= ' | ' + @title if @title %></title>
+ <title><%= @title + ' | ' if @title %><%= t 'layouts.project_name.title' %></title>
get :new, :params => { :display_name => recipient_user.display_name }
assert_response :success
assert_template "new"
get :new, :params => { :display_name => recipient_user.display_name }
assert_response :success
assert_template "new"
- assert_select "title", "OpenStreetMap | Send message"
+ assert_select "title", "Send message | OpenStreetMap"
assert_select "form[action='#{new_message_path(:display_name => recipient_user.display_name)}']", :count => 1 do
assert_select "input#message_title", :count => 1
assert_select "textarea#message_body", :count => 1
assert_select "form[action='#{new_message_path(:display_name => recipient_user.display_name)}']", :count => 1 do
assert_select "input#message_title", :count => 1
assert_select "textarea#message_body", :count => 1
end
assert_response :success
assert_template "new"
end
assert_response :success
assert_template "new"
- assert_select "title", "OpenStreetMap | Send message"
+ assert_select "title", "Send message | OpenStreetMap"
assert_select "form[action='#{new_message_path(:display_name => recipient_user.display_name)}']", :count => 1 do
assert_select "input#message_title", :count => 1 do
assert_select "[value='Test Message']"
assert_select "form[action='#{new_message_path(:display_name => recipient_user.display_name)}']", :count => 1 do
assert_select "input#message_title", :count => 1 do
assert_select "[value='Test Message']"
end
assert_response :success
assert_template "new"
end
assert_response :success
assert_template "new"
- assert_select "title", "OpenStreetMap | Send message"
+ assert_select "title", "Send message | OpenStreetMap"
assert_select "form[action='#{new_message_path(:display_name => recipient_user.display_name)}']", :count => 1 do
assert_select "input#message_title", :count => 1 do
assert_select "[value='Test Message']"
assert_select "form[action='#{new_message_path(:display_name => recipient_user.display_name)}']", :count => 1 do
assert_select "input#message_title", :count => 1 do
assert_select "[value='Test Message']"
end
assert_response :success
assert_template "new"
end
assert_response :success
assert_template "new"
- assert_select "title", "OpenStreetMap | Send message"
+ assert_select "title", "Send message | OpenStreetMap"
assert_select "form[action='#{new_message_path(:display_name => recipient_user.display_name)}']", :count => 1 do
assert_select "input#message_title", :count => 1 do
assert_select "[value='']"
assert_select "form[action='#{new_message_path(:display_name => recipient_user.display_name)}']", :count => 1 do
assert_select "input#message_title", :count => 1 do
assert_select "[value='']"
get :reply, :params => { :message_id => unread_message.id }
assert_response :success
assert_template "new"
get :reply, :params => { :message_id => unread_message.id }
assert_response :success
assert_template "new"
- assert_select "title", "OpenStreetMap | Re: #{unread_message.title}"
+ assert_select "title", "Re: #{unread_message.title} | OpenStreetMap"
assert_select "form[action='#{new_message_path(:display_name => user.display_name)}']", :count => 1 do
assert_select "input#message_title[value='Re: #{unread_message.title}']", :count => 1
assert_select "textarea#message_body", :count => 1
assert_select "form[action='#{new_message_path(:display_name => user.display_name)}']", :count => 1 do
assert_select "input#message_title[value='Re: #{unread_message.title}']", :count => 1
assert_select "textarea#message_body", :count => 1