]> git.openstreetmap.org Git - rails.git/commitdiff
Merge branch 'master' into notes
authorTom Hughes <tom@compton.nu>
Tue, 15 Jan 2013 21:11:35 +0000 (21:11 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 15 Jan 2013 21:11:35 +0000 (21:11 +0000)
Conflicts:
Gemfile.lock
app/assets/stylesheets/common.css.scss
app/views/browse/_map.html.erb
app/views/user/view.html.erb
config/locales/en.yml

1  2 
Gemfile
Gemfile.lock
app/assets/javascripts/index.js
app/assets/stylesheets/common.css.scss
app/helpers/application_helper.rb
app/views/browse/_map.html.erb
app/views/user/view.html.erb
config/locales/de.yml
config/locales/en.yml
test/functional/browse_controller_test.rb

diff --cc Gemfile
Simple merge
diff --cc Gemfile.lock
index 8fea3da8e6f6d5b9265d9486dda3076946355a24,37129758dd601e4647f917ec51a847255a23401e..ec1d4e3573089b2f53504cfb75ae326a718190af
@@@ -32,7 -32,7 +32,10 @@@ GE
      arel (3.0.2)
      bigdecimal (1.1.0)
      builder (3.0.4)
--    cocaine (0.4.2)
++    climate_control (0.0.3)
++      activesupport (>= 3.0)
++    cocaine (0.5.1)
++      climate_control (>= 0.0.3, < 1.0)
      coffee-rails (3.2.2)
        coffee-script (>= 2.2.0)
        railties (~> 3.2.0)
        i18n
      iconv (0.1)
      journey (1.0.4)
-     jquery-rails (2.1.3)
-       railties (>= 3.1.0, < 5.0)
-       thor (~> 0.14)
-     json (1.7.5)
+     jquery-rails (2.1.4)
+       railties (>= 3.0, < 5.0)
+       thor (>= 0.14, < 2.0)
+     json (1.7.6)
 +    jsonify (0.3.1)
 +      multi_json (~> 1.0)
 +    jsonify-rails (0.3.2)
 +      actionpack
 +      jsonify (< 0.4.0)
      jwt (0.1.5)
        multi_json (>= 1.0)
      libv8 (3.3.10.4)
      pg (0.14.1)
      polyglot (0.3.3)
      r2 (0.0.3)
-     rack (1.4.1)
 -    rack (1.4.3)
++    rack (1.4.4)
      rack-cache (1.2)
        rack (>= 0.4)
      rack-cors (0.2.7)
      ruby-openid (2.2.2)
      sanitize (2.0.3)
        nokogiri (>= 1.4.4, < 1.6)
-     sass (3.2.3)
-     sass-rails (3.2.5)
+     sass (3.2.5)
 -    sass-rails (3.2.5)
++    sass-rails (3.2.6)
        railties (~> 3.2.0)
        sass (>= 3.1.10)
        tilt (~> 1.3)
        libv8 (~> 3.3.10)
      thor (0.16.0)
      tilt (1.3.3)
-     timecop (0.5.3)
 -    timecop (0.5.7)
++    timecop (0.5.9)
      treetop (1.4.12)
        polyglot
        polyglot (>= 0.3.1)
Simple merge
index 96856228c0b1b23acde7a14cf42853bc8a574469,255b846cf8159a0634700ef46b7143d6cead09c0..062c782a7c13c34328ccc59f10885fe5f03f0b94
@@@ -446,24 -535,11 +535,17 @@@ table 
    right: 0px;
    padding: 5px;
    background:#fff;
-   text-align: right;
-   font-size: 12px;
- }
- #permalink a {
-   padding: 5px;
  }
  
 +.leaflet-control-attribution a.disabled {
 +  color: #99c9dc;
 +  cursor: default;
 +  text-decoration: none;
 +}
 +
  .site-index .leaflet-top,
  .site-export .leaflet-top {
-   top: 40px !important;
+   top: 10px !important;
    .leaflet-control {
      margin-top: 0px !important;
    }
@@@ -773,105 -868,84 +880,106 @@@ ul.results-list li { border-bottom: 1p
  
  /* Rules for the changeset list shown by the history tab etc */
  
- #changeset_list_container {
-   position: relative;
- }
  #changeset_list {
-   width: 50%;
-   font-size: small;
-   border-collapse: collapse;
-   border-width: 0px;
-   margin-top: 1px;
-   margin-bottom: 1px;
-   text-align: left;
- }
- #changeset_list td {
-   vertical-align: top;
-   padding: 3px;
- }
- #changeset_list .date {
-   white-space: nowrap;
+   width: 100%;
+   ul {
+     padding: 10px 0;
+     margin-bottom: 0px;
+     border-top: 1px solid #ccc;
+     &:last-child {
+       border-bottom: 1px solid #ccc;
+     }
+   }
+   .selected {
+     background-color: rgb(255, 255, 160);
+   }
+   .date,
+   .user {
+     border-left: 1px solid #ccc;
+     padding-left: 5px;
+     margin-right: 5px;
+   }
  }
  
