[ios] Rich pp.

This commit is contained in:
VladiMihaylenko 2017-02-27 18:33:16 +03:00 committed by Sergey Yershov
parent 4855a63f12
commit a6ae75285c
40 changed files with 1297 additions and 42 deletions

View file

@ -14,6 +14,8 @@
#import "MWMKeyboard.h"
#import "MWMLocationManager.h"
#import "MWMNoMapsViewController.h"
#import "MWMPlacePageButtonsProtocol.h"
#import "MWMPlacePageCellUpdateProtocol.h"
#import "MWMPushNotifications.h"
#import "MWMRouter.h"
#import "MWMSearchNoResults.h"

View file

@ -7,6 +7,7 @@
@class MapViewController;
@protocol MWMFeatureHolder;
@protocol MWMBookingInfoHolder;
@interface MWMMapViewControlsManager : NSObject
@ -64,4 +65,8 @@
- (id<MWMFeatureHolder>)featureHolder;
#pragma mark - MWMBookingInfoHolder
- (id<MWMBookingInfoHolder>)bookingInfoHolder;
@end

View file

@ -586,4 +586,8 @@ extern NSString * const kAlohalyticsTapEventKey;
#pragma mark - MWMFeatureHolder
- (id<MWMFeatureHolder>)featureHolder { return self.placePageManager; }
#pragma mark - MWMBookingInfoHolder
- (id<MWMBookingInfoHolder>)bookingInfoHolder { return self.placePageManager; }
@end

View file

@ -33,6 +33,7 @@ struct AddressInfo;
- (void)openBookmarks;
- (void)openMapsDownloader:(mwm::DownloaderMode)mode;
- (void)openEditor;
- (void)openHotelFacilities;
- (void)openBookmarkEditorWithData:(MWMPlacePageData *)data;
- (void)initialize;

View file

@ -10,6 +10,7 @@
#import "MWMCommon.h"
#import "MWMEditBookmarkController.h"
#import "MWMEditorViewController.h"
#import "MWMFacilitiesController.h"
#import "MWMFrameworkListener.h"
#import "MWMKeyboard.h"
#import "MWMLocationHelpers.h"
@ -65,6 +66,7 @@ NSString * const kMigrationSegue = @"Map2MigrationSegue";
NSString * const kEditorSegue = @"Map2EditorSegue";
NSString * const kUDViralAlertWasShown = @"ViralAlertWasShown";
NSString * const kPP2BookmarkEditingSegue = @"PP2BookmarkEditing";
NSString * const kHotelFacilitiesSegue = @"Map2FacilitiesSegue";
// The first launch after process started. Used to skip "Not follow, no position" state and to run
// locator.
@ -390,6 +392,11 @@ BOOL gIsFirstMyPositionMode = YES;
[self performSegueWithIdentifier:kEditorSegue sender:self.controlsManager.featureHolder];
}
- (void)openHotelFacilities
{
[self performSegueWithIdentifier:kHotelFacilitiesSegue sender:self.controlsManager.bookingInfoHolder];
}
- (void)openBookmarkEditorWithData:(MWMPlacePageData *)data
{
[self performSegueWithIdentifier:kPP2BookmarkEditingSegue sender:data];
@ -551,6 +558,13 @@ BOOL gIsFirstMyPositionMode = YES;
MWMAuthorizationWebViewLoginViewController * dvc = segue.destinationViewController;
dvc.authType = MWMWebViewAuthorizationTypeGoogle;
}
else if ([segue.identifier isEqualToString:kHotelFacilitiesSegue])
{
MWMFacilitiesController * dvc = segue.destinationViewController;
auto bookingInfo = id<MWMBookingInfoHolder>(sender);
dvc.facilities = bookingInfo.hotelFacilities;
dvc.hotelName = bookingInfo.hotelName;
}
}
#pragma mark - MWMKeyboard

View file

@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_bad.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_bad@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_bad@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 563 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_good.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_good@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_good@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 577 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 814 B

View file

