]> git.openstreetmap.org Git - rails.git/blob - app/views/layouts/site.rhtml
API returns user info if public
[rails.git] / app / views / layouts / site.rhtml
1 <html>
2   <head>
3     <%= javascript_include_tag 'main.js' %>
4     <!--[if IE]><%= javascript_include_tag 'pngfix.js' %><![endif]--> <!-- thanks, microsoft! -->
5     <%= javascript_include_tag 'tile.js' %>
6     <%= javascript_include_tag 'site.js' %>
7
8     <link rel="stylesheet" type="text/css" href="/stylesheets/site.css" />
9     <title>OpenStreetMap</title>
10   </head>
11   <body>
12
13     <% if params[:controller] == 'site' and params[:action] == 'index' %>
14     <div id="map" style="border: 1px solid black; position: absolute; right: 5px; bottom: 5px; left: 200px; top: 70px;"></div> 
15     <% end %>
16     <div id="content">
17       <% if flash[:notice] %>
18         <div id="notice"><%= flash[:notice] %></div>
19       <% end %>
20
21       <%= yield %>
22
23     </div>
24
25     <span id="greeting">
26         <% if @user %>
27         Welcome, <%= @user.display_name %> |
28         <%= link_to 'account', {:controller => 'user', :action => 'account'}, {:id => 'loginanchor'}%> |
29         <%= link_to 'logout', {:controller => 'user', :action => 'logout'}, {:id => 'loginanchor'}%>
30       <% else %>
31         <%= link_to 'log in', {:controller => 'user', :action => 'login'}, {:id => 'loginanchor'}%> |
32         <%= link_to 'sign up', {:controller => 'user', :action => 'new'}, {:id => 'registeranchor'} %>
33       <% end %>
34     </span>
35
36     <div>
37       <ul id="tabnav">
38         <% viewclass = ''
39         editclass = ''
40         traceclass = ''
41         viewclass = 'active' if params['controller'] == 'site' and params['action'] == 'index' 
42         editclass = 'active' if params['controller'] == 'site' and params['action'] == 'edit' 
43         traceclass = 'active' if params['controller'] == 'trace'
44         %>
45         <li><%= link_to 'View', {:controller => 'site', :action => 'index'}, {:id => 'viewanchor', :title => 'view maps', :class => viewclass  } %></li>
46         <li><%= link_to 'Edit', {:controller => 'site', :action => 'edit'}, {:id => 'editanchor', :title => 'edit maps', :class => editclass } %></li>
47         <li><%= link_to 'GPS traces', {:controller => 'trace', :action => 'list'}, {:id => 'traceanchor', :title => 'manage traces', :class => traceclass } %></li>
48       </ul>
49     </div>
50
51     <div id="left">
52
53       <div id="logo">
54         <center>
55           <h1>OpenStreetMap</h1>
56           <img src="/images/osm_logo.png" width="120" height="120"/><br/>
57           <nobr><h2>The Free Wiki World Map</h2></nobr>
58         </center>
59       </div>
60       <% unless @user %>
61       <div id="intro">
62         OpenStreetMap is a free editable map of the whole world. It is made by people like you.
63         <p/>
64         OpenStreetMap allows you to view, edit and use geographical data in a collaborative way from anywhere on Earth.
65         <p/>
66         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>.
67       </div>
68       <% end %>
69
70       <div id="left_menu">
71         <a href="http://wiki.openstreetmap.org">Help & Wiki</a><br />
72         <a href="http://www.opengeodata.org/">News blog</a><br />
73         <a href="http://wiki.openstreetmap.org/index.php/Merchandise">Shop</a><br />
74       </div>
75       <%= yield :optionals %>
76       <div id="cclogo">
77         <center>
78
79           <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
80             <input type="hidden" name="cmd" value="_s-xclick">
81             <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!">
82             <img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1">
83             <input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHTwYJKoZIhvcNAQcEoIIHQDCCBzwCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYCsNDDDDa7OZ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FArgFuCJ8VnkPsy9mcbXPoSjLRqNwrsA2yoETxMISO3ASELzELJTJgpPk4bU57eZ-----END PKCS7-----">
84           </form>
85
86           <a href="http://creativecommons.org/licenses/by-sa/2.0/"><img src="/images/cc_button.png" border="0"></a>
87
88         </center>
89       </div>
90
91     </div>
92   </body>
93 </html>