diff --git a/iphone/Maps/Images.xcassets/Bottom Menu/ic_menu_booking_search.imageset/Contents.json b/iphone/Maps/Images.xcassets/Bottom Menu/ic_menu_booking_search.imageset/Contents.json new file mode 100644 index 0000000000..725d7e5511 --- /dev/null +++ b/iphone/Maps/Images.xcassets/Bottom Menu/ic_menu_booking_search.imageset/Contents.json @@ -0,0 +1,15 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icTypeHotel.pdf" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + }, + "properties" : { + "template-rendering-intent" : "template" + } +} \ No newline at end of file diff --git a/iphone/Maps/Images.xcassets/Bottom Menu/ic_menu_booking_search.imageset/icTypeHotel.pdf b/iphone/Maps/Images.xcassets/Bottom Menu/ic_menu_booking_search.imageset/icTypeHotel.pdf new file mode 100644 index 0000000000..44d9c228a2 Binary files /dev/null and b/iphone/Maps/Images.xcassets/Bottom Menu/ic_menu_booking_search.imageset/icTypeHotel.pdf differ diff --git a/iphone/Maps/UI/BottomMenu/MWMBottomMenuViewController.mm b/iphone/Maps/UI/BottomMenu/MWMBottomMenuViewController.mm index e9d97a9356..2b716b1f0b 100644 --- a/iphone/Maps/UI/BottomMenu/MWMBottomMenuViewController.mm +++ b/iphone/Maps/UI/BottomMenu/MWMBottomMenuViewController.mm @@ -28,6 +28,7 @@ CGFloat constexpr kLayoutThreshold = 420.0; typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) { MWMBottomMenuViewCellAddPlace, MWMBottomMenuViewCellDownloadRoutes, + MWMBottomMenuViewCellBookingSearch, MWMBottomMenuViewCellDownloadMaps, MWMBottomMenuViewCellSettings, MWMBottomMenuViewCellShare, @@ -183,6 +184,12 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) { case MWMBottomMenuViewCellDownloadRoutes: [cell configurePromoWithImageName:@"ic_menu_routes" label:L(@"download_guides")]; break; + case MWMBottomMenuViewCellBookingSearch: + [cell configureWithImageName:@"ic_menu_booking_search" + label:L(@"booking_button_toolbar") + badgeCount:0 + isEnabled:YES]; + break; case MWMBottomMenuViewCellDownloadMaps: [cell configureWithImageName:@"ic_menu_download" label:L(@"download_maps") @@ -218,6 +225,7 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) { { case MWMBottomMenuViewCellAddPlace: [self menuActionAddPlace]; break; case MWMBottomMenuViewCellDownloadRoutes: [self menuActionDownloadRoutes]; break; + case MWMBottomMenuViewCellBookingSearch: [self menuActionBookingSearch]; break; case MWMBottomMenuViewCellDownloadMaps: [self menuActionDownloadMaps]; break; case MWMBottomMenuViewCellSettings: [self menuActionOpenSettings]; break; case MWMBottomMenuViewCellShare: [self menuActionShareLocation]; break; @@ -241,6 +249,14 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) { [self.mapViewController openCatalogAnimated:YES]; } +- (void)menuActionBookingSearch +{ + [Statistics logEvent:kStatToolbarClick withParameters:@{kStatButton : kStatSearch}]; + self.state = MWMBottomMenuStateInactive; + [MWMMapViewControlsManager.manager searchTextOnMap:[L(@"booking_hotel") stringByAppendingString:@" "] + forInputLocale:[NSLocale currentLocale].localeIdentifier]; +} + - (void)menuActionDownloadMaps { [Statistics logEvent:kStatToolbarMenuClick withParameters:@{kStatItem : kStatDownloadMaps}];