Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
347e79a4
Commit
347e79a4
authored
Sep 09, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #863: adjusted horizontal form layout
parent
791905e8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
34 deletions
+3
-34
main.php
apps/basic/views/layouts/main.php
+1
-1
login.php
apps/basic/views/site/login.php
+2
-1
_view.php
framework/yii/gii/generators/crud/templates/views/_view.php
+0
-32
No files found.
apps/basic/views/layouts/main.php
View file @
347e79a4
...
@@ -36,7 +36,7 @@ app\config\AppAsset::register($this);
...
@@ -36,7 +36,7 @@ app\config\AppAsset::register($this);
array
(
'label'
=>
'Contact'
,
'url'
=>
array
(
'/site/contact'
)),
array
(
'label'
=>
'Contact'
,
'url'
=>
array
(
'/site/contact'
)),
Yii
::
$app
->
user
->
isGuest
?
Yii
::
$app
->
user
->
isGuest
?
array
(
'label'
=>
'Login'
,
'url'
=>
array
(
'/site/login'
))
:
array
(
'label'
=>
'Login'
,
'url'
=>
array
(
'/site/login'
))
:
array
(
'label'
=>
'Logout ('
.
Yii
::
$app
->
user
->
identity
->
username
.
')'
,
'url'
=>
array
(
'/site/logout'
)),
array
(
'label'
=>
'Logout ('
.
Html
::
encode
(
Yii
::
$app
->
user
->
identity
->
username
)
.
')'
,
'url'
=>
array
(
'/site/logout'
)),
),
),
));
));
NavBar
::
end
();
NavBar
::
end
();
...
...
apps/basic/views/site/login.php
View file @
347e79a4
...
@@ -19,7 +19,8 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -19,7 +19,8 @@ $this->params['breadcrumbs'][] = $this->title;
'id'
=>
'login-form'
,
'id'
=>
'login-form'
,
'options'
=>
array
(
'class'
=>
'form-horizontal'
),
'options'
=>
array
(
'class'
=>
'form-horizontal'
),
'fieldConfig'
=>
array
(
'fieldConfig'
=>
array
(
'template'
=>
"<div class=
\"
col-lg-1
\"
>
{
label
}
</div>
\n
<div class=
\"
col-lg-3
\"
>
{
input
}
</div>
\n
<div class=
\"
col-lg-8
\"
>
{
error
}
</div>"
,
'template'
=>
"
{
label
}
\n
<div class=
\"
col-lg-3
\"
>
{
input
}
</div>
\n
<div class=
\"
col-lg-8
\"
>
{
error
}
</div>"
,
'labelOptions'
=>
array
(
'class'
=>
'col-lg-1 control-label'
),
),
),
));
?>
));
?>
...
...
framework/yii/gii/generators/crud/templates/views/_view.php
deleted
100644 → 0
View file @
791905e8
<?php
/**
* The following variables are available in this template:
* - $this: the CrudCode object
*/
?>
<?php
echo
"<?php
\n
"
;
?>
/* @var $this
<?php
echo
$this
->
getControllerClass
();
?>
*/
/* @var $data
<?php
echo
$this
->
getModelClass
();
?>
*/
?>
<div
class=
"view"
>
<?php
echo
"
\t
<b><?php echo CHtml::encode(
\$
data->getAttributeLabel('
{
$this
->
tableSchema
->
primaryKey
}
')); ?>:</b>
\n
"
;
echo
"
\t
<?php echo CHtml::link(CHtml::encode(
\$
data->
{
$this
->
tableSchema
->
primaryKey
}
), array('view', 'id'=>
\$
data->
{
$this
->
tableSchema
->
primaryKey
}
)); ?>
\n\t
<br />
\n\n
"
;
$count
=
0
;
foreach
(
$this
->
tableSchema
->
columns
as
$column
)
{
if
(
$column
->
isPrimaryKey
)
continue
;
if
(
++
$count
==
7
)
echo
"
\t
<?php /*
\n
"
;
echo
"
\t
<b><?php echo CHtml::encode(
\$
data->getAttributeLabel('
{
$column
->
name
}
')); ?>:</b>
\n
"
;
echo
"
\t
<?php echo CHtml::encode(
\$
data->
{
$column
->
name
}
); ?>
\n\t
<br />
\n\n
"
;
}
if
(
$count
>=
7
)
echo
"
\t
*/ ?>
\n
"
;
?>
</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