]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/users/show.html.erb
Test end states of api changeset subscriptions
[rails.git] / app / views / users / show.html.erb
index 8ef7b56447d4fd891cdcb60daa0a8ef67c7543f9..e9f364523dd6c863d8b20719bf95166fa6c055ad 100644 (file)
@@ -1,3 +1,7 @@
+<% content_for :head do %>
+  <%= stylesheet_link_tag "cal-heatmap/dist/cal-heatmap" %>
+  <%= javascript_include_tag "heatmap" %>
+<% end %>
 <% content_for :heading do %>
   <div class="row">
     <div class="col-sm-auto">
@@ -30,7 +34,7 @@
               <span class='badge count-number'><%= number_with_delimiter(current_user.diary_comments.size) %></span>
             </li>
             <li>
-              <%= link_to t(".my settings"), edit_account_path %>
+              <%= link_to t(".my_account"), account_path %>
             </li>
 
             <% if current_user.blocks.exists? %>
 
 <div class="richtext text-break clearfix"><%= @user.description.to_html %></div>
 
+<% if @heatmap_data.present? %>
+  <div class="row">
+    <div class="col overflow-auto">
+      <div class="heatmap-wrapper d-flex align-items-start">
+        <!-- Labels -->
+        <ul class="list-unstyled d-flex flex-column justify-content-between ch-domain-text mb-0 mt-4">
+          <li>&nbsp;</li>
+          <li><%= t("date.abbr_day_names")[1] %></li>
+          <li>&nbsp;</li>
+          <li><%= t("date.abbr_day_names")[3] %></li>
+          <li>&nbsp;</li>
+          <li><%= t("date.abbr_day_names")[5] %></li>
+          <li>&nbsp;</li>
+        </ul>
+        <!-- Heatmap -->
+        <div id="cal-heatmap" class="ms-2"
+          data-heatmap="<%= @heatmap_data.to_json %>">
+        </div>
+      </div>
+    </div>
+  </div>
+<% end %>
+
 <% if current_user and @user.id == current_user.id %>
   <div class="my-3">
     <%= link_to t(".edit_profile"), edit_profile_path, :class => "btn btn-outline-primary" %>