- #changeset_list .user {
-   white-space: nowrap;
+ #changeset_list_map {
+   position: absolute;
+   bottom: 20px;
+   top: 20px;
+   right: 20px;
+   width: 45%;
+   min-height: 398px;
+   max-height: 598px;
+   border: 1px solid #ccc;
  }
  
- #changeset_list .area {
-   white-space: nowrap;
- }
+ /* Rules for the data browser */
  
- #changeset_list .selected {
-   background-color: rgb(255, 255, 160);
-   background-color: rgba(255, 255, 85, 0.5);
+ .browse-section {
+   border-top: 1px solid #ccc;
+   margin-top: 10px;
+   padding-top: 10px;
+   &:first-child {
+     margin-top: 0;
+   }
+   h4, p {
+     margin-bottom: 5px;
+   }
+   p, ul, .bbox {
+     margin-left: 33.3333%;
+   }
+   h4 {
+     width: 33.3333%;
+     float: left;
+   }
  }
  
- #changeset_list_map {
-   position: absolute;
-   float: right;
-   top: 0px;
-   bottom: 0px;
-   right: 0px;
-   width: 49%;
-   min-height: 400px;
-   border: solid 1px black;
+ .bbox {
+   div {
+     width: 33.3333%;
+     text-align: center;
+     padding: 5px 0;
+     overflow: hidden;
+     text-overflow: ellipsis;
+     float: left;
+   }
+   .max_lat,
+   .min_lat {
+     margin-left: auto;
+     margin-right: auto;
+     width: 100%;
+   }
  }
  
- /* Rules for the data browser */
- #browse_navigation {
-   float: right;
-   width: 250px;
-   margin-left: 10px;
-   text-align: center;
+ #browse_map .geolink {
+   display: none;
  }
  
table.browse_details th {
-   white-space: nowrap;
#browse_map .secondary-actions {
+   margin-bottom: 10px;
  }
  
- #browse_map {
-   float: right;
-   width: 250px;
-   text-align: right;
-   margin-left: 10px;
- }
- #browse_map #small_map {
-   width: 250px;
-   height: 300px;
-   border: solid 1px black;
- }
- #browse_map .geolink {
-   display: none;
- }
 +td.browse_comments {
 +  padding: 0px;
 +
 +  table {
 +    border-collapse: collapse;
 +
 +    td {
 +      padding-bottom: 10px;
 +
 +      p {
 +        margin-top: 0px;
 +        margin-bottom: 0px;
 +      }
 +
 +      span.by {
 +        font-size: small;
 +        color: #999999;
 +      }
 +    }
 +  }
 +}
 +
  /* Rules for the trace list shown by the traces tab etc */
  
  #trace_list {
Simple merge
index f694d04644ebfcdd0228d39d701b98ada8409481,f44e5bb318e92871a3aada2e85e1de15f731adf0..cf59a4679423395c7fc20a047ed5f2578404ff15
@@@ -1,8 -1,8 +1,8 @@@
  <iframe id="linkloader" style="display: none">
  </iframe>
  
