Commit 44f6c310 authored by andre's avatar andre

перенос модуля faq с task-on.ru

parent 88136053
......@@ -2,46 +2,49 @@
namespace common\modules\faq;
/**
* blog module definition class
*/
class Module extends \common\components\WebModule
{
/**
* @inheritdoc
*/
public $controllerNamespace = 'common\modules\faq\controllers';
public $menu_icons = 'fa fa-question';
public static $active = true;
public static $base_module = true;
public $menu_icons = 'fa-info';
public static function name()
/**
* @inheritdoc
*/
public function init()
{
return 'Вопрос-ответ';
}
parent::init();
// custom initialization code goes here
}
public static function description()
{
return 'Вопрос-ответ';
return 'Справка';
}
public static function version()
{
return '1.0';
}
public function init()
{
parent::init();
// custom initialization code goes here
public static function name()
{
return 'Справка';
}
public static function adminMenu()
public static function adminMenu()
{
return array(
'Список вопросов и ответов' => '/faq/faq-admin/manage',
'Список страниц' => '/faq/faq-admin/manage',
'Рубрики' => '/faq/rubric-admin/manage',
'Голосования' => '/faq/vote-admin/manage',
);
}
}
<?php
namespace common\modules\faq\assets;
use yii\web\AssetBundle;
class AdminGeneratorAsset extends AssetBundle
{
public $sourcePath = '@common/modules/faq/assets/src';
public $css = [
];
public $js = [
'js/admin-generator.js',
];
public $depends = [
'yii\web\JqueryAsset',
'yii\bootstrap\BootstrapAsset',
// 'backend\assets\AppAsset'
];
}
<?php
namespace common\modules\faq\assets;
use yii\web\AssetBundle;
class GeneratorAsset extends AssetBundle
{
public $sourcePath = '@common/modules/faq/assets/src';
public $css = [
// 'css/reset.css',
'css/generator.css',
'css/style.css',
];
public $js = [
'js/generator.js',
];
public $depends = [
'yii\web\JqueryAsset',
'yii\bootstrap\BootstrapAsset',
// 'backend\assets\AppAsset'
];
}
._sidebar_form_response_hidden{
display: none !important;
}
#_sidebar_form_response{
min-height: 100px;
background: #ffffff ;
margin-bottom: 25px;
border-radius: 3px;
padding-top: 35px;
}
#_sidebar_form_response span{
display: block;
color: #a94442;
text-align: center;
padding: 0 20px;
}
.form_wr.radio_like_result.hidden{
display: none;
}
.keys_list_bl {
background: #fff;
/*padding-top: 56px;*/
}
.faq_sec {
width: 100%;
background: #fff;
}
a,abbr,acronym,address,applet,article,aside,audio,b,blockquote,big,body,center,canvas,caption,cite,code,command,datalist,dd,del,details,dfn,dl,div,dt,em,embed,fieldset,figcaption,figure,font,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,keygen,label,legend,li,meter,nav,object,ol,output,p,pre,progress,q,s,samp,section,small,span,source,strike,strong,sub,sup,table,tbody,tfoot,thead,th,tr,tdvideo,tt,u,ul,var{background:transparent;border:0 none;font-size:100%;margin:0;padding:0;border:0;outline:0;vertical-align:top;}ol, ul {list-style:none;}blockquote, q {quotes:none;}table, table td {padding:0;border:none;border-collapse:collapse;}img {vertical-align:top;}embed {vertical-align:top;}input[type=text], textarea{ outline:none;border-radius:0;}
article,aside,audio,canvas,command,datalist,details,embed,figcaption,figure,footer,header,hgroup,keygen,meter,nav,output,progress,section,source,video{display:block}mark,rp,rt,ruby,summary,time{display:inline}
\ No newline at end of file
/*
-----------------------------------------------------
Stylesheet Guide
-----------------------------------------------------
1. Default stylesheets
1.1. Color Schemes
2. General classes
3. Main
3.1 Offsets
4. Header
5. Basic Elements
5.1. Typography
5.2. Buttons
5.3. Icon
5.4. Crystals
5.5. Tabs
5.6. Forms
6. Main
7. Footer
8. PopUp
9. Social link
10. Rubric
11. Reference
12. Rates
/**!*/
/*@import "reset.css";*/
/*@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,600);*/
/*!* ------------------------------------------------*/
/*1. Default stylesheets*/
/*------------------------------------------------ *!*/
/*body {*/
/*font-family: 'RobotoRegular', sans-serif;*/
/*color:#0a0a0a;*/
/*font-size:13px;*/
/*line-height:26px;*/
/*background:#fff;*/
/*-webkit-text-size-adjust: none;*/
/*overflow-x: hidden !important;*/
/*}*/
/*::-webkit-input-placeholder{*/
/*color:#8d8d8d;*/
/*-webkit-transition: text-indent .5s ease, color .5s ease;*/
/*transition: text-indent .5s ease, color .5s ease;*/
/*}*/
/*input::-moz-placeholder{*/
/*color:#8d8d8d;*/
/*opacity:1;*/
/*}*/
/*textarea::-moz-placeholder{*/
/*color: #8d8d8d;*/
/*opacity: 1;*/
/*}*/
/*::ms-input-placeholder{*/
/*color:#8d8d8d;*/
/*}*/
/*[placeholder]:focus::-webkit-input-placeholder{*/
/*text-indent:10em;*/
/*color:transparent;*/
/*}*/
/** {*/
/*outline: none;*/
/*}*/
/*!* --------------------------------------------*/
/*1.1. Color Schemes*/
/*-------------------------------------------- *!*/
/*!* ------------------------------------------------*/
/*2. General Classes*/
/*------------------------------------------------ *!*/
/*.align_left{*/
/*text-align: left;*/
/*}*/
/*.align_right{*/
/*text-align: right;*/
/*}*/
/*.align_center{*/
/*text-align: center;*/
/*}*/
/*.alignleft{*/
/*float: left;*/
/*}*/
/*.alignright{*/
/*float: right;*/
/*}*/
/*.wrapper{overflow: hidden;}*/
/*.hide{ display: none;}*/
/*.show{ display: block;}*/
/*.d_ib{display: inline-block;}*/
/*.transparent{ opacity:0; }*/
/*.invisible{*/
/*opacity: 0;*/
/*visibility: hidden;*/
/*}*/
/*.visible{*/
/*opacity:1;*/
/*visibility: visible;*/
/*}*/
/*.p_abs{position: absolute;}*/
/*.p_rel{position: relative;}*/
/*.p_fix{position: fixed;}*/
/*.clear {clear:both;width:100%;line-height:0;font-size:0;}*/
/*.clearfix:after {*/
/*content: "";*/
/*display: block;*/
/*height: 0;*/
/*clear: both;*/
/*visibility: hidden;*/
/*}*/
/*.reg {text-transform:uppercase}*/
/*!* ------------------------------------------------*/
/*3. Main*/
/*------------------------------------------------ *!*/
/*#content {padding:0px 0px 0px 0px;}*/
/*!* --------------------------------------------*/
/*3.1. Offsets*/
/*-------------------------------------------- *!*/
/*.section_offset{*/
/*padding: 55px 0;*/
/*}*/
/*.section_offset:first-child{*/
/*padding: 0 0 55px;*/
/*}*/
/*.cont_pad{*/
/*padding: 75px 0 0;*/
/*}*/
/*!* ------------------------------------------------*/
/*4. Header*/
/*------------------------------------------------ *!*/
/*header {*/
/*background: #0e3242;*/
/*width: 100%;*/
/*min-height: 100px;*/
/*color: #fff;*/
/*padding-bottom: 24px;*/
/*}*/
/*a.logo {*/
/*display: block;*/
/*margin-top: 14px;*/
/*}*/
/*.top_phone {*/
/*font-size: 21px;*/
/*font-family: "RobotoLight";*/
/*float: right;*/
/*margin-top: 36px;*/
/*color: #fff;*/
/*display: inline-block;*/
/*}*/
/*.top_phone:before {*/
/*content: "";*/
/*background: url(/images/phone.png) no-repeat;*/
/*width: 18px;*/
/*height: 18px;*/
/*display: inline-block;*/
/*vertical-align: middle;*/
/*margin-right: 14px;*/
/*margin-top: -2px;*/
/*}*/
/*.top_nav {*/
/*height: 37px;*/
/*line-height: 37px;*/
/*display: block;*/
/*float: left;*/
/*margin-left: 40px;*/
/*}*/
/*.top_nav ul li {*/
/*float: left;*/
/*padding: 0 5px;*/
/*}*/
/*.top_nav ul li a {*/
/*color: #fff;*/
/*font-size: 15px;*/
/*display: block;*/
/*float: left;*/
/*padding: 0px 8px;*/
/*margin-top: 30px;*/
/*height: 38px;*/
/*line-height: 34px;*/
/*border: 2px solid transparent;*/
/*border-radius: 5px;*/
/*-moz-border-radius: 5px;*/
/*-webkit-border-radius: 5px;*/
/*-o-border-radius: 5px;*/
/*-ms-border-radius: 5px;*/
/*text-decoration: none;*/
/*-moz-transition: border 0.3s linear 0.1s;*/
/*-o-transition: border 0.3s linear 0.1s;*/
/*-webkit-transition: border 0.3s linear 0.1s;*/
/*-ms-transition: border 0.3s linear 0.1s;*/
/*transition: border 0.3s linear 0.1s;*/
/*}*/
/*.top_nav ul li a:hover {*/
/*border: 2px solid #6def0d;*/
/*color: #6def0d;*/
/*text-decoration: none;*/
/*}*/
/*.top_nav ul li a:active {*/
/*text-decoration: none;*/
/*color: #6def0d;*/
/*border: 2px solid #6def0d;*/
/*}*/
/*.top_nav ul li a:focus {*/
/*text-decoration: none;*/
/*color: #6def0d;*/
/*border: 2px solid #6def0d;*/
/*}*/
/*.top_nav ul li .act_bt {*/
/*background: #fff;*/
/*color: #303e48;*/
/*border: 2px solid #262E38;*/
/*-moz-transition: all 0.3s linear 0.1s;*/
/*-o-transition: all 0.3s linear 0.1s;*/
/*-webkit-transition: all 0.3s linear 0.1s;*/
/*-ms-transition: all 0.3s linear 0.1s;*/
/*transition: all 0.3s linear 0.1s;*/
/*}*/
/*.top_nav ul li .act_bt:hover {*/
/*border: 2px solid #fff;*/
/*background: none;*/
/*color: #fff;*/
/*}*/
/*.lang_check {
height: 37px;
line-height: 37px;
display: block;
float: left;
margin-top: 30px;
}
.lang_check a {
color: #fff;
font-size: 15px;
display: block;
padding: 0px 8px;
height: 38px;
line-height: 34px;
border: 2px solid transparent;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
-o-border-radius: 5px;
-ms-border-radius: 5px;
-moz-transition: border 0.3s linear 0.1s;
-o-transition: border 0.3s linear 0.1s;
-webkit-transition: border 0.3s linear 0.1s;
-ms-transition: border 0.3s linear 0.1s;
transition: border 0.3s linear 0.1s;
}
.lang_check a:hover {
border: 2px solid #fff;
text-decoration: none;
color: #fff;
}
.lang_check a:active {
text-decoration: none;
border: 2px solid #fff;
color: #fff;
}
.lang_check a:focus {
text-decoration: none;
border: 2px solid #fff;
color: #fff;
}
.lang_check a:last-child {
background: #fff;
text-decoration: none;
color: #262E38;
z-index: 555;
position: relative;
}
a.d_menu_hide {
display: none !important;
}
a.show_d_menu {
display: block !important;
}*/
.foot_phone{
color: #fff2e3;
}
.copyring {
font-size: 11px;
margin-left: 4px;
line-height: 11px;
color: rgb(249, 249, 250);
}
.icon-arrowDown:before {
content: "";
background: url(/images/arrow_down.png) no-repeat;
width: 6px;
height: 3px;
display: inline-block;
vertical-align: middle;
margin-right: 10px;
margin-top: -2px;
}
.icon-arrowRight:before {
content: "";
background: url(/images/arrow_right.png) no-repeat;
width: 6px;
height: 6px;
display: inline-block;
vertical-align: middle;
margin-right: 10px;
margin-top: -2px;
}
.showitems {
display: block;
}
.phone_hover_foot {
background: url(/images/phone_hover_bg.png) no-repeat center center;
width: 222px;
height: 88px;
display: none;
position: absolute;
top: -76px;
right: 56px;
color: #3c4755;
font-family: "RobotoLight";
font-size: 14px;
line-height: 21px;
text-align: center;
padding-top: 15px;
}
.show_phone_inf {
display: block;
}
.phone_hover_head {
background: url(/images/phone_hover2.png) no-repeat center center;
width: 222px;
height: 88px;
display: none;
position: absolute;
top: 58px;
right: -14px;
color: #3c4755;
font-family: "RobotoLight";
font-size: 14px;
line-height: 21px;
text-align: center;
padding-top: 25px;
z-index: 4;
}
.show_phone_inf_head {
display: block;
}
.menu {
width: 260px;
height: 100vh;
z-index: 9999;
position: fixed;
top: 0;
right: -260px;
background: #333942;
-webkit-transition: right 0.5s ease-out 0.4s;
-moz-transition: right 0.5s ease-out 0.4s;
-o-transition: right 0.5s ease-out 0.4s;
transition: right 0.5s ease-out 0.4s;
display: none;
}
.menu_active {
right: 0px;
}
.menu ul {
list-style: none;
}
.menu ul li {
padding-left: 20px;
height: 42px;
line-height: 40px;
border-bottom: 1px solid #2D323A;
display: block;
}
.menu ul li:hover {
background: #93A5BD;
}
.menu ul li:last-child {
margin-bottom: 0;
}
.menu ul li a {
font-size: 15px;
color: #fff;
text-decoration: none;
display: block;
}
.menu ul li a:hover {
color: #181818;
}
.phone_menu {
display: block;
font-size: 21px;
font-family: "RobotoLight";
height: 60px;
line-height: 60px;
padding-left: 20px;
background: #262E38;
color: #fff;
}
.phone_menu:active, .phone_menu:focus {
color: #fff;
}
.phone_menu:before {
content: "";
background: url(/images/phone.png) no-repeat;
width: 18px;
height: 18px;
display: inline-block;
vertical-align: middle;
margin-right: 14px;
margin-top: -2px;
}
.toggle_block {
width: 60px;
height: 60px;
position: absolute;
background: #22252B;
left: -60px;
}
.toggle-mnu {
display: block;
width: 60px;
height: 60px;
padding: 19px 16px 16px;
}
.toggle-mnu span:after, .toggle-mnu span:before {
content: "";
position: absolute;
left: 0;
top: 9px;
}
.toggle-mnu span:after {
top: 18px;
}
.toggle-mnu span {
position: relative;
display: block;
}
.toggle-mnu span, .toggle-mnu span:after, .toggle-mnu span:before {
width: 100%;
height: 2px;
background-color: #fff;
transition: all 0.3s;
backface-visibility: hidden;
border-radius: 2px;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
-o-border-radius: 2px;
-ms-border-radius: 2px;
}
.toggle-mnu.on span {
background: transparent;
}
.toggle-mnu.on span:before {
-webkit-transform: rotate(45deg) translate(-1px, 0px);
-ms-transform: rotate(45deg) translate(-1px, 0px);
-o-transform: rotate(45deg) translate(-1px, 0px);
transform: rotate(45deg) translate(-1px, 0px);
}
.toggle-mnu.on span:after {
-webkit-transform: rotate(-45deg) translate(6px, -7px);
-ms-transform: rotate(-45deg) translate(6px, -7px);
-o-transform: rotate(-45deg) translate(6px, -7px);
transform: rotate(-45deg) translate(6px, -7px);
}
/* ------------------------------------------------
5. Basic Elements
------------------------------------------------ */
/* --------------------------------------------
5.1. Typography
-------------------------------------------- */
h1,h2,h3,h4,h5,h6{
font-family: 'Roboto', sans-serif;
font-weight:normal;
line-height: 1.23em;
color: #333333;
margin: 0;
margin-bottom: 17px;
}
h1{
font-family: "RobotoBold";
font-size: 40px;
line-height: 54px;
color: #0c2733;
margin-bottom: 33px;
}
h2{
font-family: "RobotoBold";
font-size: 40px;
line-height: 47px;
color: #243340;
margin-bottom: 10px;
}
h3{
font-family: "RobotoBold";
font-size: 30px;
line-height: 37px;
color: #243340;
margin-bottom: 20px;
}
h4{
font-family: "RobotoBold";
font-size: 22px;
line-height: 36px;
color: #243340;
margin-bottom: 20px;
}
h5{
font-family: "RobotoRegular";
font-size: 30px;
line-height: 36px;
color: #243340;
margin-bottom: 30px;
}
h6{
font-family: "RobotoRegular";
font-size: 25px;
line-height: 28px;
color: #050505;
margin-bottom: 25px;
}
p:not(:last-child){margin-bottom: 20px;}
mark{background-color: #20cfef;padding: 0 2px;color: #fff;}
mark.red{background-color: #ee352f;}
a{
color: #009ad4;
text-decoration: none;
-webkit-transition: all 0.5s;
-o-transition: all 0.5s;
transition: all 0.5s;
}
a:hover{
color: #333;
text-decoration: none;
-webkit-transition: all 0.3s;
-o-transition: all 0.3s;
transition: all 0.3s;
}
a:focus,
a:visited{
text-decoration: none;
}
.geentxt span {
font-family: "RobotoBold";
font-size: 40px;
line-height: 54px;
color: #0c2733;
background-color: #93f82f;
display: inline;
padding: 0 16px;
margin-bottom: 2px;
}
.green_text{
color: #93f82f;
}
.blue_text {
color: #009ad4;
}
button {
-webkit-transition: all 0.5s;
-o-transition: all 0.5s;
transition: all 0.5s;
}
/* --------------------------------------------
5.2. Buttons
-------------------------------------------- */
.btn_1{
height: 46px;
padding: 10px 15px;
line-height: 26px;
font-size: 17px;
display: inline-block;
outline: none;
background: #aad2d8;
color: #0e3242;
border-radius: 3px;
}
.btn_1:hover{
background-color: #93f82f;
color: #0e3242;
}
.btn_green {
height: 64px;
width: 100%;
display: inline-block;
outline: none;
background: #97e107 url(/images/btn_green.png) 0 0 no-repeat;
background-size: cover;
color: #0e3242;
font-size: 20px;
line-height: 34px;
font-family: "RobotoBold";
text-align: center;
padding: 15px;
border-radius: 5px;
margin-bottom: 40px;
border: none;
}
.btn_green:hover{
box-shadow: 0 0 25px 5px #7fff00;
}
.btn_blue {
display: inline-block;
outline: none;
background-color: #59b3ce;
color: #fff;
font-size: 18px;
line-height: 20px;
text-align: center;
padding: 15px 18px;
border-radius: 3px;
margin-bottom: 10px;
border: none;
}
.btn_blue:hover{
background-color: #488fd3;
color: #fff;
}
.btn_pink {
height: 69px;
width: 100%;
display: inline-block;
outline: none;
background: url(/images/btn_pink.png) 0px 0 no-repeat;
background-size: cover;
color: #fff;
font-size: 27px;
line-height: 34px;
font-family: "RobotoBold";
text-align: center;
padding: 16px;
border-radius: 3px;
border: none;
}
.btn_pink:hover{
box-shadow: 0 0 25px 5px #ff7290;
}
/* --------------------------------------------
5.3. Icon
-------------------------------------------- */
.icon_load {
margin-right: 10px;
width: 32px;
height: 24px;
display: inline-block;
background: url(/images/icon_load.png) 0 0 no-repeat;
}
/* --------------------------------------------
5.4. Crystals
-------------------------------------------- */
.crystal_1 {
position: absolute;
right: -50px;
top: -50px;
}
.crystal_2 {
position: absolute;
right: -50px;
top: 240px;
}
.crystal_3 {
position: absolute;
left: -50px;
top: 100px;
}
/* --------------------------------------------
5.5. Tabs
-------------------------------------------- */
.horizontal_tab .resp-tabs-list {
border: 1px solid #0076a3;
text-align: center;
max-width: 568px;
}
.horizontal_tab .resp-tabs-list li {
display: inline-block;
background-color: transparent !important;
cursor: pointer;
padding: 15px 30px;
position: relative;
}
.horizontal_tab .resp-tabs-list li span {
font-size: 15px;
line-height: 20px;
display: inline-block;
color: #00d2ff;
border-bottom: 2px dotted #00d2ff;
-webkit-transition: all 0.5s;
-o-transition: all 0.5s;
transition: all 0.5s;
}
.horizontal_tab .resp-tabs-list li:after {
content: '';
display: block;
position: absolute;
right: 0;
top: 20px;
height: 15px;
width: 3px;
background-color: #93f82f;
border-right: 1px solid #4a8432;
border-left: 1px solid #4a8432;
}
.horizontal_tab .resp-tabs-list li:last-child:after {
display: none;
}
.horizontal_tab .resp-tabs-list li:hover span {
color: #80d930;
border-bottom: 2px dotted #80d930;
}
.horizontal_tab .resp-tabs-list .resp-tab-active span {
color: #fff;
border-bottom: 2px dotted transparent;
}
.vertical_tab {
padding-bottom: 100px;
}
.vertical_tab .resp-tabs-list {
margin-top: 66px !important;
}
.vertical_tab .resp-tabs-list li {
background-color: transparent !important;
cursor: pointer;
padding: 17px 16px;
position: relative;
/*border: 1px solid #fff;*/
border-right: none !important;
border-radius: 3px 0 0 3px;
}
.vertical_tab .resp-tabs-list li span {
font-family: "RobotoBold";
font-size: 15px;
line-height: 20px;
display: inline-block;
color: #488fd3;
border-bottom: 2px dotted #488fd3;
-webkit-transition: all 0.5s;
-o-transition: all 0.5s;
transition: all 0.5s;
}
.vertical_tab .resp-tabs-list li:hover span {
/*color: #488fd3;*/
border-bottom: 2px dotted transparent;
}
.vertical_tab .resp-tabs-list .resp-tab-active span {
color: #243340;
border-bottom: 2px dotted transparent;
}
.vertical_tab .resp-tabs-list .resp-tab-active {
background-color: #f1f0f0 !important;
border: 1px solid #dddddd;
border-right: none !important;
}
.vertical_tab .resp-tabs-list i {
display: inline-block;
margin-right: 15px;
height: 22px;
width: 22px;
}
.vertical_tab .resp-tab-active i {
background-position: 0 100%;
}
.tab_icon_1 {
background: url(/images/tab_icon_1.png) 0 0 no-repeat;
}
.tab_icon_2 {
background: url(/images/tab_icon_2.png) 0 0 no-repeat;
}
.tab_icon_3 {
height: 20px !important;
background: url(/images/tab_icon_3.png) 0 0 no-repeat;
}
.vertical_tab .img_box, .vertical_tab .resp-tab-content {
margin-bottom: 0;
}
.vertical_tab .resp-tabs-container {
box-shadow: 0 3px 8px 2px #cbcbcc;
position: relative;
z-index: 2;
}
.vertical_tab_poz {
margin-top: -50px;
}
h2.resp-accordion {
background-color: #f1f0f0 !important;
padding: 0 20px !important;
}
.resp-arrow {
margin-top: 17px;
}
/* --------------------------------------------
5.6. Forms
-------------------------------------------- */
input:not([type="radio"]):not([type="checkbox"]) {
border: none;
height: 50px;
padding: 0 20px;
border-radius: 3px;
font-size: 20px !important;
font-family: "Open Sans" !important;
font-weight: 400 !important;
margin-bottom: 25px;
width: 100%;
outline: none;
}
.input_lg {
height: 58px !important;
}
label.error {
color: #d10000;
font-size: 12px;
line-height: 12px;
font-style: italic;
margin-top: -18px;
}
input:not([type="radio"]):not([type="checkbox"]).error {
box-shadow: inset 0 0 5px 1px #d10000;
}
textarea {
border: none;
height: 175px;
padding: 10px 20px;
border-radius: 3px;
font-size: 20px;
font-family: "Open Sans", "RobotoBold";
font-weight: 400;
margin-bottom: 25px;
width: 100%;
max-height: 100%;
outline: none;
}
.checkbox {
vertical-align: top;
width: 17px;
height: 17px;
margin: 0 3px 0 0;
}
.checkbox + label {
cursor: pointer;
}
.checkbox:not(checked) {
position: absolute;
opacity: 0;
}
.checkbox:not(checked) + label {
position: relative;
padding: 0 0 0 60px;
}
.checkbox:not(checked) + label:before {
content: '';
position: absolute;
top: -4px;
left: 0;
width: 50px;
height: 26px;
border-radius: 13px;
background: #CDD1DA;
box-shadow: inset 0 2px 3px rgba(0,0,0,.2);
}
.checkbox:not(checked) + label:after {
content: '';
position: absolute;
top: -2px;
left: 2px;
width: 22px;
height: 22px;
border-radius: 10px;
background: #FFF;
box-shadow: 0 2px 5px rgba(0,0,0,.3);
transition: all .2s;
}
.checkbox:checked + label:before {
background: #9FD468;
}
.checkbox:checked + label:after {
left: 26px;
}
.checkbox:focus + label:before {
box-shadow: 0 0 0 3px rgba(255,255,0,.5);
}
.radio_wr {
display: inline-block;
margin-right: 35px;
}
.radio_wr:last-child {
margin-right: 0;
}
.radio {
vertical-align: top;
width: 17px;
height: 17px;
margin: 0 3px 0 0;
}
.radio + label {
cursor: pointer;
height: 52px;
background-color: #67ac1d;
padding: 10px 17px;
border-radius: 5px;
margin-bottom: 10px;
box-shadow: 2px 2px 4px 2px #e7e7e7;
color: #fff;
line-height: 32px;
}
.radio:checked + label {
cursor: pointer;
height: 52px;
background-color: #67ac1d;
padding: 10px 17px;
color: #fff;
}
.radio:not(checked) {
position: absolute;
opacity: 0;
}
.radio:not(checked) + label {
position: relative;
background-color: #f4f4f4;
color: #7d7d7d;
/*padding: 0 0 0 35px;*/
}
.icon_like {
content: '';
display: inline-block;
float: left;
margin-right: 18px;
width: 20px;
height: 32px;
background: url(/images/icon_like.png) 0 center no-repeat;
}
.icon_not_like {
content: '';
display: inline-block;
float: left;
margin-right: 18px;
width: 20px;
height: 32px;
background: url(/images/icon_not_like.png) 0 center no-repeat;
}
.radio.radio_like + label {
background-color: #67ac1d;
color: #fff;
-webkit-transition: all 0.5s;
-o-transition: all 0.5s;
transition: all 0.5s;
}
.radio.radio_like + label:hover {
box-shadow: 2px 2px 8px 2px #7fd028;
}
.radio.radio_not_like + label {
background-color: #f4f4f4;
color: #7d7d7d;
-webkit-transition: all 0.5s;
-o-transition: all 0.5s;
transition: all 0.5s;
}
.radio.radio_not_like + label:hover {
background-color: #ff5b57;
color: #fff;
box-shadow: 2px 2px 8px 2px #ff5b57;
}
/*.radio:not(checked) + label:before {
content: '';
position: absolute;
top: -3px;
left: 0;
width: 22px;
height: 22px;
border: 1px solid #CDD1DA;
border-radius: 50%;
background: #FFF;
}*/
/*.radio:not(checked) + label:after {
content: '';
position: absolute;
top: 1px;
left: 4px;
width: 16px;
height: 16px;
border-radius: 50%;
background: #9FD468;
box-shadow: inset 0 1px 1px rgba(0,0,0,.5);
opacity: 0;
transition: all .2s;
}*/
/*.radio:checked + label:after {
opacity: 1;
}
.radio:focus + label:before {
box-shadow: 0 0 0 3px rgba(255,255,0,.5);
}*/
input[type='reset'] {
padding: 12px 15px;
border: none;
border-radius: 5px;
background: #CDD1DA;
color: #FFF;
cursor: pointer;
font-size: 15px;
}
input[type='reset']:active {
background: #BDC0CC;
}
input[type='reset']:focus {
outline: none;
box-shadow: 0 0 0 3px rgba(255,255,0,.5);
}
/* ------------------------------------------------
6. Main
------------------------------------------------ */
.box_1 {
padding-top: 40px;
padding-bottom: 55px;
background: #0c2733 url(/images/box_1_bg.jpg) 0 0 repeat;
}
.sentence {
font-family: "RobotoBold";
font-size: 30px;
line-height: 33px;
color: #fff;
text-align: center;
margin-bottom: 50px;
}
.sentence span {
font-size: 33px;
}
.sentence_plas {
display: block;
margin: 10px;
}
.video_box {
position: relative;
max-width: 568px;
}
.video_box_2 {
width: 100%;
}
.video_box>* {
width: 100%;
height: auto;
min-height: 320px
}
.box_2 {
padding-top: 80px;
padding-bottom: 85px;
}
.doc_box_1 {
position: relative;
}
.doc_box_img {
position: absolute;
top: -17px;
left: -18px;
}
.doc_title {
font-size: 17px;
line-height: 35px;
color: #fff;
background-color: #65bb11;
padding: 0 10px;
display: inline-block;
margin-left: 35px;
margin-top: 20px;
}
.doc_cont {
padding-left: 485px;
color: #1f9ebe;
font-size: 14px;
line-height: 18px;
font-family: "Open Sans", "RobotoBold";
font-weight: 600;
}
.doc_cont span {
font-size: 14px;
line-height: 18px;
font-family: "Open Sans", "RobotoBold";
font-weight: 600;
color: #1f9ebe;
cursor: pointer;
}
.doc_cont>div:hover span {
color: #65bb11;
}
.doc_cont strong {
position: absolute;
display: block;
border: 2px dotted #258ab0;
cursor: pointer;
}
.doc_cont>div:hover strong {
border: 2px solid #c7dacf;
background: url(/images/doc_active_bg.png) 0 0 repeat;
}
.doc_line {
position: absolute;
border-bottom: 1px solid #5ec36c;
height: 1px;
}
.doc_line:after {
content: '';
display: block;
position: absolute;
bottom: -4px;
right: 0;
height: 7px;
width: 7px;
background-color: #5ec36c;
border-radius: 100%;
}
.doc_poz_1 {
padding-top: 30px;
margin-bottom: 30px;
height: 70px;
}
.doc_poz_1 strong {
height: 48px;
width: 105px;
top: 18px;
left: 35px;
}
.doc_poz_1 .doc_line {
top: 40px;
right: 468px;
width: 330px;
}
.doc_poz_2 {
height: 40px;
margin-bottom: 24px;
}
.doc_poz_2 strong {
height: 78px;
width: 177px;
top: 87px;
left: 210px;
}
.doc_poz_2 .doc_line {
top: 109px;
right: 468px;
width: 83px;
}
.doc_poz_3 {
height: 40px;
margin-bottom: 16px;
}
.doc_poz_3 strong {
height: 78px;
width: 160px;
top: 87px;
left: 35px;
}
.doc_poz_3 .doc_line {
top: 166px;
right: 468px;
width: 355px;
height: 8px;
border-left: 1px solid #5ec36c;
}
.doc_poz_4 {
height: 40px;
margin-bottom: 210px;
}
.doc_poz_4 strong {
height: 268px;
width: 357px;
top: 180px;
left: 32px;
}
.doc_poz_4 .doc_line {
top: 229px;
right: 468px;
width: 81px;
}
.doc_poz_4_img {
margin-top: 35px;
margin-left: 35px;
}
.doc_line_4 {
position: absolute;
border-bottom: 1px solid #5ec36c;
border-left: 1px solid #5ec36c;
height: 105px;
top: 229px;
right: 433px;
width: 95px;
}
.doc_line_4:after {
content: '';
display: block;
position: absolute;
bottom: -6px;
right: 0;
height: 10px;
width: 10px;
background-color: #65bb11;
border-radius: 100%;
}
.doc_poz_5 {
height: 40px;
margin-bottom: 10px;
}
.doc_poz_5 strong {
height: 28px;
width: 95px;
top: 464px;
left: 290px;
}
.doc_poz_5 .doc_line {
top: 479px;
right: 468px;
width: 83px;
}
.doc_poz_5 strong.doc_poz_5_box {
height: 28px;
width: 102px;
top: 464px;
left: 35px;
}
.doc_line_5 {
position: absolute;
border-top: 1px solid #5ec36c;
border-left: 1px solid #5ec36c;
border-right: 1px solid #5ec36c;
height: 5px;
top: 459px;
right: 535px;
width: 320px;
}
.doc_line_5_next {
position: absolute;
border-right: 1px solid #5ec36c;
height: 20px;
top: 459px;
right: 535px;
width: 1px;
}
.doc_poz_6 {
height: 40px;
margin-bottom: 12px;
}
.doc_poz_6 strong {
height: 90px;
width: 95px;
top: 464px;
left: 185px;
}
.doc_poz_6 .doc_line {
top: 529px;
right: 468px;
width: 187px;
}
.doc_poz_7 {
height: 40px;
margin-bottom: 10px;
}
.doc_poz_7 strong {
height: 40px;
width: 135px;
top: 497px;
left: 35px;
}
.doc_poz_7 .doc_line {
top: 540px;
right: 468px;
width: 375px;
height: 42px;
border-left: 1px solid #5ec36c;
}
.doc_poz_11 {
padding-top: 13px;
height: 45px;
}
.doc_poz_11 strong {
height: 55px;
width: 105px;
top: 18px;
left: 35px;
}
.doc_poz_11 .doc_line {
top: 23px;
right: 468px;
width: 330px;
}
.doc_poz_12 {
height: 40px;
margin-bottom: 30px;
}
.doc_poz_12 strong {
height: 45px;
width: 230px;
top: 32px;
left: 158px;
}
.doc_poz_12 .doc_line {
top: 55px;
right: 468px;
width: 80px;
}
.doc_poz_13 {
height: 40px;
margin-bottom: 80px;
}
.doc_poz_13 strong {
height: 68px;
width: 354px;
top: 90px;
left: 35px;
}
.doc_poz_13 .doc_line {
top: 124px;
right: 468px;
width: 80px;
}
.doc_poz_14 {
height: 40px;
margin-bottom: 7px;
}
.doc_poz_14 strong {
height: 47px;
width: 354px;
top: 223px;
left: 35px;
}
.doc_poz_14 .doc_line {
top: 246px;
right: 468px;
width: 80px;
}
.doc_poz_15 {
height: 40px;
margin-bottom: 55px;
}
.doc_poz_15 strong {
height: 15px;
width: 119px;
top: 284px;
left: 270px;
}
.doc_poz_15 .doc_line {
top: 291px;
right: 468px;
width: 80px;
}
.doc_poz_16 {
height: 40px;
margin-bottom: 280px;
}
.doc_poz_16 strong {
height: 102px;
width: 115px;
top: 315px;
left: 80px;
}
.doc_poz_16 .doc_line {
top: 385px;
right: 468px;
width: 274px;
}
.doc_poz_16 strong.doc_poz_16_box {
height: 40px;
width: 119px;
top: 310px;
left: 270px;
}
.doc_line_16 {
position: absolute;
border-left: 1px solid #5ec36c;
height: 33px;
top: 352px;
right: 610px;
width: 1px;
}
.img_box {
/*text-align: center;*/
margin: 0 auto;
margin-bottom: 20px;
}
.img_box img {
max-width: 100%;
height: auto;
}
.graph_box_1 {
position: relative;
margin-top: 40px;
padding-top: 15px;
}
.graph_box_1 span {
font-size: 14px;
line-height: 18px;
font-family: "Open Sans", "RobotoBold";
font-weight: 600;
color: #1f9ebe;
display: inline-block;
position: absolute;
}
.graph_box_text_1 {
right: 100px;
top: 0;
}
.graph_box_text_2 {
right: 395px;
top: 42px;
}
.graph_box_1:after {
content: '';
position: absolute;
right: 235px;
bottom: -20px;
display: block;
width: 102px;
height: 91px;
background: url(/images/graph_box_1_arrow.png) 0 0 no-repeat;
}
.graph_box_2 {
position: relative;
margin-top: -70px;
margin-bottom: 55px;
}
.graph_box_2 img {
float: left;
}
.graph_box_2 h4 {
padding-top: 140px;
padding-left: 30px;
overflow: hidden;
}
.graph_box_3 {
position: relative;
}
.graph_box_3 img {
float: right;
}
.graph_box_3 h4 {
padding-right: 30px;
overflow: hidden;
}
.graph_box_3:after {
content: '';
position: absolute;
left: 325px;
top: 105px;
display: block;
width: 110px;
height: 80px;
background: url(/images/graph_box_3_arrow.png) 0 0 no-repeat;
}
.box_3 {
background: url(/images/box_3_bg.jpg) 0 0 no-repeat;
background-size: cover;
padding: 100px 0;
color: #fff;
}
.box_3 * {
color: #fff;
}
.box_3 h2 {
margin-bottom: 90px;
}
.server_box {
position: relative;
font-size: 20px;
line-height: 20px;
font-family: "RobotoBold";
}
.form_message_1 {
font-size: 35px;
color: #127dba;
font-family: "RobotoBold";
text-align: center;
display: block;
padding-top: 40px;
}
.form_message_2 {
color: #127dba;
font-family: "RobotoBold";
}
.form_message_3 {
color: #9fe306;
font-size: 20px;
line-height: 30px;
font-family: "RobotoBold";
}
.server_box img {
margin-left: 30px;
margin-bottom: 36px;
}
.server_or {
display: inline-block;
position: absolute;
top: 40px;
left: 210px;
font-size: 11px;
line-height: 11px;
font-family: "RobotoBold";
}
.server_text_1 {
padding-right: 102px;
}
.server_box_cont {
font-size: 20px;
line-height: 29px;
font-family: "RobotoBold";
}
.box_4 {
background-color: #e3e3e3;
padding: 70px 0;
min-height: 375px
}
.box_4 h2 {
margin-bottom: 35px;
position: relative;
z-index: 2;
}
.box_4 p {
color: #1d303b;
font-size: 15px;
line-height: 24px;
}
.sample_box {
position: relative;
}
.sample_box img {
position: absolute;
top: -190px;
}
.box_5 {
background-color: #0e3242;
padding-top: 135px;
}
.bluetext span {
font-family: "RobotoBold";
font-size: 40px;
line-height: 54px;
color: #0e3242;
background-color: #00daff;
display: inline;
padding: 0 16px;
margin-bottom: 2px;
}
.box_5_arrow {
margin-top: 30px;
float: right;
width: 150px;
height: 95px;
background: url(/images/box_5_arrow.png) 0 0 no-repeat;
}
.form_br{
margin-bottom: 10px;
}
/* ------------------------------------------------
7. Footer
------------------------------------------------ */
footer {
padding-top: 45px;
padding-bottom: 55px;
background: #0e3242 url(/images/footer_bg.png) center 100% no-repeat;
background-size: cover;
}
footer .top_phone {
margin-top: 24px;
}
footer .phone_hover_head {
top: 66px;
}
.footer_mail {
font-size: 21px;
font-family: "RobotoLight";
float: right;
margin-top: 44px;
color: #fff;
display: inline-block;
}
.footer_mail:hover {
color: #fff;
}
.footer_mail:before {
content: "";
background: url(/images/mail.png) no-repeat;
width: 21px;
height: 18px;
display: inline-block;
vertical-align: middle;
margin-right: 10px;
margin-top: 2px;
}
.footer_info {
color: #93f82f;
font-size: 15px;
text-decoration: underline;
display: inline-block;
margin-top: 44px;
}
.footer_info:hover {
color: #93f82f;
text-decoration: none;
}
.footer_info:before{
content: "";
background: url(/images/icon_info.png) no-repeat;
width: 32px;
height: 32px;
display: inline-block;
vertical-align: middle;
margin-right: 10px;
margin-top: -2px;
}
.footer_security {
color: #93f82f;
font-size: 15px;
text-decoration: underline;
display: inline-block;
margin-top: 44px;
}
.footer_security:hover {
color: #93f82f;
text-decoration: none;
}
.footer_security:before{
content: "";
background: url(/images/icon_security.png) no-repeat;
width: 32px;
height: 32px;
display: inline-block;
vertical-align: middle;
margin-right: 10px;
margin-top: -2px;
}
.footer_nav {
padding-top: 10px;
}
.footer_nav a {
color: #fff;
font-size: 15px;
line-height: 20px;
text-decoration: none;
}
.footer_nav a:hover {
text-decoration: none;
color: #b2e938;
}
.footer_nav ul {
padding-left: 20px;
}
.footer_nav li {
margin-bottom: 10px;
}
.footer_nav span {
color: #b2e938;
font-size: 16px;
line-height: 22px;
display: inline-block;
margin-bottom: 15px;
}
.footer_nav span:before {
content: "";
width: 5px;
height: 5px;
background-color: #b2e938;
border-radius: 100%;
display: inline-block;
margin-right: 15px;
}
.footer_bottom {
padding-top: 45px;
font-size: 11px;
color: #fff;
}
.footer_bottom_text {
display: inline-block;
margin-top: 20px;
}
/* ------------------------------------------------
8. PopUp
------------------------------------------------ */
/*.popup {*/
/*width: 383px;*/
/*background: #fff;*/
/*margin: 0 auto;*/
/*position: relative;*/
/*border-radius: 8px;*/
/*-moz-border-radius: 8px;*/
/*-webkit-border-radius: 8px;*/
/*-o-border-radius: 8px;*/
/*-ms-border-radius: 8px;*/
/*padding: 50px 58px 40px;*/
/*}*/
/*.popup__title {*/
/*font-size: 31px;*/
/*line-height: 39px;*/
/*color: #698387;*/
/*text-align: center;*/
/*display: block;*/
/*margin-bottom: 25px;*/
/*}*/
/*.popup__title_2 {*/
/*font-size: 26px;*/
/*line-height: 32px;*/
/*color: #698387;*/
/*text-align: center;*/
/*display: block;*/
/*margin-bottom: 15px;*/
/*}*/
/*.popup__subtittle {*/
/*font-size: 15px;*/
/*color: #698387;*/
/*line-height: 24px;*/
/*display: block;*/
/*text-align: center;*/
/*margin-bottom: 34px;*/
/*}*/
/*.box-modal_close {*/
/*width: 44px;*/
/*height: 44px;*/
/*line-height: 44px;*/
/*position: absolute;*/
/*right: 0;*/
/*top: 0;*/
/*text-decoration: none;*/
/*text-align: center;*/
/*opacity: 0.65;*/
/*filter: alpha(opacity=65);*/
/*padding: 0 0 18px 10px;*/
/*color: #FFF;*/
/*font-style: normal;*/
/*font-size: 28px;*/
/*font-family: Arial, monospace;*/
/*color: #5C8488;*/
/*font-weight: bold;*/
/*cursor: pointer;*/
/*}*/
/* ------------------------------------------------
9. Social link
------------------------------------------------ */
/*.social_link {*/
/*margin-left: 0px;*/
/*margin-top: 3px;*/
/*}*/
/*.social_link li {*/
/*float: left;*/
/*margin-right: 12px;*/
/*}*/
/*.social_link li:last-child {*/
/*margin-right: 0;*/
/*}*/
/*.soc_item {*/
/*width: 44px;*/
/*height: 44px;*/
/*border-radius: 50%;*/
/*-moz-border-radius: 50%;*/
/*-webkit-border-radius: 50%;*/
/*-o-border-radius: 50%;*/
/*-ms-border-radius: 50%;*/
/*background: #fff;*/
/*display: block;*/
/*text-align: center;*/
/*font-size: 24px;*/
/*line-height: 40px;*/
/*color: #283C4C;*/
/*}*/
/*.soc_item:hover {*/
/*background: #b2e938;*/
/*color: #283C4C;*/
/*text-decoration: none;*/
/*}*/
/*.soc_item:focus {*/
/*background: #b2e938;*/
/*color: #283C4C;*/
/*text-decoration: none;*/
/*}*/
/*.soc_item:active {*/
/*background: #b2e938;*/
/*color: #283C4C;*/
/*text-decoration: none;*/
/*}*/
/*.social_link i {*/
/*line-height: 44px;*/
/*}*/
/*.fbicon:before {*/
/*content: "";*/
/*background: url(/images/fb.png) no-repeat;*/
/*width: 9px;*/
/*height: 19px;*/
/*display: inline-block;*/
/*vertical-align: middle;*/
/*margin-right: 2px;*/
/*margin-top: -2px;*/
/*}*/
/*.gplusicon:before {*/
/*content: "";*/
/*background: url(/images/gplus.png) no-repeat;*/
/*width: 23px;*/
/*height: 22px;*/
/*display: inline-block;*/
/*vertical-align: middle;*/
/*margin-right: 2px;*/
/*margin-top: -2px;*/
/*}*/
/* ------------------------------------------------
10. Rubric
------------------------------------------------ */
.way {
font-size: 13px;
color: #b4b4b4;
padding: 30px 0;
}
.way a {
font-size: 13px;
color: #009ad4;
text-decoration: underline;
}
.way span {
color: #b4b4b4;
}
.way a:hover {
text-decoration: none;
}
.top_line_inf {
min-height: 44px;
background-color: #051922;
}
.icon_info_2 {
margin-right: 12px;
display: inline-block;
width: 25px;
height: 25px;
background: url(/images/icon_info_2.png) 0 -26px no-repeat;
}
.icon_video {
margin-right: 12px;
margin-top: 3px;
display: inline-block;
width: 23px;
height: 18px;
background: url(/images/icon_video.png) 0 100% no-repeat;
}
.top_line_inf li {
display: inline-block;
border-right: 1px solid #0e3242;
position: relative;
}
.top_line_inf li:last-child {
border: none;
}
.top_line_inf li a {
color: #6def0d;
font-size: 13px;
line-height: 25px;
padding: 10px 25px;
display: inline-block;
text-decoration: underline;
}
.top_line_inf li a:hover {
text-decoration: none;
color: #fffcf4;
}
.top_line_inf li a:hover span {
background-position: 0 0;
}
.top_line_inf li.active a {
text-decoration: none;
color: #fffcf4;
}
.top_line_inf li.active a span {
background-position: 0 0;
}
.top_line_inf li.active:after {
position: absolute;
content: '';
left: 50%;
margin-left: -3px;
bottom: -6px;
width: 0px;
height: 0px;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-top: 6px solid #051922;
}
.faq_rubric{
}
.rubric_icon {
height: 36px;
width: 36px;
margin-right: 12px;
display: block;
float: left;
}
.wiht_icon {
overflow: hidden;
display: block;
}
.rubric_list {
font-size: 16px;
margin-bottom: 40px;
}
.rubric_list li {
margin-bottom: 10px;
padding-left: 15px;
}
/* ------------------------------------------------
11. Reference
------------------------------------------------ */
.reference_box {
position: relative;
}
.reference_box:after {
content: '';
display: block;
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: 62%;
background-color: #e8eaec;
}
.reference_right_box {
position: relative;
z-index: 1;
padding-top: 88px;
padding-left: 15px;
}
.reference_list {
font-size: 14px;
margin-bottom: 40px;
}
.reference_list li {
margin-bottom: 10px;
}
.reference_list li a:hover {
color: #66a91f;
text-decoration: underline;
}
.reference_left_box {
padding-right: 45px;
}
/*ol {*/
/*counter-reset:li; !* Инициализируем счетчик *!*/
/*padding:0; !* Удаляем установленное по умолчанию левое поле*!*/
/*list-style:none; !* Отменяем нумерацию установленную по умолчанию *!*/
/*}*/
/*ol li {*/
/*position:relative; !* Создаем контекст для позиционирования элементов *!*/
/*margin:0 0 10px 0; !* Даем каждому элементу списка отступ слева, что бы освободить пространство для нумерации *!*/
/*padding-left: 45px;*/
/*font-size: 13px;*/
/*line-height: 20px;*/
/*min-height: 28px;*/
/*}*/
/*ol li:before {*/
/*content:counter(li); !* В качестве данных используем счетчик *!*/
/*counter-increment:li; !* Увеличиваем значение счетчика на 1 *!*/
/*!* Позиционируем и оформляем цифры *!*/
/*position:absolute;*/
/*top:-4px;*/
/*left:0;*/
/*width: 28px;*/
/*height: 28px;*/
/*border-radius: 100%;*/
/*background-color: #67ac1d;*/
/*color:#fff;*/
/*font-weight:bold;*/
/*font-family: "RobotoBold";*/
/*font-size: 11px;*/
/*line-height: 28px;*/
/*text-align:center;*/
/*}*/
/*.graph_box_12 {*/
/*position: relative;*/
/*margin-top: 40px;*/
/*padding-top: 25px;*/
/*margin-bottom: 50px;*/
/*}*/
/*.graph_box_12 span {*/
/*font-size: 17px;*/
/*line-height: 21px;*/
/*font-family: "Open Sans", "RobotoBold";*/
/*font-weight: 600;*/
/*color: #1f9ebe;*/
/*display: inline-block;*/
/*position: absolute;*/
/*}*/
/*.graph_box_text_12 {*/
/*right: 0px;*/
/*top: 0;*/
/*}*/
/*.graph_box_text_22 {*/
/*bottom: 0;*/
/*left: 30px;*/
/*}*/
/*.box_info {*/
/*background-color: #bce094;*/
/*border-left: 7px solid #67ac1d;*/
/*padding: 25px 20px;*/
/*border-radius: 0 5px 5px 0;*/
/*font-size: 13px;*/
/*line-height: 26px;*/
/*margin-bottom: 20px;*/
/*}*/
/*.box_info_green {*/
/*background-color: #bce094;*/
/*border-color: #67ac1d;*/
/*}*/
/*.box_info_pick {*/
/*background-color: #ffb0ae;*/
/*border-color: #ff5b57;*/
/*}*/
/*.box_info_blue {*/
/*background-color: #bde7e5;*/
/*border-color: #2a8e89;*/
/*}*/
/*.form_wr {*/
/*margin-bottom: 60px;*/
/*}*/
/*.parallaxify {*/
/*position: relative;*/
/*}*/
/* ------------------------------------------------
12. Rates
------------------------------------------------ */
/*.way_2 {*/
/*min-height: 44px;*/
/*background-color: #051922;*/
/*}*/
/*.way_2 {*/
/*font-size: 13px;*/
/*color: #fff;*/
/*line-height: 44px;*/
/*}*/
/*.way_2 a {*/
/*font-size: 13px;*/
/*color: #cdf10c;*/
/*text-decoration: underline;*/
/*}*/
/*.way_2 span {*/
/*color: #cdf10c;*/
/*padding: 0 10px;*/
/*}*/
/*.way_2 a:hover {*/
/*text-decoration: none;*/
/*}*/
/*.rates_top {*/
/*background: url(/images/rates_top_bg.jpg) center 0 no-repeat;*/
/*background-size: cover;*/
/*min-height: 545px;*/
/*}*/
/*.rates_top_img_poz {*/
/*width: 100%;*/
/*height: 1px;*/
/*position: relative;*/
/*}*/
/*.rates_top_img {*/
/*position: absolute;*/
/*top: 60px;*/
/*right: -60px;*/
/*}*/
/*.rates_top_title_poz {*/
/*padding-top: 190px;*/
/*position: relative;*/
/*}*/
/*.bluetext_2 span {*/
/*font-family: "RobotoBold";*/
/*font-size: 50px;*/
/*line-height: 70px;*/
/*color: #fff;*/
/*background-color: #0097d0;*/
/*display: inline-block;*/
/*padding: 0 16px;*/
/*}*/
/*.darktext span {*/
/*font-family: "RobotoBold";*/
/*font-size: 35px;*/
/*line-height: 70px;*/
/*color: #fff;*/
/*background-color: #051922;*/
/*display: inline-block;*/
/*padding: 0 16px;*/
/*}*/
/*.line {*/
/*margin-bottom: 50px;*/
/*display: block;*/
/*height: 7px;*/
/*background: url(/images/line_bg.png) 0 0 repeat-x;*/
/*}*/
/*.rates_cont {*/
/*color: #243340;*/
/*font-size: 16px;*/
/*line-height: 24px;*/
/*}*/
/*.rates_cont_box {*/
/*margin-bottom: 60px;*/
/*}*/
/*.payment-methods-left li {*/
/*display: -moz-inline-stack;*/
/*display: inline-block;*/
/*vertical-align: middle;*/
/*zoom: 1;*/
/*margin: 4px 15px;*/
/*}*/
/*.payment-methods-left {*/
/*margin-left: -15px;*/
/*}*/
/*.payment-icons-bankcards {*/
/*background: url(/images/payment-icons-bec23d56ad.png) -32px -32px no-repeat;*/
/*width: 32px;*/
/*height: 32px;*/
/*}*/
/*.payment-icons-yandex-dengi {*/
/*background: url(/images/payment-icons-bec23d56ad.png) -129px -64px no-repeat;*/
/*width: 32px;*/
/*height: 32px;*/
/*}*/
/*.payment-icons-webmoney-rub {*/
/*background: url(/images/payment-icons-bec23d56ad.png) -129px -32px no-repeat;*/
/*width: 32px;*/
/*height: 32px;*/
/*}*/
/*.payment-icons-terminals {*/
/*background: url(/images/payment-icons-bec23d56ad.png) -129px 0 no-repeat;*/
/*width: 32px;*/
/*height: 32px;*/
/*}*/
/*.payment-icons-alfa-click {*/
/*background: url(/images/payment-icons-bec23d56ad.png) -96px -96px no-repeat;*/
/*width: 32px;*/
/*height: 32px;*/
/*}*/
/*.payment-icons-sb-online {*/
/*background: url(/images/payment-icons-bec23d56ad.png) -64px -96px no-repeat;*/
/*width: 32px;*/
/*height: 32px;*/
/*}*/
/*.payment-icons-promsvyaz {*/
/*background: url(/images/payment-icons-bec23d56ad.png) -97px -32px no-repeat;*/
/*width: 32px;*/
/*height: 32px;*/
/*}*/
/*.payment-icons-masterpass {*/
/*background: url(/images/payment-icons-bec23d56ad.png) -64px -64px no-repeat;*/
/*width: 32px;*/
/*height: 32px;*/
/*}*/
/*.payment-icons-kupivkredit {*/
/*background: url(/images/payment-icons-bec23d56ad.png) 0 -64px no-repeat;*/
/*width: 32px;*/
/*height: 32px;*/
/*}*/
/*.payment-icons-qppiru {*/
/*background: url(/images/payment-icons-bec23d56ad.png) -32px -96px no-repeat;*/
/*width: 32px;*/
/*height: 32px;*/
/*}*/
/*.frame_box {*/
/*border: 1px solid #aee705;*/
/*padding: 40px 35px;*/
/*color: #243340;*/
/*font-size: 16px;*/
/*line-height: 24px;*/
/*margin-bottom: 50px;*/
/*}*/
/*.rates_table {*/
/*display: table;*/
/*width: 100%;*/
/*margin-bottom: 80px;*/
/*margin-top: -60px;*/
/*}*/
/*.rates_tr {*/
/*display: table-row;*/
/*}*/
/*.rates_tr:not(:first-child):hover .rates_td {*/
/*background-color: #f5f5f5;*/
/*}*/
/*!*.rates_tr:first-child:hover .rates_td {*/
/*background-color: #fff;*/
/*}*!*/
/*.rates_table .rates_tr .rates_td:hover {*/
/*background-color: #ececec;*/
/*}*/
/*.rates_td.active_hover {*/
/*background-color: #f5f5f5;*/
/*}*/
/*.rates_td.hover_cell_2 {*/
/*background-color: #f5f5f5;*/
/*}*/
/*.border_top {*/
/*border-top: 1px solid #acacac;*/
/*}*/
/*.border_left {*/
/*border-left: 1px solid #acacac;*/
/*}*/
/*.border_right {*/
/*border-right: 1px solid #acacac;*/
/*}*/
/*.border_bottom {*/
/*border-bottom: 1px solid #acacac;*/
/*}*/
/*.rates_td {*/
/*display: table-cell;*/
/*vertical-align: middle;*/
/*text-align: center;*/
/*padding: 20px;*/
/*width: 25%;*/
/*background-color: #fff;*/
/*color: #245a5e;*/
/*font-size: 16px;*/
/*line-height: 30px;*/
/*}*/
/*.rates_td_title {*/
/*background-color: transparent !important;*/
/*}*/
/*.rates_table_title {*/
/*font-family: "RobotoBold";*/
/*font-size: 26px;*/
/*line-height: 33px;*/
/*color: #0097d0;*/
/*}*/
/*.rates_table_title_arrow_wr {*/
/*width: 100%;*/
/*height: 1px;*/
/*position: relative;*/
/*}*/
/*.rates_table_title_arrow {*/
/*position: absolute;*/
/*right: 15px;*/
/*top: 20px;*/
/*}*/
/*.rates_td_img {*/
/*height: 80px;*/
/*position: relative;*/
/*margin-bottom: 25px;*/
/*}*/
/*.rates_td_img img {*/
/*position: absolute;*/
/*bottom: 0;*/
/*left: 50%;*/
/*margin-left: -85px;*/
/*-webkit-transition: all 0.5s;*/
/*-o-transition: all 0.5s;*/
/*transition: all 0.5s;*/
/*}*/
/*.rates_td_img_cont {*/
/*position: absolute;*/
/*color: #fff;*/
/*font-size: 11px;*/
/*bottom: 60px;*/
/*width: 100%;*/
/*text-align: center;*/
/*margin-left: -20px;*/
/*-webkit-transition: all 0.5s;*/
/*-o-transition: all 0.5s;*/
/*transition: all 0.5s;*/
/*}*/
/*.rates_td_img_cont_1 {*/
/*padding-bottom: 2px;*/
/*padding-right: 22px;*/
/*}*/
/*.rates_td.active .rates_td_img img{*/
/*bottom: 20px;*/
/*}*/
/*.rates_td.active .rates_td_img_cont{*/
/*bottom: 80px;*/
/*}*/
/*.rates_td_cont h6 {*/
/*margin-bottom: 3px;*/
/*}*/
/*.rates_td_cont p {*/
/*line-height: 20px;*/
/*}*/
/*.rates_td_cont .rates_price {*/
/*color: #122730;*/
/*font-family: "RobotoBold";*/
/*font-size: 27px;*/
/*line-height: 30px;*/
/*margin-bottom: 12px;*/
/*}*/
/*.rates_td_cont .rates_price span {*/
/*color: #e75b3a;*/
/*font-family: "RobotoBold";*/
/*font-size: 18px;*/
/*line-height: 30px;*/
/*text-decoration: line-through;*/
/*padding-right: 8px;*/
/*}*/
/*.btn_rates_1 {*/
/*background: #0097d0;*/
/*display: block;*/
/*padding: 15px 20px;*/
/*font-family: "RobotoBold";*/
/*font-size: 18px;*/
/*line-height: 24px;*/
/*color: #fff;*/
/*max-width: 300px;*/
/*margin: 0 auto;*/
/*}*/
/*.btn_rates_1:hover {*/
/*color: #245a5e;*/
/*background-color: #21dcb3;*/
/*}*/
/*.btn_rates_2 {*/
/*background: #b4f10f;*/
/*display: block;*/
/*padding: 15px 20px;*/
/*font-family: "RobotoBold";*/
/*font-size: 18px;*/
/*line-height: 24px;*/
/*color: #245a5e;*/
/*max-width: 300px;*/
/*margin: 0 auto;*/
/*}*/
/*.btn_rates_2:hover {*/
/*color: #245a5e;*/
/*background-color: #21dcb3;*/
/*}*/
/*.rates_table_title_sm {*/
/*display: table;*/
/*text-align: left;*/
/*line-height: 22px;*/
/*}*/
/*.rates_table_title_sm>span {*/
/*display: table-cell;*/
/*vertical-align: middle;*/
/*}*/
/*.rates_table_title_sm>span:first-child {*/
/*width: 50px;*/
/*padding-left: 15px;*/
/*}*/
/*.help_box {*/
/*position: relative;*/
/*height: 1px;*/
/*width: 1px;*/
/*}*/
/*.icon_question_rates {*/
/*position: absolute;*/
/*width: 16px;*/
/*height: 16px;*/
/*background-color: #4ea300;*/
/*top: 10px;*/
/*left: -15px;*/
/*color: #fff;*/
/*line-height: 16px;*/
/*text-align: center;*/
/*border-radius: 100%;*/
/*font-size: 12px;*/
/*cursor: pointer;*/
/*}*/
/*.icon_question_rates_imp {*/
/*background-color: #ff3232;*/
/*}*/
/*.rates_td .help_pop_up {*/
/*font-size: 14px;*/
/*line-height: 17px;*/
/*color: #243340;*/
/*display: block;*/
/*position: absolute;*/
/*right: 60px;*/
/*width: 270px;*/
/*background-color: #fff;*/
/*box-shadow: 3px 3px 7px 3px #b8b8b8;*/
/*padding: 15px 18px;*/
/*-webkit-transform: translate(0, -50%);*/
/*-ms-transform: translate(0, -50%);*/
/*-o-transform: translate(0, -50%);*/
/*transform: translate(0, -50%);*/
/*display: none;*/
/*z-index: 5;*/
/*}*/
/*.help_pop_up_title {*/
/*font-size: 16px;*/
/*margin-bottom: 7px;*/
/*font-family: "RobotoBold";*/
/*color: #243340;*/
/*display: block;*/
/*}*/
/*.help_box:hover .help_pop_up{*/
/*display: block;*/
/*}*/
/*.btn_rates_open {*/
/*font-size: 20px;*/
/*margin-top: 15px;*/
/*margin-bottom: 10px;*/
/*display: block;*/
/*cursor: pointer;*/
/*display: none;*/
/*}*/
/*.description_box {*/
/*display: none;*/
/*}*/
/*.description_box .rates_tr {*/
/*display: table;*/
/*width: 100%;*/
/*}*/
/*.description_box .rates_td {*/
/*display: table-cell;*/
/*width: 50%;*/
/*padding: 12px 15px;*/
/*line-height: 22px;*/
/*}*/
/*.btn_rates_open .s {*/
/*display: none;*/
/*}*/
/*.btn_rates_open.active .h {*/
/*display: none;*/
/*}*/
/*.btn_rates_open.active .s {*/
/*display: inline-block;*/
/*}*/
/*.has-error label {*/
/*color: inherit !important;*/
/*}*/
\ No newline at end of file
$(document).ready(function() {
/**
* изменяем сдержимое селекта "Рубрика" в views/faq-admin/_form.php
*/
$('#faqrubric-section').on('change', function () {
var $this = $(this);
var action = $this.attr('ajax-action');
var form = $this.closest('form');
$.ajax({
type: "get",
url: action,
data:{'section': $this.val()},
success: function(msg){
var select = form.find('#faq-rubric_id');
select.find("option[value!='']").detach();
if(msg.length === 0){
if(!select.attr("disabled"))
select.closest('.form-group').removeClass('has-success').addClass('has-error');
select.val('');
}
else{
$.each(msg, function(key, value) {
select.append('<option value="' + key + '">' + value + '</option>');
});
}
}
});
})
});
\ No newline at end of file
$(document).ready(function() {
/**
* Created by andre on 18.05.2016.
*/
$('#radio-1,#radio-2').on('click', function()
{
var $this = $(this);
var id = $this.attr("id");
var action = $this.closest("form").attr("action");
var vote = 0;
if(id == "radio-1"){
vote = 1;
}
$.ajax({
type: "get",
url: action,
data: {"yes": vote},
success: function(msg){
$this.closest("form").detach();
$("h4.radio_like_result.hidden").removeClass("hidden");
}
});
})
$('form#contact-form').on('beforeSubmit', function(e) {
var form = $(this), xhr = new XMLHttpRequest, data = new FormData();
form.find('input, textarea').each(function(){
data.append($(this).attr('name'), $(this).val());
});
xhr.open("POST", form.attr('action'), true);
xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
xhr.send(data);
xhr.onreadystatechange = function()
{
if (xhr.readyState == 4){
try
{
var response = JSON.parse(xhr.responseText);
}
catch(e)
{
var response = xhr.responseText;
}
form.find('.has-error').removeClass('has-error');
if(response.success)
{ console.log("ccc");return false;
var $response = $(response.text);
form.before($response);
form.addClass("_sidebar_form_response_hidden");
$response.animate({
"opacity": 0
}, 3000, function () {
$response.detach();
form.removeClass("_sidebar_form_response_hidden");
});
form.find('input:not(.not_clear), textarea').val('');
// console.log(response.text);
}
else
{
errors = [];
$.each(response, function(key, value) {
form.find('.field-'+key).addClass('has-error');
errors = errors.concat(value);
});
}
}
}
}).on('submit', function(e){
return false;
});
});
// $('form#contact-form').on('success', function(e){
// console.log("xxx");
// });
\ No newline at end of file
<?php
namespace common\modules\blog\components;
use Yii;
use yii\base\Behavior;
use yii\db\ActiveRecord;
use yii\helpers\ArrayHelper;
use common\modules\blog\models\PostTag;
use common\modules\blog\models\PostTagAssign;
class TagBehavior extends Behavior
{
public $tags;
public function events()
{
return [
ActiveRecord::EVENT_AFTER_FIND => 'eventFind',
ActiveRecord::EVENT_AFTER_UPDATE => 'Save',
ActiveRecord::EVENT_AFTER_INSERT => 'Insert',
ActiveRecord::EVENT_BEFORE_DELETE => 'Delete',
];
}
private function clearPostTags()
{
if($this->owner->postTagAssigns)
{
foreach ($this->owner->postTagAssigns as $tag)
{
$tag->delete();
}
}
}
private function insertPostTags()
{
if($this->tags)
{
foreach ($this->tags as $tag)
{
$tg = PostTag::find()->where(['name' => $tag])->one();
if(!$tg)
{
// Убрана возможность создавать новые теги
return false;
// $tg = new PostTag;
// $tg->name = $tag;
// $tg->save();
}
$tgs = new PostTagAssign;
$tgs->post_id = $this->owner->id;
$tgs->tag_id = $tg->id;
$tgs->save();
}
}
}
public function eventFind($event)
{
$this->tags = array_keys(ArrayHelper::map($this->owner->postTags, 'name', 'id'));
}
public function Save($event)
{
$this->clearPostTags();
$this->insertPostTags();
return true;
}
public function Insert($event)
{
$this->insertPostTags();
return true;
}
public function Delete($event)
{
$this->clearPostTags();
return true;
}
}
......@@ -2,62 +2,69 @@
namespace common\modules\faq\controllers;
use Yii;
use common\modules\faq\models\Faq;
use common\modules\faq\models\SearchFaq;
use common\modules\faq\models\SearchFaqContent;
use Yii;
use common\components\AdminController;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use yii\web\Response;
use yii\helpers\ArrayHelper;
use common\modules\languages\models\Languages;
use common\modules\blog\models\Post;
use common\modules\blog\models\PostLang;
use common\modules\blog\models\PostTag;
use common\modules\blog\models\SearchPost;
/**
* FaqAdminController implements the CRUD actions for Faq model.
* PostAdminController implements the CRUD actions for Post model.
*/
class FaqAdminController extends AdminController
{
public static function actionsTitles(){
return [
'Manage' => 'Список вопросов и ответов',
'Create' => 'Задать вопрос',
'Update' => 'Дать ответ',
'View' => 'Просмотр вопроса/ответа',
'Delete' => 'Просмотр вопроса/ответа',
'Manage' => 'Управление записями',
'Create' => 'Добавление записи',
'Update' => 'Редактирование записи',
'Delete' => 'Удаление записи',
'View' => 'Просмотр записи',
'Autocomplete' => 'Автокомплит для поля тегов'
];
}
/**
* @inheritdoc
*/
public function behaviors()
{
return [
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['post'],
'delete' => ['POST'],
],
],
];
}
/**
* Lists all Faq models.
* Lists all Post models.
* @return mixed
*/
public function actionManage()
{
$searchModel = new SearchFaq();
$searchModel = new SearchFaqContent();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
\yii::$app->controller->page_title = 'Список вопросов и ответов';
\yii::$app->controller->breadcrumbs = [
'Список вопросов и ответов',
];
return $this->render('index', [
return $this->render('manage', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**
* Displays a single Faq model.
* Displays a single Post model.
* @param integer $id
* @return mixed
*/
......@@ -69,7 +76,7 @@ class FaqAdminController extends AdminController
}
/**
* Creates a new Faq model.
* Creates a new Post model.
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
*/
......@@ -77,52 +84,72 @@ class FaqAdminController extends AdminController
{
$model = new Faq();
\yii::$app->controller->page_title = 'Добавить вопрос';
\yii::$app->controller->breadcrumbs = [
['Список вопросов' => '/faq/faq-admin/manage'],
'Добавить вопрос'
];
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['manage']);
} else {
$form = new \common\components\BaseForm('/common/modules/faq/forms/FaqForm', $model);
return $this->render('create', [
'model' => $model,
'form' => $form->out
]);
}
if (Yii::$app->request->isPost)
{
$model->attributes = Yii::$app->request->post('Faq');
$transaction = Yii::$app->db->beginTransaction();
try
{
if($model->save())
{
$transaction->commit();
}
return $this->redirect(['manage']);
}
catch (\Exception $e)
{
$transaction->rollBack();
throw $e;
}
}
return $this->render('create', [
'model' => $model,
]);
}
/**
* Updates an existing Faq model.
* Updates an existing Post model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id
* @return mixed
*/
public function actionUpdate($id = null)
public function actionUpdate($id)
{
\yii::$app->controller->page_title = 'Ответить';
\yii::$app->controller->breadcrumbs = [
['Список вопросов' => '/faq/faq-admin/manage'],
'Ответить'
];
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['manage']);
} else {
$form = new \common\components\BaseForm('/common/modules/faq/forms/FaqForm', $model);
return $this->render('update', [
'model' => $model,
'form' => $form->out
]);
if (Yii::$app->request->isPost)
{
$model->attributes = Yii::$app->request->post('Faq');
$transaction = Yii::$app->db->beginTransaction();
try
{
if($model->save())
{
$transaction->commit();
}
return $this->redirect(['manage']);
}
catch (\Exception $e)
{
$transaction->rollBack();
throw $e;
}
}
return $this->render('update', [
'model' => $model,
]);
}
/**
* Deletes an existing Faq model.
* Deletes an existing Post model.
* If deletion is successful, the browser will be redirected to the 'index' page.
* @param integer $id
* @return mixed
......@@ -131,14 +158,15 @@ class FaqAdminController extends AdminController
{
$this->findModel($id)->delete();
return $this->redirect(['manage']);
return $this->redirect(['index']);
}
/**
* Finds the Faq model based on its primary key value.
* Finds the Post model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.
* @param integer $id
* @return Faq the loaded model
* @return Post the loaded model
* @throws NotFoundHttpException if the model cannot be found
*/
protected function findModel($id)
......
<?php
namespace common\modules\faq\controllers;
use common\modules\faq\models\SearchFaq;
use common\modules\faq\models\Faq;
use yii\helpers\Url;
use yii\web\NotFoundHttpException;
use \yii\widgets\ActiveForm;
use common\modules\faq\models\Vote;
use Yii;
use common\components\BaseController;
use yii\web\HttpException;
use yii\web\NotFoundHttpException;
use yii\web\Response;
use yii\widgets\ActiveForm;
use yii\helpers\Url;
class FaqController extends \common\components\BaseController
{
public $layout = '//main-short';
use common\models\Settings;
use common\modules\faq\models\Faq;
use common\modules\faq\models\FaqRubric;
use common\modules\faq\models\FaqMailForm;
public static function actionsTitles(){
/**
* PostController implements the CRUD actions for Post model.
*/
class FaqController extends BaseController
{
public static function actionsTitles()
{
return [
'View' => 'Просмотр вопроса',
'Index' => 'Просмотр вопросов',
'All' => 'Просмотр вопросов',
'Ajaxsubmit' => '',
'Validate' => '',
'Index' => 'Справка',
'Load' => 'Подгрузка записей',
'Tag' => 'Просмотр тега',
'View' => 'Просмотр записи',
'Send-article' => 'Послать статью',
'Send-faq' => 'Послать письмо',
'Vote-faq' => 'Проголосовать',
'Video' => 'Видео-уроки',
'View-video' => 'Видео-уроки',
];
}
public function actionValidate() {
$model = new Faq(['scenario' => 'ClientSide']);
$model->url = '.';
/**
* Displays all Post models.
* @return mixed
*/
public function actionIndex()
{
$this->meta_title = Yii::t('content', 'Faq');
if (Yii::$app->request->isAjax && $model->load(Yii::$app->request->post())) {
Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
return ActiveForm::validate($model);
$query = FaqRubric::find()->where(['=', 'section', Faq::SECTION_FAQ])->orderBy('sort');
return $this->render('index', [
'models' => $query->all(),
'count' => $query->count(),
]);
}
/**
* @return string
* @throws NotFoundHttpException
* главный акшн раздела видео
*/
public function actionVideo()
{
if(!isset(Faq::$section_title[Faq::SECTION_VIDEO]))
{
throw new NotFoundHttpException('The requested page does not exist.');
}
die();
$this->meta_title = Yii::t('content', 'Faq');
$query = FaqRubric::find()->where(['=', 'section', Faq::SECTION_VIDEO])->orderBy('sort');
return $this->render('index', [
'models' => $query->all(),
'count' => $query->count(),
]);
}
public function actionAjaxsubmit() {
$model = new Faq(['scenario' => 'ClientSide']);
$model->url = '.';
if($model->load(Yii::$app->request->post()) /*&& $model->validate()*/) {
if($model->save()){
$template = \common\components\AppManager::getSettingsParam('faq-email-template');
$template = str_replace(
'[question]',
Url::home( true ) . Url::toRoute(['faq-admin/update', 'id'=>$model->id]),
$template
);
$mailer = Yii::$app->get('mailer');
//$logger = new Swift_Plugins_Loggers_ArrayLogger();
$message = $mailer->compose('common',['html' => $template])
->setFrom($model->email)
->setTo(\common\components\AppManager::getSettingsParam('email-publish-new-question'))
->setSubject('Задан вопрос на сайте www.soc-zaim.ru');
//$mailer->getSwiftMailer()->registerPlugin(new Swift_Plugins_LoggerPlugin($logger));
if (!$message->send()) {
die('ERROR');
}
}
//$model = new Faq(['scenario' => 'ClientSide']);
//$model->url = '.';
/*\Yii::$app->session->setFlash('message-success',\Yii::t('faq', 'You question has posted'));
return $this->redirect(Url::toRoute(['index']));*/
die('success');
/**
* Displays a single Post model.
* @param string $url
* @return mixed
*/
public function actionTag($tag)
{
$model = PostTag::find()->where(['name' => $tag])->one();
if(!$model || !$model->posts)
{
throw new NotFoundHttpException('The requested page does not exist.');
}
$this->meta_title = Yii::t('app', 'Tag') . ': ' . $model->name;
return $this->render('tag', [
'model' => $model,
'count' => $model->getAllPosts()->count()
]);
}
public function actionIndex()
/**
* Displays a single Post model.
* @param string $url
* @return mixed
*/
public function actionView($url)
{
\common\components\AppManager::setSEO();
$model = $this->findModelByUrl($url);
$this->meta_title = 'Вопросы, задаваемые клиентами СойЗайма';
$this->meta_description = 'Список часто задаваемых вопрос представлен на сайте, вы можете задать свои вопросы';
$this->meta_keywords = 'вопросы, ответ соцзайм, задать вопрос, вопросы от пользователей';
\yii::$app->controller->breadcrumbs = [
'Часто задаваемые вопросы'
];
$this->meta_title = $model->metaTag ? $model->metaTag->title : ' ';
$this->meta_description = $model->metaTag ? $model->metaTag->description : ' ';
$this->meta_keywords = $model->metaTag ? $model->metaTag->keywords : ' ';
$form = new FaqMailForm();
$form->content_id = $model->id;
$FaqScript = <<<JS
$('.faq-questions-list').on( 'click touchstart', 'dt', function(event) {
if ($(this).is('.is-active')) {
$(this).removeClass('is-active').next('dd').slideUp('fast');
}
else {
$(this).addClass('is-active').next('dd').slideDown('fast');
}
event.preventDefault();
});
JS;
$this->getView()->registerJs($FaqScript );
$searchModel = new SearchFaq();
$search = Yii::$app->request->queryParams;
$search['is_published'] = 1;
$searchModel->is_published = 1;
$dataProvider = $searchModel->search($search, 'created_at DESC');
$model = new Faq(['scenario' => 'ClientSide']);
$model->url = '.';
if (Yii::$app->request->isAjax && $model->load(Yii::$app->request->post())) {
Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
return ActiveForm::validate($model);
return $this->render('view',
compact('model', 'form')
);
}
/*
* вызывает акшн view для раздела видео
*/
public function actionViewVideo($url)
{
if(!isset(Faq::$section_title[Faq::SECTION_VIDEO]))
{
throw new NotFoundHttpException('The requested page does not exist.');
}
if($model->load(Yii::$app->request->post()) /*&& $model->validate()*/) {
$model->save();
$model = new Faq(['scenario' => 'ClientSide']);
$model->url = '.';
\Yii::$app->session->setFlash('message-success',\Yii::t('faq', 'You question has posted'));
return $this->redirect(Url::toRoute(['index']));
return $this->actionView("video/{$url}");
}
/**
* @return mixed
*/
public function actionLoad()
{
if(Yii::$app->request->isAjax)
{
$offset = Yii::$app->request->post('offset');
$tag = Yii::$app->request->post('tag');
Yii::$app->response->format = Response::FORMAT_JSON;
$query = Post::find()->where(['active' => 1])->orderBy(Post::tableName().'.created_at DESC');
if($tag)
{
$query = $query->joinWith('postTagAssigns')->andWhere([PostTagAssign::tableName().'.tag_id' => $tag]);
}
$models = $query->limit(Post::PAGE_SIZE)->offset($offset)->all();
$count = $query->count();
return [
'posts' => $this->renderPartial('_load', [
'models' => $models,
]),
'count' => (int)$count,
'offset' => $offset + Post::PAGE_SIZE
];
}
else
{
throw new NotFoundHttpException('The requested page does not exist.');
}
return $this->render('index', ['$searchModel' => $searchModel, 'dataProvider' => $dataProvider, 'model' => $model]);
}
public function actionAll()
public function actionSendFaq()
{
\yii::$app->controller->page_title = 'Часто задаваемые вопросы';
\yii::$app->controller->breadcrumbs = [
'Часто задаваемые вопросы'
];
Yii::$app->response->format = Response::FORMAT_JSON;
\common\components\AppManager::setSEO();
$mailModel = new FaqMailForm();
$searchModel = new SearchFaq();
$search = \Yii::$app->request->queryParams;
$search['is_published'] = 1;
$searchModel->is_published = 1;
$dataProvider = $searchModel->search($search, 'created_at DESC');
// $mailModel->fio = "xxx";
// $mailModel->email = "xxx@ccc.cc";
// $mailModel->phone = "1111111";
// $mailModel->message = "1111111";
$model = new Faq(['scenario' => 'ClientSide']);
$model->url = '.';
$mailModel->content_id = Yii::$app->request->get()["id"];
if (Yii::$app->request->isAjax && $model->load(Yii::$app->request->post())) {
Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
return ActiveForm::validate($model);
if ($mailModel->load(Yii::$app->request->post()) && $mailModel->validate())
{
$mailModel->send();
$response = $this->renderFile("@common/modules/faq/views/faq/_sidebar_form_response.php");
return ($mailModel->save()) ? ['success' => true, 'text' => $response] : ['success' => false];
}
else
{
return ActiveForm::validate($mailModel);
}
}
public function actionVoteFaq()
{
Yii::$app->response->format = Response::FORMAT_JSON;
if($model->load(Yii::$app->request->post()) /*&& $model->validate()*/) {
$model->save();
$model = new Faq(['scenario' => 'ClientSide']);
$model->url = '.';
\Yii::$app->session->setFlash('message-success',\Yii::t('faq', 'You question has posted'));
return $this->redirect(Url::toRoute(['all']));
$model = Vote::find()->where([
"session_id" => Yii::$app->getSession()->id,
"content_id" => Yii::$app->request->get()["content_id"],
])->one();
if($model)
{
throw new HttpException(400);
}
return $this->render('index-all', ['$searchModel' => $searchModel, 'dataProvider' => $dataProvider, 'model' => $model]);
$model = new Vote();
$model->setAttributes(Yii::$app->request->get());
$model->session_id = Yii::$app->getSession()->id;
if( $model->validate() && $model->save())
{
return ['success' => $model->save()];
}
}
public function actionView($url)
public function actionTest()
{
$model = Faq::findOne(['url' => $url]);
echo Yii::$app->request->url;
}
/**
* @return mixed
*/
public function actionSendArticle()
{
if(Yii::$app->request->isAjax)
{
Yii::$app->response->format = Response::FORMAT_JSON;
\common\components\AppManager::setSEO('-faq');
$model = $this->getModel();
if(!$model) throw new NotFoundHttpException('The requested page does not exist.');
$model->load(Yii::$app->request->post());
\yii::$app->controller->page_title = 'Часто задаваемые вопросы';
\yii::$app->controller->breadcrumbs = [
['Часто задаваемые вопросы' => Url::toRoute('/faq')],
strip_tags($model->shortQuestion),
];
if($model->validate())
{
try
{
$email = Settings::getValue('article-email');
$message = $this->renderPartial('_mail', [
'model' => $model
]);
$headers = "MIME-Version: 1.0\r\n".
"Content-Transfer-Encoding: 8bit\r\n".
"Content-Type: text/html; charset=\"UTF-8\"\r\n".
"X-Mailer: PHP v.".phpversion()."\r\n".
"From: Блог на task-on.com <".Settings::getValue('bids-support-email-from').">\r\n";
switch ($model->form)
{
case 'theme':
$subject = "Блог. Предложить тему";
break;
case 'article':
$subject = "Блог. Статья";
break;
}
@mail($email, $subject, $message, $headers);
}
catch (Exception $e)
{
}
return ['success' => true];
}
else
{
return ActiveForm::validate($model);
}
}
else
{
throw new NotFoundHttpException('The requested page does not exist.');
}
}
$this->meta_title = $model->metaTags->title;
$this->meta_description = $model->metaTags->description;
$this->meta_keywords = $model->metaTags->keywords;
// Temp metod
public function getModel()
{
$model = new \yii\base\DynamicModel([
'name', 'email', 'message', 'form'
]);
return $this->render('view', ['model' => $model]);
$model->addRule(['name', 'email', 'message'], 'required')
->addRule(['email'], 'email')
->addRule(['message', 'name', 'form'], 'string');
return $model;
}
/**
* Finds the Post model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.
* @param string $url
* @return Post the loaded model
* @throws NotFoundHttpException if the model cannot be found
*/
protected function findModelByUrl($url)
{
if (($model = Faq::find()->where([
'url' => $url,
'active' => 1
])->one()) !== null) {
return $model;
} else {
throw new NotFoundHttpException('The requested page does not exist.');
}
}
}
<?php
namespace common\modules\faq\controllers;
use Yii;
use common\modules\faq\models\FaqRubric;
use common\modules\faq\models\SearchFaqRubric;
use common\modules\faq\models\Faq;
use common\modules\faq\models\SearchFaqContent;
use common\components\AdminController;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use yii\web\Response;
/**
* CategoryAdminController implements the CRUD actions for CoCategory model.
*/
class RubricAdminController extends AdminController
{
public static function actionsTitles(){
return [
'Manage' => 'Управление модулями',
'Create' => 'Создание модуля',
'Update' => 'Редактирование модуля',
'View' => 'Просмотр модуля',
'Delete' => '',
'Createcontroller' => 'Создание контроллера',
'Deletecontroller' => '',
'Updatecontroller' => '',
'Rubrics-by-section' => 'Получение рубрик по имени раздела',
];
}
public function behaviors()
{
return [
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['post'],
],
],
];
}
/**
* Lists all CoCategory models.
* @return mixed
*/
public function actionManage()
{
$searchModel = new SearchFaqRubric();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
\yii::$app->controller->page_title = 'Управление рубриками';
\yii::$app->controller->breadcrumbs = [
'Управление рубриками',
];
return $this->render('index', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**
* Displays a single CoCategory model.
* @param integer $id
* @return mixed
*/
public function actionView($id)
{
$model = $this->findModel($id);
$searchModel = new SearchFaqContent();
$dataProvider = $searchModel->search(['rubric_id' => $id]);
\yii::$app->controller->page_title = 'Просмотр рубрики';
\yii::$app->controller->breadcrumbs = [
['Управление рубриками' => \yii\helpers\Url::toRoute('manage')],
$model->name,
];
return $this->render('view', [
'model' => $this->findModel($id),
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**
* Creates a new CoCategory model.
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
*/
public function actionCreate()
{
return $this->actionUpdate();
}
/**
* Updates an existing CoCategory model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id
* @return mixed
*/
public function actionUpdate($id = null)
{
if(empty($id)) {
$model = new FaqRubric();
\yii::$app->controller->page_title = 'Создать рубрику';
\yii::$app->controller->breadcrumbs = [
['Управление рубриками' => \yii\helpers\Url::toRoute('manage')],
'Создать рубрику',
];
}
else {
$model = $this->findModel($id);
\yii::$app->controller->page_title = 'Редактировать рубрику';
\yii::$app->controller->breadcrumbs = [
['Управление рубриками' => \yii\helpers\Url::toRoute('manage')],
$model->name,
];
}
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(\yii\helpers\Url::toRoute(['manage']));
} else {
$form = new \common\components\BaseForm('/common/modules/faq/forms/RubricForm', $model);
return $this->render('update', [
'model' => $model,
//'form' => $form->out,
]);
}
}
/**
* Deletes an existing CoCategory model.
* If deletion is successful, the browser will be redirected to the 'index' page.
* @param integer $id
* @return mixed
*/
public function actionDelete($id)
{
$items = \common\modules\faq\models\Faq::find()->where(['rubric_id' => $id])->all();
foreach($items as $item) {
$item->rubric_id = null;
$item->save();
}
$this->findModel($id)->delete();
return $this->redirect(['manage']);
}
/**
* Finds the CoCategory model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.
* @param integer $id
* @return CoCategory the loaded model
* @throws NotFoundHttpException if the model cannot be found
*/
protected function findModel($id)
{
if (($model = FaqRubric::findOne($id)) !== null) {
return $model;
} else {
throw new NotFoundHttpException('The requested page does not exist.');
}
}
/**
* Получаем рубрики соответствующие разделу (FaqRubric->section)
*/
public function actionRubricsBySection()
{
Yii::$app->response->format = Response::FORMAT_JSON;
$array = [];
$section = Yii::$app->request->get('section');
$rows = FaqRubric::find()->where(['=', 'section', $section])->all();
foreach ($rows as $row)
{
$array[$row["id"]] = $row["name"];
}
return $array;
}
}
<?php
namespace common\modules\blog\controllers;
use Yii;
use common\components\AdminController;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use common\modules\sessions\models\Session;
use common\modules\blog\models\SearchSession;
use common\modules\blog\models\Post;
/**
* StatisticsAdminController implements the CRUD actions for Session model.
*/
class StatisticsAdminController extends AdminController
{
public static function actionsTitles()
{
return [
'Manage' => 'Управление статистикой',
'View' => 'Просмотр тега',
];
}
/**
* Lists all Session models.
* @return mixed
*/
public function actionManage($id)
{
if (($model = Post::findOne($id)) === null)
{
throw new NotFoundHttpException('The requested page does not exist.');
}
$searchModel = new SearchSession();
$searchModel->blogUrl = '/blog/'.$model->url;
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('manage', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**
* Displays a single Session model.
* @param integer $id
* @return mixed
*/
public function actionView($id)
{
return $this->render('view', [
'model' => $this->findModel($id),
]);
}
/**
* Finds the Session model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.
* @param integer $id
* @return Session the loaded model
* @throws NotFoundHttpException if the model cannot be found
*/
protected function findModel($id)
{
if (($model = Session::findOne($id)) !== null) {
return $model;
} else {
throw new NotFoundHttpException('The requested page does not exist.');
}
}
}
<?php
namespace common\modules\faq\controllers;
namespace common\modules\blog\controllers;
use Yii;
use common\modules\faq\models\FaqCategory;
use common\modules\faq\models\SearchFaqCategory;
use common\modules\blog\models\PostTag;
use common\modules\blog\models\SearchPostTag;
use common\components\AdminController;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
/**
* FaqCategoryAdminController implements the CRUD actions for FaqCategory model.
* TagAdminController implements the CRUD actions for PostTag model.
*/
class FaqCategoryAdminController extends AdminController
class TagAdminController extends AdminController
{
public static function actionsTitles(){
return [
'Manage' => 'Управление тегами',
'Create' => 'Добавление тега',
'Update' => 'Редактирование тега',
'Delete' => 'Удаление тега',
'View' => 'Просмотр тега',
];
}
/**
* @inheritdoc
*/
public function behaviors()
{
return [
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['post'],
'delete' => ['POST'],
],
],
];
}
/**
* Lists all FaqCategory models.
* Lists all PostTag models.
* @return mixed
*/
public function actionIndex()
public function actionManage()
{
$searchModel = new SearchFaqCategory();
$searchModel = new SearchPostTag();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('index', [
return $this->render('manage', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**
* Displays a single FaqCategory model.
* Displays a single PostTag model.
* @param integer $id
* @param string $name
* @return mixed
*/
public function actionView($id, $name)
public function actionView($id)
{
return $this->render('view', [
'model' => $this->findModel($id, $name),
'model' => $this->findModel($id),
]);
}
/**
* Creates a new FaqCategory model.
* Creates a new PostTag model.
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
*/
public function actionCreate()
{
$model = new FaqCategory();
$model = new PostTag();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->id, 'name' => $model->name]);
return $this->redirect(['view', 'id' => $model->id]);
} else {
return $this->render('create', [
'model' => $model,
......@@ -73,18 +85,17 @@ class FaqCategoryAdminController extends AdminController
}
/**
* Updates an existing FaqCategory model.
* Updates an existing PostTag model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id
* @param string $name
* @return mixed
*/
public function actionUpdate($id, $name)
public function actionUpdate($id)
{
$model = $this->findModel($id, $name);
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->id, 'name' => $model->name]);
return $this->redirect(['view', 'id' => $model->id]);
} else {
return $this->render('update', [
'model' => $model,
......@@ -93,30 +104,28 @@ class FaqCategoryAdminController extends AdminController
}
/**
* Deletes an existing FaqCategory model.
* Deletes an existing PostTag model.
* If deletion is successful, the browser will be redirected to the 'index' page.
* @param integer $id
* @param string $name
* @return mixed
*/
public function actionDelete($id, $name)
public function actionDelete($id)
{
$this->findModel($id, $name)->delete();
$this->findModel($id)->delete();
return $this->redirect(['index']);
return $this->redirect(['manage']);
}
/**
* Finds the FaqCategory model based on its primary key value.
* Finds the PostTag model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.
* @param integer $id
* @param string $name
* @return FaqCategory the loaded model
* @return PostTag the loaded model
* @throws NotFoundHttpException if the model cannot be found
*/
protected function findModel($id, $name)
protected function findModel($id)
{
if (($model = FaqCategory::findOne(['id' => $id, 'name' => $name])) !== null) {
if (($model = PostTag::findOne($id)) !== null) {
return $model;
} else {
throw new NotFoundHttpException('The requested page does not exist.');
......
<?php
/**
* Created by PhpStorm.
* User: Андрей
* Date: 06.03.2015
* Time: 20:11
*/
use yii\helpers\ArrayHelper;
return [
'activeForm'=>[
'id' => 'faq-form',
],
'elements' => [
'lang' => [
'type' => 'dropdownlist',
'class' => 'form-control',
'items' => \yii\helpers\ArrayHelper::map(\common\modules\languages\models\Languages::find()->all(), 'code', 'name'),
'empty' => 'Select Language',
],
'name' => [
'type' => 'text',
'class' => 'form-control',
'placeholder' => \yii::t('faq','First Name'),
'title' => \yii::t('faq','First Name')
],
'phone' => [
'type' => 'text',
'class' => 'form-control',
'placeholder' => \yii::t('faq','Phone'),
'title' => \yii::t('faq','Phone')
],
'email' => [
'type' => 'email',
'class' => 'form-control',
'placeholder' => \yii::t('faq','Email'),
'title' => \yii::t('faq','Email')
],
'cat_id' => [
'type' => 'dropdownlist',
'class' => 'form-control',
'items' => \yii\helpers\ArrayHelper::map(\common\modules\faq\models\FaqCategory::find()->all(), 'id', 'name'),
'empty' => 'Select Category',
],
'question' => [
'type' => 'textarea',
'class' => 'form-control',
'placeholder' => \yii::t('faq','Question'),
'title' => \yii::t('faq','Question')
],
'answer' => [
'type' => 'textarea',
'class' => 'form-control',
'placeholder' => \yii::t('faq','Answer'),
'title' => \yii::t('faq','Answer')
],
'is_published' => ['type' => 'checkbox', 'readonly' => 'readonly'],
/*'notification_date' => [
'type' => 'date',
'class' => 'form-control',
'placeholder' => \yii::t('faq','Notify Date'),
'title' => \yii::t('faq','Notify Date'),
'readonly' => 'readonly',
],
'notification_send' => ['type' => 'checkbox'],*/
'url' => [
'type' => 'text',
'class' => 'form-control',
'placeholder' => \yii::t('faq','Url'),
'title' => \yii::t('faq','Url')
],
/*'name' => ['type' => 'text', 'class' => 'form-control'],
'activity_from' => ['type' => 'date', 'class' => 'form-control'],
'<div style="clear: both;">',
'activity_before' => ['type' => 'date', 'class' => 'form-control'],
'enabled' => ['type' => 'checkbox'],
'default' => ['type' => 'checkbox'],*/
],
'buttons' => [
'submit' => ['type' => 'submit', 'value' => 'Cохранить']
]
];
\ No newline at end of file
<?php
use yii\helpers\ArrayHelper;
return [
'activeForm'=>[
'id' => 'module-form',
],
'elements' => [
'name' => ['type' => 'text', 'class' => 'form-control'],
'url' => ['type' => 'text', 'class' => 'form-control'],
],
'buttons' => [
'submit' => ['type' => 'submit', 'value' => 'Cохранить']
]
];
<?php
use yii\helpers\Html;
/* @var $this \yii\web\View view component instance */
/* @var $message \yii\mail\MessageInterface the message being composed */
/* @var $content string main view render result */
?>
<?php $this->beginPage() ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?= Yii::$app->charset ?>" />
<title><?= Html::encode($this->title) ?></title>
<?php $this->head() ?>
</head>
<body>
<?php $this->beginBody() ?>
<?= $content ?>
<?php $this->endBody() ?>
</body>
</html>
<?php $this->endPage() ?>
<?php
use yii\helpers\Html;
/* @var $this \yii\web\View view component instance */
/* @var $message \yii\mail\MessageInterface the message being composed */
/* @var $content string main view render result */
?>
<?php $this->beginPage() ?>
<?php $this->beginBody() ?>
<?= $content ?>
<?php $this->endBody() ?>
<?php $this->endPage() ?>
<?php
use yii\helpers\Html;
use common\models\Settings;
use yii\helpers\Url;
$domain = Url::to("/images/letter/", true);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<meta name="format-detection" content="telephone=no" />
<title>Schneider Email Template</title>
<style type="text/css">
body {
margin:0;
padding:0;
}
@media only screen and (max-width:600px) {
body[merkle] .hide {
display:none !important;
width:0px !important;
height:0px !important;
}
body[merkle] .width270 {
width:270px !important;
}
body[merkle] .width230{
width: 230px;
}
.btn_resp {
width: 190px;
display: block;
overflow: hidden;
word-wrap: break-word;
}
body[merkle] .aligncenter {
text-align:center !important;
}
body[merkle] .padding0 {
padding:0px !important;
}
body[merkle] .paddingbottom6 {
padding:6px !important;
}
body[merkle] .alignleft {
text-align:left !important;
}
body[merkle] .bgwhite {
background-color:#FFFFFF !important;
background-image:none !important;
width:inherit !important;
height:inherit !important;
}
body[merkle] .bggray {
background-color:#efefef !important;
}
body[merkle] .drop {
width:270px !important;
float:left !important;
}
body[merkle] .desktop{visibility:hidden; display:none !important;}
body[merkle] .mobile{max-height: none !important; font-family:Arial, Helvetica, sans-serif; display: block !important; }
body[merkle] .yellow{color:#ffc222 !important;}
body[merkle] .head_space_height{height:2px;}
body[merkle] .right_col_height{height:280px;}
}
</style>
<style type="text/css">
.desktop{visibility:visible;}
.mobile { max-height: 0px !important; font-size: 0 !important; display: none; }
.ExternalClass {
width:100%;
}
.ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div {
mso-line-height-rule:exactly;
mso-line-height-rule:exactly;
line-height: 100%;
}
body {
-webkit-text-size-adjust:none;
-ms-text-size-adjust:none;
}
table td {
border-collapse:collapse;
}
p {
margin:0;
padding:0;
margin-bottom:0;
}
h1, h2, h3, h4, h5, h6 {
mso-line-height-rule:exactly;
mso-line-height-rule:exactly;
line-height: 100%;
}
a, a:link {
text-decoration: underline;
}
span.yshortcuts {
color:#000;
background-color:none;
border:none;
}
span.yshortcuts:hover, span.yshortcuts:active, span.yshortcuts:focus {
background-color:none;
border:none;
}
a:visited {
text-decoration: none
}
a:focus {
text-decoration: underline
}
a:hover {
text-decoration: underline
}
.head_space_height{height:80px;}
.Img_Descrip{font-size:12px; font-weight:normal; font-family:Arial, Helvetica, sans-serif;}
.right_col_height{height:328px;}
</style>
</head>
<body merkle="fix" style="margin:0; padding:0; -webkit-text-size-adjust: none;" bgcolor="#f2f2f2" >
<div style="background-color:#f2f2f2;" align="center">
<!--[if gte mso 9]>
<v:background xmlns:v="urn:schemas-microsoft-com:vml" fill="t">
<v:fill type="tile" src="" color="#efefef"/>
</v:background>
<![endif]-->
<table height="100%" width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#424242">
<tr>
<td valign="top" align="center" bgcolor="#424242">
<!--Begin Header1 -->
<table width="600" border="0" cellspacing="0" cellpadding="0" class="width270">
<tr>
<td align="center" valign="top" style="font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; font-size:12px; mso-line-height-rule:exactly; line-height:16px; color:#ffffff; padding-top:8px; padding-bottom:8px">Если письмо отображается неккоректно, нажмите <a href="#" target="_blank" style="color:#ffffff">здесь</a></td>
</tr>
</table>
</td>
</tr>
</table>
<table height="100%" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td valign="top" align="center" background="">
<!--begin spacer -->
<table width="600" border="0" cellspacing="0" cellpadding="0" class="width270">
<tr>
<td align="left" valign="top" style="font-size:30px; line-height:30px"><img src="<?= $domain ?>spacer.gif" width="1" height="30" border="0" /></td>
</tr>
</table>
<!--end spacer -->
<!--Begin Header2 -->
<table width="600" border="0" cellspacing="0" cellpadding="0" style="-moz-border-radius:0px; -webkit-border-radius:0px; border:solid 1px #cccccc; border-radius:1px;" class="width270" >
<tr>
<td align="left" valign="top">
<!--begin spacer -->
<table width="600" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" class="width270">
<tr>
<td align="left" valign="top" style="font-size:8px; line-height:8px"><img src="<?= $domain ?>spacer.gif" width="1" height="8" border="0" /></td>
</tr>
</table>
<!--end spacer -->
<table width="600" border="0" cellspacing="0" cellpadding="0" class="width270">
<tr>
<td align="left" valign="top" bgcolor="#FFFFFF" width="20"><img src="<?= $domain ?>spacer.gif" width="20" height="1" border="0" style="display:block;"></td>
<td align="left" valign="top" bgcolor="#FFFFFF" class="aligncenter">
<a href="task-on.com"><img src="<?= $domain ?>logo.jpg" width="51" height="58" alt="Taskon" border="0"/></a>
</td>
<td align="right" valign="middle" bgcolor="#ffffff" style="font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; color:#808080; font-size:20px; mso-line-height-rule:exactly; line-height:28px;">Добро пожаловать</td>
<td align="left" valign="top" bgcolor="#FFFFFF" width="20"><img src="<?= $domain ?>spacer.gif" width="20" height="1" border="0" style="display:block;"></td>
</tr>
</table>
<!--End Header2 -->
<table width="600" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" style="font-size:16px; line-height:16px;" class="hide">
<tbody><tr>
<td align="left" width="20" valign="top" style="font-size:16px; line-height:16px"><img src="<?= $domain ?>spacer.gif" width="1" height="8" border="0"></td>
<td align="left" valign="top" style="font-size:16px; line-height:16px; border-bottom:#e3e3e3 solid 1px;" class="hideborder"><img src="<?= $domain ?>spacer.gif" width="1" height="8" border="0"></td>
<td width="20" align="left" valign="top" style="font-size:16px; line-height:16px"><img src="<?= $domain ?>spacer.gif" width="1" height="8" border="0"></td>
</tr>
</tbody></table>
<!--begin spacer -->
<table width="600" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" class="width270">
<tr>
<td align="left" valign="top" style="font-size:15px; line-height:15px"><img src="<?= $domain ?>spacer.gif" width="1" height="15" border="0" /></td>
</tr>
</table>
<!--end spacer -->
<table width="600" border="0" cellspacing="0" cellpadding="0" class="width270">
<tr>
<td align="left" valign="top" bgcolor="#FFFFFF" width="20"><img src="<?= $domain ?>spacer.gif" width="20" height="1" border="0" style="display:block;"></td>
<td align="left" valign="middle" bgcolor="#ffffff" style="font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; color:#424242; font-size:16px; mso-line-height-rule:exactly; line-height:30px; font-weight: bold;">Добрый день! </td>
<td align="left" valign="top" bgcolor="#FFFFFF" width="20"><img src="<?= $domain ?>spacer.gif" width="20" height="1" border="0" style="display:block;"></td>
</tr>
</table>
<table width="600" border="0" cellspacing="0" cellpadding="0" class="width270">
<tr>
<td align="left" valign="top" bgcolor="#FFFFFF" width="20"><img src="<?= $domain ?>spacer.gif" width="20" height="1" border="0" style="display:block;"></td>
<td align="left" valign="middle" bgcolor="#ffffff" style="font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; color:#666666; font-size:14px; mso-line-height-rule:exactly; line-height:18px;">
Уведомляем Вас о том, что с сайта <?= Yii::$app->request->hostInfo ?> поступил вопрос из раздела "Справка".
</td>
<td align="left" valign="top" bgcolor="#FFFFFF" width="20"><img src="<?= $domain ?>spacer.gif" width="20" height="1" border="0" style="display:block;"></td>
</tr>
</table>
<!--begin spacer -->
<table width="600" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" class="width270">
<tr>
<td align="left" valign="top" style="font-size:5px; line-height:5px"><img src="<?= $domain ?>spacer.gif" width="1" height="5" border="0" /></td>
</tr>
</table>
<!--end spacer -->
<table width="600" border="0" cellspacing="0" cellpadding="0" class="width270">
<tr>
<td align="left" valign="top" bgcolor="#FFFFFF" width="20"><img src="<?= $domain ?>spacer.gif" width="20" height="1" border="0" style="display:block;"></td>
<td align="left" valign="middle" bgcolor="#ffffff" style="font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; color:#666666; font-size:14px; mso-line-height-rule:exactly; line-height:18px;">
<div><strong>Имя:</strong> <?= $model->fio ?></div>
<div><strong>E-mail:</strong> <?= $model->email ?></div>
<div><strong>Телефон:</strong> <?= $model->phone ?></div>
<div><strong>Текст вопроса:</strong> <?= $model->message ?></div>
</td>
<td align="left" valign="top" bgcolor="#FFFFFF" width="20"><img src="<?= $domain ?>spacer.gif" width="20" height="1" border="0" style="display:block;"></td>
</tr>
</table>
<!--begin spacer -->
<table width="600" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" class="width270">
<tr>
<td align="left" valign="top" style="font-size:5px; line-height:5px"><img src="<?= $domain ?>spacer.gif" width="1" height="5" border="0" /></td>
</tr>
</table>
<!--end spacer -->
<!--begin spacer -->
<table width="600" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" class="width270">
<tr>
<td align="left" valign="top" style="font-size:10px; line-height:10px"><img src="<?= $domain ?>spacer.gif" width="1" height="10" border="0" /></td>
</tr>
</table>
<!--end spacer -->
<table width="600" border="0" cellspacing="0" cellpadding="0" class="width270">
<tr>
<td align="left" valign="top" bgcolor="#FFFFFF" width="20"><img src="<?= $domain ?>spacer.gif" width="20" height="1" border="0" style="display:block;"></td>
<td align="left" valign="middle" bgcolor="#ffffff" style="font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; color:#666666; font-size:14px; mso-line-height-rule:exactly; line-height:18px;">
<? $cn = $model->className() ?>
Отправлено со страници: <?= Url::to("/faq/".common\modules\faq\models\FaqMailForm::getUrlByContentId($model->content_id)->url, ["id" => $model->content_id]) ?>
</td>
<td align="left" valign="top" bgcolor="#FFFFFF" width="20"><img src="<?= $domain ?>spacer.gif" width="20" height="1" border="0" style="display:block;"></td>
</tr>
</table>
<!--begin spacer -->
<table width="600" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" class="width270">
<tr>
<td align="left" valign="top" style="font-size:5px; line-height:5px"><img src="<?= $domain ?>spacer.gif" width="1" height="5" border="0" /></td>
</tr>
</table>
<!--end spacer -->
<!--begin spacer -->
<table width="600" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" class="width270">
<tr>
<td align="left" valign="top" style="font-size:10px; line-height:10px"><img src="<?= $domain ?>spacer.gif" width="1" height="10" border="0" /></td>
</tr>
</table>
<!--end spacer -->
<!--begin spacer -->
<table width="600" border="0" cellspacing="0" cellpadding="0" bgcolor="#f7f7f7" class="width270">
<tr>
<td align="left" valign="top" style="font-size:20px; line-height:20px"><img src="<?= $domain ?>spacer.gif" width="1" height="20" border="0" /></td>
</tr>
</table>
<!--end spacer -->
<table width="600" border="0" cellspacing="0" cellpadding="0" class="width270">
<tr>
<td align="left" valign="top" bgcolor="#f7f7f7" width="20"><img src="<?= $domain ?>spacer.gif" width="20" height="1" border="0" style="display:block;"></td>
<td align="left" valign="middle" bgcolor="#f7f7f7" style="font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; color:#666666; font-size:16px; mso-line-height-rule:exactly; line-height:18px; font-weight: bold;">
О Программе Генератор КП
</td>
<td align="left" valign="top" bgcolor="#f7f7f7" width="20"><img src="<?= $domain ?>spacer.gif" width="20" height="1" border="0" style="display:block;"></td>
</tr>
</table>
<!--begin spacer -->
<table width="600" border="0" cellspacing="0" cellpadding="0" bgcolor="#f7f7f7" class="width270">
<tr>
<td align="left" valign="top" style="font-size:10px; line-height:10px"><img src="<?= $domain ?>spacer.gif" width="1" height="10" border="0" /></td>
</tr>
</table>
<!--end spacer -->
<table width="600" border="0" cellspacing="0" cellpadding="0" class="width270">
<tr>
<td align="left" valign="top" bgcolor="#f7f7f7" width="20"><img src="<?= $domain ?>spacer.gif" width="20" height="1" border="0" style="display:block;"></td>
<td align="left" valign="middle" bgcolor="#f7f7f7" style="font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; color:#666666; font-size:14px; mso-line-height-rule:exactly; line-height:18px;">
Лёгкое и быстрое создание коммерческих предложений и счетов. Возможность выбора шаблона КП, генерация бланков с нанесением печати и факсимиле. Создание базы данных товаров и услуг. Отправка КП и счетов по e-mail. Ведение подробной статистики по каждому КП. Статистика по каждому менеджеру компании.
</td>
<td align="left" valign="top" bgcolor="#f7f7f7" width="20"><img src="<?= $domain ?>spacer.gif" width="20" height="1" border="0" style="display:block;"></td>
</tr>
</table>
<!--begin spacer -->
<table width="600" border="0" cellspacing="0" cellpadding="0" bgcolor="#f7f7f7" class="width270">
<tr>
<td align="left" valign="top" style="font-size:10px; line-height:10px"><img src="<?= $domain ?>spacer.gif" width="1" height="10" border="0" /></td>
</tr>
</table>
<!--end spacer -->
<!--begin spacer -->
<table width="600" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" class="width270">
<tr>
<td align="left" valign="top" style="font-size:15px; line-height:15px"><img src="<?= $domain ?>spacer.gif" width="1" height="15" border="0" /></td>
</tr>
</table>
<!--end spacer -->
<table width="600" border="0" cellspacing="0" cellpadding="0" class="width270">
<tr>
<td align="left" valign="top" bgcolor="#FFFFFF" width="20"><img src="<?= $domain ?>spacer.gif" width="20" height="1" border="0" style="display:block;"></td>
<td align="left" valign="middle" bgcolor="#ffffff" style="font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; color:#666666; font-size:14px; mso-line-height-rule:exactly; line-height:18px;">
С уважением, команда TaskOn.
</td>
<td align="left" valign="top" bgcolor="#FFFFFF" width="20"><img src="<?= $domain ?>spacer.gif" width="20" height="1" border="0" style="display:block;"></td>
</tr>
</table>
<!--begin spacer -->
<table width="600" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" class="width270">
<tr>
<td align="left" valign="top" style="font-size:15px; line-height:15px"><img src="<?= $domain ?>spacer.gif" width="1" height="15" border="0" /></td>
</tr>
</table>
<!--end spacer -->
<!--begin spacer -->
<table width="600" border="0" cellspacing="0" cellpadding="0" bgcolor="#0e3242" class="width270">
<tr>
<td align="left" valign="top" style="font-size:50px; line-height:50px"><img src="<?= $domain ?>spacer.gif" width="1" height="50" border="0" /></td>
</tr>
</table>
<!--end spacer -->
<table width="600" border="0" cellspacing="0" cellpadding="0" class="width270">
<tr>
<td align="left" valign="top" bgcolor="#0e3242" width="20"><img src="<?= $domain ?>spacer.gif" width="20" height="1" border="0" style="display:block;"></td>
<td align="center" valign="middle" bgcolor="#0e3242" style="font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; color:#ffffff; font-size:15px; mso-line-height-rule:exactly; line-height:18px;">
Рекомендуем посмотреть:
</td>
<td align="left" valign="top" bgcolor="#0e3242" width="20"><img src="<?= $domain ?>spacer.gif" width="20" height="1" border="0" style="display:block;"></td>
</tr>
</table>
<!--begin spacer -->
<table width="600" border="0" cellspacing="0" cellpadding="0" bgcolor="#0e3242" class="width270">
<tr>
<td align="left" valign="top" style="font-size:10px; line-height:10px"><img src="<?= $domain ?>spacer.gif" width="1" height="10" border="0" /></td>
</tr>
</table>
<!--end spacer -->
<table width="600" border="0" cellspacing="0" cellpadding="0" class="width270">
<tr>
<td align="left" valign="top" bgcolor="#0e3242" width="20"><img src="<?= $domain ?>spacer.gif" width="20" height="1" border="0" style="display:block;"></td>
<td align="center" valign="middle" bgcolor="#0e3242" style="font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; color:#1397c1; font-size:14px; mso-line-height-rule:exactly; line-height:18px;">
<a style="font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; font-size:14px; line-height:18px; color:#1397c1; margin-right: 20px;" href="">Счего начать</a>
<a style="font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; font-size:14px; line-height:18px; color:#1397c1; margin-right: 20px;" href="">Создание КП</a>
<a style="font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; font-size:14px; line-height:18px; color:#1397c1; margin-right: 20px;" href="">Как выглядит статистика</a>
<a style="font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; font-size:14px; line-height:18px; color:#1397c1; margin-right: 20px;" href="">Справка</a>
</td>
<td align="left" valign="top" bgcolor="#0e3242" width="20"><img src="<?= $domain ?>spacer.gif" width="20" height="1" border="0" style="display:block;"></td>
</tr>
</table>
<!--begin spacer -->
<table width="600" border="0" cellspacing="0" cellpadding="0" bgcolor="#0e3242" class="width270">
<tr>
<td align="left" valign="top" style="font-size:15px; line-height:15px"><img src="<?= $domain ?>spacer.gif" width="1" height="15" border="0" /></td>
</tr>
</table>
<!--end spacer -->
<table width="600" border="0" cellspacing="0" cellpadding="0" class="width270">
<tr>
<td align="left" valign="top" bgcolor="#0e3242" width="20"><img src="<?= $domain ?>spacer.gif" width="20" height="1" border="0" style="display:block;"></td>
<td align="center" valign="middle" bgcolor="#0e3242" style="font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; color:#1397c1; font-size:14px; mso-line-height-rule:exactly; line-height:18px;">
<table align="center" cellspacing="0" cellpadding="5" style="margin-bottom:8px; margin-top:8px;">
<tr>
<td valign="top"><a style="background-color: #0e3242; color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 12px; text-decoration: none" rilt="TV" href="https://vk.com/itdljabiznesa?utm_source=email_kp&utm_medium=email&utm_campaign=reg_kp"><img width="42" height="41" src="<?= $domain ?>vk.png"></a></td>
<td valign="top"><a style="background-color: #0e3242; color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 12px; text-decoration: none" rilt="BLOG" href="https://www.facebook.com/itdljabiznesa/?utm_source=email_kp&utm_medium=email&utm_campaign=reg_kp"><img width="44" height="41" src="<?= $domain ?>f.png"></a></td>
<td valign="top"><a style="background-color: #0e3242; color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 12px; text-decoration: none" rilt="FACE" href="https://www.youtube.com/channel/UCp40CGu4epOPyX8uFkLHoUg?utm_source=email_kp&utm_medium=email&utm_campaign=reg_kp"><img width="44" height="41" src="<?= $domain ?>yt.png"></a></td>
<td class="hide" valign="top"><a style="background-color: #0e3242; color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 12px; text-decoration: none" rilt="FACE" href="https://www.instagram.com/ai_bigdata/?utm_source=email_kp&utm_medium=email&utm_campaign=reg_kp"><img width="43" height="41" src="<?= $domain ?>inst.png"></a></td>
<td class="hide" valign="top"><a style="background-color: #0e3242; color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 12px; text-decoration: none" rilt="FACE" href="https://twitter.com/Ltd_Art_Project?utm_source=email_kp&utm_medium=email&utm_campaign=reg_kp"><img width="44" height="41" src="<?= $domain ?>tw.png"></a></td>
<td valign="top"><a style="background-color: #0e3242; color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 12px; text-decoration: none" rilt="TWITTER" href="https://plus.google.com/102993273426326201418/about?gmbpt=true&hl=ru&_ga=1.194026926.247908380.1458310184&utm_source=email_kp&utm_medium=email&utm_campaign=reg_kp"><img width="42" height="41" src="<?= $domain ?>g.png"></a></td>
</tr>
</table>
</td>
<td align="left" valign="top" bgcolor="#0e3242" width="20"><img src="<?= $domain ?>spacer.gif" width="20" height="1" border="0" style="display:block;"></td>
</tr>
</table>
<!--begin spacer -->
<table width="600" border="0" cellspacing="0" cellpadding="0" bgcolor="#0e3242" class="width270">
<tr>
<td align="left" valign="top" style="font-size:10px; line-height:10px"><img src="<?= $domain ?>spacer.gif" width="1" height="10" border="0" /></td>
</tr>
</table>
<!--end spacer -->
<table width="600" border="0" cellspacing="0" cellpadding="0" class="width270">
<tr>
<td align="left" valign="top" bgcolor="#0e3242" width="20"><img src="<?= $domain ?>spacer.gif" width="20" height="1" border="0" style="display:block;"></td>
<td align="center" valign="middle" bgcolor="#0e3242" style="font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; color:#ffffff; font-size:14px; mso-line-height-rule:exactly; line-height:24px;">
Если у Вас есть вопросы, пишите на адрес <a style="font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; font-size:14px; line-height:24px; color:#1397c1; margin-right: 20px;" href="mailto:support@task-on.com">support@task-on.com </a> <br>
или звоните: 8-495-749-29-69
</td>
<td align="left" valign="top" bgcolor="#0e3242" width="20"><img src="<?= $domain ?>spacer.gif" width="20" height="1" border="0" style="display:block;"></td>
</tr>
</table>
<!--begin spacer -->
<table width="600" border="0" cellspacing="0" cellpadding="0" bgcolor="#0e3242" class="width270">
<tr>
<td align="left" valign="top" style="font-size:20px; line-height:20px"><img src="<?= $domain ?>spacer.gif" width="1" height="20" border="0" /></td>
</tr>
</table>
<!--end spacer -->
</td>
</tr>
</tbody></table>
<!--END A-2 -->
</td>
</tr>
</table>
<!--begin spacer -->
<table width="600" border="0" cellspacing="0" cellpadding="0" class="width270">
<tr>
<td align="left" valign="top" style="font-size:20px; line-height:20px"><img src="<?= $domain ?>spacer.gif" width="1" height="20" border="0" /></td>
</tr>
</table>
<!--end spacer -->
<table width="600" border="0" cellspacing="0" cellpadding="0" style="color:#666666; height: 80px; font-family:Arial, Helvetica, sans-serif; font-size:12px; margin-bottom:12px; line-height:24px;" class="width270">
<tr>
<td align="left" valign="top" style="font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; font-size:12px; line-height:16px; color:#666666">
Данное письмо создано с помощью автоматической рассылки. Если Вы не хотите получать письма от нас в дальнейшем, то нажмите на ссылку <a style="font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; font-size:12px; line-height:16px; color:#00536d" href="">отписаться от рассылки.</a>
<br><br>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<?php
/* @var $this yii\web\View */
/* @var $user common\models\User */
use common\models\Settings;
?>
Добрый день!
Уведомляем Вас о том, что с сайта <?=Settings::getValue('setting-project-name')?> поступил вопрос из раздела "Справка"
Имя: <?= $model->fio; ?>
E-mail: <?= $model->email; ?>
Телефон: <?= $model->phone; ?>
Текст вопроса:
<?= $model->message; ?>
С уважением, команда <?=Settings::getValue('setting-project-name')?>.
Если у Вас есть вопросы обратитесь к администратору сервиса на адрес <?=Settings::getValue('content-support-email')?>
\ No newline at end of file
<?php
use yii\db\Schema;
use yii\db\Migration;
class m160517_071645_add_table_faq extends Migration
{
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
$this->createTable('faq_content', [
'id' => Schema::TYPE_PK,
'url' => Schema::TYPE_STRING.'(255) NOT NULL',
'rubric_id' => Schema::TYPE_INTEGER . '(11) NOT NULL',
'active' => Schema::TYPE_INTEGER.'(1) NOT NULL',
'created_at' => Schema::TYPE_INTEGER.'(11) DEFAULT NULL',
'updated_at' => Schema::TYPE_INTEGER.'(11) DEFAULT NULL',
]);
$this->createIndex('faq_url_unique', 'faq_content', 'url', true);
$this->createTable('faq_content_lang', [
'id' => Schema::TYPE_PK,
'faq_id' => Schema::TYPE_INTEGER.'(11) NOT NULL',
'lang_id' => Schema::TYPE_INTEGER.'(11) NOT NULL',
'title' => Schema::TYPE_STRING.'(255) DEFAULT NULL',
'text' => 'longtext DEFAULT NULL',
'created_at' => Schema::TYPE_INTEGER.'(11) DEFAULT NULL',
'updated_at' => Schema::TYPE_INTEGER.'(11) DEFAULT NULL',
]);
$this->createTable('faq_rubric', [
'id' => Schema::TYPE_PK,
'name' => Schema::TYPE_STRING . '(255) NOT NULL',
'url' => Schema::TYPE_STRING . '(255) NOT NULL',
'created_at' => Schema::TYPE_INTEGER . '(11) DEFAULT NULL',
'updated_at' => Schema::TYPE_INTEGER . '(11) DEFAULT NULL',
]);
$this->addForeignKey(
'fk_faq_content_rubric_id_faq_rubric_id',
'faq_content', 'rubric_id',
'faq_rubric', 'id'
);
}
public function safeDown()
{
echo "m160517_071645_add_table_faq cannot be rereverted.\n";
return false;
}
/*
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
}
public function safeDown()
{
}
*/
}
<?php
use yii\db\Schema;
use yii\db\Migration;
class m160517_141200_add_column extends Migration
{
public function safeUp()
{
$this->addColumn('faq_rubric', 'img', Schema::TYPE_STRING.'(60) DEFAULT NULL');
$this->addColumn('faq_rubric', 'sort', Schema::TYPE_INTEGER . '(11) NOT NULL');
}
public function safeDown()
{
$this->dropColumn('faq_rubric', 'img');
$this->dropColumn('faq_rubric', 'sort');
}
}
<?php
use yii\db\Schema;
use yii\db\Migration;
class m160527_080112_faq_mail_form extends Migration
{
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
$q = '
CREATE TABLE `faq_mail_form` (
`id` int(11) NOT NULL,
`content_id` int(11) NOT NULL,
`email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`fio` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`phone` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`message` text COLLATE utf8_unicode_ci NOT NULL,
`created_at` int(11) NOT NULL,
`updated_at` int(11) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
ALTER TABLE `faq_mail_form`
ADD PRIMARY KEY (`id`),
ADD KEY `content_id` (`content_id`);
ALTER TABLE `faq_mail_form`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=1;
ALTER TABLE `faq_mail_form`
ADD CONSTRAINT `faq_mail_form_ibfk_1` FOREIGN KEY (`content_id`) REFERENCES `faq_content` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
';
$this->execute($q);
}
public function safeDown()
{
$this->dropTable('faq_mail_form');
}
}
<?php
use yii\db\Schema;
use yii\db\Migration;
class m160527_112741_faq_vote extends Migration
{
public function safeUp()
{
$this->createTable('faq_vote', [
'id' => Schema::TYPE_PK,
'content_id' => Schema::TYPE_INTEGER . '(11) NOT NULL',
'yes' => Schema::TYPE_BOOLEAN,
'created_at' => Schema::TYPE_INTEGER.'(11) DEFAULT NULL',
'updated_at' => Schema::TYPE_INTEGER.'(11) DEFAULT NULL',
]);
$this->createIndex('faq_vote_yes', 'faq_vote', 'yes');
$this->addForeignKey(
'faq_vote_ibfk_1', 'faq_vote', 'content_id', 'faq_content', 'id', 'CASCADE', 'CASCADE'
);
}
public function safeDown()
{
$this->dropTable('faq_vote');
}
}
<?php
use yii\db\Migration;
use yii\db\Schema;
/**
* Handles adding session_id to table `faq_vote`.
*/
class m160530_113552_add_session_id_to_faq_vote extends Migration
{
/**
* @inheritdoc
*/
public function safeUp()
{
$this->addColumn('faq_vote', 'session_id', Schema::TYPE_STRING.'(32) DEFAULT NULL');
$this->createIndex('session_id_uniue', 'faq_vote', 'session_id', true);
}
/**
* @inheritdoc
*/
public function safeDown()
{
$this->dropColumn('faq_vote', 'session_id');
}
}
<?php
use yii\db\Migration;
use yii\db\Schema;
use common\modules\faq\models\Faq;
class m160607_121443_add_section extends Migration
{
public function safeUp()
{
$this->addColumn('faq_rubric', 'section', Schema::TYPE_STRING.'(32) DEFAULT \''.Faq::SECTION_FAQ.'\'');
}
public function safeDown()
{
$this->dropColumn('faq_rubric', 'section');
}
}
<?php
use yii\db\Migration;
class m160608_094035_remove_unique_session extends Migration
{
public function safeUp()
{
$this->dropIndex("session_id_uniue", 'faq_vote');
}
public function safeDown()
{
$this->createIndex('session_id_uniue', 'faq_vote', 'session_id', true);
}
}
<?php
use yii\db\Migration;
/**
* Handles the creation for table `unique_session_id`.
*/
class m160608_094713_create_unique_session_id extends Migration
{
public function safeUp()
{
$this->createIndex('session_id_uniue', 'faq_vote', ['session_id', 'content_id'], true);
}
public function safeDown()
{
$this->dropIndex("session_id_uniue", 'faq_vote');
}
}
......@@ -3,38 +3,78 @@
namespace common\modules\faq\models;
use Yii;
use yii\behaviors\TimestampBehavior;
use \yii\helpers\StringHelper;
use yii\helpers\Url;
use yii\db\Expression;
use \common\models\MetaTags;
use \common\components\validators\TransliterateValidator;
use common\modules\languages\models\Languages;
use common\modules\faq\models\FaqContentLang;
//use common\modules\faq\models\PostTag;
use common\modules\users\models\User;
use common\models\MetaTags;
use common\modules\sessions\models\SessionUrl;
/**
* This is the model class for table "faq".
* This is the model class for table "posts".
*
* @property integer $id
* @property string $lang
* @property string $name
* @property string $phone
* @property string $email
* @property integer $cat_id
* @property string $question
* @property string $answer
* @property integer $is_published
* @property string $welcome
* @property string $notification_date
* @property integer $notification_send
* @property integer $order
* @property string $show_in_module
* @property integer $view_count
* @property string $url
* @property integer $active
* @property integer $created_at
* @property integer $updated_at
*
* @property PostsLang[] $postsLangs
* @property PostsTagsAssign[] $postsTagsAssigns
* @property PostsTags[] $tags
*/
class Faq extends \common\components\ActiveRecordModel
{
const ACTIVE_FALSE = 0;
const ACTIVE_TRUE = 1;
const PAGE_SIZE = 2;
public static $active_title = [
self::ACTIVE_FALSE => 'Скрыта',
self::ACTIVE_TRUE => 'Доступна',
];
/*
* константы SECTION_XXX именуют логические разделы модуля
*/
const SECTION_VIDEO = "video";
const SECTION_FAQ = "faq";
public static $section_title = [
self::SECTION_FAQ => 'Справка',
self::SECTION_VIDEO => 'Видео-уроки', // если удалить этот элемент, раздел работать не будет
];
/**
* @inheritdoc
*/
public static function tableName()
{
return 'faq_content';
}
public function name()
{
return 'Страницы';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['url', 'active', 'rubric_id'], 'required'],
[['active', 'created_at', 'updated_at'], 'integer'],
[['rubric_id'], 'safe'],
[['url'], 'string', 'max' => 255],
[['url'], 'unique'],
];
}
/**
* @inheritdoc
*/
......@@ -43,124 +83,157 @@ class Faq extends \common\components\ActiveRecordModel
return [
'meta' => [
'class' => 'common\components\activeRecordBehaviors\MetaTagBehavior',
'actions' => ['create', 'update']
],
'langs' => [
'class' => 'common\modules\languages\components\LanguageHelperBehavior',
'field' => 'faq_id',
'langClass' => 'common\modules\faq\models\FaqContentLang',
'actions' => ['create', 'update']
],
'timestamp' => [
'class' => TimestampBehavior::className(),
'createdAtAttribute' => 'created_at',
'updatedAtAttribute' => 'updated_at',
'value' => time(),
// 'tags' => [
// 'class' => 'common\modules\blog\components\TagBehavior',
// ],
'Timestamp' => [
'class' => '\yii\behaviors\TimestampBehavior',
],
// 'file' => [
// 'class' => 'common\components\activeRecordBehaviors\FileUploadBehavior',
// 'thumb' => true,
// 'thumbSize' => ['280', '141'],
// 'path' => '@frontend/web',
// 'folder' => '/uploads/faq/',
// 'field' => 'preview'
// ],
];
}
/**
* @return \yii\db\ActiveQuery
* @inheritdoc
*/
public function getMetaTags() {
return $this->hasOne(MetaTags::className(), [
'object_id' => 'id',
/* */
])->where([
'model_id' => get_class($this),
'language' => 'ru',]);
public function attributeLabels()
{
return [
'id' => 'ID',
'rubric_id' => 'Рубрика',
'url' => 'Ссылка',
'active' => 'Видимость',
'created_at' => 'Дата добавления',
'updated_at' => 'Дата обновления',
];
}
/**
* @inheritdoc
* @return \yii\db\ActiveQuery
*/
public static function tableName()
public function getMetaTags($lang_id = null)
{
return 'faq';
}
$query = $this->hasMany(MetaTags::className(), ['object_id' => 'id'])->where(['model_id' => get_class($this)]);
if($lang_id)
{
$query->andWhere(['lang_id' => $lang_id]);
}
public function name() {
return 'Вопрос-Ответ';
return $query;
}
/**
* @inheritdoc
* @return \yii\db\ActiveQuery
*/
public function rules()
public function getMetaTag($lang_id = null)
{
return [
[['cat_id', 'is_published', 'notification_send', 'order', 'view_count', 'created_at', 'updated_at'], 'integer'],
[['question', 'answer'], 'string', 'message' => 'Поле заполненно не корректно'],
[['notification_date'], 'safe'],
[['lang'], 'string', 'max' => 2],
[['name', 'welcome', 'show_in_module'], 'string', 'max' => 255],
[['phone'], 'string', 'max' => 50],
[['email'], 'email', 'message' => 'Поле заполненно не корректно'],
//[['email', 'name', 'question'], 'required', 'message' => 'Необходимо заполнить'],
[['question'], 'required', 'message' => 'Введите текст вашего сообщения'],
/*[['email'], 'validate_email'],
[['phone'], 'validate_phone'],*/
[['name'], 'required', 'when' => function($model){return empty($model->name);}, 'message' => 'Укажите ваше имя'],
[['phone'], 'required', 'when' => function($model){return empty($model->email);}, 'message' => 'Укажите ваш номер телефона'],
[['email'], 'required', 'when' => function($model){return empty($model->phone);}, 'message' => 'Укажите ваш E-mail адрес'],
[['url'], TransliterateValidator::className(), 'translitAttribute' => 'url'],
];
}
$lang_id = ($lang_id === null)? Languages::getCurrent()->id: $lang_id;
public function scenarios(){
$scenarios = parent::scenarios();
$scenarios['ClientSide'] = ['validate_phone','validate_email','email','phone','question','name','url'];//Scenario Values Only Accepted
return $scenarios;
return $this->hasOne(MetaTags::className(), ['object_id' => 'id'])->where([
'model_id' => get_class($this),
'lang_id' => $lang_id
]);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getLang($lang_id = null)
{
$lang_id = ($lang_id === null)? Languages::getCurrent()->id: $lang_id;
public function validate_phone($attribute, $params) {
if(empty($this->email)) {
$this->addError($attribute, 'Заполните одно из полей');
}
return $this->hasOne(FaqContentLang::className(), ['faq_id' => 'id'])->where('lang_id = :lang_id', [':lang_id' => $lang_id]);
}
public function validate_email($attribute, $params) {
if( empty($this->phone)) {
$this->addError($attribute, 'Заполните одно из полей');
}
/**
* @return \yii\db\ActiveQuery
*/
public function getLangs()
{
return $this->hasMany(FaqContentLang::className(), ['faq_id' => 'id']);
}
public function getShortQuestion() {
return StringHelper::truncateWords($this->question, 10, '', true);
/**
* @return \yii\db\ActiveQuery
*/
// public function getPostTags()
// {
// return $this->hasMany(PostTag::className(), ['id' => 'tag_id'])->viaTable('posts_tags_assign', ['post_id' => 'id']);
// }
/**
* @return \yii\db\ActiveQuery
*/
public function getPostTagAssigns()
{
return $this->hasMany(PostTagAssign::className(), ['post_id' => 'id']);
}
public function getShortAnswer()
/**
* @return \yii\db\ActiveQuery
*/
public function getRubric()
{
return StringHelper::truncateWords(strip_tags($this->answer, 'div'), 28, '...', true);
return $this->hasOne(FaqRubric::className(), ['id' => 'rubric_id']);
}
/**
* @inheritdoc
* @return \yii\db\ActiveQuery
*/
public function attributeLabels()
public function getViews()
{
return [
'id' => Yii::t('faq', 'ID'),
'lang' => Yii::t('faq', 'Language'),
'name' => Yii::t('faq', 'Name'),
'phone' => Yii::t('faq', 'Phone'),
'email' => Yii::t('faq', 'Email'),
'cat_id' => Yii::t('faq', 'Category'),
'question' => Yii::t('faq', 'Question'),
'answer' => Yii::t('faq', 'Answer'),
'is_published' => Yii::t('faq', 'Published'),
'welcome' => Yii::t('faq', 'Welcome'),
'notification_date' => Yii::t('faq', 'Notify Date'),
'notification_send' => Yii::t('faq', 'Notify Sended'),
'order' => Yii::t('faq', 'Order'),
'show_in_module' => Yii::t('faq', 'Show In Module'),
'view_count' => Yii::t('faq', 'View Count'),
'url' => Yii::t('faq', 'Url'),
'created_at' => Yii::t('faq', 'Created At'),
'updated_at' => Yii::t('faq', 'Updated At'),
'validateEmailPhone' => 'validateEmailPhone',
];
return SessionUrl::find()->where(['url' => $this->getFullUrl()]);
}
public function getCategory()
public function getFullUrl()
{
return $this->hasOne(FaqCategory::className(), ['id' => 'cat_id']);
return Url::to(['/faq/' . $this->url]);
}
public function alreadyVoted()
{
return Vote::find()->where([
"session_id" => Yii::$app->getSession()->id,
"content_id" => $this->id
])->one() ? true : false;
}
// public function getThumbnailUrl()
// {
// $path = pathinfo($this->preview);
//
// return $path['dirname'] . '/' . $path['filename'] . '.thumb.' . $path['extension'];
// }
// public function beforeSave($insert)
// {
// if (parent::beforeSave($insert))
// {
// $this->author_id = Yii::$app->user->identity->id;
// return true;
// }
// else
// {
// return false;
// }
// }
}
<?php
namespace common\modules\faq\models;
use Yii;
use common\modules\languages\models\Languages;
use common\modules\blog\models\Post;
/**
* This is the model class for table "posts_lang".
*
* @property integer $id
* @property integer $post_id
* @property integer $lang_id
* @property string $title
* @property string $text
* @property integer $created_at
* @property integer $updated_at
*
* @property Posts $post
* @property Languages $lang
*/
class FaqContentLang extends \common\components\ActiveRecordModel
{
/**
* @inheritdoc
*/
public static function tableName()
{
return 'faq_content_lang';
}
public function name()
{
return 'Языковые страницы';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['faq_id', 'lang_id'], 'required'],
[['faq_id', 'lang_id', 'created_at', 'updated_at'], 'integer'],
[['text'], 'string'],
[['title'], 'string', 'max' => 255],
[['faq_id'], 'exist', 'skipOnError' => true, 'targetClass' => Faq::className(), 'targetAttribute' => ['faq_id' => 'id']],
[['lang_id'], 'exist', 'skipOnError' => true, 'targetClass' => Languages::className(), 'targetAttribute' => ['lang_id' => 'id']],
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'faq_id' => 'Страница',
'lang_id' => 'Язык',
'title' => 'Заголовок',
'text' => 'Контент',
'created_at' => 'Дата добавления',
'updated_at' => 'Дата обновления',
];
}
/**
* @return \yii\db\ActiveQuery
*/
public function getFaq()
{
return $this->hasOne(Faq::className(), ['id' => 'faq_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getLang()
{
return $this->hasOne(Languages::className(), ['id' => 'lang_id']);
}
public function cutText($chars)
{
$text = strip_tags($this->text, '<a>');
if(strlen($text) > $chars)
{
$text = $text . " ";
$text = substr($text, 0, $chars);
$text = substr($text, 0, strrpos($text, ' '));
$text = $text . '...';
return '<p>'.$text.'</p><p><a href="'.$this->faq->getFullUrl().'">Читать...</a></p>';
}
return $this->text;
}
}
<?php
namespace common\modules\faq\models;
use Yii;
use common\models\Settings;
class FaqMailForm extends \common\components\ActiveRecordModel
{
public static function tableName()
{
return 'faq_mail_form';
}
public function name()
{
return 'Вопросы';
}
public function rules()
{
return [
[['fio', 'email', 'message', 'content_id'], 'required'],
[['content_id'], 'number'],
[['email'], 'email'],
[['phone', 'message'], 'safe'],
];
}
public function getFaq()
{
return $this->hasOne(Faq::className(), ['id' => 'content_id']);
}
public function attributeLabels()
{
return [
'fio' => 'Ваше имя',
'email' => 'E-mail',
'message' => 'Сообщение',
];
}
public function send()
{
Yii::$app->mailer->compose(
['html' => '@common/modules/faq/mail/sendUserQuest-html', 'text' => '@common/modules/faq/mail/sendUserQuest-text'],
['model' => $this,])
->setFrom([Settings::getValue('faq-from-email') => 'Вопрос. Справка Генератора КП.'])
->setTo(Settings::getValue('faq-email'))
->setSubject('Вопрос. Справка Генератора КП')
->send();
}
public static function getUrlByContentId($id)
{
return Faq::find()->where(["=", "id", 2])->one();
}
}
<?php
namespace common\modules\faq\models;
use Yii;
/**
* This is the model class for table "co_category".
*
* @property integer $id
* @property string $name
* @property string $url
*
* @property CoContent[] $coContents
*/
class FaqRubric extends \common\components\ActiveRecordModel
{
/**
* @inheritdoc
*/
public static function tableName()
{
return 'faq_rubric';
}
public function name() {
return 'Рубрика страницы';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['name', 'url', 'section'], 'required'],
[['sort'], 'integer'],
[['name', 'url'], 'string', 'max' => 255],
[['img'], 'safe'],
[['file'], 'file', 'skipOnEmpty' => true, 'extensions' => 'png, jpg, jpeg, gif'],
// [['url'], 'url'],
];
}
public function behaviors()
{
return [
'file' => [
'class' => 'common\components\activeRecordBehaviors\FileUploadBehavior',
'thumb' => true,
'thumbSize' => ['280', '141'],
'path' => '@frontend/web',
'folder' => '/uploads/faq/',
'field' => 'img'
],
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'id' => Yii::t('content', 'ID'),
'name' => Yii::t('content', 'Name'),
'url' => Yii::t('content', 'UrlCat'),
'file' => Yii::t('faq', 'Image'),
'sort' => Yii::t('faq', 'Sort'),
'section' => "Раздел",
];
}
/**
* @return \yii\db\ActiveQuery
*/
public function getFaqs()
{
// return Faq::find()->where(['rubric_id' => $this->id]);
// print_r($this->hasMany(Faq::className(), ['rubric_id' => 'id'])->where('active = 1'));die;
return $this->hasMany(Faq::className(), ['rubric_id' => 'id'])->where('active = 1');
}
}
<?php
namespace common\modules\blog\models;
use Yii;
use yii\helpers\Url;
use common\modules\blog\models\Post;
use common\modules\blog\models\PostTagAssign;
/**
* This is the model class for table "posts_tags".
*
* @property integer $id
* @property string $name
* @property integer $created_at
* @property integer $updated_at
*
* @property PostsTagsAssign[] $postsTagsAssigns
* @property Posts[] $posts
*/
class PostTag extends \common\components\ActiveRecordModel
{
/**
* @inheritdoc
*/
public static function tableName()
{
return 'posts_tags';
}
public function name()
{
return 'Теги';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['name'], 'required'],
[['created_at', 'updated_at'], 'integer'],
[['name'], 'string', 'max' => 255],
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'name' => 'Имя тега',
'created_at' => 'Дата добавления',
'updated_at' => 'Дата обновления',
];
}
/**
* @return \yii\db\ActiveQuery
*/
public function getPosts()
{
return $this->hasMany(Post::className(), ['id' => 'post_id'])
->viaTable('posts_tags_assign', ['tag_id' => 'id'])
->where(['active' => 1])
->orderBy(Post::tableName().'.created_at DESC')
->limit(Post::PAGE_SIZE);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getAllPosts()
{
return $this->hasMany(Post::className(), ['id' => 'post_id'])
->viaTable('posts_tags_assign', ['tag_id' => 'id'])
->where(['active' => 1])
->orderBy(Post::tableName().'.created_at DESC');
}
/**
* @return \yii\db\ActiveQuery
*/
public function getAssigns()
{
return $this->hasMany(PostTagAssign::className(), ['tag_id' => 'id']);
}
public function beforeDelete()
{
if (parent::beforeDelete())
{
if($this->assigns)
{
foreach ($this->assigns as $assign)
{
$assign->delete();
}
}
return true;
}
else
{
return false;
}
}
public function getUrl()
{
return Url::to(['/blog/tag/' . $this->name]);
}
}
<?php
namespace common\modules\blog\models;
use Yii;
use common\modules\blog\models\Post;
use common\modules\blog\models\PostTag;
/**
* This is the model class for table "posts_tags_assign".
*
* @property integer $id
* @property integer $tag_id
* @property integer $post_id
* @property integer $created_at
* @property integer $updated_at
*
* @property Posts $post
* @property PostsTags $tag
*/
class PostTagAssign extends \common\components\ActiveRecordModel
{
/**
* @inheritdoc
*/
public static function tableName()
{
return 'posts_tags_assign';
}
public function name()
{
return 'Связь тегов и постов';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['tag_id', 'post_id'], 'required'],
[['tag_id', 'post_id', 'created_at', 'updated_at'], 'integer'],
[['tag_id', 'post_id'], 'unique', 'targetAttribute' => ['tag_id', 'post_id'], 'message' => 'The combination of Tag ID and Post ID has already been taken.'],
[['post_id'], 'exist', 'skipOnError' => true, 'targetClass' => Post::className(), 'targetAttribute' => ['post_id' => 'id']],
[['tag_id'], 'exist', 'skipOnError' => true, 'targetClass' => PostTag::className(), 'targetAttribute' => ['tag_id' => 'id']],
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'tag_id' => 'Тег',
'post_id' => 'Запись',
'created_at' => 'Дата добавления',
'updated_at' => 'Дата обновления',
];
}
/**
* @return \yii\db\ActiveQuery
*/
public function getPost()
{
return $this->hasOne(Post::className(), ['id' => 'post_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getTag()
{
return $this->hasOne(PostTags::className(), ['id' => 'tag_id']);
}
}
......@@ -8,9 +8,9 @@ use yii\data\ActiveDataProvider;
use common\modules\faq\models\Faq;
/**
* SearchFaq represents the model behind the search form about `common\modules\faq\models\Faq`.
* SearchPost represents the model behind the search form about `common\modules\blog\models\Post`.
*/
class SearchFaq extends Faq
class SearchFaqContent extends Faq
{
/**
* @inheritdoc
......@@ -18,8 +18,8 @@ class SearchFaq extends Faq
public function rules()
{
return [
[['id', 'cat_id', 'is_published', 'notification_send', 'order', 'view_count', 'created_at', 'updated_at'], 'integer'],
[['lang', 'name', 'phone', 'email', 'question', 'answer', 'welcome', 'notification_date', 'show_in_module', 'url'], 'safe'],
[['id', 'rubric_id','active', 'created_at', 'updated_at'], 'integer'],
[['url'], 'safe'],
];
}
......@@ -39,57 +39,34 @@ class SearchFaq extends Faq
*
* @return ActiveDataProvider
*/
public function search($params, $order = null, $limit = null)
public function search($params)
{
$query = Faq::find();
// add conditions that should always apply here
$dataProvider = new ActiveDataProvider([
'query' => $query,
'pagination' => ['pageSize' => 5],
'sort'=>array(
'defaultOrder'=>'created_at DESC',
),
]);
$this->load($params);
if (!$this->validate()) {
// uncomment the following line if you do not want to any records when validation fails
// uncomment the following line if you do not want to return any records when validation fails
// $query->where('0=1');
return $dataProvider;
}
// grid filtering conditions
$query->andFilterWhere([
'id' => $this->id,
'cat_id' => $this->cat_id,
'is_published' => $this->is_published,
'notification_date' => $this->notification_date,
'notification_send' => $this->notification_send,
'order' => $this->order,
'view_count' => $this->view_count,
'active' => $this->active,
'rubric_id' => $this->rubric_id,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
]);
$query->andFilterWhere(['like', 'lang', $this->lang])
->andFilterWhere(['like', 'name', $this->name])
->andFilterWhere(['like', 'phone', $this->phone])
->andFilterWhere(['like', 'email', $this->email])
->andFilterWhere(['like', 'question', $this->question])
->andFilterWhere(['like', 'answer', $this->answer])
->andFilterWhere(['like', 'welcome', $this->welcome])
->andFilterWhere(['like', 'show_in_module', $this->show_in_module])
->andFilterWhere(['like', 'url', $this->url]);
if(!empty($_GET['search']))
$query->andFilterWhere(['like', 'answer', $_GET['search']])
->orFilterWhere(['like', 'question', $_GET['search']]);
if(!empty($order))
$query->orderBy($order);
if(!empty($limit))
$query->limit($limit);
$query->andFilterWhere(['like', 'url', $this->url]);
return $dataProvider;
}
......
<?php
namespace common\modules\faq\models;
use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use common\modules\faq\models\FaqRubric;
/**
* SearchCoCategory represents the model behind the search form about `common\modules\content\models\CoCategory`.
*/
class SearchFaqRubric extends FaqRubric
{
/**
* @inheritdoc
*/
public function rules()
{
return [
[['id'], 'integer'],
[['name', 'url', 'section',], 'safe'],
];
}
/**
* @inheritdoc
*/
public function scenarios()
{
// bypass scenarios() implementation in the parent class
return Model::scenarios();
}
/**
* Creates data provider instance with search query applied
*
* @param array $params
*
* @return ActiveDataProvider
*/
public function search($params)
{
$query = FaqRubric::find();
$dataProvider = new ActiveDataProvider([
'query' => $query,
]);
$this->load($params);
if (!$this->validate()) {
// uncomment the following line if you do not want to any records when validation fails
// $query->where('0=1');
return $dataProvider;
}
$query->andFilterWhere([
'id' => $this->id,
]);
$query->andFilterWhere(['like', 'name', $this->name])
->andFilterWhere(['like', 'url', $this->url])
->andFilterWhere(['=', 'section', $this->section]);
return $dataProvider;
}
}
<?php
namespace common\modules\faq\models;
namespace common\modules\blog\models;
use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use common\modules\faq\models\FaqCategory;
use common\modules\blog\models\PostTag;
/**
* SearchFaqCategory represents the model behind the search form about `common\modules\faq\models\FaqCategory`.
* SearchPostTag represents the model behind the search form about `common\modules\blog\models\PostTag`.
*/
class SearchFaqCategory extends FaqCategory
class SearchPostTag extends PostTag
{
/**
* @inheritdoc
......@@ -41,7 +41,9 @@ class SearchFaqCategory extends FaqCategory
*/
public function search($params)
{
$query = FaqCategory::find();
$query = PostTag::find();
// add conditions that should always apply here
$dataProvider = new ActiveDataProvider([
'query' => $query,
......@@ -50,11 +52,12 @@ class SearchFaqCategory extends FaqCategory
$this->load($params);
if (!$this->validate()) {
// uncomment the following line if you do not want to any records when validation fails
// uncomment the following line if you do not want to return any records when validation fails
// $query->where('0=1');
return $dataProvider;
}
// grid filtering conditions
$query->andFilterWhere([
'id' => $this->id,
'created_at' => $this->created_at,
......
<?php
namespace common\modules\blog\models;
use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use common\modules\sessions\models\Session;
use common\modules\sessions\models\SessionUrl;
/**
* SearchSession represents the model behind the search form about `common\modules\sessions\models\Session`.
*/
class SearchSession extends Session
{
public $blogUrl;
/**
* @inheritdoc
*/
public function rules()
{
return [
[['id', 'user_id', 'created_at'], 'integer'],
[['PHPSESSID', 'ip'], 'safe'],
];
}
/**
* @inheritdoc
*/
public function scenarios()
{
// bypass scenarios() implementation in the parent class
return Model::scenarios();
}
/**
* Creates data provider instance with search query applied
*
* @param array $params
*
* @return ActiveDataProvider
*/
public function search($params)
{
$query = Session::find();
// add conditions that should always apply here
$dataProvider = new ActiveDataProvider([
'query' => $query,
'sort' => [
'defaultOrder' => [
'created_at' => SORT_DESC
]
]
]);
$this->load($params);
if (!$this->validate()) {
// uncomment the following line if you do not want to return any records when validation fails
// $query->where('0=1');
return $dataProvider;
}
$query->select(['*', 'urls.time']);
$queryUrl = SessionUrl::find()
->select('session_id, url, SUM('.SessionUrl::tableName().'.updated_at - '.SessionUrl::tableName().'.created_at) as time')
->andWhere(['url' => $this->blogUrl])
->groupBy('session_id');
$query->leftJoin(['urls' => $queryUrl], 'urls.session_id = id');
// grid filtering conditions
$query->andFilterWhere([
'id' => $this->id,
'user_id' => $this->user_id,
'created_at' => $this->created_at
]);
$query->andFilterWhere(['like', 'PHPSESSID', $this->PHPSESSID])
->andFilterWhere(['like', 'ip', $this->ip]);
return $dataProvider;
}
}
......@@ -3,27 +3,41 @@
namespace common\modules\faq\models;
use Yii;
use yii\helpers\Url;
use common\modules\languages\models\Languages;
use common\modules\faq\models\FaqContentLang;
//use common\modules\faq\models\PostTag;
use common\modules\users\models\User;
use common\models\MetaTags;
use common\modules\sessions\models\SessionUrl;
/**
* This is the model class for table "faq_category".
* This is the model class for table "posts".
*
* @property integer $id
* @property string $name
* @property string $url
* @property integer $active
* @property integer $created_at
* @property integer $updated_at
*
* @property PostsLang[] $postsLangs
* @property PostsTagsAssign[] $postsTagsAssigns
* @property PostsTags[] $tags
*/
class FaqCategory extends \common\components\ActiveRecordModel
class Vote extends \common\components\ActiveRecordModel
{
/**
* @inheritdoc
*/
public static function tableName()
{
return 'faq_category';
return 'faq_vote';
}
public function name() {
return 'Вопрос-Ответ категории';
public function name()
{
return 'Голосование';
}
/**
......@@ -32,9 +46,8 @@ class FaqCategory extends \common\components\ActiveRecordModel
public function rules()
{
return [
[['name'], 'required'],
[['created_at', 'updated_at'], 'integer'],
[['name'], 'string', 'max' => 255]
[['yes', 'content_id'], 'required'],
[['created_at', 'updated_at', 'content_id'], 'integer'],
];
}
......@@ -44,10 +57,11 @@ class FaqCategory extends \common\components\ActiveRecordModel
public function attributeLabels()
{
return [
'id' => Yii::t('faq', 'ID'),
'name' => Yii::t('faq', 'Категория'),
'created_at' => Yii::t('faq', 'Created At'),
'updated_at' => Yii::t('faq', 'Updated At'),
'id' => 'ID',
'created_at' => 'Дата добавления',
'updated_at' => 'Дата обновления',
];
}
}
}
\ No newline at end of file
<?php
use yii\helpers\Html;
use yii\helpers\Url;
use yii\helpers\ArrayHelper;
use yii\widgets\ActiveForm;
use \xj\tagit\Tagit;
use common\modules\faq\models\Faq;
use common\modules\faq\models\FaqRubric;
use common\modules\content\widgets\MetaTagsWidget;
use common\modules\faq\assets\AdminGeneratorAsset;
AdminGeneratorAsset::register($this);
/* @var $this yii\web\View */
/* @var $model common\modules\faq\models\Faq */
/* @var $model common\modules\blog\models\Post */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="faq-form">
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'lang')->textInput(['maxlength' => 2]) ?>
<?= $form->field($model, 'first_name')->textInput(['maxlength' => 255]) ?>
<div class="post-form">
<?= $form->field($model, 'last_name')->textInput(['maxlength' => 255]) ?>
<?php $form = ActiveForm::begin([
'options' => [
'enctype' => 'multipart/form-data',
]
]); ?>
<?= $form->field($model, 'patronymic')->textInput(['maxlength' => 255]) ?>
<?= $form->field($model, 'url')->textInput(['maxlength' => 250])->hint('Для создания ЧПУ («Человеку Понятный Урл») укажите латинскими буквами путь, например, razdel/podrazdel/nazvanie_stranici.html') ?>
<?= $form->field($model, 'phone')->textInput(['maxlength' => 50]) ?>
<?= $form->field($model, 'active', [
'template' => '{input}<a href="#" class="btn btn-xs btn-success m-l-5 disabled">Страница скрыта от пользователя / Страница видна пользователю</a>'
])->checkbox([
'data-theme' => 'self',
'data-render' => 'switchery',
'data-classname' => 'switchery',
'label' => ' '
], false); ?>
<?= $form->field($model, 'email')->textInput(['maxlength' => 80]) ?>
<? $rubric = $model->rubric ? $model->rubric : new FaqRubric() ?>
<?= $form->field($rubric, 'section')->dropDownList($model::$section_title, ['prompt' => 'Выберите раздел', 'ajax-action' => '/crm/faq/rubric-admin/rubrics-by-section']);?>
<?= $form->field($model, 'cat_id')->textInput() ?>
<?= $form->field($model, 'rubric_id')->dropDownList(
ArrayHelper::map(FaqRubric::find()->all(), 'id', 'name'),
['prompt' => 'Выберите рубрику']);?>
<?= $form->field($model, 'question')->textarea(['rows' => 6]) ?>
<ul class="nav nav-pills">
<?php $c = 0; foreach ($model->getLangsHelper() as $i => $content) : $c++; ?>
<li class="<?=($c==1?'active':'')?>"><a href="#lang-<?=$content->lang->url?>" data-toggle="tab"><?=$content->lang->name?></a></li>
<?php endforeach; ?>
</ul>
<?= $form->field($model, 'answer')->textarea(['rows' => 6]) ?>
<div class="tab-content">
<?php $c = 0; foreach ($model->getLangsHelper() as $content) : $c++;
$lang_id = $content->lang->id; ?>
<div class="tab-pane fade <?=($c==1?'active in':'')?>" id="lang-<?=$content->lang->url;?>">
<?= $form->field($model, 'is_published')->textInput() ?>
<?= $form->field($content, '['.$lang_id.']title')->textInput(['maxlength' => 250])->hint('Заголовок страницы виден пользователю сайта и как правило оформляется в тег &lt;h1&gt;. Если дизайном страницы не предусмотрен вывод заголовка, то он не будет выводиться даже если был введен в данное поле.') ?>
<?= $form->field($model, 'welcome')->textInput(['maxlength' => 255]) ?>
<?= $form->field($content, '['.$lang_id.']text')->textArea() ?>
<?= $form->field($model, 'notification_date')->textInput() ?>
<?= MetaTagsWidget::widget([
'model' => $model->meta[$lang_id],
'form' => $form,
])?>
<?= $form->field($model, 'notification_send')->textInput() ?>
</div>
<?php endforeach; ?>
</div>
<?= $form->field($model, 'order')->textInput() ?>
<?= $form->field($model, 'show_in_module')->textInput(['maxlength' => 255]) ?>
<?= $form->field($model, 'view_count')->textInput() ?>
<?= $form->field($model, 'url')->textInput(['maxlength' => 255]) ?>
<?= $form->field($model, 'created_at')->textInput() ?>
<?= $form->field($model, 'updated_at')->textInput() ?>
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? Yii::t('content', 'Create') : Yii::t('content', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
<div class="form-group">
<?= Html::submitButton('Сохранить', ['class' => 'btn btn-success']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
<script type="text/javascript">
$('.field-post-tags ul').addClass('primary');
</script>
\ No newline at end of file
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model common\modules\faq\models\SearchFaq */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="faq-search">
<?php $form = ActiveForm::begin([
'action' => ['index'],
'method' => 'get',
]); ?>
<?= $form->field($model, 'id') ?>
<?= $form->field($model, 'lang') ?>
<?= $form->field($model, 'first_name') ?>
<?= $form->field($model, 'last_name') ?>
<?= $form->field($model, 'patronymic') ?>
<?php // echo $form->field($model, 'phone') ?>
<?php // echo $form->field($model, 'email') ?>
<?php // echo $form->field($model, 'cat_id') ?>
<?php // echo $form->field($model, 'question') ?>
<?php // echo $form->field($model, 'answer') ?>
<?php // echo $form->field($model, 'is_published') ?>
<?php // echo $form->field($model, 'welcome') ?>
<?php // echo $form->field($model, 'notification_date') ?>
<?php // echo $form->field($model, 'notification_send') ?>
<?php // echo $form->field($model, 'order') ?>
<?php // echo $form->field($model, 'show_in_module') ?>
<?php // echo $form->field($model, 'view_count') ?>
<?php // echo $form->field($model, 'url') ?>
<?php // echo $form->field($model, 'created_at') ?>
<?php // echo $form->field($model, 'updated_at') ?>
<div class="form-group">
<?= Html::submitButton(Yii::t('content', 'Search'), ['class' => 'btn btn-primary']) ?>
<?= Html::resetButton(Yii::t('content', 'Reset'), ['class' => 'btn btn-default']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
<?php
echo '
Для оформления текст в виде цитаты пользователя, текст должен быть размещен в следующем теге:
<b>&ltblockquote class=&quot;quote&quot;&gt;&ltp&gt;</b>Пример цитаты пользователя<b>&lt/p&gt;&lt/blockquote&gt;</b>
Для оформления текст в виде цитаты закона, текст должен быть размещен в следующем теге:
<b>&ltblockquote class=&quot;quote quote-law&quot;&gt;&ltp&gt;</b>Это решение принято на основании Федерального закона Российской Федерации от 21 декабря 2013 г. N 353-ФЗ<b>&lt/p&gt;&lt/blockquote&gt;
';
echo '<hr>';
echo $form;
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model common\modules\blog\models\Post */
$this->title = 'Create Post';
$this->params['breadcrumbs'][] = ['label' => 'Posts', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="post-create">
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>
<?php
use yii\helpers\Html;
use \common\components\zii\AdminGrid;
/* @var $this yii\web\View */
/* @var $searchModel common\modules\faq\models\SearchFaq */
/* @var $dataProvider yii\data\ActiveDataProvider */
?>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p>
<?= Html::a(Yii::t('faq', 'Create Faq'), ['create'], ['class' => 'btn btn-success']) ?>
</p>
<?php echo AdminGrid::widget([
'dataProvider' => $dataProvider,
// 'filterModel' => $searchModel,
'columns' => [
// ['class' => 'yii\grid\SerialColumn'],
//'id',
//'lang',
'name',
// 'last_name',
// 'patronymic',
// 'phone',
'email:email',
// 'cat_id',
[
'attribute' => 'question',
'format' => 'raw',
'value' => function($model) {return $model->shortQuestion;},
//'contentOptions' => ['width' => '40%']
],
[
'attribute' => 'answer',
'contentOptions' => ['width' => '40%'],
'format' => 'raw',
'value' => function($model) {return $model->shortAnswer;},
],
[
'attribute' => 'is_published',
'format' => 'raw',
'value' => function($model) {return $model->is_published ? 'Опубликовано' : 'Неопубликовано';},
],
// 'welcome',
// 'notification_date',
// 'notification_send',
// 'order',
// 'show_in_module',
// 'view_count',
// 'url:url',
// 'created_at',
// 'updated_at',
[
'class' => 'common\components\ColorActionColumn',
'template' => '{update} {delete}',
'contentOptions' => ['style' => 'width:60px;', 'align' => 'center'],
],
],
]); ?>
<?php
use yii\helpers\Html;
use yii\helpers\Url;
use yii\helpers\ArrayHelper;
use yii\grid\GridView;
use common\modules\faq\models\Faq;
use common\modules\faq\models\FaqRubric;
/* @var $this yii\web\View */
/* @var $searchModel common\modules\blog\models\SearchPost */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Faq';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="post-index">
<p>
<?= Html::a('Добавить', ['create'], ['class' => 'btn btn-success']) ?>
</p>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
// ['class' => 'yii\grid\SerialColumn'],
[
'attribute' => 'created_at',
'format' => ['date', 'php:d.m.Y H:i:s']
],
[
'attribute' => 'url',
'format' => 'raw',
'value' => function($model)
{
return Html::a($model->url, \Yii::$app->params['frontUrl'] . '/faq/' . $model->url, ['target' => '_blank', 'title' => 'Просмотреть как страницу видит пользователь', 'data-toggle'=>"tooltip"]);
}
],
[
'attribute' => 'active',
'filter' => Faq::$active_title,
'value' => function($model)
{
return Faq::$active_title[$model->active];
}
],
[
'attribute' => 'rubric_id',
'filter' => Html::activeDropDownList($searchModel, 'rubric_id', ArrayHelper::map(FaqRubric::find()->asArray()->all(), 'id', 'name'),['class'=>'form-control','prompt' => 'Выберите рубрику']),
'content' => function($model)
{
return $model->rubric;
}
],
[
'class' => 'common\components\ColorActionColumn',
'template' => '{statistics} {update} {delete}',
'buttons' => [
'statistics' => function ($url, $model, $key) {
return '<a href="'.Url::toRoute(['/blog/statistics-admin/manage', 'id' => $model->id]).'">'.Html::beginTag('i', [
'title' => "Статистика",
'data-toggle' => 'tooltip',
'class' => 'fa fa-area-chart fa-lg'
]) . Html::endTag('i') . '</a>';
},
],
],
],
]); ?>
</div>
<?php
echo '
Для оформления текст в виде цитаты пользователя, текст должен быть размещен в следующем теге:
<b>&ltblockquote class=&quot;quote&quot;&gt;&ltp&gt;</b>Пример цитаты пользователя<b>&lt/p&gt;&lt/blockquote&gt;</b>
Для оформления текст в виде цитаты закона, текст должен быть размещен в следующем теге:
<b>&ltblockquote class=&quot;quote quote-law&quot;&gt;&ltp&gt;</b>Это решение принято на основании Федерального закона Российской Федерации от 21 декабря 2013 г. N 353-ФЗ<b>&lt/p&gt;&lt/blockquote&gt;
';
echo '<hr>';
echo $form;
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model common\modules\blog\models\Post */
$this->title = 'Update Post: ' . ' ' . $model->id;
$this->params['breadcrumbs'][] = ['label' => 'Posts', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->id, 'url' => ['view', 'id' => $model->id]];
$this->params['breadcrumbs'][] = 'Update';
?>
<div class="post-update">
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>
......@@ -4,22 +4,22 @@ use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model common\modules\faq\models\Faq */
/* @var $model common\modules\blog\models\Post */
$this->title = $model->id;
$this->params['breadcrumbs'][] = ['label' => Yii::t('content', 'Faqs'), 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => 'Posts', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="faq-view">
<div class="post-view">
<h1><?= Html::encode($this->title) ?></h1>
<p>
<?= Html::a(Yii::t('content', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
<?= Html::a(Yii::t('content', 'Delete'), ['delete', 'id' => $model->id], [
<?= Html::a('Update', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
<?= Html::a('Delete', ['delete', 'id' => $model->id], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => Yii::t('content', 'Are you sure you want to delete this item?'),
'confirm' => 'Are you sure you want to delete this item?',
'method' => 'post',
],
]) ?>
......@@ -29,21 +29,8 @@ $this->params['breadcrumbs'][] = $this->title;
'model' => $model,
'attributes' => [
'id',
'lang',
'name',
'phone',
'email:email',
'cat_id',
'question:ntext',
'answer:ntext',
'is_published',
'welcome',
'notification_date',
'notification_send',
'order',
'show_in_module',
'view_count',
'url:url',
'active',
'created_at',
'updated_at',
],
......
<h1><?php echo $model->shortQuestion?></h1>
<div style="text-align: justify;"><?php echo $model->shortAnswer?></div>
<small><?php echo \yii\helpers\Html::a('Читать подробнее', \yii\helpers\Url::toRoute(['view', 'url' => $model->url]))?></small>
<?php
use yii\helpers\Html;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $model common\modules\blog\models\Post */
?>
<?php foreach ($models as $model) : ?>
<article class="article_short">
<a href="<?=Url::to(['/blog/'.$model->url])?>" class="article_short_title"><?=$model->lang->title?></a>
<div class="article_short_head">
<span class="article_short_date"><?=date('d.m.Y', $model->created_at)?></span>
<span class="article_short_view">
<?=$model->getViews()->count()?>
<div class="blog_toltip_left">Количество просмотров</div>
</span>
</div>
<div class="article_short_tags">
<?php foreach ($model->postTags as $tag) : ?>
<a href="<?=$tag->url;?>">#<?=$tag->name?></a>
<?php endforeach; ?>
</div>
<div class="article_short_txt">
<div class="preview-image">
<?php if($model->preview) :
echo Html::img($model->preview);
endif; ?>
</div>
<?=$model->lang->cutText(650)?>
</div>
</article>
<?php endforeach; ?>
\ No newline at end of file
Имя Фамилия: <?=$model->name?><br>
Email: <?=$model->email?><br>
<hr>
<?=$model->message?>
\ No newline at end of file
<?php
use yii\widgets\ActiveForm;
use yii\helpers\Html;
use common\modules\bids\models\Bid;
?>
<div class="hidden">
<div id="article" class="popup popup_2 blog_form">
<span class="popup__title">Предложить статью для блога</span>
<?php
$model = \Yii::$app->controller->getModel();
$model->form = 'article';
$form = ActiveForm::begin([
'action' => '/blog/post/send-article',
'enableClientValidation' => false,
'options' => [
'class' => 'valid_form bids-form blog-form',
'data-title' => 'Предложить статью для блога',
'data-form' => 'Предложить статью для блога',
'data-tag' => Bid::TAG_TREATMENT
],
]); ?>
<div class="message-box send_secce">Заявка на статью отправлена. Мы обязательно ее рассмотрим.</div>
<div class="content">
<?php echo $form->field($model, 'form', ['template' => '{input}'])->hiddenInput(['class' => 'not_clear']); ?>
<div class="blog_form_left form_resp">
<div>
<?php echo $form->field($model, 'name')->textInput([
'placeholder' => 'Имя Фамилия',
'class' => 'input_st'
])->label(false); ?>
<?php echo $form->field($model, 'email')->textInput([
'placeholder' => 'E-mail',
'class' => 'input_st'
])->label(false); ?>
</div>
</div>
<div class="blog_form_right form_resp">
<p><strong>Вы можете предложить статью для публикации или написать нам о том, что бы было интересно почитать.</strong></p>
<p><strong>Мы с радостью поделимся своим опытом и напишем интересную статью.</strong></p>
</div>
<div class="blog_lmg">
<img src="/images/blog_form_img.png" height="123" width="118" alt="">
</div>
<div class="clear"></div>
<br>
<?php echo $form->field($model, 'message')->textArea([
'placeholder' => 'Напишите краткие тезисы статьи или опишите интересующий вопрос.',
'class' => 'sect_cont_form__textarea'
])->label(false); ?>
<div class="clear"></div>
<?php echo Html::submitButton('Предложить статью', ['class' => 'save-button btn-default button-lg']); ?>
</div>
<?php ActiveForm::end(); ?>
</div>
<div id="feedback" class="popup popup_2 blog_form_2">
<!-- <div class="txtbtnclose">Закрыть</div> -->
<span class="popup__title">Предложить тему</span>
<p><strong>Мы готовы бесплатно поделиться накопленным опытом, если вы сообщите тему которая вас интересует</strong></p>
<br>
<?php
$model = \Yii::$app->controller->getModel();
$model->form = 'theme';
$form = ActiveForm::begin([
'action' => '/blog/post/send-article',
'enableClientValidation' => false,
'options' => [
'class' => 'valid_form bids-form blog-form',
'data-title' => 'Предложить тему для блога',
'data-form' => 'Предложить тему для блога',
'data-tag' => Bid::TAG_TREATMENT
],
]); ?>
<div class="message-box send_secce">Заявка на статью по предложенной теме отправлена. Мы обязательно ее рассмотрим.</div>
<div class="content">
<?php echo $form->field($model, 'form', ['template' => '{input}'])->hiddenInput(['class' => 'not_clear']); ?>
<div class="blog_form_left50 form_resp">
<div>
<?php echo $form->field($model, 'name')->textInput([
'placeholder' => 'Имя Фамилия',
'class' => 'input_st'
])->label(false); ?>
</div>
</div>
<div class="blog_form_right50 form_resp">
<?php echo $form->field($model, 'email')->textInput([
'placeholder' => 'E-mail',
'class' => 'input_st'
])->label(false); ?>
</div>
<div class="clear"></div>
<?php echo $form->field($model, 'message')->textArea([
'placeholder' => 'Что хочу почитать?
Например: Хочу почитать про то, как настраивается контекстная реклама.
Про то как выставляются ставки.',
'class' => 'sect_cont_form__textarea'
])->label(false); ?>
<div class="clear"></div>
<?php echo Html::submitButton('Предложить тему', ['class' => 'save-button btn-default button-lg']); ?>
</div>
<?php ActiveForm::end(); ?>
</div>
</div>
<style>
.blog-form input,
.blog-form textarea {
margin-bottom: 10px !important;
}
</style>
\ No newline at end of file
<?php
use yii\helpers\Url;
use common\modules\blog\models\Post;
use common\modules\blog\models\PostTag;
use common\models\Settings;
?>
<div class="col-md-4 col-xs-4 col-sm-12">
<aside class="sidebar">
<div class="sidebar_module">
<h2>Категории</h2>
<div class="sidebar_module_body">
<?php $tags = PostTag::find()
->innerJoinWith('posts')
->groupBy(['posts_tags_assign.tag_id'])
->where(['posts.active' => 1])
->orderBy('RAND()')
->limit(7)
->all();
foreach ($tags as $tag) : ?>
<a href="<?=$tag->url;?>" class="cat_link_mod"><?=$tag->name?></a>
<?php endforeach; ?>
</div>
</div>
<div class="sidebar_module">
<div class="sidebar_module_body">
<a href="#feedback" class="sidebar_btn popup-form">
Предложить тему
<div class="blog_toltip_right">Предложите свою тему и мы напишем</div>
</a>
<a href="#article" class="sidebar_btn popup-form">Послать статью</a>
</div>
</div>
<?php $posts = Post::find();
if($model)
{
$posts = $posts->where(['!=', 'id', $model->id]);
}
$posts = $posts->andWhere(['active' => 1])->orderBy('RAND()')->limit(3)->all();
if($posts) : ?>
<div class="sidebar_module">
<h2>Популярные</h2>
<div class="sidebar_module_body">
<?php foreach ($posts as $post) : ?>
<div class="article_itm">
<?php if($post->preview) : ?>
<img src="<?=$post->getThumbnailUrl()?>" alt="">
<?php endif; ?>
<a href="<?=Url::to(['/blog/'.$post->url])?>" class="article_itm_link"><?=$post->lang->title?></a>
</div>
<?php endforeach; ?>
</div>
</div>
<?php endif; ?>
<div class="sidebar_module">
<h2>Все секреты в наших соц сетях!</h2>
<div class="sidebar_module_body">
<ul class="sidebar_social">
<?php $s = Settings::getValue('social-link-fb'); if($s): ?><li><a href="<?=$s?>" class="sidebar_social_fb"></a></li><? endif; ?>
<!-- <li><a href="#" class="sidebar_social_ok"></a></li> -->
<?php $s = Settings::getValue('social-link-twitter'); if($s): ?><li><a href="<?=$s?>" class="sidebar_social_tw"></a></li><? endif; ?>
<?php $s = Settings::getValue('social-link-google'); if($s): ?><li><a href="<?=$s?>" class="sidebar_social_gp"></a></li><? endif; ?>
<?php $s = Settings::getValue('social-link-youtube'); if($s): ?><li><a href="<?=$s?>" class="sidebar_social_yt"></a></li><? endif; ?>
<?php $s = Settings::getValue('social-link-vk'); if($s): ?><li><a href="<?=$s?>" class="sidebar_social_vk"></a></li><? endif; ?>
<?php $s = Settings::getValue('social-link-instagram'); if($s): ?><li><a href="<?=$s?>" class="sidebar_social_inst"></a></li><? endif; ?>
</ul>
</div>
</div>
</aside>
</div>
\ No newline at end of file
<?php
use yii\widgets\ActiveForm;
use yii\helpers\Html;
use yii\helpers\Url;
?>
<h4><span class="rubric_icon"><img src="/images/rubric_icon_5.png" height="35" width="35" alt=""></span><span class="wiht_icon">Задать свой вопрос</span></h4>
<?php
$form = ActiveForm::begin([
'id' => 'contact-form',
'action' => Url::toRoute(['/faq/faq/send-faq', 'id' => $model->content_id]),
'options' => [
'class' => 'validateform_2'
]
]);
?>
<?= $form->field($model, 'fio')->textInput(['placeholder' => 'Ваше имя'])->label(false) ?>
<?= $form->field($model, 'email')->textInput(['placeholder' => 'E-mail'])->label(false) ?>
<?= $form->field($model, 'phone')->textInput(['placeholder' => 'Телефон', 'class' => 'form-control phone'])->label(false) ?>
<?= $form->field($model, 'message')->textArea(['placeholder' => 'Текст вопроса', 'style' => 'height: 175px;'])->label(false)?>
<?= Html::submitButton('Задать вопрос', ['class' => 'btn_blue']) ?>
<?
ActiveForm::end();
?>
\ No newline at end of file
<div id="_sidebar_form_response">
<span>Спасибо за Ваш вопрос</span>
</div>
\ No newline at end of file
<?php
use yii\helpers\Html;
use yii\helpers\Url;
$i = 0;
$n = (int)\common\models\Settings::getValue('faq-count-rand');
$pages = $model->rubric->faqs;
if (count($pages)-1) //кроме текущей страницы
{?>
<h4>Другое по этой теме</h4>
<ul class="reference_list">
<?php foreach($pages as $page){
if ($page->id != $model->id)
{
$i++;
if ($i > $n){ break;}
echo '<li>' . Html::a($page->lang->title, '/faq/' . $page->url) . '</li>';
}
?>
<?php }?>
</ul>
<?php
}
?>
<ul class="article_short_social">
<li>
<a href="#" onclick="window.open('http://vkontakte.ru/share.php?url=<?=$link?>&title=<?=$title?>', 'Soc', 'screenX=100,screenY=100,height=500,width=500,location=no,toolbar=no,directories=no,menubar=no,status=no'); return false;"><img src="/images/icon/sh_social_vk.png" height="30" width="30" alt=""></a>
<a href="#" onclick="window.open('http://www.facebook.com/share.php?u=<?=$title?>', 'Soc', 'screenX=100,screenY=100,height=500,width=500,location=no,toolbar=no,directories=no,menubar=no,status=no'); return false;"><img src="/images/icon/sh_social_fb.png" height="30" width="30" alt=""></a>
<a href="#" onclick="window.open('http://twitter.com/timeline/home?status=<?=$title?>%20<?=$link?>', 'Soc', 'screenX=100,screenY=100,height=500,width=500,location=no,toolbar=no,directories=no,menubar=no,status=no'); return false;"><img src="/images/icon/sh_social_tw.png" height="30" width="30" alt=""></a>
<a href="#" onclick="window.open('https://plus.google.com/share?url=<?=$link?>', 'Soc', 'screenX=100,screenY=100,height=500,width=500,location=no,toolbar=no,directories=no,menubar=no,status=no'); return false;"><img src="/images/icon/sh_social_gp.png" height="30" width="30" alt=""></a>
<!-- <a href="#"><img src="/images/icon/sh_social_t.png" height="30" width="30" alt=""></a> -->
</li>
</ul>
\ No newline at end of file
<?php
use yii\widgets\ActiveForm;
use yii\helpers\Html;
use common\modules\bids\models\Bid;
?>
<div class="subsc_blog">
<h2 class="subsc_blog_title">Понравилось? Подпишись на обновления!</h2>
<div class="subsc_blog_txt">Мы страемся публиковать в данном разделе только полезный и уникальный контент для рынка. По этому подпишись и ты будешь первым, кто получит уведомление о свежей публикации</div>
<?php
$model = new Bid;
$model->setScenario(Bid::SCENARIO_SUBSCRIBE);
$model->form = Bid::FORM_SUBSCRIBE;
$form = ActiveForm::begin([
'action' => '/bids/bid/add',
'enableClientValidation' => false,
'options' => [
'class' => 'subsc_blog_form bids-form',
'data-title' => $title,
'data-form' => 'Подпись на обновления в блоге',
'data-tag' => Bid::TAG_INVOLVEMENT
],
]); ?>
<div class="message-box send_secce">Теперь вы подписаны на обновления блога.</div>
<div class="content">
<?php echo Html::hiddenInput('scenario', $model->scenario, ['class' => 'not_clear']); ?>
<?php echo $form->field($model, 'form', ['template' => '{input}'])->hiddenInput(['class' => 'not_clear']); ?>
<?php echo $form->field($model, 'email', [
'template' => '<div class="row"><div class="col-sm-4">{input}</div></div>',
'errorOptions' => []
])->textInput([
'placeholder' => 'E-mail*'
]); ?>
<?php echo Html::submitButton('Подписаться', ['class' => 'save-button']); ?>
</div>
<?php ActiveForm::end(); ?>
</div>
\ No newline at end of file
<?
use yii\helpers\Url;
?>
<h3>Была ли информация на этой странице полезной?</h3>
<div class="form_wr">
<form action="<?= Url::toRoute(['/faq/faq/vote-faq', 'content_id' => $model->content_id]) ?>">
<div class="radio_wr">
<input type="radio" class="radio radio_like" id="radio-1" name="radio" checked>
<label for="radio-1"><span class="icon_like"></span>Да</label>
</div>
<div class="radio_wr">
<input type="radio" class="radio radio_not_like" id="radio-2" name="radio">
<label for="radio-2"><span class="icon_not_like"></span>Нет</label>
</div>
</form>
<h4 class="blue_text radio_like_result hidden">Спасибо за отзыв!</h4>
</div>
\ No newline at end of file
<?php
use \yii\widgets\ActiveForm;
use \yii\helpers\Html;
?>
<div class="col-sm-5 col-md-4">
<?php echo \common\modules\content\models\CoBlocks::printStaticBlock( 'faq-form' );?>
</div><!-- /col-sm-5 col-md-4 -->
\ No newline at end of file
<?php
/* @var $this yii\web\View */
?>
<div class="container-fluid">
<div class="main-content">
<div class="faq">
<div class="faq-questions-users">
<div class="faq-questions-search">
<form action="<?php echo \yii\helpers\Url::toRoute('all')?>" method="get">
<label>Поиск по вопросам</label>
<div class="faq-questions-search-field">
<!--input type="text" placeholder="Например: как получить деньги на карту" class="form-control" name="search"-->
<?php
$search = '';
if(!empty($_GET['search'])) $search = $_GET['search'];
echo \yii\helpers\Html::textInput("search",$search, [
'placeholder'=>"Например: как получить деньги на карту",
'class'=>"form-control",
])?>
<button class="btn-search">Найти</button>
</div><!-- /faq-questions-search-field -->
</form>
</div><!-- /faq-questions-search -->
<hr>
<div class="row">
<div class="col-sm-7 col-md-8">
<h3 class="faq-questions-heading">Вопросы от пользователей</h3><!-- /faq-questions-heading -->
<?php echo \yii\widgets\ListView::widget( [
'dataProvider' => $dataProvider,
'itemView' => '_index-view',
'itemOptions' => ['tag' => 'li'],
'options' => ['tag' => 'ul', 'class' => 'faq-questions-users-list'],
'layout' => '{items}<li><nav class="pages">{pager}</nav></li>',
'pager' => [
'class' => 'common\components\zii\FrontLinkPager',
'activePageCssClass' => 'is-active',
'prevPageLabel' => '<span class="glyphicon glyphicon-chevron-left"></span>Предыдущая',
'nextPageLabel' => 'Следующая<span class="glyphicon glyphicon-chevron-right"></span>',
'options' => [
'class' => 'pages-list',
],
],
] );
?>
</div><!-- /col-sm-7 col-md-8 -->
<?php echo $this->render('faq-form', ['model' => $model])?>
</div><!-- /row -->
</div><!-- /faq-questions-users -->
</div><!-- /faq -->
</div>
</div>
<?php
?>
<?php
use yii\helpers\Html;
use yii\helpers\Url;
use common\modules\blog\models\Post;
use common\modules\faq\models\Faq;
use common\modules\faq\assets\GeneratorAsset;
/* @var $this yii\web\View */
/* @var $model common\modules\blog\models\Post */
GeneratorAsset::register($this);
?>
<div class="container-fluid">
<div class="main-content">
<div class="faq">
<?php echo \common\modules\content\models\CoBlocks::printBlock('faq - 1')?>
<hr>
<?php echo \common\modules\content\models\CoBlocks::printBlock('faq - 2')?>
<div class="faq-questions-users">
<div class="faq-questions-search">
<form action="<?php echo \yii\helpers\Url::toRoute('all')?>" method="get">
<label>Поиск по вопросам</label>
<div class="faq-questions-search-field">
<input type="text" placeholder="Например: как получить деньги на карту" class="form-control" name="search">
<button class="btn-search">Найти</button>
</div><!-- /faq-questions-search-field -->
</form>
</div><!-- /faq-questions-search -->
<hr>
<div class="row" id="question-users">
<div class="col-sm-7 col-md-8">
<h3 class="faq-questions-heading">Вопросы от пользователей</h3><!-- /faq-questions-heading -->
<?php echo \yii\widgets\ListView::widget( [
'dataProvider' => $dataProvider,
'itemView' => '_index-view',
'itemOptions' => ['tag' => 'li'],
'options' => ['tag' => 'ul', 'class' => 'faq-questions-users-list'],
'layout' => '{items}<li><nav class="pages">{pager}</nav></li>',
'pager' => [
'class' => 'common\components\zii\FrontLinkPager',
'activePageCssClass' => 'is-active',
'prevPageLabel' => '<span class="glyphicon glyphicon-chevron-left"></span>Предыдущая',
'nextPageLabel' => 'Следующая<span class="glyphicon glyphicon-chevron-right"></span>',
'options' => [
'class' => 'pages-list',
],
],
] );
<div class="faq_sec">
<?= $this->renderFile('@common/modules/faq/views/faq/menu.php') ?>
<div class="container">
<div class="row">
<div class="col-sm-12">
<div class="way">
<a href="/">Главная</a> <span>|</span> Справка
<br>
<br>
</div>
</div>
</div>
</div>
<div class="container">
<div class="row">
<?php
$i = 0;
foreach($models as $r)
{
?>
<div class="faq_rubric col-md-6 col-xs-6 col-sm-12">
<h5>
<span class="rubric_icon">
<img src="<?= $r->img;?>" height="36" alt="">
</span>
<span class="wiht_icon"><?php echo $r->name?></span>
</h5>
<?php
$r_list = $r->faqs;
if ($r_list)
{
?>
<ul class="rubric_list">
<?php foreach($r_list as $rl_item)
{?>
<li>
<?php echo Html::a($rl_item->lang->title, '/faq/' . $rl_item->url)?>
</li>
<?}?>
</ul>
<?
}
?>
</div><!-- /col-sm-7 col-md-8 -->
<?php echo $this->render('faq-form', ['model' => $model])?>
</div><!-- /row -->
</div><!-- /faq-questions-users -->
</div>
<?
if ($i%2){
echo '<div class="clearfix"></div>';
}
$i++;
}?>
</div><!-- /faq -->
</div>
</div>
<?php
</div>
?>
</div>
</div>
<?php echo $this->render('@app/views/layouts/footer'); ?>
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: andre
* Date: 14.06.2016
* Time: 16:43
*/
use yii\helpers\Html;
use yii\helpers\Url;
use common\modules\faq\models\Faq;
?>
<div class="faq_sec">
<div class="top_line_inf">
<div class="container">
<div class="row">
<div class="col-sm-12">
<ul>
<li class="active"><a href="/faq"><span class="icon_info_2"></span>Справка </a></li>
<? if(isset(Faq::$section_title[Faq::SECTION_VIDEO])): ?>
<li><a href="/faq/video"><span class="icon_video"></span>Видео-уроки</a></li>
<? endif ?>
</ul>
</div>
</div>
</div>
</div>
<?php
use yii\helpers\Html;
use yii\helpers\Url;
use common\modules\blog\models\Post;
/* @var $this yii\web\View */
/* @var $model common\modules\blog\models\Post */
?>
<div class="blog_container">
<div class="container">
<div class="row">
<div class="col-md-8 col-xs-8 col-sm-12">
<section class="blog">
<h1><?=Yii::t('app', 'Tag')?>: <?=$model->name;?></h1>
<?=$this->render('_load', ['models' => $model->posts])?>
<?php if($count > count($model->posts)) : ?>
<div class="loaded">
</div>
<div class="load-box">
<a href="#" class="sidebar_btn" id="load-post" data-offset="<?=Post::PAGE_SIZE?>" data-tag="<?=$model->id?>" style="display:block; margin: 0 auto;">Загрузить еще</a>
<div class="loading-post"></div>
</div>
<?php endif; ?>
<?=$this->render('_subscribe', ['title' => 'Тег: ' . $model->name])?>
</section>
</div>
<?=$this->render('_sidebar')?>
</div>
</div>
</div>
<?=$this->render('_modals')?>
<?=$this->render('@app/views/layouts/footer');?>
\ No newline at end of file
<?php
use yii\helpers\Html;
use yii\helpers\Url;
use common\modules\faq\models\Faq;
use common\modules\faq\assets\GeneratorAsset;
/* @var $this yii\web\View */
?>
<div class="container-fluid">
<div class="main-content">
/* @var $model common\modules\blog\models\Post */
<div class="faq">
GeneratorAsset::register($this);
?>
<div class="faq_sec">
<div class="faq-questions-users">
<?= $this->renderFile('@common/modules/faq/views/faq/menu.php') ?>
<div class="reference_box">
<div class="container">
<div class="row">
<div class="col-sm-7 col-md-8">
<h1><?php echo $model->question?></h1>
<?php echo $model->answer?>
<div class="col-md-8 col-xs-8 col-sm-12">
<div class="way">
<a href="/">Главная</a>
<span>|</span> <a href="/faq">Справка</a>
<span>|</span> <?= $model->lang->title?>
</div>
</div><!-- /col-sm-7 col-md-8 -->
</div><!-- /row -->
<div class="row">
<div class="col-sm-12">
<div class="reference_left_box">
<h2><?= $model->lang->title;?></h2>
</div><!-- /faq-questions-users -->
<?= $model->lang->text?>
</div><!-- /faq -->
<? if(!$model->alreadyVoted()): ?>
<?php echo $this->render('_yes_no_form', ['model' => $form])?>
<? endif ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
<div class="col-md-4 col-xs-4 col-sm-12">
<div class="reference_right_box">
<?php echo $this->render('_sidebar_other', ['model' => $model]);?>
?>
<?php echo $this->render('_sidebar_form', ['model' => $form]);?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php echo $this->render('@app/views/layouts/footer'); ?>
\ No newline at end of file
......@@ -2,21 +2,33 @@
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use common\modules\faq\models\Faq;
/* @var $this yii\web\View */
/* @var $model common\modules\faq\models\FaqCategory */
/* @var $model common\modules\content\models\CoCategory */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="faq-category-form">
<div class="co-category-form">
<?php $form = ActiveForm::begin(); ?>
<?php $form = ActiveForm::begin([
'options' => [
'enctype' => 'multipart/form-data'
]
]); ?>
<?= $form->field($model, 'name')->textInput(['maxlength' => 255]) ?>
<?= $form->field($model, 'created_at')->textInput() ?>
<?= $form->field($model, 'section')->dropDownList(Faq::$section_title, [
'prompt' => '',
'class' => 'form-control',
]) ?>
<?= $form->field($model, 'updated_at')->textInput() ?>
<?= $form->field($model, 'url')->textInput(['maxlength' => 255]) ?>
<?= $form->field($model, 'file')->fileInput() ?>
<?= $form->field($model, 'sort')->textInput(['maxlength' => 255]) ?>
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? Yii::t('content', 'Create') : Yii::t('content', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
......
......@@ -4,11 +4,11 @@ use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model common\modules\faq\models\SearchFaqCategory */
/* @var $model common\modules\content\models\SearchCoCategory */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="faq-category-search">
<div class="co-category-search">
<?php $form = ActiveForm::begin([
'action' => ['index'],
......@@ -19,9 +19,7 @@ use yii\widgets\ActiveForm;
<?= $form->field($model, 'name') ?>
<?= $form->field($model, 'created_at') ?>
<?= $form->field($model, 'updated_at') ?>
<?= $form->field($model, 'url') ?>
<div class="form-group">
<?= Html::submitButton(Yii::t('content', 'Search'), ['class' => 'btn btn-primary']) ?>
......
......@@ -4,13 +4,13 @@ use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model common\modules\faq\models\FaqCategory */
/* @var $model common\modules\content\models\CoCategory */
$this->title = Yii::t('content', 'Create Faq Category');
$this->params['breadcrumbs'][] = ['label' => Yii::t('content', 'Faq Categories'), 'url' => ['index']];
$this->title = Yii::t('content', 'Create Co Category');
$this->params['breadcrumbs'][] = ['label' => Yii::t('content', 'Co Categories'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="faq-category-create">
<div class="co-category-create">
<h1><?= Html::encode($this->title) ?></h1>
......
<?php
use yii\helpers\Html;
use yii\grid\GridView;
use common\modules\faq\models\Faq;
/* @var $this yii\web\View */
/* @var $searchModel common\modules\content\models\SearchCoCategory */
/* @var $dataProvider yii\data\ActiveDataProvider */
?>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p>
<?= Html::a(Yii::t('faq', 'Создать рубрику'), ['create'], ['class' => 'btn btn-success']) ?>
</p>
<div class="alert alert-success m-b-0" style="background:#79C137;">
<p>
Для того что бы было проще идентифицировать статические страницы и инфо-блоки страниц мы добавили возможность каждую создаваемую страницу привязывать к Рубрики. Это позволяет в дальнейшем сортировать страницы по рубрикам.
</p>
</div>
<br>
<?= \common\components\zii\AdminGrid::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
//['class' => 'yii\grid\SerialColumn'],
[
'attribute' => 'sort',
'headerOptions' => [
'style' => 'width: 100px;'
]
],
[
'attribute' => 'name',
'label' => 'Название рубрики'
],
[
'attribute' => 'section',
'value' => function($data) {
if (!empty($data->section)) {
return Faq::$section_title[$data->section];
}
return 'не задано';
},
'filter' => Html::dropDownList('SearchFaqRubric[section]',
$searchModel->section,
Faq::$section_title,
['class'=>'form-control','prompt'=>'']
)
],
/*'url:url',*/
[
'class' => 'common\components\ColorActionColumn',
'headerOptions' => [
'style' => 'width: 150px;'
]
],
],
]); ?>
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model common\modules\blog\models\Post */
$this->title = 'Update Rubric: ' . ' ' . $model->id;
$this->params['breadcrumbs'][] = ['label' => 'Rubrics', 'url' => ['manage']];
$this->params['breadcrumbs'][] = ['label' => $model->id, 'url' => ['view', 'id' => $model->id]];
$this->params['breadcrumbs'][] = 'Update';
?>
<div class="post-update">
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>
<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model common\modules\content\models\CoCategory */
?>
<p>
<?= Html::a(Yii::t('content', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
<?= Html::a(Yii::t('content', 'Delete'), ['delete', 'id' => $model->id], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => Yii::t('content', 'Are you sure you want to delete this item?'),
'method' => 'post',
],
]) ?>
</p>
<?= DetailView::widget([
'model' => $model,
'attributes' => [
'id',
'name',
'url:url',
],
]) ?>
<p>
<?= Html::a(Yii::t('content', 'Create Content'), ['/content/content-admin/create', 'category_id'=>$model->id], ['class' => 'btn btn-success']) ?>
</p>
<?= \common\components\zii\AdminGrid::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
[
'attribute' => 'category_id',
'format' => 'text',
'value' => function($data) {
return $data->category->name;
}
],
'url:url',
'name',
'title',
// 'active',
// 'created_at',
// 'updated_at',
['class' => 'common\components\ColorActionColumn'],
],
]); ?>
<?php
use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel common\modules\sessions\models\SearchSession */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Sessions';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="session-index">
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
// ['class' => 'yii\grid\SerialColumn'],
'PHPSESSID',
[
'attribute' => 'user_id',
'value' => function($model)
{
if($model->user_id)
{
return $model->user->surname.' '.$model->user->name;
}
return null;
}
],
'ip',
[
'header' => 'Общее время просмотра',
'value' => function($model)
{
return date('H:i:s', mktime(0, 0, $model->time));
}
],
// ['class' => 'yii\grid\ActionColumn'],
],
]); ?>
</div>
......@@ -4,22 +4,22 @@ use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model common\modules\faq\models\FaqCategory */
/* @var $model common\modules\sessions\models\Session */
$this->title = $model->name;
$this->params['breadcrumbs'][] = ['label' => Yii::t('content', 'Faq Categories'), 'url' => ['index']];
$this->title = $model->id;
$this->params['breadcrumbs'][] = ['label' => 'Sessions', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="faq-category-view">
<div class="session-view">
<h1><?= Html::encode($this->title) ?></h1>
<p>
<?= Html::a(Yii::t('content', 'Update'), ['update', 'id' => $model->id, 'name' => $model->name], ['class' => 'btn btn-primary']) ?>
<?= Html::a(Yii::t('content', 'Delete'), ['delete', 'id' => $model->id, 'name' => $model->name], [
<?= Html::a('Update', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
<?= Html::a('Delete', ['delete', 'id' => $model->id], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => Yii::t('content', 'Are you sure you want to delete this item?'),
'confirm' => 'Are you sure you want to delete this item?',
'method' => 'post',
],
]) ?>
......@@ -29,9 +29,10 @@ $this->params['breadcrumbs'][] = $this->title;
'model' => $model,
'attributes' => [
'id',
'name',
'PHPSESSID',
'user_id',
'ip',
'created_at',
'updated_at',
],
]) ?>
......
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model common\modules\blog\models\PostTag */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="post-tag-form">
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>
<div class="form-group">
<?= Html::submitButton('Сохранить', ['class' => 'btn btn-success']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model common\modules\blog\models\PostTag */
$this->title = 'Create Post Tag';
$this->params['breadcrumbs'][] = ['label' => 'Post Tags', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="post-tag-create">
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>
......@@ -4,34 +4,29 @@ use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel common\modules\faq\models\SearchFaqCategory */
/* @var $searchModel common\modules\blog\models\SearchPostTag */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Yii::t('content', 'Faq Categories');
$this->title = 'Post Tags';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="faq-category-index">
<h1><?= Html::encode($this->title) ?></h1>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<div class="post-tag-index">
<p>
<?= Html::a(Yii::t('content', 'Create Faq Category'), ['create'], ['class' => 'btn btn-success']) ?>
<?= Html::a('Добавить', ['create'], ['class' => 'btn btn-success']) ?>
</p>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
// ['class' => 'yii\grid\SerialColumn'],
'id',
'name',
'created_at',
'updated_at',
['class' => 'common\components\ColorActionColumn'],
[
'class' => 'common\components\ColorActionColumn',
'template' => '{update} {delete}',
],
],
]); ?>
</div>
......@@ -3,18 +3,14 @@
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model common\modules\faq\models\FaqCategory */
/* @var $model common\modules\blog\models\PostTag */
$this->title = Yii::t('content', 'Update {modelClass}: ', [
'modelClass' => 'Faq Category',
]) . ' ' . $model->name;
$this->params['breadcrumbs'][] = ['label' => Yii::t('content', 'Faq Categories'), 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->id, 'name' => $model->name]];
$this->params['breadcrumbs'][] = Yii::t('content', 'Update');
$this->title = 'Update Post Tag: ' . ' ' . $model->name;
$this->params['breadcrumbs'][] = ['label' => 'Post Tags', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->id]];
$this->params['breadcrumbs'][] = 'Update';
?>
<div class="faq-category-update">
<h1><?= Html::encode($this->title) ?></h1>
<div class="post-tag-update">
<?= $this->render('_form', [
'model' => $model,
......
<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model common\modules\blog\models\PostTag */
$this->title = $model->name;
$this->params['breadcrumbs'][] = ['label' => 'Post Tags', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="post-tag-view">
<p>
<?= Html::a('Редактировать', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
<?= Html::a('Удалить', ['delete', 'id' => $model->id], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => 'Are you sure you want to delete this item?',
'method' => 'post',
],
]) ?>
</p>
<?= DetailView::widget([
'model' => $model,
'attributes' => [
'name',
],
]) ?>
</div>
......@@ -5,4 +5,5 @@ return [
'Blog' => 'Блог',
'Contacts' => 'Контакты',
'Analytics school' => 'Школа аналитики',
'Faq' => 'Справка',
];
\ No newline at end of file
......@@ -34,6 +34,7 @@ use common\modules\languages\widgets\Languages;
<li><?=Html::a(\Yii::t('menu', 'Blog'), ['/blog']);?></li>
<!-- <li><?=Html::a(\Yii::t('menu', 'Analytics school'), ['/school']);?></li> -->
<li><?=Html::a(\Yii::t('menu', 'Contacts'), ['/contacts']);?></li>
<li><?=Html::a(\Yii::t('menu', 'Faq'), ['/faq']);?></li>
</ul>
</nav>
<?= Languages::widget();?>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment