<% content_for :title, 'Imports' %>

Imports

<%= link_to "New import", new_import_path, class: "rounded-lg py-3 px-5 bg-blue-600 text-white block font-medium" %> <% if current_user.settings['immich_url'] && current_user.settings['immich_api_key'] %> <%= link_to 'Import Immich data', settings_background_jobs_path(job_name: 'start_immich_import'), method: :post, data: { confirm: 'Are you sure?', turbo_confirm: 'Are you sure?', turbo_method: :post }, class: 'rounded-lg py-3 px-5 bg-blue-600 text-white block font-medium' %> <% else %> Import Immich data <% end %> <% if current_user.settings['photoprism_url'] && current_user.settings['photoprism_api_key'] %> <%= link_to 'Import Photoprism data', settings_background_jobs_path(job_name: 'start_photoprism_import'), method: :post, data: { confirm: 'Are you sure?', turbo_confirm: 'Are you sure?', turbo_method: :post }, class: 'rounded-lg py-3 px-5 bg-blue-600 text-white block font-medium' %> <% else %> Import Photoprism data <% end %>
<% if @imports.empty? %>

Hello there!

Here you'll find your imports, but now there are none. Let's <%= link_to 'create one', new_import_path, class: 'link' %>!

<% else %>
<%= paginate @imports %>
<% @imports.each do |import| %> <% end %>
Name Imported points Created at
<%= link_to import.name, import, class: 'underline hover:no-underline' %> (<%= import.source %>)   <%= link_to 'πŸ—ΊοΈ', map_path(import_id: import.id) %>   <%= link_to 'πŸ“‹', points_path(import_id: import.id) %> <%= number_with_delimiter import.points_count %> <%= import.created_at.strftime("%d.%m.%Y, %H:%M") %>
<% end %>