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
cda050d2
Commit
cda050d2
authored
Oct 27, 2016
by
杨培
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
课程列表功能完善
课堂申请错误统一
parent
c7181066
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
47 deletions
+32
-47
apply.php
src/frontend/views/classes-info/apply.php
+3
-2
index.php
src/frontend/views/my-course/index.php
+29
-45
No files found.
src/frontend/views/classes-info/apply.php
View file @
cda050d2
...
@@ -25,14 +25,15 @@ $this->title = '申请课堂';
...
@@ -25,14 +25,15 @@ $this->title = '申请课堂';
'template'
=>
"
{
label
}
\n
<div class=
\"
cls-intro-textarea
\"
>
{
input}</div>\n{hint}\n{error
}
"
'template'
=>
"
{
label
}
\n
<div class=
\"
cls-intro-textarea
\"
>
{
input}</div>\n{hint}\n{error
}
"
])
->
textarea
([
'placeholder'
=>
'填写分享或培训的案例链接…'
])
?>
])
->
textarea
([
'placeholder'
=>
'填写分享或培训的案例链接…'
])
?>
<div
class=
"cls-part"
>
<?php
$agreeError
=
$model
->
getFirstError
(
'agreement'
);
?>
<div
class=
"cls-part
<?php
if
(
$agreeError
)
{
?>
has-error
<?php
}
?>
"
>
<div
class=
"checkbox"
>
<div
class=
"checkbox"
>
<label>
<label>
<?=
Html
::
checkbox
(
'agreement'
,
$agreement
==
1
)
?>
<?=
Html
::
checkbox
(
'agreement'
,
$agreement
==
1
)
?>
同意
<a
href=
"#"
>
云涯使用协议
</a>
及
<a
href=
"#"
>
版权声明
</a>
同意
<a
href=
"#"
>
云涯使用协议
</a>
及
<a
href=
"#"
>
版权声明
</a>
</label>
</label>
</div>
</div>
<?
=
$model
->
getFirstError
(
'agreement'
)
?>
<?
php
if
(
$agreeError
)
{
?>
<div
class=
"help-block"
>
<?=
$agreeError
?>
</div>
<?php
}
?>
</div>
</div>
<div
class=
"btn-box text-center"
style=
"margin-top: 10px; "
>
<div
class=
"btn-box text-center"
style=
"margin-top: 10px; "
>
...
...
src/frontend/views/my-course/index.php
View file @
cda050d2
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
*/
*/
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
=
'课程列表'
;
...
@@ -20,7 +19,6 @@ JS;
...
@@ -20,7 +19,6 @@ JS;
$this
->
registerJs
(
$js
);
$this
->
registerJs
(
$js
);
/**
/**
* @var $qiniu common\components\Qiniu;
* @var $qiniu common\components\Qiniu;
*/
*/
...
@@ -32,75 +30,61 @@ $qiniu = \Yii::$app->qiniu;
...
@@ -32,75 +30,61 @@ $qiniu = \Yii::$app->qiniu;
<div
class=
"col-md-4"
>
<div
class=
"col-md-4"
>
<div
class=
"cls-box-main"
>
<div
class=
"cls-box-main"
>
<div
class=
"video-img-box"
>
<div
class=
"video-img-box"
>
<?php
if
(
$course
[
'status'
]
==
'3'
||
$course
[
'status'
]
==
'4'
)
:
?>
<?php
<a
href=
"javascript:;"
target=
"_blank"
><img
$status
=
(
int
)
$course
[
'status'
];
src=
"
<?=
$qiniu
->
getUrl
(
'public'
,
$course
[
'preview_pic'
])
?>
-m.preview"
></a>
switch
(
$course
[
'status'
])
{
<?php
elseif
(
$course
[
'status'
]
==
'1'
)
:
?>
case
Course
::
STATUS_OK
:
$url
=
Course
::
url
(
$course
[
'id'
]);
break
;
<a
href=
"
<?=
Course
::
url
(
$course
[
'id'
])
?>
"
target=
"_blank"
><img
case
Course
::
STATUS_FAILED
:
src=
"
<?=
$qiniu
->
getUrl
(
'public'
,
$course
[
'preview_pic'
])
?>
-m.preview"
></a>
case
Course
::
STATUS_UNCHECK
:
$url
=
Url
::
to
([
'home/preview'
,
'courseId'
=>
$course
[
'id'
]]);
break
;
<?php
elseif
(
$course
[
'status'
]
==
'2'
||
$course
[
'status'
]
==
'0'
)
:
?>
default
:
$url
=
'javascript:;'
;
<a
href=
"
<?=
Url
::
to
([
'home/preview'
,
'courseId'
=>
$course
[
'id'
]])
?>
"
target=
"_blank"
><img
}
src=
"
<?=
$qiniu
->
getUrl
(
'public'
,
$course
[
'preview_pic'
])
?>
-m.preview"
></a>
?>
<?php
endif
;
?>
<a
href=
"
<?=
$url
?>
"
target=
"_blank"
>
<img
src=
"
<?=
$qiniu
->
getUrl
(
'public'
,
$course
[
'preview_pic'
])
?>
-m.preview"
>
</a>
<div
class=
"video-list-cnt"
>
<div
class=
"video-list-cnt"
>
<div
class=
"tit"
><a
href=
"
<?=
$url
?>
"
target=
"_blank"
>
<?=
$course
[
'name'
]
?>
</a></div>
<?php
if
(
$course
[
'status'
]
==
'3'
||
$course
[
'status'
]
==
'4'
)
:
?>
<div
class=
"tit"
><a
href=
"javascript:;"
target=
"_blank"
>
<?=
$course
[
'name'
]
?>
</a></div>
<?php
elseif
(
$course
[
'status'
]
==
'1'
)
:
?>
<div
class=
"tit"
><a
href=
"
<?=
Course
::
url
(
$course
[
'id'
])
?>
"
target=
"_blank"
>
<?=
$course
[
'name'
]
?>
</a></div>
<?php
elseif
(
$course
[
'status'
]
==
'2'
||
$course
[
'status'
]
==
'0'
)
:
?>
<div
class=
"tit"
><a
href=
"
<?=
Url
::
to
([
'home/preview'
,
'courseId'
=>
$course
[
'id'
]])
?>
"
target=
"_blank"
>
<?=
$course
[
'name'
]
?>
</a></div>
<?php
endif
;
?>
<div
class=
"teacher"
>
<div
class=
"teacher"
>
<?php
if
(
$course
[
'teachers'
])
{
?>
讲师:
<?=
join
(
', '
,
array_column
(
$course
[
'teachers'
],
'name'
))
?><?php
}
?>
<?php
if
(
$course
[
'teachers'
])
{
?>
讲师:
<?=
join
(
', '
,
array_column
(
$course
[
'teachers'
],
'name'
))
?><?php
}
?>
</div>
</div>
<div
class=
"teacher clearfix"
><span
class=
"pull-left"
>
发布时间:2016-12-11
</span>
<span
class=
"pull-right"
>
时长:01:23:21
</span></div>
<div
class=
"teacher clearfix"
><span
class=
"pull-left"
>
发布时间:
<?=
date
(
'Y-m-d H:i'
,
$course
[
'created_at'
])
?>
</span>
<!-- <span class="pull-right">时长:00:00:00</span>-->
</div>
<!--<div class="description">
<?
/*= mb_substr(strip_tags($course['intro']), 0, 250) */
?>
</div>-->
<div
class=
"teacher"
>
<div
class=
"teacher"
>
<span>
<?=
$course
[
'play_count'
]
?>
次播放
</span>
·
<span>
<?=
$course
[
'play_count'
]
?>
次播放
</span>
·
<span>
<?=
$course
[
'comment_count'
]
?>
次评论
</span>
·
<span>
<?=
$course
[
'comment_count'
]
?>
次评论
</span>
·
<span>
<?=
$course
[
'favorite_count'
]
?>
收藏
</span>
<span>
<?=
$course
[
'favorite_count'
]
?>
收藏
</span>
</div>
</div>
<!-- 4 转码中 3 锁定 2 拒绝 1 通过 0 待审核 -->
</div>
</div>
<?php
if
(
$course
[
'recommend'
]
==
'1'
)
:
?>
<?php
if
(
$status
==
Course
::
STATUS_UNCHECK
or
$course
[
'status'
]
==
Course
::
STATUS_FAILED
)
{
?>
<span
class=
"video-examine-icon"
>
荐
</span>
<?php
endif
;
?>
<?php
if
(
$course
[
'status'
]
==
'0'
or
$course
[
'status'
]
==
'2'
)
:
?>
<span
class=
"video-examine-icon"
>
审
</span>
<span
class=
"video-examine-icon"
>
审
</span>
<?php
endif
;
?>
<?php
}
elseif
(
$course
[
'recommend'
])
{
?>
<?php
if
(
$course
[
'status'
]
!=
'3'
&&
$course
[
'status'
]
!=
'4'
)
:
?>
<span
class=
"video-examine-icon"
>
荐
</span>
<div
class=
"edit"
><a
href=
"
<?=
Url
::
to
([
'my-course/edit'
,
'id'
=>
$course
[
'id'
]])
?>
"
<?php
}
?>
title=
"编辑课程信息"
><i
class=
"icon-mode_edit"
></i></a></div>
<?php
endif
;
?>
<?php
if
(
$course
[
'status'
]
==
'4'
)
:
?>
<?php
if
(
$status
!=
Course
::
STATUS_LOCKED
&&
$status
!=
Course
::
STATUS_TRANSCODING
)
{
?>
<div
class=
"edit"
>
<a
href=
"
<?=
Url
::
to
([
'my-course/edit'
,
'id'
=>
$course
[
'id'
]])
?>
"
title=
"编辑课程信息"
>
<i
class=
"icon-mode_edit"
></i></a>
</div>
<?php
}
?>
<?php
if
(
$status
==
Course
::
STATUS_TRANSCODING
)
{
?>
<div
class=
"mask-big"
>
<div
class=
"mask-big"
>
<span>
<span>
<i
class=
"glyphicon glyphicon-refresh"
></i>
视频转码中...
<i
class=
"glyphicon glyphicon-refresh"
></i>
视频转码中...
</span></div>
</span></div>
<?php
endif
;
?>
<?php
}
elseif
(
$status
==
Course
::
STATUS_LOCKED
)
{
?>
<?php
if
(
$course
[
'status'
]
==
'3'
)
:
?>
<div
class=
"mask-big"
>
<div
class=
"mask-big"
>
<span>
<span>
<i
class=
"glyphicon glyphicon-lock"
></i>
课程被锁定
<i
class=
"glyphicon glyphicon-lock"
></i>
课程被锁定
</span>
</span>
</div>
</div>
<?php
endif
;
?>
<?php
}
?>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
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