- <div id="browse_map">
+ <div id="browse_map" class='clearfix content_map'>
 -  <% if map.instance_of? Changeset or (map.instance_of? Node and map.version > 1) or map.visible %>
 +  <% if map.instance_of? Changeset or (map.instance_of? Node and map.version > 1) or map.visible? %>
  
    <% content_for :head do %>
      <%= javascript_include_tag "browse" %>
    <%= content_tag "div", "", :id => "small_map", :data => data %>
    <span id="loading"><%= t 'browse.map.loading' %></span>
  
-   <% if map.instance_of? Note -%>
-     <%= link_to t("browse.map.larger.area"),
-                 root_path(:notes => "yes"),
-                 :id => "area_larger_map",
-                 :class => "geolink bbox" %>
-   <% else -%>
-     <%= link_to t("browse.map.larger.area"),
-                 root_path(:box => "yes"),
-                 :id => "area_larger_map",
+ <ul class='secondary-actions clearfix'>
+   <li>
 -    <%= link_to t("browse.map.larger.area"),
 -                root_path(:box => "yes"),
 -                :id => "area_larger_map",
 -                :class => "geolink bbox" %>
++    <% if map.instance_of? Note -%>
++      <%= link_to t("browse.map.larger.area"),
++                  root_path(:notes => "yes"),
++                  :id => "area_larger_map",
++                  :class => "geolink bbox" %>
++    <% else -%>
++      <%= link_to t("browse.map.larger.area"),
++                  root_path(:box => "yes"),
++                  :id => "area_larger_map",
++                  :class => "geolink bbox" %>
++    <% end -%>
+   </li>
+   <li>
+     <%= link_to h(t("browse.map.edit.area")) + content_tag(:span, "▾", :class => "menuicon"),
+                 edit_path,
+                 :id => "area_edit",
+                 :data => { :editor => preferred_editor },
                  :class => "geolink bbox" %>
-   <% end -%>
-   <br />
-   <%= link_to h(t("browse.map.edit.area")) + content_tag(:span, "▾", :class => "menuicon"),
-               edit_path,
-               :id => "area_edit",
-               :data => { :editor => preferred_editor },
-               :class => "geolink bbox" %>
+   </li>
+ </ul>
  
 -  <% unless map.instance_of? Changeset %>
 +  <% unless map.instance_of? Changeset or map.instance_of? Note %>
-     <br />
-     <%= link_to t("browse.map.larger." + map.class.to_s.downcase),
-                 root_path,
-                 :id => "object_larger_map",
-                 :class => "geolink object" %>
-     <br />
-     <%= link_to h(t("browse.map.edit." + map.class.to_s.downcase)) + content_tag(:span, "▾", :class => "menuicon"),
-                 edit_path,
-                 :id => "object_edit",
-                 :data => { :editor => preferred_editor },
-                 :class => "geolink object" %>
+   <ul class='secondary-actions clearfix'>
+     <li>
+       <%= link_to t("browse.map.larger." + map.class.to_s.downcase),
+                   root_path,
+                   :id => "object_larger_map",
+                   :class => "geolink object" %>
+     </li>
+     <li>
+       <%= link_to h(t("browse.map.edit." + map.class.to_s.downcase)) + content_tag(:span, "▾", :class => "menuicon"),
+                   edit_path,
+                   :id => "object_edit",
+                   :data => { :editor => preferred_editor },
+                   :class => "geolink object" %>
+     </li>
+   </ul>
    <% end %>
  
    <% else %>
