Add 'tags' to event model. Add a dataimport system - currently for MaxMind zip files

This commit is contained in:
Dan Milne
2025-11-11 10:31:36 +11:00
parent 772fae7e8b
commit 26216da9ca
34 changed files with 3580 additions and 14 deletions

View File

@@ -150,7 +150,13 @@
</div>
<div class="mt-1 text-sm text-gray-500">
<%= policy.policy_type.humanize %> policy targeting
<% if policy.targets.length > 3 %>
<% if policy.country_policy? && policy.targets.any? %>
<% if policy.targets.length > 3 %>
<%= policy.targets.length %> countries
<% else %>
<%= policy.targets.map { |code| CountryHelper.display_with_flag(code) }.join(', ') %>
<% end %>
<% elsif policy.targets.length > 3 %>
<%= policy.targets.length %> items
<% else %>
<%= policy.targets.join(', ') %>