def _import_hue_3_5_collections(self, props, user): props['collection']['template']['template'] = self.result.get_template() props['collection']['template']['extracode'] = escape(self.result.get_extracode()) props['collection']['template']['isGridLayout'] = False props['layout'] = [ {"size":2,"rows":[{"widgets":[]}],"drops":["temp"],"klass":"card card-home card-column span2"}, {"size":10,"rows":[{"widgets":[ {"size":12,"name":"Grid Results","id":"52f07188-f30f-1296-2450-f77e02e1a5c0","widgetType":"html-resultset-widget", "properties":{},"offset":0,"isLoading":True,"klass":"card card-widget span12"}] }], "drops":["temp"],"klass":"card card-home card-column span10"} ] from search.views import _create_facet props['collection']['facets'] =[] facets = self.facets.get_data() for facet_id in facets['order']: for facet in facets['fields'] + facets['ranges']: if facet['uuid'] == facet_id: props['collection']['facets'].append( _create_facet({'name': self.name}, user, facet_id, facet['label'], facet['field'], 'facet-widget')) props['layout'][0]['rows'][0]['widgets'].append({ "size":12,"name": facet['label'], "id":facet_id, "widgetType": "facet-widget", "properties":{},"offset":0,"isLoading":True,"klass":"card card-widget span12" })
def _import_hue_3_5_collections(self, props, user): props["collection"]["template"]["template"] = self.result.get_template() props["collection"]["template"]["extracode"] = escape(self.result.get_extracode()) props["collection"]["template"]["isGridLayout"] = False props["layout"] = [ {"size": 2, "rows": [{"widgets": []}], "drops": ["temp"], "klass": "card card-home card-column span2"}, { "size": 10, "rows": [ { "widgets": [ { "size": 12, "name": "Grid Results", "id": "52f07188-f30f-1296-2450-f77e02e1a5c0", "widgetType": "html-resultset-widget", "properties": {}, "offset": 0, "isLoading": True, "klass": "card card-widget span12", } ] } ], "drops": ["temp"], "klass": "card card-home card-column span10", }, ] from search.views import _create_facet props["collection"]["facets"] = [] facets = self.facets.get_data() for facet_id in facets["order"]: for facet in facets["fields"] + facets["ranges"]: if facet["uuid"] == facet_id: props["collection"]["facets"].append( _create_facet( {"name": self.name}, user, facet_id, facet["label"], facet["field"], "facet-widget" ) ) props["layout"][0]["rows"][0]["widgets"].append( { "size": 12, "name": facet["label"], "id": facet_id, "widgetType": "facet-widget", "properties": {}, "offset": 0, "isLoading": True, "klass": "card card-widget span12", } )