2024-05-19 12:26:48 -04:00
|
|
|
<%= sidebar_distance(@distance) %> <%= sidebar_points(@points) %>
|
2024-03-17 12:58:09 -04:00
|
|
|
|
2024-04-02 11:37:38 -04:00
|
|
|
<div id='years-nav'>
|
|
|
|
|
<div class="dropdown">
|
2024-11-28 11:13:04 -05:00
|
|
|
<div tabindex="0" role="button" class="btn">Select year</div>
|
2024-04-02 11:37:38 -04:00
|
|
|
<ul tabindex="0" class="dropdown-content z-[1] menu p-2 shadow bg-base-100 rounded-box w-52">
|
2024-12-06 11:32:45 -05:00
|
|
|
<% current_user.years_tracked.each do |year| %>
|
2024-09-08 11:25:35 -04:00
|
|
|
<li><%= link_to year, map_url(year_timespan(year).merge(year: year, import_id: params[:import_id])) %></li>
|
2024-04-02 11:37:38 -04:00
|
|
|
<% end %>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<% @years.each do |year| %>
|
|
|
|
|
<h3 class='text-xl'>
|
|
|
|
|
<%= year %>
|
|
|
|
|
</h3>
|
|
|
|
|
|
|
|
|
|
<div class='grid grid-cols-3 gap-3'>
|
|
|
|
|
<% (1..12).to_a.each_slice(3) do |months| %>
|
|
|
|
|
<% months.each do |month_number| %>
|
2024-05-25 07:36:15 -04:00
|
|
|
<% if past?(year, month_number) && points_exist?(year, month_number, current_user) %>
|
2024-09-08 11:25:35 -04:00
|
|
|
<%= link_to Date::ABBR_MONTHNAMES[month_number], map_url(timespan(month_number, year).merge(import_id: params[:import_id])), class: 'btn btn-default' %>
|
2024-04-02 11:37:38 -04:00
|
|
|
<% else %>
|
|
|
|
|
<div class='btn btn-disabled'><%= Date::ABBR_MONTHNAMES[month_number] %></div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
|
2024-03-24 13:05:39 -04:00
|
|
|
<% if REVERSE_GEOCODING_ENABLED && @countries_and_cities&.any? %>
|
2024-04-02 11:37:38 -04:00
|
|
|
<hr class='my-5'>
|
2024-03-17 12:58:09 -04:00
|
|
|
<% @countries_and_cities.each do |country| %>
|
2024-03-23 15:58:22 -04:00
|
|
|
<h2 class="text-lg font-semibold mt-5">
|
|
|
|
|
<%= country[:country] %> (<%= country[:cities].count %> cities)
|
|
|
|
|
</h2>
|
2024-07-24 14:25:16 -04:00
|
|
|
<ul class="timeline timeline-vertical">
|
2024-03-17 12:58:09 -04:00
|
|
|
<% country[:cities].each do |city| %>
|
2024-04-26 12:59:58 -04:00
|
|
|
<li>
|
2024-07-24 14:25:16 -04:00
|
|
|
<hr />
|
|
|
|
|
<div class="timeline-start"><%= link_to_date(city[:timestamp]) %></div>
|
|
|
|
|
<div class="timeline-middle">
|
|
|
|
|
<svg
|
|
|
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
|
|
|
viewBox="0 0 20 20"
|
|
|
|
|
fill="currentColor"
|
|
|
|
|
class="h-5 w-5">
|
|
|
|
|
<path
|
|
|
|
|
fill-rule="evenodd"
|
|
|
|
|
d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z"
|
|
|
|
|
clip-rule="evenodd" />
|
|
|
|
|
</svg>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="timeline-end timeline-box"><%= city[:city] %></div>
|
|
|
|
|
<hr />
|
2024-04-26 12:59:58 -04:00
|
|
|
</li>
|
2024-03-16 17:39:03 -04:00
|
|
|
<% end %>
|
|
|
|
|
</ul>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|