]> git.openstreetmap.org Git - rails.git/blob - app/views/site/id.html.erb
Fix issue where iD would not take the full height of its iframe
[rails.git] / app / views / site / id.html.erb
1 <!DOCTYPE html>
2 <html>
3 <head>
4   <meta charset='utf-8'>
5   <%= stylesheet_link_tag "id" %>
6   <!--[if !IE || gte IE 9]><!-->
7   <%= javascript_include_tag "id" %>
8   <!-- <![endif]-->
9   <style type='text/css'>
10     /* apply document-level styling */
11     html, body {
12       width: 100%;
13       height: 100%;
14       margin: 0;
15       padding: 0;
16     }
17   </style>
18 </head>
19 <body>
20 <% data = {} -%>
21 <% if Settings.key?(:id_key) %>
22 <% token = current_user.access_token(Settings.id_key) %>
23 <% data[:token] = token.token -%>
24 <% data[:token_secret] = token.secret -%>
25 <% data[:consumer_key] = token.client_application.key -%>
26 <% data[:consumer_secret] = token.client_application.secret -%>
27 <% end %>
28 <% data[:locale] = ID::LOCALES.preferred(preferred_languages).to_s -%>
29 <% data[:locale_path] = asset_path("iD/locales/#{data[:locale]}.json") -%>
30 <% data[:asset_map] = assets("iD").to_json -%>
31 <%= content_tag :div, "", :id => "id-container", :data => data %>
32 </body>
33 </html>