Skip to content

Commit

Permalink
Removed references to node types - "place" and "tool" (#9719)
Browse files Browse the repository at this point in the history
* Update show.html.erb

* place & tool removed from models services controllers

* Update legacy_controller.rb
  • Loading branch information
KSVSC authored Jun 3, 2021
1 parent 0b739d1 commit 59d0ef6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/models/node.rb
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ def icon
icon = 'book' if type == 'page'
icon = 'map-marker' if type == 'map'
icon = 'flag' if has_tag('chapter')
icon = 'wrench' if type == 'tool'
# icon = 'wrench' if type == 'tool'
icon = 'question-circle' if has_power_tag('question')
icon
end
Expand Down Expand Up @@ -553,7 +553,7 @@ def tagnames_as_classes
end

def edit_path
path = if type == 'page' || type == 'tool' || type == 'place'
path = if type == 'page'
'/wiki/edit/' + self.path.split('/').last
else
'/notes/edit/' + id.to_s
Expand Down
2 changes: 1 addition & 1 deletion app/services/search_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def search_notes(input, limit = 25, order = :natural, type = :boolean)

def search_wikis(input, limit = 25, order = :natural, type = :boolean)
Node.search(query: input, order: order, type: type, limit: limit)
.where("`node`.`type` = 'page' OR `node`.`type` = 'place' OR `node`.`type` = 'tool'")
.where("`node`.`type` = 'page'")
end

def search_maps(input, limit = 25, order = :natural, type = :boolean)
Expand Down

0 comments on commit 59d0ef6

Please sign in to comment.