Skip to content

Commit

Permalink
Add heatmap container to user profile view
Browse files Browse the repository at this point in the history
  • Loading branch information
kcne committed Dec 17, 2024
1 parent f46796f commit 9d87115
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions app/views/users/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<% content_for :head do %>
<%= stylesheet_link_tag "heatmap" %>
<%= javascript_include_tag "heatmap" %>
<% end %>
<% content_for :heading do %>
<div class="row">
<div class="col-sm-auto">
Expand Down Expand Up @@ -235,6 +239,12 @@

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

<% if @heatmap_data.present? %>
<div class="overflow-auto" style="max-height: 500px;">
<%= tag.div(:id => "cal-heatmap", :data => { :heatmap => @heatmap_data.to_json }) %>
</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" %>
Expand Down

0 comments on commit 9d87115

Please sign in to comment.