-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1791 from manyfold3d/problem-cards-on-show-pages
Show problem details on model/file pages
- Loading branch information
Showing
12 changed files
with
62 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<%= card(problem_severity(problem), t("problems.model_file_#{problem.category}.title")) do %> | ||
<%= t("problems.model_file_#{problem.category}.description", note: problem.note ) %> | ||
|
||
<% unless @duplicates.empty? %> | ||
<ul> | ||
<% @duplicates.each do |file| %> | ||
<li><%= link_to "#{file.model.name}/#{file.filename}", [file.model.library, file.model, file]%></li> | ||
<% end %> | ||
</ul> | ||
<% end %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<%= card(problem_severity(problem), t("problems.model_#{problem.category}.title")) do %> | ||
<%= t("problems.model_#{problem.category}.description", note: problem.note ) %> | ||
|
||
<% if @model.contains_other_models? %> | ||
<ul> | ||
<% @model.contained_models.each do |target| %> | ||
<li><%= link_to target.name, library_model_path(@library, target)%></li> | ||
<% end %> | ||
</ul> | ||
<p> | ||
<%= t("problems.model_nesting.warning") %> | ||
</p> | ||
<%= link_to "Merge all", merge_library_model_path(@library, @model, all: true), class: "btn btn-danger", method: :post %> | ||
<% end %> | ||
|
||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<td><%= icon("boxes", "Missing library") %></td> | ||
<td><%= icon("boxes", t(".title")) %></td> | ||
<td><%= link_to problem.problematic.name, problem.problematic %></td> | ||
<td><%= t "problems.library.missing" %></td> | ||
<td><%= t ".title" %></td> | ||
<td></td> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<td><%= icon("folder-x", "Empty model") %></td> | ||
<td><%= icon("folder-x", t(".title")) %></td> | ||
<td><%= link_to problem.problematic.name, [problem.problematic.library, problem.problematic] %></td> | ||
<td><%= t "problems.model.empty" %></td> | ||
<td><%= t ".title" %></td> | ||
<td><%= link_to "Purge", [problem.problematic.library, problem.problematic], method: :delete, class: "btn btn-danger" %></td> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<td><%= icon("files", t(".description")) %></td> | ||
<td><%= icon("files", t(".title")) %></td> | ||
<td><%= link_to problem.problematic.name, [problem.problematic.model.library, problem.problematic.model, problem.problematic] %></td> | ||
<td><%= t ".description" %></td> | ||
<td><%= t ".title" %></td> | ||
<td><%= link_to "Open", [problem.problematic.model.library, problem.problematic.model, problem.problematic], class: "btn btn-primary" %></td> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<td><%= icon("fire", t(".description")) %></td> | ||
<td><%= icon("fire", t(".title")) %></td> | ||
<td><%= link_to problem.problematic.name, [problem.problematic.model.library, problem.problematic.model, problem.problematic] %></td> | ||
<td><%= t ".description" %>: <%= problem.note %></td> | ||
<td><%= t ".title" %>: <%= problem.note %></td> | ||
<td><%= link_to "Open", [problem.problematic.model.library, problem.problematic.model, problem.problematic], class: "btn btn-primary" %></td> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<td><%= icon("file-x", "Missing file") %></td> | ||
<td><%= icon("file-x", t(".title")) %></td> | ||
<td><%= link_to problem.problematic.name, [problem.problematic.model.library, problem.problematic.model, problem.problematic] %></td> | ||
<td><%= t "problems.model_file.missing" %></td> | ||
<td><%= t ".title" %></td> | ||
<td><%= link_to "Purge", [problem.problematic.model.library, problem.problematic.model, problem.problematic], method: :delete, class: "btn btn-danger" %></td> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<td><%= icon("folder-x", "Missing model") %></td> | ||
<td><%= icon("folder-x", t(".title")) %></td> | ||
<td><%= link_to problem.problematic.name, [problem.problematic.library, problem.problematic] %></td> | ||
<td><%= t "problems.model.missing" %></td> | ||
<td><%= t ".title" %></td> | ||
<td><%= link_to "Purge", [problem.problematic.library, problem.problematic], method: :delete, class: "btn btn-danger" %></td> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<td><%= icon("files-alt", "Nested model") %></td> | ||
<td><%= icon("files-alt", t(".title")) %></td> | ||
<td><%= link_to problem.problematic.name, [problem.problematic.library, problem.problematic] %></td> | ||
<td><%= t "problems.model.nesting" %></td> | ||
<td><%= t ".title" %></td> | ||
<td><%= link_to "Open", [problem.problematic.library, problem.problematic], class: "btn btn-primary" %></td> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters