Commit 0339317e authored by 杨培's avatar 杨培

Merge remote-tracking branch 'origin/dev' into dev

parents 1ab933ce bd88e550
......@@ -177,7 +177,7 @@ class HomeController extends \yii\web\Controller
$coursewareInfo = Courseware::findOne(['course_id' => $courseId, 'status' => Courseware::STATUS_OK]);
$course = Course::findOne(['id' => $courseId]);
if ($course === NULL or Yii::$app->user->id !== $coursewareInfo['user_id']) {
if ($course === NULL or Yii::$app->user->id != $coursewareInfo->user_id) {
throw new HttpException(404, '页面不存在');
}
$teachers = $course->teachers;
......
......@@ -55,13 +55,15 @@ class UserCenterController extends Controller
{
$classInfo = Classes::getUserClass(Yii::$app->user->id);
if ($classInfo === NULL) {
$status = 0;
$status = -1;
} else if ($classInfo['status'] === '0') {
$status = 0;
} else if ($classInfo['status'] === '1') {
$status = 1;
} else if ($classInfo['status'] === '2') {
$status = 2;
} else if ($classInfo['status'] === '3') {
$status = 3;
}
return $status;
}
......
......@@ -32,15 +32,15 @@ $this->beginContent('@app/views/layouts/center.php');
</ul>
<div class="apply-class">
<?php if ($status === 0): ?>
<?php if ($status === -1): ?>
<button class="btn btn-danger"
onclick="location.href='/classes-info/apply';">申请课堂
</button>
<?php elseif ($status === 2): ?>
<?php elseif ($status === 2 || $status === 0): ?>
<button class="btn btn-danger"
onclick="location.href='/classes-info/apply';">课堂审核中...
</button>
<?php elseif ($status === 1): ?>
<?php elseif ($status === 1 || $status === 3 ): ?>
<button class="btn btn-primary"
onclick="location.href='/classes-info';">我的课堂
</button>
......
......@@ -10,7 +10,8 @@ $this->title = '讲师管理';
<img src="<?=\common\models\User::getAvatarUrl($row['avatar'])?>">
<h3><?=$row['name']?></h3>
<p><?=$row['intro']?></p>
<a href="<?=\yii\helpers\Url::to(['teacher-manager/edit', 'id'=>$row['id']])?>"><i class="icon-mode_edit"></i></a>
<a class="edit" href="<?=\yii\helpers\Url::to(['teacher-manager/edit', 'id'=>$row['id']])?>"><i class="icon-mode_edit"></i></a>
<a href="#" class="delete"><i class="icon-trash"></i></a>
</div>
</div>
<?php } ?>
......
......@@ -50,6 +50,13 @@ a:link,a:active,a:visited {
}
.logo a {
display: block;
font-size: 18px;
color: #fff;
height: 60px;
line-height: 60px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.logo a img {
padding: 21px 0;
......@@ -157,6 +164,15 @@ a:link,a:active,a:visited {
.avatar > a {
display: block;
margin-top: 15px;
-webkit-transition: all 0.4s ease;
-o-transition: all 0.4s ease;
transition: all 0.4s ease;
}
.avatar > a:hover {
-webkit-transform: rotate(360deg);
-ms-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
.avatar > a > img {
height: 30px;
......@@ -226,7 +242,7 @@ a:link,a:active,a:visited {
width: 30px;
height: 30px;
text-align: center;
line-height: 30px;
line-height: 33px;
font-size: 16px;
background-color: rgba(0,0,0,.3);
color: #fff;
......@@ -388,8 +404,6 @@ a:link,a:active,a:visited {
}
.teacher-box > a {
position: absolute;
right: 15px;
top: 15px;
opacity: 0;
height: 30px;
width: 30px;
......@@ -407,6 +421,17 @@ a:link,a:active,a:visited {
.teacher-box > a:hover {
background-color:#2a6496;
}
.teacher-box > a.edit {
top: 15px;
right: 15px;
}
.teacher-box > a.delete {
top: 60px;
right: 15px;
}
.teacher-box > p {
font-size: 12px;
color: #999;
......@@ -424,10 +449,6 @@ a:link,a:active,a:visited {
}
.teacher-box:hover > img {
margin-top: 50px;
-webkit-transform: rotate(360deg);
-ms-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
.teacher-box:hover > p {
......@@ -441,9 +462,6 @@ a:link,a:active,a:visited {
height: 300px;
color: #999;
border-radius: 3px;
-webkit-transition: all 0.4s ease;
-o-transition: all 0.4s ease;
transition: all 0.4s ease;
}
.teacher-box .add-teacher a:hover {
text-decoration: none;
......@@ -974,7 +992,8 @@ textarea.input-r-control {
line-height: 22px;
}
.video-list-cnt .teacher b{
color: red;
color: #f7b940;
font-weight: normal;
}
.video-img-box .outline {
position: absolute;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment