mirror of
https://github.com/manyfold3d/manyfold.git
synced 2026-10-22 03:32:18 -05:00
33 lines
1.3 KiB
ERB
33 lines
1.3 KiB
ERB
<% return if problems.empty? %>
|
|
<%= card("secondary", Problem.model_name.human(count: 100), id: "model-problems-card", data: tour_attributes(id: "model-problems-card", title: translate(".tour.title"), description: translate(".tour.description"))) do %>
|
|
<% problems.each do |problem| %>
|
|
<div class="clearfix">
|
|
<%= turbo_stream_from problem %>
|
|
<details>
|
|
<summary>
|
|
<%= problem_icon_tag(problem) %>
|
|
<%= t("problems.model.%{cat}.title" % {cat: problem.category}) %>
|
|
</summary>
|
|
<div class="card mb-2">
|
|
<div class="card-body">
|
|
<p>
|
|
<%= t("problems.model.%{cat}.description_html" % {cat: problem.category}, note: problem.note) %>
|
|
</p>
|
|
<% if problem.category == "nesting" && @model.contains_other_models? %>
|
|
<ul>
|
|
<% @model.contained_models.each do |target| %>
|
|
<li><%= link_to target.name, model_path(target) %></li>
|
|
<% end %>
|
|
</ul>
|
|
<p>
|
|
<%= t("problems.model.nesting.warning") %>
|
|
</p>
|
|
<% end %>
|
|
<div class="text-end"><%= ResolveButton(problem: problem, user: current_user) %></div>
|
|
</div>
|
|
</div>
|
|
</details>
|
|
</div>
|
|
<% end %>
|
|
<% end %>
|