diff --git a/app/controllers/api/places_controller.rb b/app/controllers/api/places_controller.rb
index 35016d7..5048b71 100644
--- a/app/controllers/api/places_controller.rb
+++ b/app/controllers/api/places_controller.rb
@@ -1,3 +1,7 @@
class Api::PlacesController < Api::BaseController
+ # Search attributes
search_attributes :name, :city, :state, :country
+
+ # Preloads
+ preloads :qualifications, only: :show
end
diff --git a/app/models/place.rb b/app/models/place.rb
index 37dc510..04bacb0 100644
--- a/app/models/place.rb
+++ b/app/models/place.rb
@@ -1,5 +1,6 @@
class Place < ApplicationRecord
# Includes
+ include Qualifiable
include Recordable
include Search::Place
@@ -11,6 +12,7 @@ class Place < ApplicationRecord
# Resourceable parameters
allow_params :name, :place_type, :lat, :long, :city, :state, :country, :url, :database_value, :notes, :same_as,
- :part_of, locations_attributes: [:id, :locateable_id, :locateable_type, :description, :certainty,
- :notes, :_destroy, qualifications_attributes: [:id, :value_list_id, :notes, :persistent, :_destroy]]
+ :part_of, :authorized_vocabulary_url,
+ locations_attributes: [:id, :locateable_id, :locateable_type, :description, :certainty, :notes, :_destroy,
+ qualifications_attributes: [:id, :value_list_id, :notes, :persistent, :_destroy]]
end
diff --git a/app/serializers/places_serializer.rb b/app/serializers/places_serializer.rb
index 036f6cb..d114eb7 100644
--- a/app/serializers/places_serializer.rb
+++ b/app/serializers/places_serializer.rb
@@ -1,6 +1,7 @@
class PlacesSerializer < BaseSerializer
index_attributes :id, :name, :place_type, :lat, :long, :city, :state, :country
- show_attributes :id, :name, :place_type, :lat, :long, :city, :state, :country, :url, :database_value, :notes, :same_as, :part_of
+ show_attributes :id, :name, :place_type, :lat, :long, :city, :state, :country, :url, :database_value, :notes,
+ :same_as, :part_of, :authorized_vocabulary_url, qualifications: QualificationsSerializer
# For unauthenticated users, only display locations for artworks that are published
show_attributes(:locations) do |place, current_user|
diff --git a/client/src/components/PlaceForm.js b/client/src/components/PlaceForm.js
index 134a52a..be97555 100644
--- a/client/src/components/PlaceForm.js
+++ b/client/src/components/PlaceForm.js
@@ -6,6 +6,7 @@ import { GoogleScript } from '@performant-software/shared-components';
import { Form, Grid } from 'semantic-ui-react';
import _ from 'underscore';
import Countries from '../resources/Countries.json';
+import ValueListDropdown from './ValueListDropdown';
import type { EditContainerProps } from 'react-components/types';
import type { Translateable } from '../types/Translateable';
@@ -110,6 +111,19 @@ const PlaceForm = (props: Props) => {
onChange={props.onTextInputChange.bind(this, 'url')}
value={props.item.url || ''}
/>
+