@ -829,16 +829,64 @@
F653CE161C71F60200A453F1 /* MWMAddPlaceNavigationBar.mm in Sources */ = {isa = PBXBuildFile; fileRef = F653CE151C71F60200A453F1 /* MWMAddPlaceNavigationBar.mm */; };
F653CE181C71F62400A453F1 /* MWMAddPlaceNavigationBar.xib in Resources */ = {isa = PBXBuildFile; fileRef = F653CE171C71F62400A453F1 /* MWMAddPlaceNavigationBar.xib */; };
F653CE191C71F62700A453F1 /* MWMAddPlaceNavigationBar.mm in Sources */ = {isa = PBXBuildFile; fileRef = F653CE151C71F60200A453F1 /* MWMAddPlaceNavigationBar.mm */; };
F6558D791E5D7E0A002203AE /* PPFacilityCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6558D781E5D7E0A002203AE /* PPFacilityCell.swift */; };
F6558D7B1E5D7E0A002203AE /* PPFacilityCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6558D781E5D7E0A002203AE /* PPFacilityCell.swift */; };
F6558D7D1E5D7E91002203AE /* PPFacilityCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6558D7C1E5D7E91002203AE /* PPFacilityCell.xib */; };
F6558D7F1E5D7E91002203AE /* PPFacilityCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6558D7C1E5D7E91002203AE /* PPFacilityCell.xib */; };
F6558D811E5D839C002203AE /* PPReviewHeaderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6558D801E5D839C002203AE /* PPReviewHeaderCell.swift */; };
F6558D831E5D839C002203AE /* PPReviewHeaderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6558D801E5D839C002203AE /* PPReviewHeaderCell.swift */; };
F6558D891E5D83EE002203AE /* PPReviewHeaderCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6558D881E5D83EE002203AE /* PPReviewHeaderCell.xib */; };
F6558D8B1E5D83EE002203AE /* PPReviewHeaderCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6558D881E5D83EE002203AE /* PPReviewHeaderCell.xib */; };
F6558D8D1E5D83FA002203AE /* MWMPPReviewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6558D8C1E5D83FA002203AE /* MWMPPReviewCell.xib */; };
F6558D8F1E5D83FA002203AE /* MWMPPReviewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6558D8C1E5D83FA002203AE /* MWMPPReviewCell.xib */; };
F6558D921E5D8571002203AE /* MWMPPReviewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6558D911E5D8571002203AE /* MWMPPReviewCell.mm */; };
F6558D941E5D8571002203AE /* MWMPPReviewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6558D911E5D8571002203AE /* MWMPPReviewCell.mm */; };
F6558DA11E642CC0002203AE /* MWMFacilitiesController.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6558DA01E642CC0002203AE /* MWMFacilitiesController.mm */; };
F6558DA21E642CC0002203AE /* MWMFacilitiesController.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6558DA01E642CC0002203AE /* MWMFacilitiesController.mm */; };
F6558DA31E642CC0002203AE /* MWMFacilitiesController.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6558DA01E642CC0002203AE /* MWMFacilitiesController.mm */; };
F6588E2C1B15C26700EE1E58 /* MWMTextView.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6588E2B1B15C26700EE1E58 /* MWMTextView.mm */; };
F6664BF91E6459CB00E703C2 /* PPFacilityCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6664BF71E6459CB00E703C2 /* PPFacilityCell.swift */; };
F6664BFA1E6459CB00E703C2 /* PPFacilityCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6664BF71E6459CB00E703C2 /* PPFacilityCell.swift */; };
F6664BFB1E6459CB00E703C2 /* PPFacilityCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6664BF71E6459CB00E703C2 /* PPFacilityCell.swift */; };
F6664BFC1E6459CB00E703C2 /* PPFacilityCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6664BF81E6459CB00E703C2 /* PPFacilityCell.xib */; };
F6664BFD1E6459CB00E703C2 /* PPFacilityCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6664BF81E6459CB00E703C2 /* PPFacilityCell.xib */; };
F6664BFE1E6459CB00E703C2 /* PPFacilityCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6664BF81E6459CB00E703C2 /* PPFacilityCell.xib */; };
F6664C011E6459DA00E703C2 /* PPReviewHeaderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6664BFF1E6459DA00E703C2 /* PPReviewHeaderCell.swift */; };
F6664C021E6459DA00E703C2 /* PPReviewHeaderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6664BFF1E6459DA00E703C2 /* PPReviewHeaderCell.swift */; };
F6664C031E6459DA00E703C2 /* PPReviewHeaderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6664BFF1E6459DA00E703C2 /* PPReviewHeaderCell.swift */; };
F6664C041E6459DA00E703C2 /* PPReviewHeaderCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6664C001E6459DA00E703C2 /* PPReviewHeaderCell.xib */; };
F6664C051E6459DA00E703C2 /* PPReviewHeaderCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6664C001E6459DA00E703C2 /* PPReviewHeaderCell.xib */; };
F6664C061E6459DA00E703C2 /* PPReviewHeaderCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6664C001E6459DA00E703C2 /* PPReviewHeaderCell.xib */; };
F6664C121E645A4100E703C2 /* MWMPPReviewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6664C101E645A4100E703C2 /* MWMPPReviewCell.mm */; };
F6664C131E645A4100E703C2 /* MWMPPReviewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6664C101E645A4100E703C2 /* MWMPPReviewCell.mm */; };
F6664C141E645A4100E703C2 /* MWMPPReviewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6664C101E645A4100E703C2 /* MWMPPReviewCell.mm */; };
F6664C151E645A4100E703C2 /* MWMPPReviewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6664C111E645A4100E703C2 /* MWMPPReviewCell.xib */; };
F6664C161E645A4100E703C2 /* MWMPPReviewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6664C111E645A4100E703C2 /* MWMPPReviewCell.xib */; };
F6664C171E645A4100E703C2 /* MWMPPReviewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6664C111E645A4100E703C2 /* MWMPPReviewCell.xib */; };
F6791B131C43DEA7007A8A6E /* MWMStartButton.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6791B121C43DEA7007A8A6E /* MWMStartButton.mm */; };
F6791B141C43DF0B007A8A6E /* MWMStartButton.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6791B121C43DEA7007A8A6E /* MWMStartButton.mm */; };
F67E751E1DB76DFC00D6741F /* MWMTaxiCollectionLayout.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6F778791DABC6D800B603E7 /* MWMTaxiCollectionLayout.mm */; };
F682249A1E5B104600BC1C18 /* PPHotelDescriptionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F68224991E5B104600BC1C18 /* PPHotelDescriptionCell.swift */; };
F682249B1E5B104600BC1C18 /* PPHotelDescriptionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F68224991E5B104600BC1C18 /* PPHotelDescriptionCell.swift */; };
F682249C1E5B104600BC1C18 /* PPHotelDescriptionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F68224991E5B104600BC1C18 /* PPHotelDescriptionCell.swift */; };
F682249E1E5B105900BC1C18 /* PPHotelDescriptionCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F682249D1E5B105900BC1C18 /* PPHotelDescriptionCell.xib */; };
F682249F1E5B105900BC1C18 /* PPHotelDescriptionCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F682249D1E5B105900BC1C18 /* PPHotelDescriptionCell.xib */; };
F68224A01E5B105900BC1C18 /* PPHotelDescriptionCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F682249D1E5B105900BC1C18 /* PPHotelDescriptionCell.xib */; };
F68FCB851DA7BBA6007CC7D7 /* MWMTaxiPreviewDataSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = F68FCB841DA7BBA6007CC7D7 /* MWMTaxiPreviewDataSource.mm */; };
F68FCB861DA7BBA6007CC7D7 /* MWMTaxiPreviewDataSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = F68FCB841DA7BBA6007CC7D7 /* MWMTaxiPreviewDataSource.mm */; };
F68FCB8A1DA7BD20007CC7D7 /* MWMTaxiPreviewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F68FCB881DA7BD20007CC7D7 /* MWMTaxiPreviewCell.mm */; };
F68FCB8B1DA7BD20007CC7D7 /* MWMTaxiPreviewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F68FCB881DA7BD20007CC7D7 /* MWMTaxiPreviewCell.mm */; };
F68FCB8C1DA7BD20007CC7D7 /* MWMTaxiPreviewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F68FCB891DA7BD20007CC7D7 /* MWMTaxiPreviewCell.xib */; };
F68FCB8D1DA7BD20007CC7D7 /* MWMTaxiPreviewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F68FCB891DA7BD20007CC7D7 /* MWMTaxiPreviewCell.xib */; };
F69CE8D51E5C49B4002B5881 /* PPHotelCarouselCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F69CE8D41E5C49B4002B5881 /* PPHotelCarouselCell.swift */; };
F69CE8D61E5C49B4002B5881 /* PPHotelCarouselCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F69CE8D41E5C49B4002B5881 /* PPHotelCarouselCell.swift */; };
F69CE8D71E5C49B4002B5881 /* PPHotelCarouselCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F69CE8D41E5C49B4002B5881 /* PPHotelCarouselCell.swift */; };
F69CE8D91E5C5088002B5881 /* PPHotelCarouselCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F69CE8D81E5C5088002B5881 /* PPHotelCarouselCell.xib */; };
F69CE8DA1E5C5088002B5881 /* PPHotelCarouselCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F69CE8D81E5C5088002B5881 /* PPHotelCarouselCell.xib */; };
F69CE8DB1E5C5088002B5881 /* PPHotelCarouselCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F69CE8D81E5C5088002B5881 /* PPHotelCarouselCell.xib */; };
F69CE8DD1E5C51AB002B5881 /* CarouselElement.xib in Resources */ = {isa = PBXBuildFile; fileRef = F69CE8DC1E5C51AB002B5881 /* CarouselElement.xib */; };
F69CE8DE1E5C51AB002B5881 /* CarouselElement.xib in Resources */ = {isa = PBXBuildFile; fileRef = F69CE8DC1E5C51AB002B5881 /* CarouselElement.xib */; };
F69CE8DF1E5C51AB002B5881 /* CarouselElement.xib in Resources */ = {isa = PBXBuildFile; fileRef = F69CE8DC1E5C51AB002B5881 /* CarouselElement.xib */; };
F6A218491CA3F26800BE2CC6 /* MWMEditorViralActivityItem.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6A218481CA3F26800BE2CC6 /* MWMEditorViralActivityItem.mm */; };
F6A2184A1CA3F26800BE2CC6 /* MWMEditorViralActivityItem.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6A218481CA3F26800BE2CC6 /* MWMEditorViralActivityItem.mm */; };
F6B97B261CD0CA990009B612 /* MWMBookmarkNameCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6B97B251CD0CA990009B612 /* MWMBookmarkNameCell.mm */; };
@ -1881,15 +1929,36 @@
F653CE141C71F60200A453F1 /* MWMAddPlaceNavigationBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMAddPlaceNavigationBar.h; sourceTree = "<group>"; };
F653CE151C71F60200A453F1 /* MWMAddPlaceNavigationBar.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMAddPlaceNavigationBar.mm; sourceTree = "<group>"; };
F653CE171C71F62400A453F1 /* MWMAddPlaceNavigationBar.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMAddPlaceNavigationBar.xib; sourceTree = "<group>"; };
F6558D781E5D7E0A002203AE /* PPFacilityCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PPFacilityCell.swift; sourceTree = "<group>"; };
F6558D7C1E5D7E91002203AE /* PPFacilityCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PPFacilityCell.xib; sourceTree = "<group>"; };
F6558D801E5D839C002203AE /* PPReviewHeaderCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PPReviewHeaderCell.swift; sourceTree = "<group>"; };
F6558D881E5D83EE002203AE /* PPReviewHeaderCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PPReviewHeaderCell.xib; sourceTree = "<group>"; };
F6558D8C1E5D83FA002203AE /* MWMPPReviewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMPPReviewCell.xib; sourceTree = "<group>"; };
F6558D911E5D8571002203AE /* MWMPPReviewCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMPPReviewCell.mm; sourceTree = "<group>"; };
F6558D9F1E642CC0002203AE /* MWMFacilitiesController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMFacilitiesController.h; sourceTree = "<group>"; };
F6558DA01E642CC0002203AE /* MWMFacilitiesController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMFacilitiesController.mm; sourceTree = "<group>"; };
F6588E2A1B15C26700EE1E58 /* MWMTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMTextView.h; sourceTree = "<group>"; };
F6588E2B1B15C26700EE1E58 /* MWMTextView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMTextView.mm; sourceTree = "<group>"; };
F6664BF71E6459CB00E703C2 /* PPFacilityCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PPFacilityCell.swift; sourceTree = "<group>"; };
F6664BF81E6459CB00E703C2 /* PPFacilityCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PPFacilityCell.xib; sourceTree = "<group>"; };
F6664BFF1E6459DA00E703C2 /* PPReviewHeaderCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PPReviewHeaderCell.swift; sourceTree = "<group>"; };
F6664C001E6459DA00E703C2 /* PPReviewHeaderCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PPReviewHeaderCell.xib; sourceTree = "<group>"; };
F6664C0F1E645A4100E703C2 /* MWMPPReviewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMPPReviewCell.h; sourceTree = "<group>"; };
F6664C101E645A4100E703C2 /* MWMPPReviewCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMPPReviewCell.mm; sourceTree = "<group>"; };
F6664C111E645A4100E703C2 /* MWMPPReviewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMPPReviewCell.xib; sourceTree = "<group>"; };
F6791B111C43DEA7007A8A6E /* MWMStartButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMStartButton.h; sourceTree = "<group>"; };
F6791B121C43DEA7007A8A6E /* MWMStartButton.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMStartButton.mm; sourceTree = "<group>"; };
F68224991E5B104600BC1C18 /* PPHotelDescriptionCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PPHotelDescriptionCell.swift; sourceTree = "<group>"; };
F682249D1E5B105900BC1C18 /* PPHotelDescriptionCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PPHotelDescriptionCell.xib; sourceTree = "<group>"; };
F68224A11E5B1B1A00BC1C18 /* MWMPlacePageButtonsProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMPlacePageButtonsProtocol.h; sourceTree = "<group>"; };
F68FCB831DA7BBA6007CC7D7 /* MWMTaxiPreviewDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MWMTaxiPreviewDataSource.h; path = Views/RoutePreview/MWMTaxiPreviewDataSource.h; sourceTree = "<group>"; };
F68FCB841DA7BBA6007CC7D7 /* MWMTaxiPreviewDataSource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MWMTaxiPreviewDataSource.mm; path = Views/RoutePreview/MWMTaxiPreviewDataSource.mm; sourceTree = "<group>"; };
F68FCB871DA7BD20007CC7D7 /* MWMTaxiPreviewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMTaxiPreviewCell.h; sourceTree = "<group>"; };
F68FCB881DA7BD20007CC7D7 /* MWMTaxiPreviewCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMTaxiPreviewCell.mm; sourceTree = "<group>"; };
F68FCB891DA7BD20007CC7D7 /* MWMTaxiPreviewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMTaxiPreviewCell.xib; sourceTree = "<group>"; };
F69CE8D41E5C49B4002B5881 /* PPHotelCarouselCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PPHotelCarouselCell.swift; sourceTree = "<group>"; };
F69CE8D81E5C5088002B5881 /* PPHotelCarouselCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PPHotelCarouselCell.xib; sourceTree = "<group>"; };
F69CE8DC1E5C51AB002B5881 /* CarouselElement.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CarouselElement.xib; sourceTree = "<group>"; };
F6A218471CA3F26800BE2CC6 /* MWMEditorViralActivityItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditorViralActivityItem.h; sourceTree = "<group>"; };
F6A218481CA3F26800BE2CC6 /* MWMEditorViralActivityItem.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMEditorViralActivityItem.mm; sourceTree = "<group>"; };
F6B97B241CD0CA990009B612 /* MWMBookmarkNameCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMBookmarkNameCell.h; sourceTree = "<group>"; };
@ -3263,6 +3332,16 @@
name = "AddPlace NavigationBar";
sourceTree = "<group>";
};
F6558D951E642C18002203AE /* Controllers */ = {
isa = PBXGroup;
children = (
F6558D9F1E642CC0002203AE /* MWMFacilitiesController.h */,
F6558DA01E642CC0002203AE /* MWMFacilitiesController.mm */,
);
name = Controllers;
path = ../Controllers;
sourceTree = "<group>";
};
F6588E291B15C25C00EE1E58 /* TextView */ = {
isa = PBXGroup;
children = (
@ -3272,6 +3351,26 @@
name = TextView;
sourceTree = "<group>";
};
F68224981E5B0FE100BC1C18 /* BookingCells */ = {
isa = PBXGroup;
children = (
F6558D951E642C18002203AE /* Controllers */,
F6664BFF1E6459DA00E703C2 /* PPReviewHeaderCell.swift */,
F6664C001E6459DA00E703C2 /* PPReviewHeaderCell.xib */,
F6664BF71E6459CB00E703C2 /* PPFacilityCell.swift */,
F6664BF81E6459CB00E703C2 /* PPFacilityCell.xib */,
F68224991E5B104600BC1C18 /* PPHotelDescriptionCell.swift */,
F682249D1E5B105900BC1C18 /* PPHotelDescriptionCell.xib */,
F69CE8D41E5C49B4002B5881 /* PPHotelCarouselCell.swift */,
F69CE8D81E5C5088002B5881 /* PPHotelCarouselCell.xib */,
F69CE8DC1E5C51AB002B5881 /* CarouselElement.xib */,
F6664C0F1E645A4100E703C2 /* MWMPPReviewCell.h */,
F6664C101E645A4100E703C2 /* MWMPPReviewCell.mm */,
F6664C111E645A4100E703C2 /* MWMPPReviewCell.xib */,
);
path = BookingCells;
sourceTree = "<group>";
};
F6BBF2C31B4FFB56000CF8E2 /* LocationAlert */ = {
isa = PBXGroup;
children = (
@ -3534,6 +3633,7 @@
F6E2FC991E097B9F0083EBEC /* MWMPlacePageManager.h */,
F6E2FC9A1E097B9F0083EBEC /* MWMPlacePageManager.mm */,
F6E2FC9B1E097B9F0083EBEC /* MWMPlacePageProtocol.h */,
F68224A11E5B1B1A00BC1C18 /* MWMPlacePageButtonsProtocol.h */,
F6E2FC9C1E097B9F0083EBEC /* PlacePageLayout */,
);
path = PlacePage;
@ -3595,6 +3695,7 @@
isa = PBXGroup;
children = (
346DB81C1E5C4F6700E3123E /* Gallery */,
F68224981E5B0FE100BC1C18 /* BookingCells */,
F6E2FCA91E097B9F0083EBEC /* BookmarkCell */,
F6E2FCAF1E097B9F0083EBEC /* ButtonCell */,
F6E2FCB31E097B9F0083EBEC /* OpeningHoursCell */,
@ -4160,6 +4261,7 @@
340E1EF11E2F614400CE49BF /* Main.storyboard in Resources */,
F6E2FF501E097BA00083EBEC /* MWMAboutControllerHeader.xib in Resources */,
F6E2FE511E097BA00083EBEC /* MWMActionBarButton.xib in Resources */,
F6558D891E5D83EE002203AE /* PPReviewHeaderCell.xib in Resources */,
F653CE181C71F62400A453F1 /* MWMAddPlaceNavigationBar.xib in Resources */,
F64F199A1AB81A00006EAF7E /* MWMAlertViewController.xib in Resources */,
341C2A5B1B720B8A00AD41A1 /* MWMAPIBarView.xib in Resources */,
@ -4189,17 +4291,21 @@
34D3B0441E389D05004100F9 /* MWMEditorTextTableViewCell.xib in Resources */,
346DB8301E5C4F6700E3123E /* GalleryItemViewController.xib in Resources */,
F64D9CA21C899C760063FA30 /* MWMEditorViralAlert.xib in Resources */,
F6664C151E645A4100E703C2 /* MWMPPReviewCell.xib in Resources */,
F6BC1E541ACBF9AB00EF0360 /* MWMFacebookAlert.xib in Resources */,
F6172FA51BBD5A3E0081D325 /* MWMiPadRoutePreview.xib in Resources */,
F6BBF2C81B4FFB8C000CF8E2 /* MWMLocationAlert.xib in Resources */,
3406FA181C6E0D8F00E9FAD2 /* MWMMapDownloadDialog.xib in Resources */,
F6E2FD521E097BA00083EBEC /* MWMMapDownloaderAdsTableViewCell.xib in Resources */,
F6E2FD581E097BA00083EBEC /* MWMMapDownloaderButtonTableViewCell.xib in Resources */,
F6664BFC1E6459CB00E703C2 /* PPFacilityCell.xib in Resources */,
F6E2FD611E097BA00083EBEC /* MWMMapDownloaderLargeCountryTableViewCell.xib in Resources */,
F6E2FD671E097BA00083EBEC /* MWMMapDownloaderPlaceTableViewCell.xib in Resources */,
F6E2FD6D1E097BA00083EBEC /* MWMMapDownloaderSubplaceTableViewCell.xib in Resources */,
F6E2FD731E097BA00083EBEC /* MWMMapDownloaderTableViewCell.xib in Resources */,
349A13841DEC138C00C7DB60 /* MWMMobileInternetAlert.xib in Resources */,
F6558D7D1E5D7E91002203AE /* PPFacilityCell.xib in Resources */,
F6558D8D1E5D83FA002203AE /* MWMPPReviewCell.xib in Resources */,
349C3AEF1D33A96B002AC7A9 /* MWMNavigationInfoView.xib in Resources */,
34D3B04A1E389D05004100F9 /* MWMNoteCell.xib in Resources */,
F6E2FDEE1E097BA00083EBEC /* MWMOpeningHoursAddClosedTableViewCell.xib in Resources */,
@ -4221,11 +4327,13 @@
F6E2FE841E097BA00083EBEC /* MWMPlacePageOpeningHoursWeekDayView.xib in Resources */,
F6E2FE931E097BA00083EBEC /* MWMPlacePageTaxiCell.xib in Resources */,
F6E2FEA51E097BA00083EBEC /* MWMPPView.xib in Resources */,
F69CE8D91E5C5088002B5881 /* PPHotelCarouselCell.xib in Resources */,
F61579361AC2CEB60032D8E9 /* MWMRateAlert.xib in Resources */,
F6BB6CC01BB17D7000DF1DF2 /* MWMRoutePointCell.xib in Resources */,
F6BB6CBE1BB15A5E00DF1DF2 /* MWMRoutePreview.xib in Resources */,
F63774E71B59375E00BCF54D /* MWMRoutingDisclaimerAlert.xib in Resources */,
F6E2FEFF1E097BA00083EBEC /* MWMSearchCategoryCell.xib in Resources */,
F69CE8DD1E5C51AB002B5881 /* CarouselElement.xib in Resources */,
F6E2FF321E097BA00083EBEC /* MWMSearchCommonCell.xib in Resources */,
F6E2FF051E097BA00083EBEC /* MWMSearchHistoryClearCell.xib in Resources */,
F6E2FF0E1E097BA00083EBEC /* MWMSearchHistoryMyPositionCell.xib in Resources */,
@ -4233,6 +4341,7 @@
F6E2FEE71E097BA00083EBEC /* MWMSearchNoResults.xib in Resources */,
346225911DDC5FBA001E8752 /* MWMSearchNoResultsAlert.xib in Resources */,
F6E2FF381E097BA00083EBEC /* MWMSearchSuggestionCell.xib in Resources */,
F6664C041E6459DA00E703C2 /* PPReviewHeaderCell.xib in Resources */,
F6E2FF1A1E097BA00083EBEC /* MWMSearchTabbedCollectionViewCell.xib in Resources */,
F6E2FF201E097BA00083EBEC /* MWMSearchTabbedViewController.xib in Resources */,
F6E2FF291E097BA00083EBEC /* MWMSearchTabButtonsView.xib in Resources */,
@ -4260,6 +4369,7 @@
4A23D15F1B8B4DD700D4EB6F /* resources-xxhdpi_clear in Resources */,
4A7D89C81B2EBF3B00AC843E /* resources-xxhdpi_dark in Resources */,
340E1EF41E2F614400CE49BF /* SearchFilters.storyboard in Resources */,
F682249E1E5B105900BC1C18 /* PPHotelDescriptionCell.xib in Resources */,
340E1EF71E2F614400CE49BF /* Settings.storyboard in Resources */,
5605022F1B6211E100169CAD /* sound-strings in Resources */,
FAAEA7D1161BD26600CCD661 /* synonyms.txt in Resources */,
@ -4315,6 +4425,7 @@
6741A9501BF340DE002C974C /* fonts_whitelist.txt in Resources */,
34F73FA31E08300E00AC1FD6 /* Images.xcassets in Resources */,
34F73F9C1E082FF800AC1FD6 /* InfoPlist.strings in Resources */,
F6664C161E645A4100E703C2 /* MWMPPReviewCell.xib in Resources */,
340E1EEF1E2F614400CE49BF /* LaunchScreen.storyboard in Resources */,
34F73F9F1E082FF800AC1FD6 /* Localizable.strings in Resources */,
340E1EF21E2F614400CE49BF /* Main.storyboard in Resources */,
@ -4356,6 +4467,7 @@
F6E2FD531E097BA00083EBEC /* MWMMapDownloaderAdsTableViewCell.xib in Resources */,
F6E2FD591E097BA00083EBEC /* MWMMapDownloaderButtonTableViewCell.xib in Resources */,
F6E2FD621E097BA00083EBEC /* MWMMapDownloaderLargeCountryTableViewCell.xib in Resources */,
F6664BFD1E6459CB00E703C2 /* PPFacilityCell.xib in Resources */,
F6E2FD681E097BA00083EBEC /* MWMMapDownloaderPlaceTableViewCell.xib in Resources */,
F6E2FD6E1E097BA00083EBEC /* MWMMapDownloaderSubplaceTableViewCell.xib in Resources */,
F6E2FD741E097BA00083EBEC /* MWMMapDownloaderTableViewCell.xib in Resources */,
@ -4396,6 +4508,7 @@
F6E2FF391E097BA00083EBEC /* MWMSearchSuggestionCell.xib in Resources */,
F6E2FF1B1E097BA00083EBEC /* MWMSearchTabbedCollectionViewCell.xib in Resources */,
F6E2FF211E097BA00083EBEC /* MWMSearchTabbedViewController.xib in Resources */,
F6664C051E6459DA00E703C2 /* PPReviewHeaderCell.xib in Resources */,
F6E2FF2A1E097BA00083EBEC /* MWMSearchTabButtonsView.xib in Resources */,
F6E2FF421E097BA00083EBEC /* MWMSearchTableViewController.xib in Resources */,
F6E2FEEE1E097BA00083EBEC /* MWMSearchView.xib in Resources */,
@ -4414,6 +4527,8 @@
677A2DE21C0DD50900635A00 /* resources-default in Resources */,
F607C1881C032A8800B53A87 /* resources-hdpi_clear in Resources */,
F607C18A1C032A8800B53A87 /* resources-hdpi_dark in Resources */,
F69CE8DA1E5C5088002B5881 /* PPHotelCarouselCell.xib in Resources */,
F69CE8DE1E5C51AB002B5881 /* CarouselElement.xib in Resources */,
6741A97F1BF340DE002C974C /* resources-mdpi_clear in Resources */,
6741A9901BF340DE002C974C /* resources-mdpi_dark in Resources */,
6741A9981BF340DE002C974C /* resources-xhdpi_clear in Resources */,
@ -4421,6 +4536,7 @@
6741A94D1BF340DE002C974C /* resources-xxhdpi_clear in Resources */,
6741A9551BF340DE002C974C /* resources-xxhdpi_dark in Resources */,
340E1EF51E2F614400CE49BF /* SearchFilters.storyboard in Resources */,
F682249F1E5B105900BC1C18 /* PPHotelDescriptionCell.xib in Resources */,
340E1EF81E2F614400CE49BF /* Settings.storyboard in Resources */,
6741A9421BF340DE002C974C /* sound-strings in Resources */,
6741A97D1BF340DE002C974C /* synonyms.txt in Resources */,
@ -4482,6 +4598,7 @@
F6E2FF521E097BA00083EBEC /* MWMAboutControllerHeader.xib in Resources */,
F6E2FE531E097BA00083EBEC /* MWMActionBarButton.xib in Resources */,
849CF6641DE842290024A8A5 /* MWMAddPlaceNavigationBar.xib in Resources */,
F6558D8B1E5D83EE002203AE /* PPReviewHeaderCell.xib in Resources */,
849CF67B1DE842290024A8A5 /* MWMAlertViewController.xib in Resources */,
849CF6621DE842290024A8A5 /* MWMAPIBarView.xib in Resources */,
F6E2FE651E097BA00083EBEC /* MWMBookmarkCell.xib in Resources */,
@ -4490,6 +4607,7 @@
F6E2FD9C1E097BA00083EBEC /* MWMBookmarkTitleCell.xib in Resources */,
349D1AD31E2E325B004A2006 /* MWMBottomMenuCollectionViewLandscapeCell.xib in Resources */,
349D1AD61E2E325C004A2006 /* MWMBottomMenuCollectionViewPortraitCell.xib in Resources */,
F69CE8DF1E5C51AB002B5881 /* CarouselElement.xib in Resources */,
349D1AE21E2E325C004A2006 /* MWMBottomMenuViewController.xib in Resources */,
34D3B01F1E389D05004100F9 /* MWMButtonCell.xib in Resources */,
849CF6661DE842290024A8A5 /* MWMCircularProgress.xib in Resources */,
@ -4510,17 +4628,21 @@
34D3B0461E389D05004100F9 /* MWMEditorTextTableViewCell.xib in Resources */,
849CF66D1DE842290024A8A5 /* MWMEditorViralAlert.xib in Resources */,
346DB8321E5C4F6700E3123E /* GalleryItemViewController.xib in Resources */,
F6664C171E645A4100E703C2 /* MWMPPReviewCell.xib in Resources */,
849CF66F1DE842290024A8A5 /* MWMFacebookAlert.xib in Resources */,
849CF6381DE842290024A8A5 /* MWMiPadRoutePreview.xib in Resources */,
849CF6301DE842290024A8A5 /* MWMLocationAlert.xib in Resources */,
849CF60D1DE842290024A8A5 /* MWMMapDownloadDialog.xib in Resources */,
F6E2FD541E097BA00083EBEC /* MWMMapDownloaderAdsTableViewCell.xib in Resources */,
F6E2FD5A1E097BA00083EBEC /* MWMMapDownloaderButtonTableViewCell.xib in Resources */,
F6664BFE1E6459CB00E703C2 /* PPFacilityCell.xib in Resources */,
F6E2FD631E097BA00083EBEC /* MWMMapDownloaderLargeCountryTableViewCell.xib in Resources */,
F6E2FD691E097BA00083EBEC /* MWMMapDownloaderPlaceTableViewCell.xib in Resources */,
F6E2FD6F1E097BA00083EBEC /* MWMMapDownloaderSubplaceTableViewCell.xib in Resources */,
F6E2FD751E097BA00083EBEC /* MWMMapDownloaderTableViewCell.xib in Resources */,
849CF6431DE842290024A8A5 /* MWMNavigationInfoView.xib in Resources */,
F6558D7F1E5D7E91002203AE /* PPFacilityCell.xib in Resources */,
F6558D8F1E5D83FA002203AE /* MWMPPReviewCell.xib in Resources */,
34D3B04C1E389D05004100F9 /* MWMNoteCell.xib in Resources */,
F6E2FDF01E097BA00083EBEC /* MWMOpeningHoursAddClosedTableViewCell.xib in Resources */,
F6E2FDF61E097BA00083EBEC /* MWMOpeningHoursAddScheduleTableViewCell.xib in Resources */,
@ -4545,6 +4667,7 @@
849CF6511DE842290024A8A5 /* MWMRateAlert.xib in Resources */,
849CF6651DE842290024A8A5 /* MWMRoutePointCell.xib in Resources */,
849CF6311DE842290024A8A5 /* MWMRoutePreview.xib in Resources */,
F68224A01E5B105900BC1C18 /* PPHotelDescriptionCell.xib in Resources */,
849CF6191DE842290024A8A5 /* MWMRoutingDisclaimerAlert.xib in Resources */,
F6E2FF011E097BA00083EBEC /* MWMSearchCategoryCell.xib in Resources */,
F6E2FF341E097BA00083EBEC /* MWMSearchCommonCell.xib in Resources */,
@ -4555,6 +4678,7 @@
F6E2FEE91E097BA00083EBEC /* MWMSearchNoResults.xib in Resources */,
849CF5E71DE842290024A8A5 /* MWMSearchNoResultsAlert.xib in Resources */,
F6E2FF3A1E097BA00083EBEC /* MWMSearchSuggestionCell.xib in Resources */,
F6664C061E6459DA00E703C2 /* PPReviewHeaderCell.xib in Resources */,
F6E2FF1C1E097BA00083EBEC /* MWMSearchTabbedCollectionViewCell.xib in Resources */,
F6E2FF221E097BA00083EBEC /* MWMSearchTabbedViewController.xib in Resources */,
F6E2FF2B1E097BA00083EBEC /* MWMSearchTabButtonsView.xib in Resources */,
@ -4577,6 +4701,7 @@
849CF6031DE842290024A8A5 /* resources-hdpi_dark in Resources */,
849CF64F1DE842290024A8A5 /* resources-mdpi_clear in Resources */,
849CF66E1DE842290024A8A5 /* resources-mdpi_dark in Resources */,
F69CE8DB1E5C5088002B5881 /* PPHotelCarouselCell.xib in Resources */,
849CF67A1DE842290024A8A5 /* resources-xhdpi_clear in Resources */,
849CF61A1DE842290024A8A5 /* resources-xhdpi_dark in Resources */,
849CF5FC1DE842290024A8A5 /* resources-xxhdpi_clear in Resources */,
@ -4685,6 +4810,7 @@
F6E2FE1E1E097BA00083EBEC /* MWMOpeningHoursCommon.mm in Sources */,
F6BC1E521ACBF98600EF0360 /* MWMFacebookAlert.mm in Sources */,
F6E2FF5C1E097BA00083EBEC /* MWMRecentTrackSettingsController.mm in Sources */,
F6664BF91E6459CB00E703C2 /* PPFacilityCell.swift in Sources */,
F6E2FDE81E097BA00083EBEC /* MWMObjectsCategorySelectorController.mm in Sources */,
F64F199D1AB81A00006EAF7E /* MWMDefaultAlert.mm in Sources */,
34D3AFF51E37A36A004100F9 /* UICollectionView+Cells.swift in Sources */,
@ -4741,6 +4867,7 @@
340475611E081A4600C92850 /* MWMNetworkPolicy.mm in Sources */,
342EE4111C43DAA7009F6A49 /* MWMAuthorizationWebViewLoginViewController.mm in Sources */,
F6E2FEE41E097BA00083EBEC /* MWMSearchNoResults.mm in Sources */,
F6558D811E5D839C002203AE /* PPReviewHeaderCell.swift in Sources */,
F6E2FF621E097BA00083EBEC /* MWMTTSLanguageViewController.mm in Sources */,
F64D9C9F1C899C350063FA30 /* MWMEditorViralAlert.mm in Sources */,
34ABA62C1C2D57D500FE1BEC /* MWMInputPasswordValidator.mm in Sources */,
@ -4767,6 +4894,7 @@
F6E2FEDB1E097BA00083EBEC /* MWMSearchManager+Filter.mm in Sources */,
34943BB61E26222300B14F84 /* WelcomeProtocol.swift in Sources */,
F6E2FD5E1E097BA00083EBEC /* MWMMapDownloaderLargeCountryTableViewCell.mm in Sources */,
F6558DA11E642CC0002203AE /* MWMFacilitiesController.mm in Sources */,
F6E2FF471E097BA00083EBEC /* SettingsTableViewSelectableCell.swift in Sources */,
349D1ACE1E2E325B004A2006 /* MWMBottomMenuCollectionViewCell.mm in Sources */,
F6E2FF261E097BA00083EBEC /* MWMSearchTabButtonsView.mm in Sources */,
@ -4820,6 +4948,7 @@
340475491E081A4600C92850 /* AppInfo.mm in Sources */,
F6E2FDF11E097BA00083EBEC /* MWMOpeningHoursAddScheduleTableViewCell.mm in Sources */,
F6E2FD821E097BA00083EBEC /* MWMMapDownloaderSearchDataSource.mm in Sources */,
F6664C011E6459DA00E703C2 /* PPReviewHeaderCell.swift in Sources */,
3454D7C11E07F045004AF2AD /* NSString+Categories.mm in Sources */,
340E1EFA1E2F614400CE49BF /* Storyboard.swift in Sources */,
F6E2FE7B1E097BA00083EBEC /* MWMPlacePageOpeningHoursCell.mm in Sources */,
@ -4837,6 +4966,7 @@
349C3AEC1D33A933002AC7A9 /* MWMNavigationInfoView.mm in Sources */,
3454D7CD1E07F045004AF2AD /* UIFont+MapsMeFonts.mm in Sources */,
3454D7DC1E07F045004AF2AD /* UISwitch+RuntimeAttributes.m in Sources */,
F682249A1E5B104600BC1C18 /* PPHotelDescriptionCell.swift in Sources */,
F6E2FEC91E097BA00083EBEC /* MWMSearchFilterTransitioning.mm in Sources */,
FA054612155C465E001F4E37 /* SelectSetVC.mm in Sources */,
F6E2FE811E097BA00083EBEC /* MWMPlacePageOpeningHoursDayView.mm in Sources */,
@ -4874,6 +5004,7 @@
F6E2FF231E097BA00083EBEC /* MWMSearchTabbedViewLayout.mm in Sources */,
F6E2FF1D1E097BA00083EBEC /* MWMSearchTabbedViewController.mm in Sources */,
F6E2FF2F1E097BA00083EBEC /* MWMSearchCommonCell.mm in Sources */,
F6558D791E5D7E0A002203AE /* PPFacilityCell.swift in Sources */,
F6E2FE9F1E097BA00083EBEC /* MWMPlacePageLayout.mm in Sources */,
F6E2FEC31E097BA00083EBEC /* MWMSearchFilterPresentationController.mm in Sources */,
340475731E081A4600C92850 /* MWMStorage.mm in Sources */,
@ -4911,6 +5042,7 @@
F6BD33841B6240F200F2CE18 /* MWMNavigationView.mm in Sources */,
F6E2FE721E097BA00083EBEC /* MWMOpeningHours.mm in Sources */,
34AB39C11D2BD8310021857D /* MWMStopButton.mm in Sources */,
F69CE8D51E5C49B4002B5881 /* PPHotelCarouselCell.swift in Sources */,
F6E2FF5F1E097BA00083EBEC /* MWMSettingsViewController.mm in Sources */,
F6E2FE2A1E097BA00083EBEC /* MWMStreetEditorEditTableViewCell.mm in Sources */,
340475641E081A4600C92850 /* MWMRouter.mm in Sources */,
@ -4924,6 +5056,7 @@
F6E2FF561E097BA00083EBEC /* MWMMobileInternetViewController.mm in Sources */,
ED48BBBA17C2B1E2003E7E92 /* CircleView.mm in Sources */,
F6E2FEEA1E097BA00083EBEC /* MWMSearchTextField.mm in Sources */,
F6664C121E645A4100E703C2 /* MWMPPReviewCell.mm in Sources */,
F68FCB8A1DA7BD20007CC7D7 /* MWMTaxiPreviewCell.mm in Sources */,
3454D7D91E07F045004AF2AD /* UILabel+RuntimeAttributes.mm in Sources */,
F6E2FD9D1E097BA00083EBEC /* MWMEditBookmarkController.mm in Sources */,
@ -4931,6 +5064,7 @@
3454D7E21E07F045004AF2AD /* UITextView+RuntimeAttributes.mm in Sources */,
34D15BA81BD8F93C00C8BCBE /* AddSetTableViewCell.mm in Sources */,
F6E2FED51E097BA00083EBEC /* MWMSearchChangeModeView.mm in Sources */,
F6558D921E5D8571002203AE /* MWMPPReviewCell.mm in Sources */,
F6A218491CA3F26800BE2CC6 /* MWMEditorViralActivityItem.mm in Sources */,
34845DB21E165E24003D55B9 /* SearchNoResultsViewController.swift in Sources */,
);
@ -4951,6 +5085,7 @@
F6E2FE1F1E097BA00083EBEC /* MWMOpeningHoursCommon.mm in Sources */,
3454D7B91E07F045004AF2AD /* CALayer+RuntimeAttributes.mm in Sources */,
F6E2FF5D1E097BA00083EBEC /* MWMRecentTrackSettingsController.mm in Sources */,
F6664BFA1E6459CB00E703C2 /* PPFacilityCell.swift in Sources */,
F6E2FDE91E097BA00083EBEC /* MWMObjectsCategorySelectorController.mm in Sources */,
6741A9A81BF340DE002C974C /* MWMFacebookAlert.mm in Sources */,
34D3AFF61E37A36A004100F9 /* UICollectionView+Cells.swift in Sources */,
@ -5033,6 +5168,7 @@
F6E2FD5F1E097BA00083EBEC /* MWMMapDownloaderLargeCountryTableViewCell.mm in Sources */,
F6E2FF481E097BA00083EBEC /* SettingsTableViewSelectableCell.swift in Sources */,
F6E2FF271E097BA00083EBEC /* MWMSearchTabButtonsView.mm in Sources */,
F6558DA21E642CC0002203AE /* MWMFacilitiesController.mm in Sources */,
F6E2FE911E097BA00083EBEC /* MWMPlacePageTaxiCell.mm in Sources */,
349D1ACF1E2E325B004A2006 /* MWMBottomMenuCollectionViewCell.mm in Sources */,
F6E2FF451E097BA00083EBEC /* SettingsTableViewLinkCell.swift in Sources */,
@ -5061,6 +5197,7 @@
3454D7E01E07F045004AF2AD /* UITextField+RuntimeAttributes.mm in Sources */,
343E75981E5B1EE20041226A /* MWMCollectionViewController.mm in Sources */,
F6E2FEFA1E097BA00083EBEC /* MWMSearchCategoriesManager.mm in Sources */,
F6664C131E645A4100E703C2 /* MWMPPReviewCell.mm in Sources */,
F6E2FE431E097BA00083EBEC /* MWMDirectionView.mm in Sources */,
3486B50D1E27A6DA0069C126 /* MWMPushNotifications.mm in Sources */,
F6E2FD561E097BA00083EBEC /* MWMMapDownloaderButtonTableViewCell.mm in Sources */,
@ -5086,6 +5223,7 @@
F6E2FDF21E097BA00083EBEC /* MWMOpeningHoursAddScheduleTableViewCell.mm in Sources */,
F6E2FD831E097BA00083EBEC /* MWMMapDownloaderSearchDataSource.mm in Sources */,
3490D2E11CE9DD2500D0B838 /* MWMSideButtonsView.mm in Sources */,
F6664C021E6459DA00E703C2 /* PPReviewHeaderCell.swift in Sources */,
F6E2FE7C1E097BA00083EBEC /* MWMPlacePageOpeningHoursCell.mm in Sources */,
340E1EFB1E2F614400CE49BF /* Storyboard.swift in Sources */,
F6E2FF361E097BA00083EBEC /* MWMSearchSuggestionCell.mm in Sources */,
@ -5103,6 +5241,7 @@
6741A9FF1BF340DE002C974C /* AddSetVC.mm in Sources */,
3454D7CE1E07F045004AF2AD /* UIFont+MapsMeFonts.mm in Sources */,
349C3AED1D33A933002AC7A9 /* MWMNavigationInfoView.mm in Sources */,
F682249B1E5B104600BC1C18 /* PPHotelDescriptionCell.swift in Sources */,
F6E2FECA1E097BA00083EBEC /* MWMSearchFilterTransitioning.mm in Sources */,
3454D7DD1E07F045004AF2AD /* UISwitch+RuntimeAttributes.m in Sources */,
F6E2FE821E097BA00083EBEC /* MWMPlacePageOpeningHoursDayView.mm in Sources */,
@ -5177,6 +5316,7 @@
F6E2FE731E097BA00083EBEC /* MWMOpeningHours.mm in Sources */,
F6E2FF601E097BA00083EBEC /* MWMSettingsViewController.mm in Sources */,
F6E2FE2B1E097BA00083EBEC /* MWMStreetEditorEditTableViewCell.mm in Sources */,
F69CE8D61E5C49B4002B5881 /* PPHotelCarouselCell.swift in Sources */,
F6FEA82E1C58F108007223CC /* MWMButton.mm in Sources */,
34B924431DC8A29C0008D971 /* MWMMailViewController.mm in Sources */,
340475651E081A4600C92850 /* MWMRouter.mm in Sources */,
@ -5217,6 +5357,7 @@
F6E2FE201E097BA00083EBEC /* MWMOpeningHoursCommon.mm in Sources */,
849CF6891DE842290024A8A5 /* MWMFacebookAlert.mm in Sources */,
F6E2FF5E1E097BA00083EBEC /* MWMRecentTrackSettingsController.mm in Sources */,
F6664BFB1E6459CB00E703C2 /* PPFacilityCell.swift in Sources */,
F6E2FDEA1E097BA00083EBEC /* MWMObjectsCategorySelectorController.mm in Sources */,
849CF68A1DE842290024A8A5 /* MWMDefaultAlert.mm in Sources */,
34D3AFF71E37A36A004100F9 /* UICollectionView+Cells.swift in Sources */,
@ -5273,6 +5414,7 @@
3454D7DB1E07F045004AF2AD /* UILabel+RuntimeAttributes.mm in Sources */,
3454D7BD1E07F045004AF2AD /* CLLocation+Mercator.mm in Sources */,
F6E2FEE61E097BA00083EBEC /* MWMSearchNoResults.mm in Sources */,
F6558D831E5D839C002203AE /* PPReviewHeaderCell.swift in Sources */,
849CF6BD1DE842290024A8A5 /* MWMAuthorizationWebViewLoginViewController.mm in Sources */,
F6E2FF641E097BA00083EBEC /* MWMTTSLanguageViewController.mm in Sources */,
849CF6C31DE842290024A8A5 /* MWMEditorViralAlert.mm in Sources */,
@ -5299,6 +5441,7 @@
F6E2FEDD1E097BA00083EBEC /* MWMSearchManager+Filter.mm in Sources */,
34943BB81E26222300B14F84 /* WelcomeProtocol.swift in Sources */,
F6E2FD601E097BA00083EBEC /* MWMMapDownloaderLargeCountryTableViewCell.mm in Sources */,
F6558DA31E642CC0002203AE /* MWMFacilitiesController.mm in Sources */,
F6E2FF491E097BA00083EBEC /* SettingsTableViewSelectableCell.swift in Sources */,
349D1AD01E2E325B004A2006 /* MWMBottomMenuCollectionViewCell.mm in Sources */,
F6E2FF281E097BA00083EBEC /* MWMSearchTabButtonsView.mm in Sources */,
@ -5352,6 +5495,7 @@
849CF6F31DE842290024A8A5 /* MWMButton.mm in Sources */,
F6E2FDF31E097BA00083EBEC /* MWMOpeningHoursAddScheduleTableViewCell.mm in Sources */,
F6E2FD841E097BA00083EBEC /* MWMMapDownloaderSearchDataSource.mm in Sources */,
F6664C031E6459DA00E703C2 /* PPReviewHeaderCell.swift in Sources */,
849CF6F61DE842290024A8A5 /* MWMNavigationDashboardEntity.mm in Sources */,
340E1EFC1E2F614400CE49BF /* Storyboard.swift in Sources */,
F6E2FE7D1E097BA00083EBEC /* MWMPlacePageOpeningHoursCell.mm in Sources */,
@ -5369,6 +5513,7 @@
849CF7071DE842290024A8A5 /* LocaleTranslator.mm in Sources */,
340475821E081B3300C92850 /* iosOGLContextFactory.mm in Sources */,
849CF70A1DE842290024A8A5 /* MWMTaxiPreviewDataSource.mm in Sources */,
F682249C1E5B104600BC1C18 /* PPHotelDescriptionCell.swift in Sources */,
F6E2FECB1E097BA00083EBEC /* MWMSearchFilterTransitioning.mm in Sources */,
849CF70D1DE842290024A8A5 /* MWMAddPlaceNavigationBar.mm in Sources */,
F6E2FE831E097BA00083EBEC /* MWMPlacePageOpeningHoursDayView.mm in Sources */,
@ -5406,6 +5551,7 @@
F6E2FF251E097BA00083EBEC /* MWMSearchTabbedViewLayout.mm in Sources */,
F6E2FF1F1E097BA00083EBEC /* MWMSearchTabbedViewController.mm in Sources */,
F6E2FF311E097BA00083EBEC /* MWMSearchCommonCell.mm in Sources */,
F6558D7B1E5D7E0A002203AE /* PPFacilityCell.swift in Sources */,
F6E2FEA11E097BA00083EBEC /* MWMPlacePageLayout.mm in Sources */,
F6E2FEC51E097BA00083EBEC /* MWMSearchFilterPresentationController.mm in Sources */,
F6E2FD871E097BA00083EBEC /* MWMBaseMapDownloaderViewController.mm in Sources */,
@ -5443,6 +5589,7 @@
849CF7581DE842290024A8A5 /* MWMDownloadTransitMapAlert.mm in Sources */,
F6E2FE741E097BA00083EBEC /* MWMOpeningHours.mm in Sources */,
3454D7E71E07F045004AF2AD /* UIView+RuntimeAttributes.mm in Sources */,
F69CE8D71E5C49B4002B5881 /* PPHotelCarouselCell.swift in Sources */,
F6E2FF611E097BA00083EBEC /* MWMSettingsViewController.mm in Sources */,
F6E2FE2C1E097BA00083EBEC /* MWMStreetEditorEditTableViewCell.mm in Sources */,
849CF75C1DE842290024A8A5 /* MWMNavigationView.mm in Sources */,
@ -5456,6 +5603,7 @@
F6E2FF581E097BA00083EBEC /* MWMMobileInternetViewController.mm in Sources */,
849CF7651DE842290024A8A5 /* ColorPickerView.mm in Sources */,
F6E2FEEC1E097BA00083EBEC /* MWMSearchTextField.mm in Sources */,
F6664C141E645A4100E703C2 /* MWMPPReviewCell.mm in Sources */,
3454D7DE1E07F045004AF2AD /* UISwitch+RuntimeAttributes.m in Sources */,
849CF7671DE842290024A8A5 /* CircleView.mm in Sources */,
F6E2FD9F1E097BA00083EBEC /* MWMEditBookmarkController.mm in Sources */,
@ -5463,6 +5611,7 @@
849CF7691DE842290024A8A5 /* MWMTaxiPreviewCell.mm in Sources */,
849CF76D1DE842290024A8A5 /* AddSetTableViewCell.mm in Sources */,
F6E2FED71E097BA00083EBEC /* MWMSearchChangeModeView.mm in Sources */,
F6558D941E5D8571002203AE /* MWMPPReviewCell.mm in Sources */,
849CF76E1DE842290024A8A5 /* MWMEditorViralActivityItem.mm in Sources */,
34845DB41E165E24003D55B9 /* SearchNoResultsViewController.swift in Sources */,
);

View file

@ -0,0 +1,14 @@
@protocol MWMPlacePageButtonsProtocol<NSObject>
- (void)editPlace;
- (void)addPlace;
- (void)addBusiness;
- (void)book:(BOOL)isDescription;
- (void)editBookmark;
- (void)taxiTo;
- (void)showAllReviews;
- (void)showAllFacilities;
- (void)showPhotoAtIndex:(NSUInteger)index;
- (void)showGalery;
@end

View file

@ -2,6 +2,8 @@
#include "std/vector.hpp"
#include "partners_api/booking_api.hpp"
namespace place_page
{
enum class Sections
@ -9,7 +11,11 @@ enum class Sections
Preview,
Bookmark,
Metainfo,
Buttons
Buttons,
HotelPhotos,
HotelDescription,
HotelFacilities,
HotelReviews
};
enum class PreviewRows
@ -24,6 +30,29 @@ enum class PreviewRows
Banner
};
enum class HotelDescriptionRow
{
Regular
};
enum class HotelPhotosRow
{
Regular
};
enum class HotelFacilitiesRow
{
Regular,
ShowMore
};
enum class HotelReviewsRow
{
Header,
Regular,
ShowMore
};
enum class MetainfoRows
{
OpeningHours,
@ -44,7 +73,9 @@ enum class ButtonsRows
AddBusiness,
EditPlace,
AddPlace,
HotelDescription
HotelDescription,
BookingShowMoreFacilities,
BookingShowMoreReviews
};
enum class OpeningHours
@ -55,11 +86,18 @@ enum class OpeningHours
Unknown
};
} // namespace place_page_data
using NewSectionsReady = void(^)(NSRange const & range);
} // namespace place_page
@class MWMGalleryItemModel;
/// ViewModel for place page.
@interface MWMPlacePageData : NSObject
@property (copy, nonatomic) place_page::NewSectionsReady sectionsReadyCallback;
// ready callback will be called from main queue.
- (instancetype)initWithPlacePageInfo:(place_page::Info const &)info;
@ -76,13 +114,21 @@ enum class OpeningHours
- (NSString *)address;
// Booking
- (void)fillOnlineBookingSections;
- (NSString *)bookingRating;
- (NSString *)bookingApproximatePricing;
- (NSURL *)sponsoredURL;
- (NSURL *)sponsoredDescriptionURL;
- (NSString *)sponsoredId;
- (banners::Banner)banner;
- (void)assignOnlinePriceToLabel:(UILabel *)label;
- (NSString *)hotelDescription;
- (vector<booking::HotelFacility> const &)facilities;
- (vector<booking::HotelReview> const &)reviews;
- (NSUInteger)numberOfReviews;
- (NSArray<MWMGalleryItemModel *> *)photos;
// Banner
- (banners::Banner)banner;
// API
- (NSString *)apiURL;
@ -97,6 +143,10 @@ enum class OpeningHours
// Table view's data
- (vector<place_page::Sections> const &)sections;
- (vector<place_page::PreviewRows> const &)previewRows;
- (vector<place_page::HotelPhotosRow> const &)photosRows;
- (vector<place_page::HotelDescriptionRow> const &)descriptionRows;
- (vector<place_page::HotelFacilitiesRow> const &)hotelFacilitiesRows;
- (vector<place_page::HotelReviewsRow> const &)hotelReviewsRows;
- (vector<place_page::MetainfoRows> const &)metainfoRows;
- (vector<place_page::ButtonsRows> const &)buttonsRows;

