contact.php 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <?php
  2. /* @var $this yii\web\View */
  3. /* @var $form yii\bootstrap\ActiveForm */
  4. /* @var $model app\models\ContactForm */
  5. use yii\helpers\Html;
  6. use yii\bootstrap\ActiveForm;
  7. use yii\captcha\Captcha;
  8. $this->title = Yii::t('app','Contact');
  9. $this->params['breadcrumbs'][] = $this->title;
  10. ?>
  11. <link rel="stylesheet" href="../css/ol.css" type="text/css">
  12. <script src="../js/ol.js"></script>
  13. <div class="panel panel-primary">
  14. <div class="panel-heading"><span class="glyphicon glyphicon-phone-alt"></span><strong> Зв’язатися з нами</strong></div>
  15. <div class="panel-body">
  16. <div class="site-contact">
  17. <?php if (Yii::$app->session->hasFlash('contactFormSubmitted')): ?>
  18. <div class="alert alert-success">
  19. Thank you for contacting us. We will respond to you as soon as possible.
  20. </div>
  21. <p>
  22. Note that if you turn on the Yii debugger, you should be able
  23. to view the mail message on the mail panel of the debugger.
  24. <?php if (Yii::$app->mailer->useFileTransport): ?>
  25. Because the application is in development mode, the email is not sent but saved as
  26. a file under <code><?= Yii::getAlias(Yii::$app->mailer->fileTransportPath) ?></code>.
  27. Please configure the <code>useFileTransport</code> property of the <code>mail</code>
  28. application component to be false to enable email sending.
  29. <?php endif; ?>
  30. </p>
  31. <?php else: ?>
  32. <div class="row">
  33. <div class="col-lg-6">
  34. <address><h4>
  35. <strong>:: ReactLogic Agency ::</strong><br><br>
  36. Україна,<br> 36011, м. Полтава,<br>
  37. вул. Конева 4/2
  38. </address>
  39. <address><h4>
  40. <strong>телефоны:</strong><a href="tel:+380500000000"> 0500000000</a>, <a href="tel:+380500000000"> 0500000000</a>
  41. <p><br /></p>
  42. <strong>електронна пошта:</strong><a href="mailto:admin@react-logic.com"> admin@react-logic.com</a>
  43. <p><br /></p>
  44. </address>
  45. <?php /*$form = ActiveForm::begin(['id' => 'contact-form']); ?>
  46. <?= $form->field($model, 'name') ?>
  47. <?= $form->field($model, 'email') ?>
  48. <?= $form->field($model, 'subject') ?>
  49. <?= $form->field($model, 'body')->textArea(['rows' => 6]) ?>
  50. <?= $form->field($model, 'verifyCode')->widget(Captcha::className(), [
  51. 'template' => '<div class="row"><div class="col-lg-3">{image}</div><div class="col-lg-6">{input}</div></div>',
  52. ]) ?>
  53. <div class="form-group">
  54. <?= Html::submitButton('Отправить', ['class' => 'btn btn-primary', 'name' => 'contact-button']) ?>
  55. </div>
  56. <?php ActiveForm::end(); */?>
  57. </div>
  58. <div class="col-lg-6">
  59. <div class="container-fluid">
  60. <div class="row-fluid">
  61. <div class="span12">
  62. <div id="map" class="map"></div>
  63. <div id="marker" title="Marker"></div>
  64. </div>
  65. </div>
  66. </div>
  67. <script>
  68. var attribution = new ol.control.Attribution({
  69. collapsible: false
  70. });
  71. var map = new ol.Map({
  72. layers: [
  73. new ol.layer.Tile({
  74. source: new ol.source.OSM()
  75. })
  76. ],
  77. controls: ol.control.defaults({ attribution: false }).extend([attribution]),
  78. target: 'map',
  79. view: new ol.View({
  80. projection: 'EPSG:3857',
  81. center: ol.proj.transform([34.507666, 49.574596], // < больше - в лево
  82. 'EPSG:4326', 'EPSG:3857'),
  83. zoom: 16,
  84. maxZoom: 18,
  85. minZoom: 12,
  86. })
  87. });
  88. // Disposition marker
  89. var marker = new ol.Overlay({
  90. position: ol.proj.fromLonLat([34.507666, 49.574596]), //49.586726, 34.551578
  91. positioning: 'center-center',
  92. element: document.getElementById('marker'),
  93. stopEvent: false
  94. });
  95. map.addOverlay(marker);
  96. function checkSize() {
  97. var small = map.getSize()[0] < 600;
  98. attribution.setCollapsible(small);
  99. attribution.setCollapsed(small);
  100. }
  101. window.addEventListener('resize', checkSize);
  102. checkSize();
  103. </script>
  104. </div>
  105. </div>
  106. <?php endif; ?>
  107. </div>
  108. </div>
  109. </div>