1 <% if STATUS == :database_offline or STATUS == :api_offline %>
2 <p><%= t 'layouts.osm_offline' %>
4 <% elsif STATUS == :database_readonly or STATUS == :api_readonly %>
5 <p><%= t 'layouts.osm_read_only' %>
7 <% elsif !@user.data_public? %>
8 <p><%= t 'site.edit.not_public' %></p>
9 <p><%= t 'site.edit.not_public_description',
10 :user_page => (link_to t('site.edit.user_page_link'), {:controller => 'user', :action => 'account', :display_name => @user.display_name, :anchor => 'public'}) %></p>
11 <p><%= t 'site.edit.anon_edits', :link => link_to(t('site.edit.anon_edits_link_text'), t('site.edit.anon_edits_link')) %></p>
13 <% content_for :greeting do %>
14 <% if @user and !@user.home_lon.nil? and !@user.home_lat.nil? %>
15 <%= link_to_function t('layouts.home'), "setPosition(#{@user.home_lat}, #{@user.home_lon}, 10)", { :title => t('layouts.home_tooltip') } %> |
19 <%= render :partial => 'sidebar', :locals => { :onopen => "resizeMap();", :onclose => "resizeMap();" } %>
20 <%= render :partial => 'search' %>
22 <%= render :partial => @preferred_editor %>
24 <script type="text/javascript" defer="defer">
25 function resizeContent() {
26 var content = $("content");
27 var rightMargin = parseInt(getStyle(content, "right"));
28 var bottomMargin = parseInt(getStyle(content, "bottom"));
30 content.style.width = document.documentElement.clientWidth - content.offsetLeft - rightMargin;
31 content.style.height = document.documentElement.clientHeight - content.offsetTop - bottomMargin;
34 function resizeMap() {
35 var sidebar_width = $("sidebar").offsetWidth;
37 if (sidebar_width > 0) {
38 sidebar_width = sidebar_width + 5
41 $("map").style.left = (sidebar_width) + "px";
42 $("map").style.width = ($("content").offsetWidth - sidebar_width) + "px";
43 $("map").style.height = ($("content").offsetHeight - 2) + "px";
46 function handleResize() {
47 if (brokenContentSize) {
54 function maximiseMap() {
55 $("left").style.display = "none";
56 $("greeting").style.display = "none";
57 $("tabnav").style.display = "none";
59 $("content").style.top = "10px";
60 $("content").style.left = "10px";
65 function minimiseMap() {
66 $("left").style.display = "";
67 $("greeting").style.display = "";
68 $("tabnav").style.display = "";
70 $("content").style.top = "35px";
71 $("content").style.left = "192px";
78 window.onload = handleResize;
79 window.onresize = handleResize;