]> git.openstreetmap.org Git - rails.git/blob - app/views/layouts/site.rhtml
Link from user profile to view traces and to set home location if none is set.
[rails.git] / app / views / layouts / site.rhtml
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
2 <html>
3   <head>
4     <%= javascript_include_tag 'main.js' %>
5     <!--[if lt IE 7]><%= javascript_include_tag 'pngfix.js' %><![endif]--> <!-- thanks, microsoft! -->
6     <%= javascript_include_tag 'tile.js' %>
7     <%= javascript_include_tag 'site.js' %>
8
9     <link rel="stylesheet" type="text/css" href="/stylesheets/site.css" />
10     <title>OpenStreetMap<%= ' | '+@title if @title %></title>
11   </head>
12   <body>
13
14     <% if params[:controller] == 'site' and params[:action] == 'index' %>
15     <div id="map" style="border: 1px solid black; position: absolute; right: 5px; bottom: 5px; left: 200px; top: 70px;"></div> 
16     <% end %>
17     <div id="content">
18       <% if flash[:notice] %>
19         <div id="notice"><%= flash[:notice] %></div>
20       <% end %>
21
22       <%= yield %>
23
24     </div>
25
26     <span id="greeting">
27       <% if @user and @user.id %>
28         Welcome, <%= link_to @user.display_name, {:controller => 'user', :action => 'view', :display_name => @user.display_name}%> | 
29         <% @inbox_weight = 'bold' if @user.get_new_messages.length > 0 %>
30         <%= link_to "inbox (#{@user.get_new_messages.length})", {:controller => 'message', :action => 'inbox', :display_name => @user.display_name}, {:style => "font-weight: #{@inbox_weight};" } %> |
31         <%= link_to 'logout', {:controller => 'user', :action => 'logout', :referer => request.request_uri}, {:id => 'logoutanchor'}%>
32       <% else %>
33         <%= link_to 'log in', {:controller => 'user', :action => 'login', :referer => request.request_uri}, {:id => 'loginanchor'}%> |
34         <%= link_to 'sign up', {:controller => 'user', :action => 'new'}, {:id => 'registeranchor'} %>
35       <% end %>
36     </span>
37
38     <div>
39       <ul id="tabnav">
40         <% viewclass = ''
41         editclass = ''
42         traceclass = ''
43         viewclass = 'active' if params['controller'] == 'site' and params['action'] == 'index' 
44         editclass = 'active' if params['controller'] == 'site' and params['action'] == 'edit' 
45         editcalss = 'active' if params['controller'] == 'campaign'
46         traceclass = 'active' if params['controller'] == 'trace'
47         %>
48         <li><%= link_to 'View', {:controller => 'site', :action => 'index'}, {:id => 'viewanchor', :title => 'view maps', :class => viewclass  } %></li>
49         <li><%= link_to 'Edit', {:controller => 'site', :action => 'edit'}, {:id => 'editanchor', :title => 'edit maps', :class => editclass } %></li>
50         <li><%= link_to 'GPS traces', {:controller => 'trace', :action => 'list'}, {:id => 'traceanchor', :title => 'manage traces', :class => traceclass } %></li>
51       </ul>
52     </div>
53
54     <div id="left">
55
56       <div id="logo">
57         <center>
58           <h1>OpenStreetMap</h1>
59           <%= link_to(image_tag("osm_logo.png", :size => "120x120", :border => 0), :controller => 'site', :action => 'index') %><br/>
60           <nobr><h2>The Free Wiki World Map</h2></nobr>
61         </center>
62       </div>
63       <% unless @user %>
64       <div id="intro">
65         OpenStreetMap is a free editable map of the whole world. It is made by people like you.
66         <p/>
67         OpenStreetMap allows you to view, edit and use geographical data in a collaborative way from anywhere on Earth.
68         <p/>
69         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>.
70       </div>
71       <% end %>
72
73       <div id="left_menu">
74         <a href="http://wiki.openstreetmap.org">Help & Wiki</a><br />
75                 <%= link_to "Users' diaries", {:controller => 'diary_entry', :action => 'list'} %><br />
76         <a href="http://www.opengeodata.org/">News blog</a><br />
77         <a href="http://wiki.openstreetmap.org/index.php/Merchandise">Shop</a><br />
78 </div>
79
80
81       <div id="left_menu">
82     <div id="sotminfo">
83 Come to the first OpenStreetMap Conference, <a href="http://www.stateofthemap.org">The State of the Map</a>: 14th-15th July 2007, Manchester, UK.
84 </div>
85       </div>
86
87
88       <%= yield :optionals %>
89       <div id="cclogo">
90         <center>
91
92           <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
93             <input type="hidden" name="cmd" value="_s-xclick">
94             <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!">
95             <img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1">
96             <input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHTwYJKoZIhvcNAQcEoIIHQDCCBzwCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYCsNDDDDa7OZFojBzDvG4HSPXOiJSO3VNuLoc8HGwsds3LsZYYtv4cPGw7Z/SoVVda+RELM+5FQn0D3Kv7hjA2Z6QdwEkFH2kDDlXCvyPt53ENHkQrzC1KOueRpimsQMH5hl03nvuVXij0hEYlMFqTH0UZr80vyczB+lJU6ZKYtrDELMAkGBSsOAwIaBQAwgcwGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIZa12CIRB0geAgahqF6Otz0oY0+Wg56fSuEpZvbUmNGEQznjWqBXkJqTkZT0jOwekOrlEi7bNEU8yVIie2u5L1gOhBDSl6rmgpxxVURSa4Jig5qiSioyK5baH6HjXVPQ+MDEWg1gZ4LtjYYtroZ8SBE/1eikQWmG7EOEgU62Vn/jqJJ77/mgS7mdEQhlEWYMiyJBZs35yCB/pK5FUxhZnrquL4sS+2QKHPPOGPDfRc/dnhMKgggOHMIIDgzCCAuygAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1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xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wNjA4MjYwODQ2NDdaMCMGCSqGSIb3DQEJBDEWBBTyC1ZchvuTMtcYeudPPSP/w8HiEDANBgkqhkiG9w0BAQEFAASBgJPpBf69pRAJfhzv/MfPiMncuq3TSlvpX7VtG9p4dXzSko4i2lWUDD72r5zdF2NwDgZ6avf630PutgpOzYJQ525If1xU2olc9DWI43UZTqY+FArgFuCJ8VnkPsy9mcbXPoSjLRqNwrsA2yoETxMISO3ASELzELJTJgpPk4bU57eZ-----END PKCS7-----">
97           </form>
98
99           <a href="http://creativecommons.org/licenses/by-sa/2.0/"><img src="/images/cc_button.png" border="0"></a>
100
101         </center>
102       </div>
103
104     </div>
105   </body>
106 </html>