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
25c1cfd0
Commit
25c1cfd0
authored
Oct 31, 2016
by
汪波
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
9ac4950a
fc580718
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
74 additions
and
60 deletions
+74
-60
ClassesInfoController.php
src/frontend/controllers/ClassesInfoController.php
+16
-0
HomeController.php
src/frontend/controllers/HomeController.php
+1
-1
index.php
src/frontend/views/classes-info/index.php
+25
-59
setting.php
src/frontend/views/classes-info/setting.php
+32
-0
No files found.
src/frontend/controllers/ClassesInfoController.php
View file @
25c1cfd0
...
@@ -96,5 +96,21 @@ class ClassesInfoController extends \yii\web\Controller
...
@@ -96,5 +96,21 @@ class ClassesInfoController extends \yii\web\Controller
return
$this
->
render
(
'apply'
,
compact
(
'model'
,
'agreement'
));
return
$this
->
render
(
'apply'
,
compact
(
'model'
,
'agreement'
));
}
}
public
function
actionSetting
()
{
//课堂信息
$model
=
Classes
::
findOne
(
$this
->
classStatus
[
'id'
]);
if
(
Yii
::
$app
->
request
->
getIsPost
())
{
$model
->
load
(
Yii
::
$app
->
request
->
post
());
if
(
$model
->
update
())
{
return
$this
->
redirect
([
'classes-info/index'
]);
}
}
return
$this
->
render
(
'setting'
,
compact
(
'model'
));
}
}
}
src/frontend/controllers/HomeController.php
View file @
25c1cfd0
...
@@ -143,7 +143,7 @@ class HomeController extends \yii\web\Controller
...
@@ -143,7 +143,7 @@ class HomeController extends \yii\web\Controller
$coursewareInfo
[
'isSupport'
]
=
(
Support
::
findByUserIdAndCoursewareId
(
$userId
,
$coursewareInfo
[
'id'
])
===
NULL
?
FALSE
:
TRUE
);
$coursewareInfo
[
'isSupport'
]
=
(
Support
::
findByUserIdAndCoursewareId
(
$userId
,
$coursewareInfo
[
'id'
])
===
NULL
?
FALSE
:
TRUE
);
$coursewareInfo
[
'isFavorite'
]
=
(
Favorite
::
findByUserIdAndCoursewareId
(
$userId
,
$coursewareInfo
[
'id'
])
===
NULL
?
FALSE
:
TRUE
);
$coursewareInfo
[
'isFavorite'
]
=
(
Favorite
::
findByUserIdAndCoursewareId
(
$userId
,
$coursewareInfo
[
'id'
])
===
NULL
?
FALSE
:
TRUE
);
$coursewareInfo
[
'isShop'
]
=
FALSE
;
$coursewareInfo
[
'isShop'
]
=
FALSE
;
$coursewareInfo
[
'isMe'
]
=
true
;
$coursewareInfo
[
'isMe'
]
=
FALSE
;
//已登录
//已登录
if
(
!
Yii
::
$app
->
user
->
isGuest
)
{
if
(
!
Yii
::
$app
->
user
->
isGuest
)
{
$coursewareInfo
[
'userAvatar'
]
=
User
::
getAvatarUrl
(
Yii
::
$app
->
user
->
identity
->
avatar
);
$coursewareInfo
[
'userAvatar'
]
=
User
::
getAvatarUrl
(
Yii
::
$app
->
user
->
identity
->
avatar
);
...
...
src/frontend/views/classes-info/index.php
View file @
25c1cfd0
...
@@ -10,66 +10,32 @@ use yii\helpers\Url;
...
@@ -10,66 +10,32 @@ use yii\helpers\Url;
$this
->
title
=
'我的课堂'
;
$this
->
title
=
'我的课堂'
;
?>
?>
<ul
class=
"tab-headbox"
>
<!-- Nav tabs -->
<li
class=
"active"
><a
href=
"#"
>
基本信息
</a></li>
<ul
class=
"tab-headbox"
role=
"tablist"
>
<li
><a
href=
"
<?=
Url
::
to
([
'classes-info/setting'
])
?>
"
>
课堂设置
</a></li>
<li
role=
"presentation"
class=
"active"
><a
href=
"#home"
role=
"tab"
data-toggle=
"tab"
>
基本信息
</a></li>
<li
role=
"presentation"
><a
href=
"#profile"
role=
"tab"
data-toggle=
"tab"
>
课堂设置
</a></li>
</ul>
</ul>
<!-- Tab panes -->
<div
class=
"class-name m-t-50"
>
<div
class=
"tab-content"
>
<span
class=
"nomal-class-name"
>
<?=
$model
->
name
?>
<!-- <a href="#"><i class="icon-mode_edit"></i></a>-->
</span>
<div
role=
"tabpanel"
class=
"tab-pane active"
id=
"home"
>
<!--<div class="edit"><a href="#" title="课堂设置"><i class="icon-mode_edit"></i></a></div>-->
<div
class=
"class-name m-t-50"
>
<span
class=
"edit-class-name"
style=
"display: none"
><input
type=
"text"
class=
"input-r-control"
>
<button
class=
"btn btn-default"
>
保存
</button>
<button
class=
"btn btn-default"
>
取消
</button></span>
<span
class=
"nomal-class-name"
>
<?=
$model
->
name
?>
<!-- <a href="#"><i class="icon-mode_edit"></i></a>-->
</span>
</div>
<div
class=
"edit"
><a
href=
"#"
title=
"课堂设置"
><i
class=
"icon-mode_edit"
></i></a></div>
<div
class=
"class-intro"
>
<span
class=
"edit-class-name"
style=
"display: none"
><input
type=
"text"
class=
"input-r-control"
>
<button
class=
"btn btn-default"
>
保存
</button>
<button
class=
"btn btn-default"
>
取消
</button></span>
<div
class=
"col-md-4"
>
</div>
<h3>
课程总数
</h3>
<div
class=
"class-intro"
>
<p>
<?=
$courseCount
?>
<small>
讲
</small></p>
<div
class=
"col-md-4"
>
<a
href=
"
<?=
Url
::
to
([
'my-course/publish'
])
?>
"
>
发布课程
</a>
<h3>
课程总数
</h3>
<i
class=
"icon-play"
></i>
<p>
<?=
$courseCount
?>
<small>
讲
</small></p>
<a
href=
"
<?=
Url
::
to
([
'my-course/publish'
])
?>
"
>
发布课程
</a>
<i
class=
"icon-play"
></i>
</div>
<div
class=
"col-md-4"
>
<h3>
今日收益
</h3>
<p>
<?=
$todayIncome
?>
<small>
元
</small></p>
<a
href=
"
<?=
Url
::
to
([
'my-income/index'
])
?>
"
>
查看账单
</a>
<i
class=
"icon-clipboard"
></i>
</div>
<div
class=
"col-md-4"
>
<h3>
今日发言
</h3>
<p>
<?=
$commentCount
?>
<small>
条
</small></p>
<i
class=
"icon-speech-bubble"
></i>
</div>
</div>
</div>
</div>
<div
class=
"col-md-4"
>
<div
role=
"tabpanel"
class=
"tab-pane"
id=
"profile"
>
<h3>
今日收益
</h3>
<div
class=
"send-class apply-class-box m-t-50"
>
<p>
<?=
$todayIncome
?>
<small>
元
</small></p>
<div
class=
"tit"
>
课堂设置
</div>
<a
href=
"
<?=
Url
::
to
([
'my-income/index'
])
?>
"
>
查看账单
</a>
<i
class=
"icon-clipboard"
></i>
<div
class=
"cls-part"
>
<div
class=
"tit"
>
课堂名称
</div>
<input
type=
"text"
class=
"input-r-control"
placeholder=
"请输入课堂名称"
>
</div>
<div
class=
"cls-part"
>
<div
class=
"tit"
>
课堂介绍
</div>
<div
class=
"cls-intro-textarea"
>
<textarea
name=
""
id=
""
class=
"input-r-control"
placeholder=
"填写分享或培训的案例链接……"
></textarea>
</div>
</div>
<div
class=
"btn-box text-center"
style=
"margin-top: 10px; "
>
<button
class=
"btn btn-link m-l-10"
>
取消
</button><button
class=
"btn btn-save m-l-10"
>
保存
</button>
</div>
</div>
</div>
</div>
<div
class=
"col-md-4"
>
</div
>
<h3>
今日发言
</h3
>
<p>
<?=
$commentCount
?>
<small>
条
</small></p>
<i
class=
"icon-speech-bubble"
></i>
</div>
</div>
\ No newline at end of file
src/frontend/views/classes-info/setting.php
0 → 100644
View file @
25c1cfd0
<?php
/**
* @var $this yii\web\View
* @var \common\models\Classes $model
* @var $courseCount int
* @var $todayIncome float
* @var $commentCount int
*/
use
frontend\models\MyActiveForm
;
use
yii\helpers\Url
;
$this
->
title
=
'课堂设置'
;
?>
<ul
class=
"tab-headbox"
>
<li><a
href=
"
<?=
Url
::
to
([
'classes-info/index'
])
?>
"
>
基本信息
</a></li>
<li
class=
"active"
><a
href=
"#"
>
课堂设置
</a></li>
</ul>
<div
class=
"send-class apply-class-box m-t-50"
>
<div
class=
"tit"
>
课堂设置
</div>
<?php
$form
=
MyActiveForm
::
begin
([
'id'
=>
'applyForm'
,
'options'
=>
[
'name'
=>
'applyClass'
]]);
?>
<?=
$form
->
field
(
$model
,
'name'
,
[
'inputOptions'
=>
[
'placeholder'
=>
'请输入课堂名称'
]])
?>
<?=
$form
->
field
(
$model
,
'intro'
,
[
'template'
=>
"
{
label
}
\n
<div class=
\"
cls-intro-textarea
\"
>
{
input}</div>\n{hint}\n{error
}
"
])
->
textarea
([
'placeholder'
=>
'填写分享或培训的案例链接…'
])
?>
<div
class=
"btn-box text-center"
style=
"margin-top: 10px; "
>
<a
href=
"
<?=
Url
::
to
([
'classes-info/index'
])
?>
"
class=
"btn btn-link m-l-10"
>
取消
</a><button
type=
"submit"
class=
"btn btn-save m-l-10"
>
保存
</button>
</div>
<?php
MyActiveForm
::
end
();
?>
</div>
\ No newline at end of file
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