Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zuiketang
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
zuiketang
Commits
3a7eed63
Commit
3a7eed63
authored
Oct 26, 2016
by
xiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加预览页连接
parent
e7163310
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
index.php
src/frontend/views/my-course/index.php
+15
-10
No files found.
src/frontend/views/my-course/index.php
View file @
3a7eed63
...
@@ -6,9 +6,20 @@
...
@@ -6,9 +6,20 @@
*/
*/
use
common\models\Course
;
use
common\models\Course
;
use
yii\helpers\Url
;
use
yii\helpers\Url
;
use
yii\web\View
;
use
yii\widgets\LinkPager
;
use
yii\widgets\LinkPager
;
$this
->
title
=
'课程列表'
;
$this
->
title
=
'课程列表'
;
$js
=
<<<JS
$(function () {
turmbw = $('.video-img-box img').width();
turmbh = turmbw * 5 / 9;
$('.video-img-box img').css('height', turmbh);
});
JS;
$this
->
registerJs
(
$js
);
/**
/**
* @var $qiniu common\components\Qiniu;
* @var $qiniu common\components\Qiniu;
...
@@ -27,7 +38,7 @@ $qiniu = \Yii::$app->qiniu;
...
@@ -27,7 +38,7 @@ $qiniu = \Yii::$app->qiniu;
<a
href=
"
<?=
Course
::
url
(
$course
[
'id'
])
?>
"
target=
"_blank"
><img
<a
href=
"
<?=
Course
::
url
(
$course
[
'id'
])
?>
"
target=
"_blank"
><img
src=
"
<?=
$qiniu
->
getUrl
(
'public'
,
$course
[
'preview_pic'
])
?>
-m.preview"
></a>
src=
"
<?=
$qiniu
->
getUrl
(
'public'
,
$course
[
'preview_pic'
])
?>
-m.preview"
></a>
<?php
elseif
(
$course
[
'status'
]
==
'2'
||
$course
[
'status'
]
==
'0'
)
:
?>
<?php
elseif
(
$course
[
'status'
]
==
'2'
||
$course
[
'status'
]
==
'0'
)
:
?>
<a
href=
"
<?=
Url
::
to
([
'home/preview'
,
'courseId'
=>
$course
[
'id'
]])
?>
"
target=
"_blank"
><img
<a
href=
"
<?=
Url
::
to
([
'home/preview'
,
'courseId'
=>
$course
[
'id'
]])
?>
"
target=
"_blank"
><img
src=
"
<?=
$qiniu
->
getUrl
(
'public'
,
$course
[
'preview_pic'
])
?>
-m.preview"
></a>
src=
"
<?=
$qiniu
->
getUrl
(
'public'
,
$course
[
'preview_pic'
])
?>
-m.preview"
></a>
<?php
endif
;
?>
<?php
endif
;
?>
...
@@ -41,7 +52,7 @@ $qiniu = \Yii::$app->qiniu;
...
@@ -41,7 +52,7 @@ $qiniu = \Yii::$app->qiniu;
<div
class=
"tit"
><a
href=
"
<?=
Course
::
url
(
$course
[
'id'
])
?>
"
<div
class=
"tit"
><a
href=
"
<?=
Course
::
url
(
$course
[
'id'
])
?>
"
target=
"_blank"
>
<?=
$course
[
'name'
]
?>
</a></div>
target=
"_blank"
>
<?=
$course
[
'name'
]
?>
</a></div>
<?php
elseif
(
$course
[
'status'
]
==
'2'
||
$course
[
'status'
]
==
'0'
)
:
?>
<?php
elseif
(
$course
[
'status'
]
==
'2'
||
$course
[
'status'
]
==
'0'
)
:
?>
<div
class=
"tit"
><a
href=
"
<?=
Url
::
to
([
'home/preview'
,
'courseId'
=>
$course
[
'id'
]])
?>
"
<div
class=
"tit"
><a
href=
"
<?=
Url
::
to
([
'home/preview'
,
'courseId'
=>
$course
[
'id'
]])
?>
"
target=
"_blank"
>
<?=
$course
[
'name'
]
?>
</a></div>
target=
"_blank"
>
<?=
$course
[
'name'
]
?>
</a></div>
<?php
endif
;
?>
<?php
endif
;
?>
...
@@ -66,7 +77,7 @@ $qiniu = \Yii::$app->qiniu;
...
@@ -66,7 +77,7 @@ $qiniu = \Yii::$app->qiniu;
<?php
if
(
$course
[
'status'
]
==
'0'
or
$course
[
'status'
]
==
'2'
)
:
?>
<?php
if
(
$course
[
'status'
]
==
'0'
or
$course
[
'status'
]
==
'2'
)
:
?>
<span
class=
"video-examine-icon"
>
审
</span>
<span
class=
"video-examine-icon"
>
审
</span>
<?php
endif
;
?>
<?php
endif
;
?>
<?php
if
(
$course
[
'status'
]
!=
'3'
&&
$course
[
'status'
]
!=
'4'
)
:
?>
<?php
if
(
$course
[
'status'
]
!=
'3'
&&
$course
[
'status'
]
!=
'4'
)
:
?>
<div
class=
"edit"
><a
href=
"
<?=
Url
::
to
([
'my-course/edit'
,
'id'
=>
$course
[
'id'
]])
?>
"
<div
class=
"edit"
><a
href=
"
<?=
Url
::
to
([
'my-course/edit'
,
'id'
=>
$course
[
'id'
]])
?>
"
title=
"编辑课程信息"
><i
class=
"icon-mode_edit"
></i></a></div>
title=
"编辑课程信息"
><i
class=
"icon-mode_edit"
></i></a></div>
<?php
endif
;
?>
<?php
endif
;
?>
...
@@ -101,10 +112,4 @@ $qiniu = \Yii::$app->qiniu;
...
@@ -101,10 +112,4 @@ $qiniu = \Yii::$app->qiniu;
<?=
LinkPager
::
widget
([
'pagination'
=>
$pagination
])
?>
<?=
LinkPager
::
widget
([
'pagination'
=>
$pagination
])
?>
</div>
</div>
<script
type=
'text/javascript'
>
$
(
function
()
{
turmbw
=
$
(
'.video-img-box img'
).
width
();
turmbh
=
turmbw
*
5
/
9
;
$
(
'.video-img-box img'
).
css
(
'height'
,
turmbh
);
})
</script>
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