Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taskonsite-архив-перенесен
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitry Korolev
taskonsite-архив-перенесен
Commits
b1f56aa0
Commit
b1f56aa0
authored
Feb 10, 2016
by
Олег Гиммельшпах
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#1004 - Добавить кейсы
parent
21a3db2a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
112 additions
and
13 deletions
+112
-13
common/modules/content/controllers/PageController.php
common/modules/content/controllers/PageController.php
+1
-1
common/modules/content/models/CoBlocks.php
common/modules/content/models/CoBlocks.php
+2
-2
common/modules/content/models/CoContentLang.php
common/modules/content/models/CoContentLang.php
+16
-6
common/modules/faq/views/faq/faq-form.php
common/modules/faq/views/faq/faq-form.php
+1
-1
frontend/controllers/SiteController.php
frontend/controllers/SiteController.php
+1
-1
frontend/views/layouts/block/case-more.php
frontend/views/layouts/block/case-more.php
+74
-0
frontend/web/css/custom.css
frontend/web/css/custom.css
+17
-2
No files found.
common/modules/content/controllers/PageController.php
View file @
b1f56aa0
...
@@ -33,7 +33,7 @@ class PageController extends \common\components\BaseController
...
@@ -33,7 +33,7 @@ class PageController extends \common\components\BaseController
$model
=
CoContent
::
findOne
([
'url'
=>
$page
]);
$model
=
CoContent
::
findOne
([
'url'
=>
$page
]);
}
}
$content
=
$model
->
lang
->
content
;
$content
=
$model
->
lang
->
getFinishedContent
()
;
$this
->
meta_title
=
$model
->
metaTag
->
title
.
' - '
.
\Yii
::
$app
->
params
[
'name'
];
$this
->
meta_title
=
$model
->
metaTag
->
title
.
' - '
.
\Yii
::
$app
->
params
[
'name'
];
$this
->
meta_description
=
$model
->
metaTag
->
description
;
$this
->
meta_description
=
$model
->
metaTag
->
description
;
$this
->
meta_keywords
=
$model
->
metaTag
->
keywords
;
$this
->
meta_keywords
=
$model
->
metaTag
->
keywords
;
...
...
common/modules/content/models/CoBlocks.php
View file @
b1f56aa0
...
@@ -94,8 +94,8 @@ class CoBlocks extends \common\components\ActiveRecordModel
...
@@ -94,8 +94,8 @@ class CoBlocks extends \common\components\ActiveRecordModel
return
$model
->
lang
->
text
;
return
$model
->
lang
->
text
;
}
}
public
static
function
printStaticBlock
(
$block
,
$
addPath
=
false
)
public
static
function
printStaticBlock
(
$block
,
$
params
=
[]
)
{
{
return
Yii
::
$app
->
getView
()
->
render
(
'@app/views/layouts/block/'
.
$block
.
'.php'
);
return
Yii
::
$app
->
getView
()
->
render
(
'@app/views/layouts/block/'
.
$block
.
'.php'
,
$params
);
}
}
}
}
common/modules/content/models/CoContentLang.php
View file @
b1f56aa0
...
@@ -91,10 +91,18 @@ class CoContentLang extends \common\components\ActiveRecordModel
...
@@ -91,10 +91,18 @@ class CoContentLang extends \common\components\ActiveRecordModel
return
$this
->
hasOne
(
Languages
::
className
(),
[
'id'
=>
'lang_id'
]);
return
$this
->
hasOne
(
Languages
::
className
(),
[
'id'
=>
'lang_id'
]);
}
}
/**
* @return \yii\db\ActiveQuery
*/
public
function
getContent
()
{
return
$this
->
hasOne
(
CoContent
::
className
(),
[
'id'
=>
'content_id'
]);
}
/**
/**
* @return html
* @return html
*/
*/
public
function
get
Content
()
public
function
get
FinishedContent
()
{
{
$content
=
$this
->
text
;
$content
=
$this
->
text
;
$content
=
\common\components\AppManager
::
prepareWidget
(
$content
);
$content
=
\common\components\AppManager
::
prepareWidget
(
$content
);
...
@@ -118,17 +126,19 @@ class CoContentLang extends \common\components\ActiveRecordModel
...
@@ -118,17 +126,19 @@ class CoContentLang extends \common\components\ActiveRecordModel
}
}
$arrWhatReplaceNext
[]
=
'[about-reviews]'
;
$arrWhatReplaceNext
[]
=
'[about-reviews]'
;
$arrReplaceNext
[]
=
CoBlocks
::
printStaticBlock
(
'about-reviews'
,
true
);
$arrReplaceNext
[]
=
CoBlocks
::
printStaticBlock
(
'about-reviews'
);
$arrWhatReplaceNext
[]
=
'[reviews]'
;
$arrWhatReplaceNext
[]
=
'[reviews]'
;
$arrReplaceNext
[]
=
CoBlocks
::
printStaticBlock
(
'reviews'
,
true
);
$arrReplaceNext
[]
=
CoBlocks
::
printStaticBlock
(
'reviews'
);
$arrWhatReplaceNext
[]
=
'[content-phone]'
;
$arrWhatReplaceNext
[]
=
'[content-phone]'
;
$arrReplaceNext
[]
=
\common\models\Settings
::
getValue
(
'content-phone'
);
$arrReplaceNext
[]
=
\common\models\Settings
::
getValue
(
'content-phone'
);
$arrWhatReplaceNext
[]
=
'[cases]'
;
$arrWhatReplaceNext
[]
=
'[cases]'
;
$arrReplaceNext
[]
=
CoBlocks
::
printStaticBlock
(
'cases'
,
true
);
$arrReplaceNext
[]
=
CoBlocks
::
printStaticBlock
(
'cases'
);
$arrWhatReplaceNext
[]
=
'[projects]'
;
$arrWhatReplaceNext
[]
=
'[projects]'
;
$arrReplaceNext
[]
=
CoBlocks
::
printStaticBlock
(
'projects'
,
true
);
$arrReplaceNext
[]
=
CoBlocks
::
printStaticBlock
(
'projects'
);
$arrWhatReplaceNext
[]
=
'[case-subscribe]'
;
$arrWhatReplaceNext
[]
=
'[case-subscribe]'
;
$arrReplaceNext
[]
=
CoBlocks
::
printStaticBlock
(
'case-subscribe'
,
true
);
$arrReplaceNext
[]
=
CoBlocks
::
printStaticBlock
(
'case-subscribe'
);
$arrWhatReplaceNext
[]
=
'[case-more]'
;
$arrReplaceNext
[]
=
CoBlocks
::
printStaticBlock
(
'case-more'
,
[
'model'
=>
$this
->
content
]);
$arrWhatReplaceNext
[]
=
'[footer]'
;
$arrWhatReplaceNext
[]
=
'[footer]'
;
$arrReplaceNext
[]
=
\Yii
::
$app
->
getView
()
->
render
(
'@app/views/layouts/footer'
);
$arrReplaceNext
[]
=
\Yii
::
$app
->
getView
()
->
render
(
'@app/views/layouts/footer'
);
$arrWhatReplaceNext
[]
=
'[footer-index]'
;
$arrWhatReplaceNext
[]
=
'[footer-index]'
;
...
...
common/modules/faq/views/faq/faq-form.php
View file @
b1f56aa0
...
@@ -4,6 +4,6 @@ use \yii\helpers\Html;
...
@@ -4,6 +4,6 @@ use \yii\helpers\Html;
?>
?>
<div
class=
"col-sm-5 col-md-4"
>
<div
class=
"col-sm-5 col-md-4"
>
<?php
echo
\common\modules\content\models\CoBlocks
::
printStaticBlock
(
'faq-form'
,
true
);
?>
<?php
echo
\common\modules\content\models\CoBlocks
::
printStaticBlock
(
'faq-form'
);
?>
</div>
<!-- /col-sm-5 col-md-4 -->
</div>
<!-- /col-sm-5 col-md-4 -->
\ No newline at end of file
frontend/controllers/SiteController.php
View file @
b1f56aa0
...
@@ -107,7 +107,7 @@ class SiteController extends BaseController
...
@@ -107,7 +107,7 @@ class SiteController extends BaseController
{
{
$model
=
\common\modules\content\models\CoContent
::
findOne
([
'url'
=>
'site/error'
]);
$model
=
\common\modules\content\models\CoContent
::
findOne
([
'url'
=>
'site/error'
]);
$content
=
$model
->
lang
->
content
;
$content
=
$model
->
lang
->
getFinishedContent
()
;
$this
->
meta_title
=
$model
->
metaTag
->
title
.
' - '
.
\Yii
::
$app
->
params
[
'name'
];
$this
->
meta_title
=
$model
->
metaTag
->
title
.
' - '
.
\Yii
::
$app
->
params
[
'name'
];
$this
->
meta_description
=
$model
->
metaTag
->
description
;
$this
->
meta_description
=
$model
->
metaTag
->
description
;
$this
->
meta_keywords
=
$model
->
metaTag
->
keywords
;
$this
->
meta_keywords
=
$model
->
metaTag
->
keywords
;
...
...
frontend/views/layouts/block/case-more.php
0 → 100644
View file @
b1f56aa0
<?php
use
yii\widgets\ActiveForm
;
use
yii\helpers\Html
;
use
yii\helpers\Url
;
use
common\modules\content\models\CoContent
;
use
common\modules\bids\models\Bid
;
$more
=
CoContent
::
find
()
->
where
([
'category_id'
=>
4
,
'active'
=>
true
])
->
andWhere
([
'!='
,
'id'
,
$model
->
id
])
->
orderBy
(
'RAND()'
)
->
one
();
?>
<section
class=
"short_keys_sect"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-md-12 col-xs-12 col-sm-12"
>
<h2
class=
"short_keys_title"
>
Посмотрите еще один
<br/>
короткий кейс
</h2>
</div>
</div>
<div
class=
"row"
>
<?php
if
(
$more
)
:
?>
<div
class=
"col-md-6 col-xs-6 col-sm-12"
>
<div
class=
"short_keys_block"
>
<img
src=
"
<?=
$model
->
preview
?>
"
height=
"338"
width=
"455"
>
<a
href=
"
<?=
Url
::
to
([
$more
->
url
]);
?>
"
style=
"color:
<?
if
(
$model
->
custom
==
CoContent
::
CUSTOM_WHITE
){
?>
#fff
<?
}
else
{
?>
#2d3642
<?
}
?>
;"
class=
"short_keys_title_link"
>
<?=
$more
->
lang
->
title
?>
</a>
<div
class=
"short_keys_foot"
>
<a
href=
"
<?=
Url
::
to
([
$more
->
url
]);
?>
"
class=
"short_keys_btn_more"
><span>
Подробнее
</span></a>
<!-- <a href="#" class="short_keys_tags"># Big data</a> -->
</div>
</div>
</div>
<?php
endif
;
?>
<div
class=
"col-md-6 col-xs-6 col-sm-12"
>
<div
class=
"subsc_block"
>
<h2
class=
"subsc_block_title"
>
Подписаться на обновление
</h2>
<div
class=
"subsc_block_txt"
>
Нам будет приятно, если вы захотите подписаться на обновление наших проектов
</div>
<?php
$model
=
new
Bid
;
$model
->
scenario
=
Bid
::
SCENARIO_SUBSCRIBE
;
$form
=
ActiveForm
::
begin
([
'action'
=>
'/'
,
'options'
=>
[
'class'
=>
'subsc_form bids-form'
,
],
]);
?>
<?php
echo
Html
::
hiddenInput
(
'scenario'
,
$model
->
scenario
,
[
'class'
=>
'not_clear'
]);
?>
<?php
echo
Html
::
hiddenInput
(
'Bid[form]'
,
Bid
::
FORM_SUBSCRIBE
,
[
'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'
]);
?>
<?php
ActiveForm
::
end
();
?>
</div>
</div>
</div>
</div>
</section>
\ No newline at end of file
frontend/web/css/custom.css
View file @
b1f56aa0
...
@@ -6,8 +6,8 @@
...
@@ -6,8 +6,8 @@
margin
:
0
;
margin
:
0
;
}
}
.has-error
input
{
.has-error
input
{
background
:
#fff
url(../images/icon-fail.png)
no-repeat
96%
center
;
background
:
#fff
url(../images/icon-fail.png)
no-repeat
96%
center
!important
;
border
:
1px
solid
#E9A2A2
;
border
:
1px
solid
#E9A2A2
!important
;
}
}
/* EAuth widget */
/* EAuth widget */
.eauth-list
.eauth-service-id-vk
.eauth-service-link
:before
{
.eauth-list
.eauth-service-id-vk
.eauth-service-link
:before
{
...
@@ -56,4 +56,19 @@ a.login_form_link, a.login_form_popup_link, a.reg_popup_link, a.reg_form_link{
...
@@ -56,4 +56,19 @@ a.login_form_link, a.login_form_popup_link, a.reg_popup_link, a.reg_form_link{
}
}
.sh_ft
.popup_text
,
.reg_form
.popup_text
{
.sh_ft
.popup_text
,
.reg_form
.popup_text
{
margin-top
:
10px
;
margin-top
:
10px
;
}
.subsc_form
input
{
display
:
block
;
width
:
273px
;
height
:
49px
;
background
:
#FDFDFD
;
border
:
1px
solid
#E9E9E9
;
padding
:
0
10px
;
border-radius
:
10px
;
-moz-border-radius
:
10px
;
-webkit-border-radius
:
10px
;
-o-border-radius
:
10px
;
-ms-border-radius
:
10px
;
font-size
:
16px
;
color
:
#83999e
;
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment