]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/layouts/site.rhtml
TomH's patches
[rails.git] / app / views / layouts / site.rhtml
index 0ff110cedd9cc940a6e8f819652d843870622c0f..f42048b882c3269c8f432b6a2c6809d167f4f882 100644 (file)
@@ -1,3 +1,4 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
 <html>
   <head>
     <%= javascript_include_tag 'main.js' %>
 <html>
   <head>
     <%= javascript_include_tag 'main.js' %>
   </head>
   <body>
 
   </head>
   <body>
 
+    <% if params[:controller] == 'site' and params[:action] == 'index' %>
+    <div id="map" style="border: 1px solid black; position: absolute; right: 5px; bottom: 5px; left: 200px; top: 70px;"></div> 
+    <% end %>
     <div id="content">
     <div id="content">
-<% if @flash[:notice] %>
-  <div id="notice"><%= @flash[:notice] %></div>
-<% end %>
+      <% if flash[:notice] %>
+        <div id="notice"><%= flash[:notice] %></div>
+      <% end %>
 
 
-    <%= @content_for_layout %>
+      <%= yield %>
 
 
-  </div>
-
-  <span id="greeting">
-    <%= link_to 'Login', {:controller => 'user', :action => 'login'}, {:id => 'loginanchor'}%> /
-    <%= link_to 'Sign up', {:controller => 'user', :action => 'new'}, {:id => 'registeranchor'} %>
-  </span>
-  
-  <div>
-    <ul id="tabnav">
-      <li><a  id="viewanchor" href="/index.html" title="view maps">View</a></li>
-      <li><a  style="font-style:italic" href="/login.html" title="edit maps">Edit</a></li>
-      <li><a  href="/traces" title="manage traces">GPS traces</a></li>
-    </ul>
-  </div>
-
-  <div id="left">
-
-    <div id="logo">
-      <center>
-        <h1>OpenStreetMap</h1>
-
-        <img src="/images/osm_logo.png" width="120" height="120"/><br/>
-        <nobr><h2>The Free Wiki World Map</h2></nobr>
-      </center>
     </div>
 
     </div>
 
-    <div id="intro">
-      OpenStreetMap is a free editable map of the whole world. It is made by people like you.
-      <p/>
-      OpenStreetMap allows you to view, edit and use geographical data in a collaborative way from anywhere on Earth.
-      <p/>
-      OpenStreetMap's hosting is kindly supported by the <a href="http://www.vr.ucl.ac.uk">UCL VR Centre</a> and <a href="http://www.bytemark.co.uk">bytemark</a>.
-
+    <span id="greeting">
+      <% if @user %>
+        Welcome, <%= link_to @user.display_name, {:controller => 'user', :action => 'view', :display_name => @user.display_name}, {:id => 'loginanchor'}%> |
+        <%= link_to 'logout', {:controller => 'user', :action => 'logout', :next_controller => @controller.controller_name, :next_action => @controller.action_name}, {:id => 'loginanchor'}%>
+      <% else %>
+        <%= link_to 'log in', {:controller => 'user', :action => 'login', :next_controller => @controller.controller_name, :next_action => @controller.action_name}, {:id => 'loginanchor'}%> |
+        <%= link_to 'sign up', {:controller => 'user', :action => 'new'}, {:id => 'registeranchor'} %>
+      <% end %>
+    </span>
+
+    <div>
+      <ul id="tabnav">
+        <% viewclass = ''
+        editclass = ''
+        traceclass = ''
+        viewclass = 'active' if params['controller'] == 'site' and params['action'] == 'index' 
+        editclass = 'active' if params['controller'] == 'site' and params['action'] == 'edit' 
+        traceclass = 'active' if params['controller'] == 'trace'
+        %>
+        <li><%= link_to 'View', {:controller => 'site', :action => 'index'}, {:id => 'viewanchor', :title => 'view maps', :class => viewclass  } %></li>
+        <li><%= link_to 'Edit', {:controller => 'site', :action => 'edit'}, {:id => 'editanchor', :title => 'edit maps', :class => editclass } %></li>
+        <li><%= link_to 'GPS traces', {:controller => 'trace', :action => 'list'}, {:id => 'traceanchor', :title => 'manage traces', :class => traceclass } %></li>
+      </ul>
     </div>
 
     </div>
 
-    <div id="left_menu">
-      <a href="http://wiki.openstreetmap.org">Help & Wiki</a><br />
-      <a href="http://www.opengeodata.org/">News blog</a><br />
-      <a href="http://wiki.openstreetmap.org/index.php/Merchandise">Shop</a><br />
-      <center>
-
-        <script type="text/javascript"><!--
-          var detect = navigator.userAgent.toLowerCase();
-          if (detect.indexOf('msie') >= 0) {
-            document.write('<script type=\"text/javascript\"> google_ad_client = \"pub-7727744269903103\";  google_ad_width = 125;  google_ad_height = 125;  google_ad_format = \"125x125_as_rimg\";  google_cpa_choice = \"CAAQveHnzwEaCEiH5iXPqf1SKJe193M\";  </script>  <script type=\"text/javascript\" src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">  </script>');
-            }
-//--></script>
-
-
-          </center>
-
-        </div>
+    <div id="left">
 
 
+      <div id="logo">
+        <center>
+          <h1>OpenStreetMap</h1>
+          <img src="/images/osm_logo.png" width="120" height="120"/><br/>
+          <nobr><h2>The Free Wiki World Map</h2></nobr>
+        </center>
+      </div>
+      <% unless @user %>
+      <div id="intro">
+        OpenStreetMap is a free editable map of the whole world. It is made by people like you.
+        <p/>
+        OpenStreetMap allows you to view, edit and use geographical data in a collaborative way from anywhere on Earth.
+        <p/>
+        OpenStreetMap's hosting is kindly supported by the <a href="http://www.vr.ucl.ac.uk">UCL VR Centre</a> and <a href="http://www.bytemark.co.uk">bytemark</a>.
+      </div>
+      <% end %>
 
 
-        <div id="cclogo">
-          <center>
-            <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
-              <input type="hidden" name="cmd" value="_s-xclick">
-              <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
-              <input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHFgYJKoZIhvcNAQcEoIIHBzCCBwMCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYBJr8BolWgGYvrtd1+IKusKyffII5UlFikz+JVREVGdN8UIRnZcopnl2qIjAEMukhq0/mh/8A5kuG85ndYP5gC6UN1xLdoIl55HEJtNEdos5en/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QswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbYIBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAIFfOlaagFrl71+jq6OKidbWFSE+Q4FqROvdgIONth+8kSK//Y/4ihuE4Ymvzn5ceE3S/iBSQQMjyvb+s2TWbQYDwcp129OPIbD9epdr4tJOUNiSojw7BHwYRiPh58S1xGlFgHFXwrEBb3dgNbMUa+u4qectsMAXpVHnD9wIyfmHMYIBmjCCAZYCAQEwgZQwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wNjAyMDgxMTQxMjhaMCMGCSqGSIb3DQEJBDEWBBShwtAQjoDmloA+pQJMoRTY/hFOLjANBgkqhkiG9w0BAQEFAASBgK2XalT/ShlrD0owoDt3at4NTz8hrNnrEnLUmGJWlOdhqviP6mH1FiHqYjNNck8Br0fW2J05tIE1IdGShjxDqWLgJTXBhGDwG7bW9r8lMcCsi6Z4pI3jkFa9JXw8ZyNZ4qZO3x5vRRPWaD/jQTjsz9/I2jwahkUZ/hsJqxJyhrpI-----END PKCS7-----">
-            </form>
+      <div id="left_menu">
+        <a href="http://wiki.openstreetmap.org">Help & Wiki</a><br />
+               <%= link_to "Users' diaries", {:controller => 'diary_entry', :action => 'list'} %><br />
+        <a href="http://www.opengeodata.org/">News blog</a><br />
+        <a href="http://wiki.openstreetmap.org/index.php/Merchandise">Shop</a><br />
+      </div>
+      <%= yield :optionals %>
+      <div id="cclogo">
+        <center>
 
 
-            <a href="http://creativecommons.org/licenses/by-sa/2.0/"><img src="/images/cc_button.png" border="0"></a>
+          <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
+            <input type="hidden" name="cmd" value="_s-xclick">
+            <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" border="0" style="border: none;" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
+            <img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1">
+            <input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHTwYJKoZIhvcNAQcEoIIHQDCCBzwCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYCsNDDDDa7OZFojBzDvG4HSPXOiJSO3VNuLoc8HGwsds3LsZYYtv4cPGw7Z/SoVVda+RELM+5FQn0D3Kv7hjA2Z6QdwEkFH2kDDlXCvyPt53ENHkQrzC1KOueRpimsQMH5hl03nvuVXij0hEYlMFqTH0UZr80vyczB+lJU6ZKYtrDELMAkGBSsOAwIaBQAwgcwGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIZa12CIRB0geAgahqF6Otz0oY0+Wg56fSuEpZvbUmNGEQznjWqBXkJqTkZT0jOwekOrlEi7bNEU8yVIie2u5L1gOhBDSl6rmgpxxVURSa4Jig5qiSioyK5baH6HjXVPQ+MDEWg1gZ4LtjYYtroZ8SBE/1eikQWmG7EOEg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NVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAIFfOlaagFrl71+jq6OKidbWFSE+Q4FqROvdgIONth+8kSK//Y/4ihuE4Ymvzn5ceE3S/iBSQQMjyvb+s2TWbQYDwcp129OPIbD9epdr4tJOUNiSojw7BHwYRiPh58S1xGlFgHFXwrEBb3dgNbMUa+u4qectsMAXpVHnD9wIyfmHMYIBmjCCAZYCAQEwgZQwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wNjA4MjYwODQ2NDdaMCMGCSqGSIb3DQEJBDEWBBTyC1ZchvuTMtcYeudPPSP/w8HiEDANBgkqhkiG9w0BAQEFAASBgJPpBf69pRAJfhzv/MfPiMncuq3TSlvpX7VtG9p4dXzSko4i2lWUDD72r5zdF2NwDgZ6avf630PutgpOzYJQ525If1xU2olc9DWI43UZTqY+FArgFuCJ8VnkPsy9mcbXPoSjLRqNwrsA2yoETxMISO3ASELzELJTJgpPk4bU57eZ-----END PKCS7-----">
+          </form>
 
 
-          </center>
-        </div>
+          <a href="http://creativecommons.org/licenses/by-sa/2.0/"><img src="/images/cc_button.png" border="0"></a>
 
 
+        </center>
       </div>
       </div>
+
+    </div>
   </body>
 </html>
   </body>
 </html>