index 04fc4cb3b09346184981d3f27aca73108949fcaf,de2e93f9439c2ac4757ddee1d40119832cd6b3c4..699ff3cafa467a64f284381ff5aa33b63c0e3a4a
- <%= user_image @this_user %>
+ <% content_for :heading do %>
+   <div id='userinformation'>
+     <%= user_image @this_user %>
+     <div class='userinformation-inner'>
+       <h2><%= @this_user.display_name %><%= role_icons(@this_user) %></h2>
+       <% if @user and @this_user.id == @user.id %>
+         <!-- Displaying user's own profile page -->
+         <ul class='secondary-actions clearfix'>
+           <li>
+             <%= link_to t('user.view.my edits'), :controller => 'changeset', :action => 'list', :display_name => @user.display_name %>
+             <span class='count-number'><%= number_with_delimiter(@user.changesets.size) %></span>
+           </li>
++          <li>
++            <%= link_to t('user.view.my notes'), :controller => 'notes', :action=> 'mine' %>
++          </li>
+           <li>
+             <%= link_to t('user.view.my traces'), :controller => 'trace', :action=>'mine' %>
+             <span class='count-number'><%= number_with_delimiter(@user.traces.size) %></span>
+           </li>
+           <li>
+             <%= link_to t('user.view.my diary'), :controller => 'diary_entry', :action => 'list', :display_name => @user.display_name %>
+             <span class='count-number'><%= number_with_delimiter(@user.diary_entries.size) %></span>
+           </li>
+           <li>
+             <%= link_to t('user.view.my comments' ), :controller => 'diary_entry', :action => 'comments', :display_name => @user.display_name %>
+           </li>
+           <li>
+             <%= link_to t('user.view.my settings'), :controller => 'user', :action => 'account', :display_name => @user.display_name %>
+           </li>
  