View file

@ -1,6 +1,8 @@
#import "MWMPlacePageData.h"
#import "AppInfo.h"
#import "MWMNetworkPolicy.h"
#import "MWMSettings.h"
#import "SwiftBridge.h"
#include "Framework.h"
@ -26,6 +28,12 @@ using namespace place_page;
vector<PreviewRows> m_previewRows;
vector<MetainfoRows> m_metainfoRows;
vector<ButtonsRows> m_buttonsRows;
vector<HotelPhotosRow> m_hotelPhotosRows;
vector<HotelDescriptionRow> m_hotelDescriptionRows;
vector<HotelFacilitiesRow> m_hotelFacilitiesRows;
vector<HotelReviewsRow> m_hotelReviewsRows;
booking::HotelInfo m_hotelInfo;
}
- (instancetype)initWithPlacePageInfo:(Info const &)info
@ -46,6 +54,10 @@ using namespace place_page;
m_previewRows.clear();
m_metainfoRows.clear();
m_buttonsRows.clear();
m_hotelPhotosRows.clear();
m_hotelDescriptionRows.clear();
m_hotelReviewsRows.clear();
m_hotelFacilitiesRows.clear();
m_sections.push_back(Sections::Preview);
[self fillPreviewSection];
@ -140,6 +152,98 @@ using namespace place_page;
m_buttonsRows.push_back(ButtonsRows::AddBusiness);
}
- (void)fillOnlineBookingSections
{
if (!self.isBooking)
return;
if (Platform::ConnectionStatus() == Platform::EConnectionType::CONNECTION_NONE)
return;
network_policy::CallPartnersApi([self](platform::NetworkPolicy const & canUseNetwork)
{
if (auto const api = GetFramework().GetBookingApi(canUseNetwork))
{
string const hotelId = self.sponsoredId.UTF8String;
api->GetHotelInfo(hotelId, [[AppInfo sharedInfo] languageId].UTF8String, [hotelId, self](booking::HotelInfo const & hotelInfo)
{
if (hotelId != hotelInfo.m_hotelId)
return;
m_hotelInfo = hotelInfo;
auto & sections = self->m_sections;
auto const begin = sections.begin();
auto const end = sections.end();
NSUInteger const position = find(begin, end, Sections::Bookmark) != end ? 2 : 1;
NSUInteger length = 0;
auto it = m_sections.begin() + position;
if (!hotelInfo.m_photos.empty())
{
it = sections.insert(it, Sections::HotelPhotos) + 1;
m_hotelPhotosRows.emplace_back(HotelPhotosRow::Regular);
length++;
}
if (!hotelInfo.m_description.empty())
{
it = sections.insert(it, Sections::HotelDescription) + 1;
m_hotelDescriptionRows.emplace_back(HotelDescriptionRow::Regular);
length++;
}
auto constexpr maxNumberOfHotelCellsInPlacePage = 3UL;
auto const & facilities = hotelInfo.m_facilities;
if (!facilities.empty())
{
it = sections.insert(it, Sections::HotelFacilities) + 1;
auto & facilitiesRows = self->m_hotelFacilitiesRows;
auto const size = facilities.size();
if (size > maxNumberOfHotelCellsInPlacePage)
{
facilitiesRows.insert(facilitiesRows.begin(), maxNumberOfHotelCellsInPlacePage, HotelFacilitiesRow::Regular);
facilitiesRows.emplace_back(HotelFacilitiesRow::ShowMore);
}
else
{
facilitiesRows.insert(facilitiesRows.begin(), size, HotelFacilitiesRow::Regular);
}
length++;
}
auto const & reviews = hotelInfo.m_reviews;
if (!reviews.empty())
{
sections.insert(it, Sections::HotelReviews);
auto const size = reviews.size();
auto & reviewsRows = self->m_hotelReviewsRows;
reviewsRows.emplace_back(HotelReviewsRow::Header);
if (size > maxNumberOfHotelCellsInPlacePage)
{
reviewsRows.insert(reviewsRows.begin() + 1, maxNumberOfHotelCellsInPlacePage, HotelReviewsRow::Regular);
reviewsRows.emplace_back(HotelReviewsRow::ShowMore);
}
else
{
reviewsRows.insert(reviewsRows.begin() + 1, size, HotelReviewsRow::Regular);
}
length++;
}
dispatch_async(dispatch_get_main_queue(), ^{
self.sectionsReadyCallback({position, length});
});
});
}
});
}
- (void)updateBookmarkStatus:(BOOL)isBookmark
{
auto & f = GetFramework();
@ -202,16 +306,10 @@ using namespace place_page;
return type::Unknown;
}
- (NSString *)bookingRating
{
return self.isBooking ? @(m_info.GetRatingFormatted().c_str()) : nil;
}
- (NSString *)bookingApproximatePricing
{
return self.isBooking ? @(m_info.GetApproximatePricing().c_str()) : nil;
}
#pragma mark - Sponsored
- (NSString *)bookingRating { return self.isBooking ? @(m_info.GetRatingFormatted().c_str()) : nil; }
- (NSString *)bookingApproximatePricing { return self.isBooking ? @(m_info.GetApproximatePricing().c_str()) : nil; }
- (NSURL *)sponsoredURL
{
return m_info.IsSponsored() ? [NSURL URLWithString:@(m_info.GetSponsoredUrl().c_str())]
@ -232,7 +330,6 @@ using namespace place_page;
: nil;
}
- (banners::Banner)banner { return m_info.GetBanner(); }
- (void)assignOnlinePriceToLabel:(UILabel *)label
{
NSAssert(self.isBooking, @"Online price must be assigned to booking object!");
@ -278,11 +375,35 @@ using namespace place_page;
auto const api = GetFramework().GetBookingApi(canUseNetwork);
if (api)
api->GetMinPrice(self.sponsoredId.UTF8String, currency, func);
});
});
}
- (NSString *)address { return @(m_info.GetAddress().c_str()); }
- (NSString *)apiURL { return @(m_info.GetApiUrl().c_str()); }
- (NSString *)hotelDescription { return @(m_hotelInfo.m_description.c_str()); }
- (vector<booking::HotelFacility> const &)facilities { return m_hotelInfo.m_facilities; }
- (vector<booking::HotelReview> const &)reviews { return m_hotelInfo.m_reviews; }
- (NSUInteger)numberOfReviews { return m_hotelInfo.m_score; }
- (NSArray<MWMGalleryItemModel *> *)photos
{
NSMutableArray<MWMGalleryItemModel *> * res = [@[] mutableCopy];
for (auto const & p : m_hotelInfo.m_photos)
{
auto big = [NSURL URLWithString:@(p.m_original.c_str())];
auto preview = [NSURL URLWithString:@(p.m_small.c_str())];
if (!big || !preview)
continue;
auto photo = [[MWMGalleryItemModel alloc] initWithImageURL:big previewURL:preview];
[res addObject:photo];
}
return res;
}
#pragma mark - Banner
- (banners::Banner)banner { return m_info.GetBanner(); }
#pragma mark - Bookmark
- (NSString *)externalTitle
{
return m_info.IsBookmark() && m_info.m_bookmarkTitle != m_info.GetTitle()
@ -312,11 +433,19 @@ using namespace place_page;
return m_info.IsBookmark() ? m_info.m_bac : BookmarkAndCategory();
}
#pragma mark - Getters
- (NSString *)address { return @(m_info.GetAddress().c_str()); }
- (NSString *)apiURL { return @(m_info.GetApiUrl().c_str()); }
- (vector<Sections> const &)sections { return m_sections; }
- (vector<PreviewRows> const &)previewRows { return m_previewRows; }
- (vector<MetainfoRows> const &)metainfoRows { return m_metainfoRows; }
- (vector<MetainfoRows> &)mutableMetainfoRows { return m_metainfoRows; }
- (vector<ButtonsRows> const &)buttonsRows { return m_buttonsRows; }
- (vector<HotelPhotosRow> const &)photosRows { return m_hotelPhotosRows; }
- (vector<HotelDescriptionRow> const &)descriptionRows { return m_hotelDescriptionRows; }
- (vector<HotelFacilitiesRow> const &)hotelFacilitiesRows { return m_hotelFacilitiesRows; }
- (vector<HotelReviewsRow> const &)hotelReviewsRows { return m_hotelReviewsRows; }
- (NSString *)stringForRow:(MetainfoRows)row
{
switch (row)

View file

@ -18,6 +18,7 @@
#import "MWMViewController.h"
#import "MapViewController.h"
#import "Statistics.h"
#import "SwiftBridge.h"
#include "geometry/distance_on_sphere.hpp"
@ -298,6 +299,30 @@
[[MapViewController controller].apiBar back];
}
- (void)showAllReviews
{
// TODO: Open reviews url.
}
- (void)showPhotoAtIndex:(NSUInteger)index
{
auto model = self.data.photos[index];
auto galleryVc = [MWMGalleryItemViewController instanceWithModel:model];
[[MapViewController controller].navigationController pushViewController:galleryVc animated:YES];
}
- (void)showGalery
{
auto galleryVc = [MWMGalleryViewController instanceWithModel:[[MWMGalleryModel alloc]
initWithTitle:self.hotelName items:self.data.photos]];
[[MapViewController controller].navigationController pushViewController:galleryVc animated:YES];
}
- (void)showAllFacilities
{
[[MapViewController controller] openHotelFacilities];
}
- (void)viewWillTransitionToSize:(CGSize)size
withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator
{
@ -313,7 +338,12 @@
- (FeatureID const &)featureId { return self.data.featureId; }
#pragma mark - Owner
#pragma mark - MWMBookingInfoHolder
- (std::vector<booking::HotelFacility> const &)hotelFacilities { return self.data.facilities; }
- (NSString *)hotelName { return self.data.title; }
#pragma mark - Ownerfacilities
- (MapViewController *)ownerViewController { return [MapViewController controller]; }

View file

@ -1,4 +1,5 @@
#import "MWMMapViewControlsManager.h"
#import "MWMPlacePageButtonsProtocol.h"
#include "Framework.h"
@ -22,17 +23,6 @@
@end
@protocol MWMPlacePageButtonsProtocol<NSObject>
- (void)editPlace;
- (void)addPlace;
- (void)addBusiness;
- (void)book:(BOOL)isDescription;
- (void)editBookmark;
- (void)taxiTo;
@end
struct FeatureID;
@protocol MWMFeatureHolder<NSObject>
@ -41,7 +31,19 @@ struct FeatureID;
@end
@protocol MWMPlacePageProtocol<MWMActionBarProtocol, MWMPlacePageButtonsProtocol, MWMFeatureHolder>
namespace booking
{
struct HotelFacility;
}
@protocol MWMBookingInfoHolder<NSObject>
- (std::vector<booking::HotelFacility> const &)hotelFacilities;
- (NSString *)hotelName;
@end
@protocol MWMPlacePageProtocol<MWMActionBarProtocol, MWMPlacePageButtonsProtocol, MWMFeatureHolder, MWMBookingInfoHolder>
@property(nonatomic) CGFloat topBound;
@property(nonatomic) CGFloat leftBound;

View file

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="CarouselElement" id="M3h-Po-OZ2" customClass="CarouselElement" customModule="cm_beta" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="150" height="100"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="150" height="100"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="49T-yd-qah">
<rect key="frame" x="0.0" y="0.0" width="150" height="100"/>
</imageView>
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Mmh-sw-uHm">
<rect key="frame" x="0.0" y="0.0" width="150" height="100"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.20000000000000001" colorSpace="calibratedRGB"/>
</view>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_arrow_gray_right" translatesAutoresizingMaskIntoConstraints="NO" id="2V7-Dd-KtM">
<rect key="frame" x="61" y="36" width="28" height="28"/>
<constraints>
<constraint firstAttribute="width" constant="28" id="MjA-so-bnW"/>
<constraint firstAttribute="height" constant="28" id="QqY-ls-uTz"/>
</constraints>
</imageView>
</subviews>
</view>
<constraints>
<constraint firstItem="2V7-Dd-KtM" firstAttribute="centerY" secondItem="M3h-Po-OZ2" secondAttribute="centerY" id="0V7-LW-t5Z"/>
<constraint firstAttribute="trailing" secondItem="49T-yd-qah" secondAttribute="trailing" id="58H-hY-Vr2"/>
<constraint firstItem="49T-yd-qah" firstAttribute="top" secondItem="M3h-Po-OZ2" secondAttribute="top" id="7Cs-L0-7Uc"/>
<constraint firstItem="49T-yd-qah" firstAttribute="leading" secondItem="M3h-Po-OZ2" secondAttribute="leading" id="9uw-Hk-2jO"/>
<constraint firstAttribute="bottom" secondItem="49T-yd-qah" secondAttribute="bottom" id="Drb-T8-arB"/>
<constraint firstItem="2V7-Dd-KtM" firstAttribute="centerX" secondItem="M3h-Po-OZ2" secondAttribute="centerX" id="rid-0X-v4H"/>
</constraints>
<connections>
<outlet property="image" destination="49T-yd-qah" id="oUk-H9-V0F"/>
<outletCollection property="dimMask" destination="Mmh-sw-uHm" collectionClass="NSMutableArray" id="DdN-K1-Ytc"/>
<outletCollection property="dimMask" destination="2V7-Dd-KtM" collectionClass="NSMutableArray" id="BeV-h5-wJV"/>
</connections>
<point key="canvasLocation" x="43" y="118"/>
</collectionViewCell>
</objects>
<resources>
<image name="ic_arrow_gray_right" width="28" height="28"/>
</resources>
</document>

View file

@ -0,0 +1,12 @@
#import "MWMTableViewCell.h"
namespace booking
{
struct HotelReview;
}
@interface MWMPPReviewCell : MWMTableViewCell
- (void)configWithReview:(booking::HotelReview const &)review;
@end

View file

@ -0,0 +1,69 @@
#import "MWMPPReviewCell.h"
#include "partners_api/booking_api.hpp"
@interface MWMPPReviewCell ()
@property(weak, nonatomic) IBOutlet UILabel * name;
@property(weak, nonatomic) IBOutlet UILabel * rating;
@property(weak, nonatomic) IBOutlet UILabel * date;
@property(weak, nonatomic) IBOutlet UILabel * positiveReview;
@property(weak, nonatomic) IBOutlet UILabel * negativeReview;
@property(weak, nonatomic) IBOutlet UIImageView * positiveIcon;
@property(weak, nonatomic) IBOutlet UIImageView * negativeIcon;
@property(nonatomic) IBOutletCollection(NSLayoutConstraint) NSArray<NSLayoutConstraint *> * inactiveWhenNoPositiveReviews;
@property(nonatomic) IBOutletCollection(NSLayoutConstraint) NSArray<NSLayoutConstraint *> * inactiveWhenNoNegativeReviews;
@property(nonatomic) IBOutletCollection(NSLayoutConstraint) NSArray<NSLayoutConstraint *> * activateWhenNoPositiveReviews;
@property(nonatomic) IBOutletCollection(NSLayoutConstraint) NSArray<NSLayoutConstraint *> * activateWhenNoNegativeReviews;
@property(nonatomic) IBOutlet NSLayoutConstraint * activeWhenReviewsAreEmpty;
@end
@implementation MWMPPReviewCell
- (void)configWithReview:(booking::HotelReview const &)review
{
self.name.text = @(review.m_author.c_str());
self.rating.text = @(review.m_score).stringValue;
auto formatter = [[NSDateFormatter alloc] init];
formatter.timeStyle = NSDateFormatterNoStyle;
formatter.dateStyle = NSDateFormatterLongStyle;
self.date.text = [formatter stringFromDate:
[NSDate dateWithTimeIntervalSince1970:duration_cast<seconds>(review.m_date.time_since_epoch()).count()]];
self.positiveReview.text = @(review.m_pros.c_str());
self.negativeReview.text = @(review.m_cons.c_str());
if (!self.positiveReview.text.length)
{
for (NSLayoutConstraint * c in self.inactiveWhenNoPositiveReviews)
c.active = NO;
self.positiveIcon.hidden = self.positiveReview.hidden = YES;
for (NSLayoutConstraint * c in self.activateWhenNoPositiveReviews)
c.priority = UILayoutPriorityDefaultHigh;
}
if (!self.negativeReview.text.length)
{
for (NSLayoutConstraint * c in self.inactiveWhenNoNegativeReviews)
c.active = NO;
self.negativeIcon.hidden = self.negativeReview.hidden = YES;
for (NSLayoutConstraint * c in self.activateWhenNoNegativeReviews)
c.priority = UILayoutPriorityDefaultHigh;
}
if (self.negativeIcon.hidden && self.positiveIcon.hidden)
self.activeWhenReviewsAreEmpty.priority = UILayoutPriorityDefaultHigh;
[self setNeedsLayout];
}
@end

View file

@ -0,0 +1,147 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
<capability name="Alignment constraints to the first baseline" minToolsVersion="6.0"/>
<capability name="Alignment constraints with different attributes" minToolsVersion="5.1"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="173" id="Lz1-M8-PNp" customClass="MWMPPReviewCell">
<rect key="frame" x="0.0" y="0.0" width="375" height="173"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Lz1-M8-PNp" id="JmU-zX-lG2">
<rect key="frame" x="0.0" y="0.0" width="375" height="172"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="499" text="Name" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6Q8-RL-48E">
<rect key="frame" x="16" y="16" width="286" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular17"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
</userDefinedRuntimeAttributes>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="501" verticalHuggingPriority="251" text="Rating" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OLG-Tc-sAw">
<rect key="frame" x="310" y="16" width="49" height="21"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="DMe-wi-WoV"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium20"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
</userDefinedRuntimeAttributes>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Date" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2Tp-mn-Q3B">
<rect key="frame" x="16" y="41" width="343" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular13"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackSecondaryText"/>
</userDefinedRuntimeAttributes>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_bad" translatesAutoresizingMaskIntoConstraints="NO" id="haU-XM-cHZ">
<rect key="frame" x="16" y="127" width="24" height="24"/>
<constraints>
<constraint firstAttribute="height" constant="24" id="Uel-MI-EWr"/>
<constraint firstAttribute="width" constant="24" id="mcd-h5-MUP"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalCompressionResistancePriority="800" text="Positive" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TrQ-v5-OtL">
<rect key="frame" x="60" y="78" width="299" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular14"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
</userDefinedRuntimeAttributes>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalCompressionResistancePriority="850" text="Negative" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Alj-pH-AWU">
<rect key="frame" x="60" y="123" width="299" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular14"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
</userDefinedRuntimeAttributes>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_good" translatesAutoresizingMaskIntoConstraints="NO" id="oMn-kq-Yit">
<rect key="frame" x="16" y="82" width="24" height="24"/>
<constraints>
<constraint firstAttribute="height" constant="24" id="Ry7-o5-zze"/>
<constraint firstAttribute="width" constant="24" id="n7n-du-CID"/>
</constraints>
</imageView>
</subviews>
<constraints>
<constraint firstItem="Alj-pH-AWU" firstAttribute="top" secondItem="TrQ-v5-OtL" secondAttribute="bottom" constant="24" id="2yl-Jg-4iH"/>
<constraint firstItem="Alj-pH-AWU" firstAttribute="leading" secondItem="haU-XM-cHZ" secondAttribute="trailing" constant="20" id="3Ik-6S-gE3"/>
<constraint firstAttribute="bottom" secondItem="Alj-pH-AWU" secondAttribute="bottom" constant="28.5" id="7l6-vm-GHZ"/>
<constraint firstItem="oMn-kq-Yit" firstAttribute="centerY" secondItem="TrQ-v5-OtL" secondAttribute="firstBaseline" id="83x-6l-y62"/>
<constraint firstAttribute="bottom" secondItem="TrQ-v5-OtL" secondAttribute="bottom" priority="250" constant="28" id="9Ci-5y-Pyh"/>
<constraint firstAttribute="trailingMargin" secondItem="Alj-pH-AWU" secondAttribute="trailing" constant="8" id="AwS-1P-3h3"/>
<constraint firstItem="oMn-kq-Yit" firstAttribute="leading" secondItem="JmU-zX-lG2" secondAttribute="leadingMargin" constant="8" id="BH2-LA-QzW"/>
<constraint firstItem="TrQ-v5-OtL" firstAttribute="top" secondItem="2Tp-mn-Q3B" secondAttribute="bottom" constant="16" id="EYc-ch-f6m"/>
<constraint firstItem="6Q8-RL-48E" firstAttribute="top" secondItem="JmU-zX-lG2" secondAttribute="top" constant="16" id="FSl-xA-2RI"/>
<constraint firstItem="TrQ-v5-OtL" firstAttribute="leading" secondItem="oMn-kq-Yit" secondAttribute="trailing" constant="20" id="Ivw-l9-wfM"/>
<constraint firstAttribute="trailingMargin" secondItem="OLG-Tc-sAw" secondAttribute="trailing" constant="8" id="KSP-mn-dXv"/>
<constraint firstItem="OLG-Tc-sAw" firstAttribute="leading" secondItem="6Q8-RL-48E" secondAttribute="trailing" constant="8" id="Srv-O6-N6Q"/>
<constraint firstItem="OLG-Tc-sAw" firstAttribute="top" secondItem="JmU-zX-lG2" secondAttribute="topMargin" constant="8" id="TLf-us-MQD"/>
<constraint firstItem="2Tp-mn-Q3B" firstAttribute="leading" secondItem="JmU-zX-lG2" secondAttribute="leadingMargin" constant="8" id="WHF-vI-er8"/>
<constraint firstItem="haU-XM-cHZ" firstAttribute="leading" secondItem="JmU-zX-lG2" secondAttribute="leadingMargin" constant="8" id="dOe-HZ-7t5"/>
<constraint firstAttribute="bottom" secondItem="2Tp-mn-Q3B" secondAttribute="bottom" priority="100" constant="16" id="dZI-nT-JLN"/>
<constraint firstItem="6Q8-RL-48E" firstAttribute="leading" secondItem="JmU-zX-lG2" secondAttribute="leading" constant="16" id="duT-Ds-3Vg"/>
<constraint firstItem="Alj-pH-AWU" firstAttribute="top" secondItem="2Tp-mn-Q3B" secondAttribute="bottom" priority="250" constant="16" id="grx-dG-STE"/>
<constraint firstItem="2Tp-mn-Q3B" firstAttribute="top" secondItem="6Q8-RL-48E" secondAttribute="bottom" constant="4" id="k6a-m2-5FS"/>
<constraint firstItem="haU-XM-cHZ" firstAttribute="centerY" secondItem="Alj-pH-AWU" secondAttribute="firstBaseline" id="pmR-D4-dyc"/>
<constraint firstAttribute="trailingMargin" secondItem="TrQ-v5-OtL" secondAttribute="trailing" constant="8" id="tRq-58-P1o"/>
<constraint firstAttribute="trailingMargin" secondItem="2Tp-mn-Q3B" secondAttribute="trailing" constant="8" id="y7b-Ao-obh"/>
</constraints>
</tableViewCellContentView>
<inset key="separatorInset" minX="16" minY="0.0" maxX="0.0" maxY="0.0"/>
<connections>
<outlet property="activeWhenReviewsAreEmpty" destination="dZI-nT-JLN" id="Uq1-Bh-ff2"/>
<outlet property="date" destination="2Tp-mn-Q3B" id="405-oa-b39"/>
<outlet property="name" destination="6Q8-RL-48E" id="pTz-i2-dbv"/>
<outlet property="negativeIcon" destination="haU-XM-cHZ" id="uRY-F0-FwL"/>
<outlet property="negativeReview" destination="Alj-pH-AWU" id="8uB-j8-0NI"/>
<outlet property="positiveIcon" destination="oMn-kq-Yit" id="aqq-Mz-9wJ"/>
<outlet property="positiveReview" destination="TrQ-v5-OtL" id="fMW-gT-QWC"/>
<outlet property="rating" destination="OLG-Tc-sAw" id="0Tw-oU-ScM"/>
<outletCollection property="activateWhenNoNegativeReviews" destination="9Ci-5y-Pyh" id="UaR-Tb-qJg"/>
<outletCollection property="inactiveWhenNoNegativeReviews" destination="2yl-Jg-4iH" id="gfz-Gn-L36"/>
<outletCollection property="inactiveWhenNoNegativeReviews" destination="3Ik-6S-gE3" id="ly7-pL-jjo"/>
<outletCollection property="inactiveWhenNoNegativeReviews" destination="7l6-vm-GHZ" id="vQK-PR-VLa"/>
<outletCollection property="inactiveWhenNoNegativeReviews" destination="AwS-1P-3h3" id="taq-4H-our"/>
<outletCollection property="activateWhenNoPositiveReviews" destination="grx-dG-STE" id="6jt-sR-CxU"/>
<outletCollection property="inactiveWhenNoNegativeReviews" destination="grx-dG-STE" id="3mP-Gq-39Q"/>
<outletCollection property="inactiveWhenNoPositiveReviews" destination="EYc-ch-f6m" id="qsU-ca-rDH"/>
<outletCollection property="inactiveWhenNoPositiveReviews" destination="EYc-ch-f6m" id="9TP-oH-aap"/>
<outletCollection property="inactiveWhenNoPositiveReviews" destination="Ivw-l9-wfM" id="ocu-5C-SCX"/>
<outletCollection property="inactiveWhenNoPositiveReviews" destination="tRq-58-P1o" id="5fb-jx-zFe"/>
<outletCollection property="inactiveWhenNoPositiveReviews" destination="2yl-Jg-4iH" id="ANF-i7-SOa"/>
</connections>
<point key="canvasLocation" x="29.5" y="-15.5"/>
</tableViewCell>
</objects>
<resources>
<image name="ic_bad" width="24" height="24"/>
<image name="ic_good" width="24" height="24"/>
</resources>
</document>

View file

@ -0,0 +1,8 @@
@objc (MWMPPFacilityCell)
final class PPFacilityCell: MWMTableViewCell {
@IBOutlet private var facility: UILabel!
func config(with str:String) {
facility.text = str
}
}

View file

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="49" id="6kl-PA-DNT" customClass="MWMPPFacilityCell">
<rect key="frame" x="0.0" y="0.0" width="375" height="49"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="6kl-PA-DNT" id="JBd-XZ-fhG">
<rect key="frame" x="0.0" y="0.0" width="375" height="48"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xW7-gO-pph">
<rect key="frame" x="16" y="14" width="343" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular16"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
</userDefinedRuntimeAttributes>
</label>
</subviews>
<constraints>
<constraint firstAttribute="bottom" secondItem="xW7-gO-pph" secondAttribute="bottom" constant="13.5" id="0VX-GV-qUO"/>
<constraint firstItem="xW7-gO-pph" firstAttribute="leading" secondItem="JBd-XZ-fhG" secondAttribute="leading" constant="16" id="7u2-cQ-4zm"/>
<constraint firstItem="xW7-gO-pph" firstAttribute="top" secondItem="JBd-XZ-fhG" secondAttribute="top" constant="14" id="Qka-0k-yt1"/>
<constraint firstAttribute="trailing" secondItem="xW7-gO-pph" secondAttribute="trailing" constant="16" id="v3m-6x-j4j"/>
</constraints>
</tableViewCellContentView>
<inset key="separatorInset" minX="16" minY="0.0" maxX="0.0" maxY="0.0"/>
<connections>
<outlet property="facility" destination="xW7-gO-pph" id="gUm-lt-R4g"/>
</connections>
<point key="canvasLocation" x="-161.5" y="-5.5"/>
</tableViewCell>
</objects>
</document>

View file

@ -0,0 +1,59 @@
final class CarouselElement : UICollectionViewCell {
@IBOutlet private weak var image: UIImageView!
@IBOutlet private var dimMask: [UIView]!
func config(with url: URL, isLastCell: Bool) {
image.af_setImage(withURL: url, placeholderImage: #imageLiteral(resourceName: "ic_placeholder"))
dimMask.forEach { $0.isHidden = !isLastCell }
}
}
@objc(MWMPPHotelCarouselCell)
final class PPHotelCarouselCell: MWMTableViewCell {
@IBOutlet private weak var collectionView: UICollectionView!
fileprivate var dataSource: [GalleryItemModel] = []
fileprivate let kMaximumNumberOfPhotos = 5
fileprivate var delegate: MWMPlacePageButtonsProtocol?
func config(with ds: [GalleryItemModel], delegate d: MWMPlacePageButtonsProtocol?) {
dataSource = ds
delegate = d
collectionView.delegate = self
collectionView.dataSource = self
collectionView.register(cellClass: CarouselElement.self)
collectionView.reloadData()
}
}
extension PPHotelCarouselCell: UICollectionViewDelegate, UICollectionViewDataSource {
private var isFullPhotosCarousel: Bool {
return dataSource.count <= kMaximumNumberOfPhotos
}
private func isLastCell(_ indexPath: IndexPath) -> Bool {
return (indexPath.item == kMaximumNumberOfPhotos - 1) && !isFullPhotosCarousel
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withCellClass: CarouselElement.self,
indexPath: indexPath) as! CarouselElement
cell.config(with: dataSource[indexPath.item].previewURL, isLastCell: isLastCell(indexPath))
return cell
}
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return isFullPhotosCarousel ? dataSource.count : kMaximumNumberOfPhotos
}
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
guard let d = delegate else { return }
if isLastCell(indexPath) {
d.showGalery()
} else {
d.showPhoto(at: UInt(indexPath.row))
}
}
}

View file

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="109" id="Sg7-wE-7Ir" customClass="MWMPPHotelCarouselCell">
<rect key="frame" x="0.0" y="0.0" width="375" height="109"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Sg7-wE-7Ir" id="aSG-gb-Vaa">
<rect key="frame" x="0.0" y="0.0" width="375" height="108"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="5Cw-QQ-VRc">
<rect key="frame" x="0.0" y="4" width="375" height="100"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="100" id="BgC-ps-kiz"/>
</constraints>
<collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" minimumLineSpacing="4" minimumInteritemSpacing="4" id="KiF-3P-pUG">
<size key="itemSize" width="150" height="100"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<inset key="sectionInset" minX="4" minY="0.0" maxX="4" maxY="0.0"/>
</collectionViewFlowLayout>
</collectionView>
</subviews>
<constraints>
<constraint firstItem="5Cw-QQ-VRc" firstAttribute="leading" secondItem="aSG-gb-Vaa" secondAttribute="leading" id="Nlk-Ll-dRR"/>
<constraint firstAttribute="trailing" secondItem="5Cw-QQ-VRc" secondAttribute="trailing" id="qgf-Dc-kSN"/>
<constraint firstItem="5Cw-QQ-VRc" firstAttribute="top" secondItem="aSG-gb-Vaa" secondAttribute="top" constant="4" id="vNM-Jj-E95"/>
<constraint firstAttribute="bottom" secondItem="5Cw-QQ-VRc" secondAttribute="bottom" constant="4.5" id="yac-xe-eNm"/>
</constraints>
</tableViewCellContentView>
<connections>
<outlet property="collectionView" destination="5Cw-QQ-VRc" id="IdD-9L-EmF"/>
</connections>
<point key="canvasLocation" x="41.5" y="86.5"/>
</tableViewCell>
</objects>
</document>

View file

@ -0,0 +1,43 @@
@objc(MWMPPHotelDescriptionCell)
final class PPHotelDescriptionCell: MWMTableViewCell
{
private let kMaximumDescriptionHeight: CGFloat = 60
@IBOutlet private var compactModeConstraints: [NSLayoutConstraint]!
@IBOutlet private weak var descriptionText: UILabel!
@IBOutlet private weak var buttonZeroHeight: NSLayoutConstraint!
@IBOutlet private weak var button: UIButton!
private weak var updateDelegate: MWMPlacePageCellUpdateProtocol?
func config(with description: String, delegate: MWMPlacePageCellUpdateProtocol) {
descriptionText.text = description;
descriptionText.sizeToFit()
updateDelegate = delegate
let isCompact = descriptionText.height > kMaximumDescriptionHeight;
if (isCompact) {
compactModeConstraints.forEach { $0.priority = UILayoutPriorityDefaultHigh }
} else {
hideButton()
}
setNeedsLayout()
}
private func hideButton() {
button.isHidden = true
buttonZeroHeight.priority = UILayoutPriorityDefaultHigh
}
@IBAction private func tap() {
compactModeConstraints.forEach { $0.isActive = false }
hideButton()
setNeedsLayout()
UIView.animate(withDuration: kDefaultAnimationDuration, animations: { [weak self] in
guard let s = self else { return }
s.layoutIfNeeded()
s.updateDelegate?.cellUpdated()
})
}
}

