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
d26f68b0
Commit
d26f68b0
authored
Mar 02, 2016
by
Шакарим Сапа
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
33201dc6
1787b0c1
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
97 additions
and
14 deletions
+97
-14
common/modules/blog/models/SearchSession.php
common/modules/blog/models/SearchSession.php
+13
-4
common/modules/blog/views/post/_load.php
common/modules/blog/views/post/_load.php
+6
-4
common/modules/blog/views/post/view.php
common/modules/blog/views/post/view.php
+6
-4
frontend/views/layouts/footer-index.php
frontend/views/layouts/footer-index.php
+4
-0
frontend/views/layouts/footer-testing.php
frontend/views/layouts/footer-testing.php
+5
-1
frontend/views/layouts/footer.php
frontend/views/layouts/footer.php
+4
-0
frontend/web/css/custom.css
frontend/web/css/custom.css
+44
-1
frontend/web/images/up-button.png
frontend/web/images/up-button.png
+0
-0
frontend/web/js/custom.js
frontend/web/js/custom.js
+15
-0
No files found.
common/modules/blog/models/SearchSession.php
View file @
d26f68b0
...
@@ -51,6 +51,11 @@ class SearchSession extends Session
...
@@ -51,6 +51,11 @@ class SearchSession extends Session
$dataProvider
=
new
ActiveDataProvider
([
$dataProvider
=
new
ActiveDataProvider
([
'query'
=>
$query
,
'query'
=>
$query
,
'sort'
=>
[
'defaultOrder'
=>
[
'created_at'
=>
SORT_DESC
]
]
]);
]);
$this
->
load
(
$params
);
$this
->
load
(
$params
);
...
@@ -61,16 +66,20 @@ class SearchSession extends Session
...
@@ -61,16 +66,20 @@ class SearchSession extends Session
return
$dataProvider
;
return
$dataProvider
;
}
}
$query
->
joinWith
(
'urls'
);
$query
->
select
([
'*'
,
'urls.time'
]
);
$query
->
select
([
'*'
,
new
\yii\db\Expression
(
"SUM("
.
SessionUrl
::
tableName
()
.
".updated_at - "
.
SessionUrl
::
tableName
()
.
".created_at) as 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
// grid filtering conditions
$query
->
andFilterWhere
([
$query
->
andFilterWhere
([
'id'
=>
$this
->
id
,
'id'
=>
$this
->
id
,
'user_id'
=>
$this
->
user_id
,
'user_id'
=>
$this
->
user_id
,
'created_at'
=>
$this
->
created_at
,
'created_at'
=>
$this
->
created_at
SessionUrl
::
tableName
()
.
'.url'
=>
$this
->
blogUrl
]);
]);
$query
->
andFilterWhere
([
'like'
,
'PHPSESSID'
,
$this
->
PHPSESSID
])
$query
->
andFilterWhere
([
'like'
,
'PHPSESSID'
,
$this
->
PHPSESSID
])
...
...
common/modules/blog/views/post/_load.php
View file @
d26f68b0
...
@@ -23,16 +23,18 @@ use yii\helpers\Url;
...
@@ -23,16 +23,18 @@ use yii\helpers\Url;
<?php
foreach
(
$model
->
postTags
as
$tag
)
:
?>
<?php
foreach
(
$model
->
postTags
as
$tag
)
:
?>
<a
href=
"
<?=
$tag
->
url
;
?>
"
>
#
<?=
$tag
->
name
?>
</a>
<a
href=
"
<?=
$tag
->
url
;
?>
"
>
#
<?=
$tag
->
name
?>
</a>
<?php
endforeach
;
?>
<?php
endforeach
;
?>
</div>
</div>
<div
class=
"article_short_txt"
>
<div
class=
"article_short_txt"
>
<?php
if
(
$model
->
preview
)
:
<div
class=
"preview-image"
>
echo
Html
::
img
(
$model
->
preview
);
<?php
if
(
$model
->
preview
)
:
endif
;
?>
echo
Html
::
img
(
$model
->
preview
);
endif
;
?>
</div>
<?=
$model
->
lang
->
cutText
(
650
)
?>
<?=
$model
->
lang
->
cutText
(
650
)
?>
</div>
</div>
...
...
common/modules/blog/views/post/view.php
View file @
d26f68b0
...
@@ -30,16 +30,18 @@ use yii\helpers\Url;
...
@@ -30,16 +30,18 @@ use yii\helpers\Url;
<?php
foreach
(
$model
->
postTags
as
$tag
)
:
?>
<?php
foreach
(
$model
->
postTags
as
$tag
)
:
?>
<a
href=
"
<?=
$tag
->
url
;
?>
"
>
#
<?=
$tag
->
name
?>
</a>
<a
href=
"
<?=
$tag
->
url
;
?>
"
>
#
<?=
$tag
->
name
?>
</a>
<?php
endforeach
;
?>
<?php
endforeach
;
?>
</div>
</div>
<div
class=
"article_short_txt"
>
<div
class=
"article_short_txt"
>
<?php
if
(
$model
->
preview
)
:
<div
class=
"preview-image"
>
echo
Html
::
img
(
$model
->
preview
);
<?php
if
(
$model
->
preview
)
:
endif
;
?>
echo
Html
::
img
(
$model
->
preview
);
endif
;
?>
</div>
<?=
$model
->
lang
->
text
?>
<?=
$model
->
lang
->
text
?>
</div>
</div>
...
...
frontend/views/layouts/footer-index.php
View file @
d26f68b0
...
@@ -128,4 +128,8 @@ FileUploadBundle::register($this);
...
@@ -128,4 +128,8 @@ FileUploadBundle::register($this);
</div>
</div>
</footer>
</footer>
<div
class=
"up-button-container"
>
<div
class=
"up-button"
></div>
</div>
<?php
echo
$this
->
render
(
'block/callback'
);
?>
<?php
echo
$this
->
render
(
'block/callback'
);
?>
\ No newline at end of file
frontend/views/layouts/footer-testing.php
View file @
d26f68b0
...
@@ -14,4 +14,8 @@
...
@@ -14,4 +14,8 @@
</div>
</div>
</div>
</div>
</div>
</div>
</footer>
</footer>
\ No newline at end of file
<div
class=
"up-button-container"
>
<div
class=
"up-button"
></div>
</div>
\ No newline at end of file
frontend/views/layouts/footer.php
View file @
d26f68b0
...
@@ -31,4 +31,8 @@
...
@@ -31,4 +31,8 @@
</div>
</div>
</footer>
</footer>
<div
class=
"up-button-container"
>
<div
class=
"up-button"
></div>
</div>
<?php
echo
$this
->
render
(
'block/callback'
);
?>
<?php
echo
$this
->
render
(
'block/callback'
);
?>
\ No newline at end of file
frontend/web/css/custom.css
View file @
d26f68b0
...
@@ -266,9 +266,37 @@ a.toggle_bottom:hover .icon-arrowDown2:after, a.toggle_bottom:active .icon-arrow
...
@@ -266,9 +266,37 @@ a.toggle_bottom:hover .icon-arrowDown2:after, a.toggle_bottom:active .icon-arrow
.subsc_blog
{
.subsc_blog
{
margin-top
:
50px
;
margin-top
:
50px
;
}
}
.language-markup
{
pre
code
{
font-size
:
14px
;
font-size
:
14px
;
}
}
.article_short_txt
ol
li
{
line-height
:
30px
;
}
.preview-image
{
text-align
:
center
;
}
.up-button
{
background
:
url(../images/up-button.png)
no-repeat
left
top
;
width
:
56px
;
height
:
72px
;
position
:
absolute
;
left
:
-80px
;
top
:
0
;
cursor
:
pointer
;
display
:
none
;
}
.up-button
:hover
{
background-position
:
right
top
;
}
.up-button-container
{
position
:
fixed
;
width
:
970px
;
height
:
0px
;
bottom
:
150px
;
left
:
50%
;
margin-left
:
-485px
;
z-index
:
2
;
}
/* ------------ BLOG MODAL ------------------ */
/* ------------ BLOG MODAL ------------------ */
...
@@ -469,6 +497,9 @@ a.toggle_bottom:hover .icon-arrowDown2:after, a.toggle_bottom:active .icon-arrow
...
@@ -469,6 +497,9 @@ a.toggle_bottom:hover .icon-arrowDown2:after, a.toggle_bottom:active .icon-arrow
.gen_mail_top
a
.toggle_bottom
{
.gen_mail_top
a
.toggle_bottom
{
margin-top
:
50px
;
margin-top
:
50px
;
}
}
.article_short_txt
iframe
{
width
:
100%
;
}
}
}
@media
(
max-width
:
768px
)
{
@media
(
max-width
:
768px
)
{
...
@@ -516,6 +547,9 @@ a.toggle_bottom:hover .icon-arrowDown2:after, a.toggle_bottom:active .icon-arrow
...
@@ -516,6 +547,9 @@ a.toggle_bottom:hover .icon-arrowDown2:after, a.toggle_bottom:active .icon-arrow
.subsc_form
input
,
.subsc_blog_form
input
{
.subsc_form
input
,
.subsc_blog_form
input
{
width
:
100%
;
width
:
100%
;
}
}
pre
code
{
font-size
:
12px
;
}
}
}
@media
only
screen
and
(
max-width
:
479px
)
and
(
min-width
:
320px
)
{
@media
only
screen
and
(
max-width
:
479px
)
and
(
min-width
:
320px
)
{
...
@@ -528,4 +562,13 @@ a.toggle_bottom:hover .icon-arrowDown2:after, a.toggle_bottom:active .icon-arrow
...
@@ -528,4 +562,13 @@ a.toggle_bottom:hover .icon-arrowDown2:after, a.toggle_bottom:active .icon-arrow
.calk_form
.file-upload_block
{
.calk_form
.file-upload_block
{
display
:
none
;
display
:
none
;
}
}
}
@media
only
screen
and
(
max-width
:
479px
)
{
.article_short_view
{
display
:
none
;
}
.article_short_tags
{
margin-top
:
0
;
}
}
}
\ No newline at end of file
frontend/web/images/up-button.png
0 → 100644
View file @
d26f68b0
6.03 KB
frontend/web/js/custom.js
View file @
d26f68b0
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
$
(
window
).
scroll
(
function
(){
if
(
$
(
window
).
scrollTop
()
>
700
)
{
$
(
'
.up-button
'
).
show
();
}
else
{
$
(
'
.up-button
'
).
hide
();
}
});
$
(
'
.up-button
'
).
click
(
function
(){
$
(
"
html, body
"
).
animate
({
scrollTop
:
0
},
"
slow
"
);
});
$
(
"
a.toggle_bottom
"
).
click
(
function
()
{
$
(
"
a.toggle_bottom
"
).
click
(
function
()
{
var
a
=
$
(
this
);
var
a
=
$
(
this
);
$
(
"
html, body
"
).
animate
({
scrollTop
:
$
(
a
.
attr
(
'
href
'
)).
position
().
top
-
50
},
"
slow
"
);
$
(
"
html, body
"
).
animate
({
scrollTop
:
$
(
a
.
attr
(
'
href
'
)).
position
().
top
-
50
},
"
slow
"
);
...
...
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