- <h2><%= @this_user.display_name %><%= role_icons(@this_user) %></h2>
+           <% if @user.blocks.exists? %>
+             <li>
+               <%= link_to t('user.view.blocks on me'), :controller => 'user_blocks', :action => 'blocks_on', :display_name => @user.display_name %>
+               <span class='count-number'><%= number_with_delimiter(@user.blocks.active.size) %></span>
+             </li>
+           <% end %>
+           <% if @user and @user.moderator? and @user.blocks_created.exists? %>
+             <li>
+               <%= link_to t('user.view.blocks by me'), :controller => 'user_blocks', :action => 'blocks_by', :display_name => @user.display_name %>
+               <span class='count-number'><%= number_with_delimiter(@user.blocks_created.active.size) %></span>
+             </li>
+           <% end %>
+         </ul>
+         <% else %>
+         <ul class='secondary-actions clearfix'>
+           <li>
+             <%= link_to t('user.view.edits'), :controller => 'changeset', :action => 'list', :display_name => @this_user.display_name %>
+             <span class='count-number'><%= number_with_delimiter(@this_user.changesets.size) %></span>
+           </li>
++          <li>
++            <%= link_to t('user.view.notes'), :controller => 'notes', :action=> 'mine' %>
++          </li>
+           <li>
+             <%= link_to t('user.view.traces'), :controller => 'trace', :action => 'list', :display_name => @this_user.display_name %>
+             <span class='count-number'><%= number_with_delimiter(@this_user.traces.size) %></span>
+           </li>
+           <!-- Displaying another user's profile page -->
+           <li>
+             <%= link_to t('user.view.send message'), :controller => 'message', :action => 'new', :display_name => @this_user.display_name %>
+           </li>
+           <li>
+             <%= link_to t('user.view.diary'), :controller => 'diary_entry', :action => 'list', :display_name => @this_user.display_name %>
+             <span class='count-number'><%= number_with_delimiter(@this_user.diary_entries.size) %></span>
+           </li>
+           <li>
+             <%= link_to t('user.view.comments'), :controller => 'diary_entry', :action => 'comments', :display_name => @this_user.display_name %>
+           </li>
+           <li>
+             <% if @user and @user.is_friends_with?(@this_user) %>
+               <%= link_to t('user.view.remove as friend'), remove_friend_path(:display_name => @this_user.display_name), :method => :post %>
+             <% else %>
+               <%= link_to t('user.view.add as friend'), make_friend_path(:display_name => @this_user.display_name), :method => :post %>
+             <% end %>
+           </li>
+           <% if @this_user.blocks.exists? %>
+             <li>
+               <%= link_to t('user.view.block_history'), :controller => 'user_blocks', :action => 'blocks_on', :display_name => @this_user.display_name %>
+               <span class='count-number'><%= number_with_delimiter(@this_user.blocks.active.size) %></span>
+             </li>
+           <% end %>
+           <% if @this_user.moderator? and @this_user.blocks_created.exists? %>
+             <li>
+               <%= link_to t('user.view.moderator_history'), :controller => 'user_blocks', :action => 'blocks_by', :display_name => @this_user.display_name %>
+               <span class='count-number'><%= number_with_delimiter(@this_user.blocks_created.active.size) %></span>
+             </li>
+           <% end %>
+           <% if @user and @user.moderator? %>
+             <li>
+             <%= link_to t('user.view.create_block'), :controller => 'user_blocks', :action => 'new', :display_name => @this_user.display_name %>
+             </li>
+           <% end %>
+         </ul>
+       <% end %>
+       <% if @user and @user.administrator? %>
+         <ul class='secondary-actions clearfix'>
+           <% if ["active", "confirmed"].include? @this_user.status %>
+             <li>
+               <%= link_to t('user.view.deactivate_user'), set_status_user_path(:status => 'pending', :display_name => @this_user.display_name), :data => { :confirm => t('user.view.confirm') } %>
+             </li>
+           <% elsif ["pending"].include? @this_user.status %>
+             <li>
+               <%= link_to t('user.view.activate_user'), set_status_user_path(:status => 'active', :display_name => @this_user.display_name), :data => { :confirm => t('user.view.confirm') } %>
+             </li>
+           <% end %>
+           <% if ["active", "suspended"].include? @this_user.status %>
+             <li>
+               <%= link_to t('user.view.confirm_user'), set_status_user_path(:status => 'confirmed', :display_name => @this_user.display_name), :data => { :confirm => t('user.view.confirm') } %>
+             </li>
+           <% end %>
+             <li>
+               <% if ["pending", "active", "confirmed", "suspended"].include? @this_user.status %>
+                 <%= link_to t('user.view.hide_user'), set_status_user_path(:status => 'deleted', :display_name => @this_user.display_name), :data => { :confirm => t('user.view.confirm') } %>
+             <% else %>
+               <%= link_to t('user.view.unhide_user'), set_status_user_path(:status => 'active', :display_name => @this_user.display_name), :data => { :confirm => t('user.view.confirm') } %>
+             </li>
+           <% end %>
+           <li>
+             <%= link_to t('user.view.delete_user'), delete_user_path(:display_name => @this_user.display_name), :data => { :confirm => t('user.view.confirm') } %>
+           </li>
+         </ul>
+         <% end %>
+       <p class='deemphasize'>
+         <small>
+           <%= t 'user.view.mapper since' %> <%= l @this_user.creation_time.to_date, :format => :long %>
+           |
+           <%= t 'user.view.ct status' %>
+           <% if not @this_user.terms_agreed.nil? -%>
+           <%= t 'user.view.ct accepted', :ago =>time_ago_in_words(@this_user.terms_agreed)  %>
+           <% elsif not @this_user.terms_seen? -%>
+           <%= t 'user.view.ct undecided' %>
+           <% else -%>
+           <%= t 'user.view.ct declined' %>
+           <% end -%>
+         </small>
+       </p>
+     </div>
+     <div class='user-description'><%= @this_user.description.to_html %></div>
+   </div>
+   <% if @user and @user.administrator? -%>
+     <div class='admin-user-info deemphasize'>
+       <small><b><%= t 'user.view.email address' %></b> <%= @this_user.email %></small>
+       <% unless @this_user.creation_ip.nil? -%>
+         <small><b><%= t 'user.view.created from' %></b> <%= @this_user.creation_ip %></small>
+       <% end -%>
+       <small><b><%= t 'user.view.status' %></b> <%= @this_user.status.capitalize %></small>
+       <small><b><%= t 'user.view.spam score' %></b> <%= @this_user.spam_score %></small>
+     </div>
+   <% end -%>
+ <% end %>
  
- <div id="userinformation">
    <% if @user and @this_user.id == @user.id %>