View file

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="PPHotelDescriptionCell" rowHeight="44" id="x5g-my-EeP" customClass="MWMPPHotelDescriptionCell">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="x5g-my-EeP" id="2f0-Qh-gMq">
<rect key="frame" x="0.0" y="0.0" width="375" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ILZ-NI-VZb">
<rect key="frame" x="16" y="14" width="343" height="15.5"/>
<constraints>
<constraint firstAttribute="height" priority="250" constant="60" id="p7P-XI-WnA"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular16"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/>
</userDefinedRuntimeAttributes>
</label>
<button opaque="NO" contentMode="scaleToFill" verticalCompressionResistancePriority="501" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="n7r-xF-fbc">
<rect key="frame" x="0.0" y="43.5" width="375" height="0.0"/>
<constraints>
<constraint firstAttribute="height" priority="500" id="VFr-Uh-l7q"/>
<constraint firstAttribute="height" priority="250" constant="36" id="fsJ-u1-4gE"/>
</constraints>
<state key="normal" title="Button"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular17"/>
<userDefinedRuntimeAttribute type="string" keyPath="textColorName" value="linkBlue"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="booking_show_more"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="tap" destination="x5g-my-EeP" eventType="touchUpInside" id="Wdx-Mm-VxZ"/>
</connections>
</button>
</subviews>
<constraints>
<constraint firstItem="n7r-xF-fbc" firstAttribute="top" secondItem="ILZ-NI-VZb" secondAttribute="bottom" constant="14" id="5yR-UL-Ok7"/>
<constraint firstAttribute="trailing" secondItem="n7r-xF-fbc" secondAttribute="trailing" id="YSr-mm-xOp"/>
<constraint firstItem="ILZ-NI-VZb" firstAttribute="top" secondItem="2f0-Qh-gMq" secondAttribute="top" constant="14" id="eb7-UC-1N6"/>
<constraint firstAttribute="bottom" secondItem="n7r-xF-fbc" secondAttribute="bottom" id="f81-in-UJU"/>
<constraint firstItem="n7r-xF-fbc" firstAttribute="leading" secondItem="2f0-Qh-gMq" secondAttribute="leading" id="l0U-Us-SvH"/>
<constraint firstItem="ILZ-NI-VZb" firstAttribute="leading" secondItem="2f0-Qh-gMq" secondAttribute="leading" constant="16" id="lBK-OX-lOc"/>
<constraint firstAttribute="trailing" secondItem="ILZ-NI-VZb" secondAttribute="trailing" constant="16" id="u9S-uq-2ZH"/>
</constraints>
</tableViewCellContentView>
<connections>
<outlet property="button" destination="n7r-xF-fbc" id="3nI-UG-vie"/>
<outlet property="buttonZeroHeight" destination="VFr-Uh-l7q" id="QC8-Cm-oAX"/>
<outlet property="descriptionText" destination="ILZ-NI-VZb" id="iRg-Ca-5vg"/>
<outletCollection property="compactModeConstraints" destination="fsJ-u1-4gE" collectionClass="NSMutableArray" id="mpD-RN-ypi"/>
<outletCollection property="compactModeConstraints" destination="p7P-XI-WnA" collectionClass="NSMutableArray" id="3EH-oK-qAl"/>
</connections>
<point key="canvasLocation" x="-67.5" y="145"/>
</tableViewCell>
</objects>
</document>

