'google_reviews_history', 'label' => 'Review history', 'description' => '', 'source' => 'sql', 'sql' => $aieo_grv_sql, 'registry_id' => 'google_reviews.history', 'scope' => 'both', 'version' => '1', 'per_page' => 50, 'row_key' => 'id', 'default_sort' => array( 'review_time', 'desc' ), 'empty_state' => 'No reviews stored yet. Google only ever returns the latest five per location, so this table fills as each fetch finds one it has not seen before.', 'actions' => array( array( 'id' => 'hide', 'label' => 'Hide', 'capability' => 'aieo_access', 'when' => array( 'key' => 'is_visible', 'is' => '1' ), 'bulk' => 'selection', 'bulk_confirm' => 'Hide %1$s reviews from the shop? They stay here, and Show puts them back.', ), array( 'id' => 'show', 'label' => 'Show', 'capability' => 'aieo_access', 'when' => array( 'key' => 'is_visible', 'is' => '0' ), 'bulk' => 'selection', 'bulk_confirm' => 'Show %1$s reviews on the shop again?', ), ), 'columns' => array( array( 'key' => 'select', 'label' => '', 'type' => 'selector', 'width' => '28px', 'sortable' => false, ), array( 'key' => 'id', 'label' => 'ID', 'type' => 'id', 'width' => '60px', 'sortable' => true, ), array( 'key' => 'location_label', 'label' => 'Location', 'type' => 'text', 'subline' => 'location_slug', 'width' => '150px', 'sortable' => true, 'filter' => 'multiselect', ), array( 'key' => 'location_slug', 'label' => 'Location slug', 'type' => 'code', 'hidden' => true, ), array( 'key' => 'rating', 'label' => 'Rating', 'type' => 'badge', 'width' => '120px', 'sortable' => true, 'filter' => 'select', 'format' => array( 'labels' => array( '1' => '★☆☆☆☆ 1', '2' => '★★☆☆☆ 2', '3' => '★★★☆☆ 3', '4' => '★★★★☆ 4', '5' => '★★★★★ 5', ), 'map' => array( '1' => 'danger', '2' => 'danger', '3' => 'warning', '4' => 'success', '5' => 'success', ), ), ), array( 'key' => 'author_name', 'label' => 'Author', 'type' => 'link', 'width' => '170px', 'sortable' => true, 'searchable' => true, 'filter' => 'text', 'subline' => 'language', 'format' => array( 'href' => 'author_url', 'external' => true ), ), array( 'key' => 'author_url', 'label' => 'Author URL', 'type' => 'link', 'hidden' => true, ), array( 'key' => 'language', 'label' => 'Language', 'type' => 'code', 'hidden' => true, ), array( 'key' => 'review_time', 'label' => 'Review date', 'type' => 'date', 'width' => '130px', 'nowrap' => true, 'sortable' => true, 'filter' => 'date_range', 'subline' => 'relative_time', ), array( 'key' => 'relative_time', 'label' => 'Relative', 'type' => 'text', 'hidden' => true, ), array( 'key' => 'review_text', 'label' => 'Text', 'type' => 'text', 'sortable' => false, 'searchable' => true, 'truncate' => 200, 'tooltip' => true, 'empty' => '', ), array( 'key' => 'matched_user_id', 'label' => 'Customer match', 'type' => 'user', 'width' => '180px', 'sortable' => true, 'empty' => '', 'format' => array( 'email' => true ), ), array( 'key' => 'match_method', 'label' => 'Matched by', 'type' => 'badge', 'width' => '110px', 'sortable' => true, 'filter' => 'select', 'empty' => '', 'suffix' => 'match_score', 'format' => array( 'map' => array( 'manual' => 'success', 'email' => 'info', 'name' => 'muted', ), ), ), array( 'key' => 'match_score', 'label' => 'Score', 'type' => 'decimal', 'hidden' => true, 'format' => array( 'precision' => 2 ), ), array( 'key' => 'is_visible', 'label' => 'Shown', 'type' => 'boolean', 'width' => '70px', 'align' => 'center', 'sortable' => true, ), array( 'key' => 'seen_at', 'label' => 'First seen', 'type' => 'datetime', 'width' => '150px', 'nowrap' => true, 'tone' => 'secondary', 'sortable' => true, 'filter' => 'date_range', 'format' => array( 'tz' => 'utc' ), ), array( 'key' => 'location_id', 'label' => 'Location id', 'type' => 'id', 'hidden' => true, ), ), );