Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove support for type specific comment form info #2076

Merged
merged 2 commits into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions app/views/controllers/comments/_object.html.erb
Original file line number Diff line number Diff line change
@@ -1,38 +1,3 @@
<%= case object.class.name

when "Location"
render(partial: "locations/show/location", object: object)

when "LocationDescription"
render(partial: "descriptions/description_details_and_alts_panel")

when "Name"
str = render(partial: "names/show/nomenclature",
locals: { name: object, synonyms: true })
if object.has_notes?
str += tag.p("#{:show_name_notes.t}:")
str += notes_panel(object.notes.tpl)
end
content_tag(:div, str, class: "name-section m-3")

when "NameDescription"
render(partial: "descriptions/description_details_and_alts_panel")

when "Observation"
render(partial: "observations/show/observation_details",
locals: { obs: object })

when "Project"
render(partial: "projects/project", object: object)

when "SpeciesList"
render(partial: "species_lists/species_list", object: object)

else
raise("We appear to have forgotten to tell add/edit_comment " +
"how to display objects of type \"#{object.class.name}\".")
end %>

<%= render(partial: "comments/comments_for_object",
locals: { object: object, comments: @comments,
controls: false, limit: 10 }) %>
4 changes: 0 additions & 4 deletions app/views/controllers/locations/descriptions/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,4 @@ add_pager_for(@description)
<%= render(partial: "descriptions/show_description_notes") %>
<%= render(partial: "descriptions/show_description_authors_and_editors") %>

<%= render(partial: "comments/comments_for_object",
locals: { object: @description, comments: @comments,
controls: @user, limit: 10 }) %>

<%= show_object_footer(@description, @versions) %>
4 changes: 0 additions & 4 deletions app/views/controllers/names/descriptions/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,4 @@ add_page_title(@description.format_name.t)
<%= render(partial: "descriptions/show_description_notes") %>
<%= render(partial: "descriptions/show_description_authors_and_editors") %>

<%= render(partial: "comments/comments_for_object",
locals: { object: @description, comments: @comments,
controls: @user, limit: 10 }) if false %>

<%= show_object_footer(@description, @versions) %>
6 changes: 0 additions & 6 deletions app/views/controllers/projects/_project.html.erb

This file was deleted.

14 changes: 0 additions & 14 deletions app/views/controllers/species_lists/_species_list.html.erb

This file was deleted.

Loading