View file

@ -0,0 +1,11 @@
@objc(MWMPPReviewHeaderCell)
final class PPReviewHeaderCell: UITableViewCell {
@IBOutlet private var rating: UILabel!
@IBOutlet private var count: UILabel!
func config(with rate: String, numberOfReviews: Int) {
rating.text = rate
count.text = String(format: L("booking_based_on_reviews"), numberOfReviews)
}
}

View file

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="73" id="YCM-4v-MNp" customClass="MWMPPReviewHeaderCell">
<rect key="frame" x="0.0" y="0.0" width="375" height="73"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="YCM-4v-MNp" id="Bqc-Cr-hRy">
<rect key="frame" x="0.0" y="0.0" width="375" height="72"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="249" verticalHuggingPriority="249" verticalCompressionResistancePriority="751" text="Rating" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3Nd-AC-y0A">
<rect key="frame" x="16" y="14" width="343" height="20.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.33333333329999998" green="0.5450980392" blue="0.1843137255" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium16"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="green"/>
</userDefinedRuntimeAttributes>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Based on" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yHa-uA-HgQ">
<rect key="frame" x="16" y="42.5" width="343" height="19.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular13"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackSecondaryText"/>
</userDefinedRuntimeAttributes>
</label>
</subviews>
<constraints>
<constraint firstItem="3Nd-AC-y0A" firstAttribute="leading" secondItem="Bqc-Cr-hRy" secondAttribute="leading" constant="16" id="1oh-58-1HH"/>
<constraint firstAttribute="bottom" secondItem="yHa-uA-HgQ" secondAttribute="bottom" constant="10" id="5MN-Aa-uDa"/>
<constraint firstAttribute="trailing" secondItem="3Nd-AC-y0A" secondAttribute="trailing" constant="16" id="Fdk-Pa-d2K"/>
<constraint firstItem="yHa-uA-HgQ" firstAttribute="leading" secondItem="Bqc-Cr-hRy" secondAttribute="leading" constant="16" id="H1u-t0-j9A"/>
<constraint firstItem="3Nd-AC-y0A" firstAttribute="top" secondItem="Bqc-Cr-hRy" secondAttribute="top" constant="14" id="a9O-bD-Fyd"/>
<constraint firstAttribute="trailing" secondItem="yHa-uA-HgQ" secondAttribute="trailing" constant="16" id="dKx-92-hOf"/>
<constraint firstItem="yHa-uA-HgQ" firstAttribute="top" secondItem="3Nd-AC-y0A" secondAttribute="bottom" constant="8" id="teF-4b-skN"/>
</constraints>
</tableViewCellContentView>
<color key="backgroundColor" red="0.27450980392156865" green="0.62745098039215685" blue="0.27450980392156865" alpha="0.16" colorSpace="calibratedRGB"/>
<inset key="separatorInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
<connections>
<outlet property="count" destination="yHa-uA-HgQ" id="sGr-0J-scb"/>
<outlet property="rating" destination="3Nd-AC-y0A" id="WIl-W1-jte"/>
</connections>
<point key="canvasLocation" x="3.5" y="40.5"/>
</tableViewCell>
</objects>
</document>

View file

@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11201" systemVersion="16A323" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@ -13,10 +16,11 @@
<rect key="frame" x="0.0" y="0.0" width="320" height="240"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="45K-kk-B2o" id="wdW-iu-3p9">
<frame key="frameInset" width="320" height="239"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="239"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" editable="NO" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="Fsd-1g-BiQ">
<rect key="frame" x="16" y="0.0" width="288" height="161"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="161" id="9oh-yS-fXg"/>
@ -35,6 +39,7 @@
</connections>
</textView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="gradient_light" translatesAutoresizingMaskIntoConstraints="NO" id="nxK-lC-JqY">
<rect key="frame" x="16" y="137" width="288" height="24"/>
<constraints>
<constraint firstAttribute="height" constant="24" id="lxX-KK-ccK"/>
</constraints>
@ -43,6 +48,7 @@
</userDefinedRuntimeAttributes>
</imageView>
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ZiC-VG-fs0">
<rect key="frame" x="0.0" y="161" width="320" height="33"/>
<constraints>
<constraint firstAttribute="height" constant="33" id="I3z-10-2aB"/>
</constraints>
@ -61,6 +67,7 @@
</connections>
</button>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="separator_image" translatesAutoresizingMaskIntoConstraints="NO" id="ZHb-qS-nFh">
<rect key="frame" x="16" y="194" width="304" height="1"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="Nie-DF-2Ki"/>
</constraints>
@ -69,6 +76,7 @@
</userDefinedRuntimeAttributes>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fKp-HW-1bX">
<rect key="frame" x="0.0" y="195" width="320" height="44"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="GrP-Iw-EEG"/>
</constraints>
@ -87,6 +95,7 @@
</connections>
</button>
<imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Xqf-Fb-Ojj">
<rect key="frame" x="142" y="199" width="36" height="36"/>
<constraints>
<constraint firstAttribute="width" constant="36" id="gj2-Tn-x6I"/>
<constraint firstAttribute="height" constant="36" id="rzU-50-2nS"/>

View file

@ -24,23 +24,29 @@
- (void)configForRow:(place_page::ButtonsRows)row
withDelegate:(id<MWMPlacePageButtonsProtocol>)delegate
{
using place_page::ButtonsRows;
self.delegate = delegate;
self.rowType = row;
NSString * title = nil;
switch (row)
{
case place_page::ButtonsRows::AddPlace:
case ButtonsRows::AddPlace:
title = L(@"placepage_add_place_button");
break;
case place_page::ButtonsRows::EditPlace:
case ButtonsRows::EditPlace:
title = L(@"edit_place");
break;
case place_page::ButtonsRows::AddBusiness:
case ButtonsRows::AddBusiness:
title = L(@"placepage_add_business_button");
break;
case place_page::ButtonsRows::HotelDescription:
case ButtonsRows::HotelDescription:
title = L(@"details");
break;
case ButtonsRows::BookingShowMoreFacilities:
case ButtonsRows::BookingShowMoreReviews:
title = L(@"booking_show_more");
break;
}
[self.titleButton setTitle:title forState:UIControlStateNormal];
@ -49,7 +55,8 @@
- (IBAction)buttonTap
{
using namespace place_page;
using place_page::ButtonsRows;
auto d = self.delegate;
switch (self.rowType)
{
@ -57,6 +64,8 @@
case ButtonsRows::EditPlace: [d editPlace]; break;
case ButtonsRows::AddBusiness: [d addBusiness]; break;
case ButtonsRows::HotelDescription: [d book:YES]; break;
case ButtonsRows::BookingShowMoreFacilities: [d showAllFacilities]; break;
case ButtonsRows::BookingShowMoreReviews: [d showAllReviews]; break;
}
}

View file

@ -0,0 +1,15 @@
#import "MWMTableViewController.h"
#include <vector>
namespace booking
{
struct HotelFacility;
}
@interface MWMFacilitiesController : MWMTableViewController
- (void)setHotelName:(NSString *)name;
- (void)setFacilities:(std::vector<booking::HotelFacility> const &)facilities;
@end

View file

@ -0,0 +1,44 @@
#import "MWMFacilitiesController.h"
#import "SwiftBridge.h"
#include "partners_api/booking_api.hpp"
@implementation MWMFacilitiesController
{
std::vector<booking::HotelFacility> m_dataSource;
}
- (void)viewDidLoad
{
[super viewDidLoad];
self.tableView.estimatedRowHeight = 44;
self.tableView.rowHeight = UITableViewAutomaticDimension;
[self.tableView registerWithCellClass:[MWMPPFacilityCell class]];
}
- (void)setHotelName:(NSString *)name
{
self.title = name;
}
- (void)setFacilities:(std::vector<booking::HotelFacility> const &)facilities
{
m_dataSource = facilities;
}
#pragma mark - TableView
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return m_dataSource.size();
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
Class cls = [MWMPPFacilityCell class];
auto c = static_cast<MWMPPFacilityCell *>([tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]);
[c configWith:@(m_dataSource[indexPath.row].m_name.c_str())];
return c;
}
@end

View file

@ -8,7 +8,7 @@ final class GalleryCell: UICollectionViewCell {
var model: Model! {
didSet {
imageView.af_setImage(withURL: model.previewURL,
placeholderImage: UIImage(named: "ic_placeholder"))
placeholderImage: #imageLiteral(resourceName: "ic_placeholder"))
}
}

View file

@ -29,7 +29,7 @@ final class GalleryItemViewController: MWMViewController {
imageView.contentMode = .scaleAspectFit
scrollView.addSubview(imageView)
imageView.af_setImage(withURL: model.imageURL,
placeholderImage: UIImage(named: "ic_placeholder"))
placeholderImage: #imageLiteral(resourceName: "ic_placeholder"))
}
override func viewDidLayoutSubviews() {

View file

@ -3,6 +3,7 @@
#import "MWMCircularProgress.h"
#import "MWMOpeningHoursLayoutHelper.h"
#import "MWMPPPreviewLayoutHelper.h"
#import "MWMPPReviewCell.h"
#import "MWMPlacePageButtonCell.h"
#import "MWMPlacePageCellUpdateProtocol.h"
#import "MWMPlacePageData.h"
@ -96,6 +97,11 @@ map<MetainfoRows, Class> const kMetaInfoCells = {
auto tv = self.placePageView.tableView;
[tv registerWithCellClass:[MWMPlacePageButtonCell class]];
[tv registerWithCellClass:[MWMBookmarkCell class]];
[tv registerWithCellClass:[MWMPPHotelDescriptionCell class]];
[tv registerWithCellClass:[MWMPPHotelCarouselCell class]];
[tv registerWithCellClass:[MWMPPReviewHeaderCell class]];
[tv registerWithCellClass:[MWMPPReviewCell class]];
[tv registerWithCellClass:[MWMPPFacilityCell class]];
// Register all meta info cells.
for (auto const & pair : kMetaInfoCells)
@ -112,6 +118,12 @@ map<MetainfoRows, Class> const kMetaInfoCells = {
{
self.isPlacePageButtonsEnabled = YES;
self.data = data;
data.sectionsReadyCallback = ^(NSRange const & range)
{
[self.placePageView.tableView insertSections:[NSIndexSet indexSetWithIndexesInRange:range]
withRowAnimation:UITableViewRowAnimationAutomatic];
};
self.bookmarkCell = nil;
[self.actionBar configureWithData:static_cast<id<MWMActionBarSharedData>>(data)];
@ -122,6 +134,7 @@ map<MetainfoRows, Class> const kMetaInfoCells = {
[self.placePageView.tableView reloadData];
[self.layoutImpl onShow];
[data fillOnlineBookingSections];
}
- (void)rotateDirectionArrowToAngle:(CGFloat)angle
@ -285,6 +298,10 @@ map<MetainfoRows, Class> const kMetaInfoCells = {
case Sections::Preview: return data.previewRows.size();
case Sections::Metainfo: return data.metainfoRows.size();
case Sections::Buttons: return data.buttonsRows.size();
case Sections::HotelPhotos: return data.photosRows.size();
case Sections::HotelDescription: return data.descriptionRows.size();
case Sections::HotelFacilities: return data.hotelFacilitiesRows.size();
case Sections::HotelReviews: return data.hotelReviewsRows.size();
}
}
@ -360,6 +377,68 @@ map<MetainfoRows, Class> const kMetaInfoCells = {
return c;
}
case Sections::HotelPhotos:
{
Class cls = [MWMPPHotelCarouselCell class];
auto c = static_cast<MWMPPHotelCarouselCell *>([tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]);
[c configWith:data.photos delegate:delegate];
return c;
}
case Sections::HotelFacilities:
{
auto const row = data.hotelFacilitiesRows[indexPath.row];
switch (row)
{
case HotelFacilitiesRow::Regular:
{
Class cls = [MWMPPFacilityCell class];
auto c = static_cast<MWMPPFacilityCell *>([tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]);
[c configWith:@(data.facilities[indexPath.row].m_name.c_str())];
return c;
}
case HotelFacilitiesRow::ShowMore:
Class cls = [MWMPlacePageButtonCell class];
auto c = static_cast<MWMPlacePageButtonCell *>([tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]);
[c configForRow:ButtonsRows::BookingShowMoreFacilities withDelegate:delegate];
return c;
}
}
case Sections::HotelReviews:
{
auto const row = data.hotelReviewsRows[indexPath.row];
switch (row)
{
case HotelReviewsRow::Header:
{
Class cls = [MWMPPReviewHeaderCell class];
auto c = static_cast<MWMPPReviewHeaderCell *>([tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]);
[c configWith:data.bookingRating numberOfReviews:data.numberOfReviews];
return c;
}
case HotelReviewsRow::Regular:
{
Class cls = [MWMPPReviewCell class];
auto c = static_cast<MWMPPReviewCell *>([tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]);
[c configWithReview:data.reviews[indexPath.row - 1]];
return c;
}
case HotelReviewsRow::ShowMore:
{
Class cls = [MWMPlacePageButtonCell class];
auto c = static_cast<MWMPlacePageButtonCell *>([tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]);
[c configForRow:ButtonsRows::BookingShowMoreReviews withDelegate:delegate];
return c;
}
}
}
case Sections::HotelDescription:
{
Class cls = [MWMPPHotelDescriptionCell class];
auto c = static_cast<MWMPPHotelDescriptionCell *>(
[tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]);
[c configWith:data.hotelDescription delegate:self];
return c;
}
}
}

View file

@ -44,7 +44,7 @@
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/>
</userDefinedRuntimeAttributes>
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" style="grouped" separatorStyle="none" allowsSelectionDuringEditing="YES" rowHeight="44" sectionHeaderHeight="1" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="Taj-ne-CBp">
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" style="grouped" allowsSelectionDuringEditing="YES" rowHeight="44" sectionHeaderHeight="1" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="Taj-ne-CBp">
<rect key="frame" x="0.0" y="22" width="375" height="645"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<inset key="separatorInset" minX="60" minY="0.0" maxX="0.0" maxY="0.0"/>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16C67" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="Wns-nH-AQU">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="Wns-nH-AQU">
<device id="retina4_0" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
@ -57,12 +57,31 @@
<segue destination="lFr-lA-JTW" kind="show" identifier="PP2BookmarkEditing" id="0A8-4b-0A2"/>
<segue destination="Psz-BY-Fy4" kind="presentation" identifier="PP2BookmarkEditingIPAD" modalPresentationStyle="formSheet" id="k6v-a7-5DO"/>
<segue destination="DdR-kk-MnB" kind="custom" identifier="Map2Settings" customClass="MWMSegue" id="wtl-on-KxQ"/>
<segue destination="A8t-Zn-AGP" kind="custom" identifier="Map2FacilitiesSegue" customClass="MWMSegue" id="BOb-Wh-k7j"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="cKg-Q7-bFd" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1132.5" y="443.66197183098592"/>
</scene>
<!--Facilities Controller-->
<scene sceneID="2px-7m-UAf">
<objects>
<tableViewController id="A8t-Zn-AGP" customClass="MWMFacilitiesController" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="kNh-ar-yQv">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<connections>
<outlet property="dataSource" destination="A8t-Zn-AGP" id="vIb-hx-q5j"/>
<outlet property="delegate" destination="A8t-Zn-AGP" id="ExI-mO-xCG"/>
</connections>
</tableView>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="xFK-gh-uhg" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2704" y="-452"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="lCi-qJ-2rn">
<objects>