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
e588b4d7
Commit
e588b4d7
authored
Nov 08, 2016
by
xiabin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
13cee6f4
a57c0755
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
92 additions
and
10 deletions
+92
-10
CourseController.php
src/backend/controllers/CourseController.php
+2
-0
detail.php
src/backend/views/course/detail.php
+88
-8
back.php
src/backend/views/layouts/back.php
+2
-2
No files found.
src/backend/controllers/CourseController.php
View file @
e588b4d7
...
@@ -12,7 +12,9 @@ use common\libs\Message;
...
@@ -12,7 +12,9 @@ use common\libs\Message;
use
common\libs\Utils
;
use
common\libs\Utils
;
use
common\models\Classes
;
use
common\models\Classes
;
use
common\models\Course
;
use
common\models\Course
;
use
common\models\CourseTeacher
;
use
common\models\Courseware
;
use
common\models\Courseware
;
use
common\models\Teacher
;
use
common\models\TranscodeQueue
;
use
common\models\TranscodeQueue
;
use
common\models\User
;
use
common\models\User
;
use
Yii
;
use
Yii
;
...
...
src/backend/views/course/detail.php
View file @
e588b4d7
...
@@ -2,20 +2,100 @@
...
@@ -2,20 +2,100 @@
/**
/**
* @var $class \common\models\Classes
* @var $class \common\models\Classes
* @var $course \common\models\Course
* @var $course \common\models\Course
* @var $courseware \common\models\Courseware
* @var $previewUrl string
* @var $previewUrl string
* @var $sourceUrl string
* @var $sourceUrl string
* @var $avUrl string
* @var $avUrl string
*/
*/
use
yii\helpers\Html
;
use
common\models\User
;
use
common\libs\Utils
;
use
yii\helpers\Url
;
$this
->
title
=
$course
->
name
;
$this
->
title
=
$course
->
name
;
?>
?>
<p>
<?=
$class
->
name
?>
</p>
<section
class=
"content-header"
>
<div><img
src=
"
<?=
$previewUrl
?>
-m.preview"
></div>
<h1>
[
<?=
$class
->
name
?>
]
<?=
$course
->
name
?>
<small>
#
<?=
$class
->
id
?>
</small></h1>
<div>
<?=
$course
->
intro
?>
</div>
<ol
class=
"breadcrumb"
>
<p>
<li><a
href=
"
<?=
Url
::
to
([
'course/index'
])
?>
"
><i
class=
"fa fa-dashboard"
></i>
课程管理
</a></li>
[
<a
href=
"
<?=
$sourceUrl
?>
"
target=
"_blank"
>
下载源视频
</a>
]
<li
class=
"active"
>
课程详情
</li>
[
<a
href=
"
<?=
$avUrl
?>
"
target=
"_blank"
>
AVINFO
</a>
]
</ol>
</p>
</section>
\ No newline at end of file
<div
class=
"content body"
>
<div
class=
"row"
>
<div
class=
"col-md-4"
>
<div
class=
"box"
>
<div
class=
"box-header with-border"
>
<h3
class=
"box-title"
>
基本信息
</h3>
</div>
<div
class=
"box-body"
>
<table
class=
"table table-bordered"
>
<tbody>
<tr>
<td>
原始视频
</td>
<td>
<?=
$courseware
->
format
?>
/
<?=
Utils
::
humanSeconds
(
$courseware
->
time
)
?>
/
<?=
Utils
::
byteConvert
(
$courseware
->
size
)
?>
<br><a
href=
"
<?=
$sourceUrl
?>
"
target=
"_blank"
title=
"播放或下载视频"
><span
class=
"glyphicon glyphicon-play-circle"
></span></a>
<a
href=
"
<?=
$avUrl
?>
"
target=
"_blank"
title=
"调试视频信息"
><span
class=
"glyphicon glyphicon-info-sign"
></span></a>
</td>
</tr>
<tr>
<td>
会员价
</td>
<td>
<?=
$course
->
price
?>
元
</td>
</tr>
<tr>
<td>
免费试看
</td>
<td>
<?php
if
(
$course
->
free_time
)
{
echo
$course
->
free_time
;
?>
分钟
<?php
}
else
{
?>
<span
class=
"glyphicon glyphicon-ban-circle text-danger"
></span>
<?php
}
?>
</td>
</tr>
<tr>
<td>
推荐
</td>
<td>
<?php
if
(
$course
->
recommend
)
{
?>
<span
class=
"glyphicon glyphicon-ok text-success"
></span>
<?php
}
else
{
?>
<span
class=
"glyphicon glyphicon-ban-circle text-danger"
></span>
<?php
}
?>
</td>
</tr>
<tr>
<td>
其它
</td>
<td>
<span
class=
"glyphicon glyphicon-comment text-muted"
></span>
<?=
$course
->
comment_count
?>
<span
class=
"glyphicon glyphicon glyphicon-star text-muted"
></span>
<?=
$course
->
favorite_count
?>
<span
class=
"glyphicon glyphicon-thumbs-up text-muted"
></span>
<?=
$course
->
support_count
?>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div
class=
"col-md-4"
>
<div
class=
"box"
>
<div
class=
"box-header with-border"
>
<h3
class=
"box-title"
>
讲师列表
</h3>
</div>
<div
class=
"box-body no-padding"
>
<ul
class=
"users-list clearfix"
>
<?php
foreach
(
$course
->
teachers
as
$teacher
)
{
?>
<li>
<img
src=
"
<?=
User
::
getAvatarUrl
(
$teacher
->
avatar
)
?>
"
alt=
"User Image"
>
<a
class=
"users-list-name"
href=
"#"
>
<?=
$teacher
->
name
?>
</a>
</li>
<?php
}
?>
</ul>
</div>
</div>
</div>
<div
class=
"col-md-4"
><a
href=
"
<?=
$previewUrl
?>
"
target=
"_blank"
><img
class=
"img-responsive pad"
src=
"
<?=
$previewUrl
?>
-m.preview"
></a></div>
</div>
<div
class=
"box"
>
<div
class=
"box-header with-border"
>
<h3
class=
"box-title"
>
简介
</h3>
</div>
<div
class=
"box-body"
>
<?=
$course
->
intro
?>
</div>
</div>
</div>
\ No newline at end of file
src/backend/views/layouts/back.php
View file @
e588b4d7
...
@@ -124,8 +124,8 @@ $this->beginContent('@app/views/layouts/lte.php');
...
@@ -124,8 +124,8 @@ $this->beginContent('@app/views/layouts/lte.php');
<!-- Optionally, you can add icons to the links -->
<!-- Optionally, you can add icons to the links -->
<li><a
href=
"#"
><i
class=
"fa fa-link"
></i>
<span>
全局概揽
</span></a></li>
<li><a
href=
"#"
><i
class=
"fa fa-link"
></i>
<span>
全局概揽
</span></a></li>
<li
class=
"header"
>
内容
</li>
<li
class=
"header"
>
内容
</li>
<li
class=
"RT_classes"
><a
href=
"/classes"
><i
class=
"fa fa-
li
nk"
></i>
<span>
课堂管理
</span></a></li>
<li
class=
"RT_classes"
><a
href=
"/classes"
><i
class=
"fa fa-
ba
nk"
></i>
<span>
课堂管理
</span></a></li>
<li
class=
"RT_course"
><a
href=
"/course"
><i
class=
"fa fa-
link
"
></i>
<span>
课程管理
</span></a></li>
<li
class=
"RT_course"
><a
href=
"/course"
><i
class=
"fa fa-
tv
"
></i>
<span>
课程管理
</span></a></li>
</ul>
</ul>
<script>
<script>
var
sidebar
=
$
(
"#sidebarMenu"
);
var
sidebar
=
$
(
"#sidebarMenu"
);
...
...
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