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
0339317e
Commit
0339317e
authored
Oct 27, 2016
by
杨培
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
1ab933ce
bd88e550
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
17 deletions
+39
-17
HomeController.php
src/frontend/controllers/HomeController.php
+1
-1
UserCenterController.php
src/frontend/controllers/UserCenterController.php
+3
-1
userCenter.php
src/frontend/views/layouts/userCenter.php
+3
-3
index.php
src/frontend/views/teacher-manager/index.php
+2
-1
style.css
src/frontend/web/css/style.css
+30
-11
No files found.
src/frontend/controllers/HomeController.php
View file @
0339317e
...
...
@@ -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
;
...
...
src/frontend/controllers/UserCenterController.php
View file @
0339317e
...
...
@@ -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
;
}
...
...
src/frontend/views/layouts/userCenter.php
View file @
0339317e
...
...
@@ -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>
...
...
src/frontend/views/teacher-manager/index.php
View file @
0339317e
...
...
@@ -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
}
?>
...
...
src/frontend/web/css/style.css
View file @
0339317e
...
...
@@ -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
:
3
0
px
;
line-height
:
3
3
px
;
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
;
...
...
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