-     <!-- Displaying user's own profile page -->
-     <%= link_to t('user.view.my edits'), :controller => 'changeset', :action => 'list', :display_name => @user.display_name %>
-     <span class='count-number'><%= number_with_delimiter(@user.changesets.size) %></span>
-     |
-     <%= link_to t('user.view.my traces'), :controller => 'trace', :action=>'mine' %>
-     <span class='count-number'><%= number_with_delimiter(@user.traces.size) %></span>
-     |
-     <%= link_to t('user.view.my notes'), :controller => 'notes', :action=> 'mine' %>
-     |
-     <%= link_to t('user.view.my diary'), :controller => 'diary_entry', :action => 'list', :display_name => @user.display_name %>
-     <span class='count-number'><%= number_with_delimiter(@user.diary_entries.size) %></span>
-     |
-     <%= link_to t('user.view.my comments' ), :controller => 'diary_entry', :action => 'comments', :display_name => @user.display_name %>
-     |
-     <%= link_to t('user.view.my settings'), :controller => 'user', :action => 'account', :display_name => @user.display_name %>
-     <% if @user.blocks.exists? %>
-       |
-       <%= link_to t('user.view.blocks on me'), :controller => 'user_blocks', :action => 'blocks_on', :display_name => @user.display_name %>
-       <span class='count-number'><%= number_with_delimiter(@user.blocks.active.size) %></span>
-     <% end %>
-     <% if @user and @user.moderator? and @user.blocks_created.exists? %>
-       |
-       <%= link_to t('user.view.blocks by me'), :controller => 'user_blocks', :action => 'blocks_by', :display_name => @user.display_name %>
-       <span class='count-number'><%= number_with_delimiter(@user.blocks_created.active.size) %></span>
-     <% end %>
-   <% else %>
-     <%= link_to t('user.view.edits'), :controller => 'changeset', :action => 'list', :display_name => @this_user.display_name %>
-     <span class='count-number'><%= number_with_delimiter(@this_user.changesets.size) %></span>
-     |
-     <%= link_to t('user.view.traces'), :controller => 'trace', :action => 'list', :display_name => @this_user.display_name %>
-     <span class='count-number'><%= number_with_delimiter(@this_user.traces.size) %></span>
-     |
-     <%= link_to t('user.view.notes'), :controller => 'notes', :action=> 'mine' %>
-     |
-     <!-- Displaying another user's profile page -->
-     <%= link_to t('user.view.send message'), :controller => 'message', :action => 'new', :display_name => @this_user.display_name %>
-     |
-     <%= link_to t('user.view.diary'), :controller => 'diary_entry', :action => 'list', :display_name => @this_user.display_name %>
-     <span class='count-number'><%= number_with_delimiter(@this_user.diary_entries.size) %></span>
-     |
-     <%= link_to t('user.view.comments'), :controller => 'diary_entry', :action => 'comments', :display_name => @this_user.display_name %>
-     |
-     <% if @user and @user.is_friends_with?(@this_user) %>
-       <%= link_to t('user.view.remove as friend'), remove_friend_path(:display_name => @this_user.display_name), :method => :post %>
+     <% if @this_user.home_lat.nil? or @this_user.home_lon.nil? %>
+       <div id="map" class="content_map">
+         <p id="no_home_location"><%= raw(t 'user.view.if set location', :settings_link => (link_to t('user.view.settings_link_text'), :controller => 'user', :action => 'account', :display_name => @user.display_name)) %></p>
+       </div>
      <% else %>
-       <%= link_to t('user.view.add as friend'), make_friend_path(:display_name => @this_user.display_name), :method => :post %>
-     <% end %>
-     <% if @this_user.blocks.exists? %>
-       |
-       <%= link_to t('user.view.block_history'), :controller => 'user_blocks', :action => 'blocks_on', :display_name => @this_user.display_name %>
-       <span class='count-number'><%= number_with_delimiter(@this_user.blocks.active.size) %></span>
-     <% end %>
-     <% if @this_user.moderator? and @this_user.blocks_created.exists? %>
-       |
-       <%= link_to t('user.view.moderator_history'), :controller => 'user_blocks', :action => 'blocks_by', :display_name => @this_user.display_name %>
-       <span class='count-number'><%= number_with_delimiter(@this_user.blocks_created.active.size) %></span>
-     <% end %>
-     <% if @user and @user.moderator? %>
-       | <%= link_to t('user.view.create_block'), :controller => 'user_blocks', :action => 'new', :display_name => @this_user.display_name %>
+       <% content_for :head do %>
+         <%= javascript_include_tag "user" %>
+       <% end %>
+       <%
+         user_data = {
+           :lon => @user.home_lon,
+           :lat => @user.home_lat,
+           :icon => image_path("marker-red.png"),
+           :description => render(:partial => "popup", :object => @user, :locals => {:type => "your location"})
+         }
+       %>
+       <%= content_tag "div", "", :id => "map", :class => "content_map", :data => {:user => user_data} %>
      <% end %>
-   <% end %>
-   <% if @user and @user.administrator? %>
-     <br/>
-     <% if ["active", "confirmed"].include? @this_user.status %>
-       <%= link_to t('user.view.deactivate_user'), set_status_user_path(:status => 'pending', :display_name => @this_user.display_name), :data => { :confirm => t('user.view.confirm') } %> |
-     <% elsif ["pending"].include? @this_user.status %>
-       <%= link_to t('user.view.activate_user'), set_status_user_path(:status => 'active', :display_name => @this_user.display_name), :data => { :confirm => t('user.view.confirm') } %> |
-     <% end %>
-     <% if ["active", "suspended"].include? @this_user.status %>
-       <%= link_to t('user.view.confirm_user'), set_status_user_path(:status => 'confirmed', :display_name => @this_user.display_name), :data => { :confirm => t('user.view.confirm') } %> |
-     <% end %>
-     <% if ["pending", "active", "confirmed", "suspended"].include? @this_user.status %>
-       <%= link_to t('user.view.hide_user'), set_status_user_path(:status => 'deleted', :display_name => @this_user.display_name), :data => { :confirm => t('user.view.confirm') } %> |
+     <% friends = @this_user.friends.collect { |f| f.befriendee } %>
+     <% nearby = @this_user.nearby - friends %>
+   <div class="activity-block column-1">
+     <h3><%= t 'user.view.your friends' %></h3>
+     <% if friends.empty? %>
+       <%= t 'user.view.no friends' %>
      <% else %>
-       <%= link_to t('user.view.unhide_user'), set_status_user_path(:status => 'active', :display_name => @this_user.display_name), :data => { :confirm => t('user.view.confirm') } %> |
+       <ul class='secondary-actions clearfix'>
+         <li><%= link_to t('user.view.friends_changesets'), friend_changesets_path %></li>
+         <li><%= link_to t('user.view.friends_diaries'), friend_diaries_path %></li>
+       </ul>
+       <div id="friends-container">
+         <%= render :partial => "contact", :collection => friends, :locals => {:type => "friend"} %>
+       </div>
      <% end %>
-     <%= link_to t('user.view.delete_user'), delete_user_path(:display_name => @this_user.display_name), :data => { :confirm => t('user.view.confirm') } %>
-   <% end %>
- </div>
- <div id="description"><%= @this_user.description.to_html %></div>
- <p class='deemphasize'><small>
- <%= t 'user.view.mapper since' %> <%= l @this_user.creation_time.to_date, :format => :long %>
- /
- <%= t 'user.view.ct status' %>
- <% if not @this_user.terms_agreed.nil? -%>
- <%= t 'user.view.ct accepted', :ago =>time_ago_in_words(@this_user.terms_agreed)  %>
- <% elsif not @this_user.terms_seen? -%>
- <%= t 'user.view.ct undecided' %>
- <% else -%>
- <%= t 'user.view.ct declined' %>
- <% end -%>
- </small>
- </p>
- <% if @user and @user.administrator? -%>
-   <p><b><%= t 'user.view.email address' %></b> <%= @this_user.email %></p>
-   <% unless @this_user.creation_ip.nil? -%>
-   <p><b><%= t 'user.view.created from' %></b> <%= @this_user.creation_ip %></p>
-   <% end -%>
-   <p><b><%= t 'user.view.status' %></b> <%= @this_user.status.capitalize %></p>
-   <p><b><%= t 'user.view.spam score' %></b> <%= @this_user.spam_score %></p>
- <% end -%>
- <% if @user and @this_user.id == @user.id %>
-   <% if @this_user.home_lat.nil? or @this_user.home_lon.nil? %>
-     <div id="map" class="user_map">
-       <p id="no_home_location"><%= raw(t 'user.view.if set location', :settings_link => (link_to t('user.view.settings_link_text'), :controller => 'user', :action => 'account', :display_name => @user.display_name)) %></p>
-     </div>
-   <% else %>
-     <% content_for :head do %>
-       <%= javascript_include_tag "user" %>
+   </div>
+   <div class="activity-block column-1">
+     <h3><%= t 'user.view.nearby users' %></h3>
+     <% if nearby.empty? %>
+       <%= t 'user.view.no nearby users' %>
+     <% else %>
+       <ul class='secondary-actions clearfix'>
+         <li><%= link_to t('user.view.nearby_changesets'), nearby_changesets_path %></li>
+         <li><%= link_to t('user.view.nearby_diaries'), nearby_diaries_path %></li>
+       </ul>
+       <div id="nearbyusers">
+         <%= render :partial => "contact", :collection => nearby, :locals => {:type => "nearby mapper"} %>
+       </div>
      <% end %>
-     <%
-       user_data = {
-         :lon => @user.home_lon,
-         :lat => @user.home_lat,
-         :icon => image_path("marker-red.png"),
-         :description => render(:partial => "popup", :object => @user, :locals => {:type => "your location"})
-       }
-     %>
-     <%= content_tag "div", "", :id => "map", :class => "user_map", :data => {:user => user_data} %>
-   <% end %>
-   <% friends = @this_user.friends.collect { |f| f.befriendee } %>
-   <% nearby = @this_user.nearby - friends %>
-   <h3 style="margin-top: 0"><%= t 'user.view.your friends' %></h3>
-   <% if friends.empty? %>
-     <%= t 'user.view.no friends' %>
-   <% else %>
-     <%= link_to t('user.view.friends_changesets'), friend_changesets_path %><br/>
-     <%= link_to t('user.view.friends_diaries'), friend_diaries_path %><br/><br/>
-     <table id="friends">
-       <%= render :partial => "contact", :collection => friends, :locals => {:type => "friend"} %>
-     </table>
-   <% end %>
-   <h3><%= t 'user.view.nearby users' %></h3>
-   <% if nearby.empty? %>
-     <%= t 'user.view.no nearby users' %>
-   <% else %>
-     <%= link_to t('user.view.nearby_changesets'), nearby_changesets_path %><br/>
-     <%= link_to t('user.view.nearby_diaries'), nearby_diaries_path %><br/><br/>
-     <table id="nearbyusers">
-       <%= render :partial => "contact", :collection => nearby, :locals => {:type => "nearby mapper"} %>
-     </table>
-   <% end %>
+   </div>
  <% end %>
Simple merge
index 3490163352fa192abddfeda093e6a520e5c9c912,831311615b007b89807fa0e58c4891aba202e98e..09d3ceae0da169b782928a6c992b7a507a3c62b0
@@@ -282,18 -279,9 +282,18 @@@ en
        download_xml: "Download XML"
        view_history: "View history"
        edit: "Edit way"
 +    note:
 +      open_title: "Unresolved issue: %{note_name}"
 +      closed_title: "Resolved issue: %{note_name}"
 +      opened: "Opened:"
 +      last_modified: "Last modified:"
 +      closed: "Closed:"
 +      at_by_html: "%{when} ago by %{user}"
 +      description: "Description:"
 +      comments: "Comments:"
    changeset:
      changeset_paging_nav:
-       showing_page: "Showing page %{page}"
+       showing_page: "Page %{page}"
        next: "Next »"
        previous: "« Previous"
      changeset:
        diary: diary
        edits: edits
        traces: traces
-       remove as friend: remove as friend
-       add as friend: add as friend
 +      notes: map notes
+       remove as friend: unfriend
+       add as friend: add friend
        mapper since: "Mapper since:"
        ago: "(%{time_in_words_ago} ago)"
        ct status: "Contributor terms:"