Skip to content

Commit 9d87115

Browse files
committed
Add heatmap container to user profile view
1 parent f46796f commit 9d87115

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

app/views/users/show.html.erb

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<% content_for :head do %>
2+
<%= stylesheet_link_tag "heatmap" %>
3+
<%= javascript_include_tag "heatmap" %>
4+
<% end %>
15
<% content_for :heading do %>
26
<div class="row">
37
<div class="col-sm-auto">
@@ -235,6 +239,12 @@
235239

236240
<div class="richtext text-break clearfix"><%= @user.description.to_html %></div>
237241

242+
<% if @heatmap_data.present? %>
243+
<div class="overflow-auto" style="max-height: 500px;">
244+
<%= tag.div(:id => "cal-heatmap", :data => { :heatmap => @heatmap_data.to_json }) %>
245+
</div>
246+
<% end %>
247+
238248
<% if current_user and @user.id == current_user.id %>
239249
<div class="my-3">
240250
<%= link_to t(".edit_profile"), edit_profile_path, :class => "btn btn-outline-primary" %>

0 commit comments

Comments
 (0)