Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
Yii Bootstrap 3
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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Common
Yii Bootstrap 3
Commits
833f801f
Commit
833f801f
authored
May 11, 2014
by
TTouka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced span-*s with col-md-*.
Updated TbNavbar.
parent
f5557443
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
14 deletions
+19
-14
.hgignore
.hgignore
+2
-0
main.php
demo/protected/views/layouts/main.php
+6
-6
index.php
demo/protected/views/site/index.php
+2
-1
TbNavbar.php
widgets/TbNavbar.php
+9
-7
No files found.
.hgignore
View file @
833f801f
...
@@ -3,3 +3,5 @@ syntax: glob
...
@@ -3,3 +3,5 @@ syntax: glob
demo/assets/*
demo/assets/*
demo/protected/config/local.php
demo/protected/config/local.php
demo/protected/runtime/*
demo/protected/runtime/*
*.swp
*.swo
demo/protected/views/layouts/main.php
View file @
833f801f
...
@@ -63,7 +63,7 @@
...
@@ -63,7 +63,7 @@
'active'
=>
Yii
::
app
()
->
controller
->
id
===
'site'
&&
Yii
::
app
()
->
controller
->
action
->
id
===
'index'
),
'active'
=>
Yii
::
app
()
->
controller
->
id
===
'site'
&&
Yii
::
app
()
->
controller
->
action
->
id
===
'index'
),
array
(
'label'
=>
'Setup'
,
'url'
=>
array
(
'site/setup'
)),
array
(
'label'
=>
'Setup'
,
'url'
=>
array
(
'site/setup'
)),
),
),
'htmlOptions'
=>
array
(
'class'
=>
'pull-left'
),
'htmlOptions'
=>
array
(
'class'
=>
'pull-left
navbar-nav
'
),
),
),
'<div class="add-this pull-right">
'<div class="add-this pull-right">
<!-- AddThis Button BEGIN -->
<!-- AddThis Button BEGIN -->
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
array
(
'label'
=>
'Fork me on Bitbucket'
,
'url'
=>
'http://www.bitbucket.org/Crisu83/yii-bootstrap'
,
'linkOptions'
=>
array
(
'target'
=>
'_blank'
)),
array
(
'label'
=>
'Fork me on Bitbucket'
,
'url'
=>
'http://www.bitbucket.org/Crisu83/yii-bootstrap'
,
'linkOptions'
=>
array
(
'target'
=>
'_blank'
)),
array
(
'label'
=>
'Follow me on Twitter'
,
'url'
=>
'http://www.twitter.com/Crisu83'
,
'linkOptions'
=>
array
(
'target'
=>
'_blank'
)),
array
(
'label'
=>
'Follow me on Twitter'
,
'url'
=>
'http://www.twitter.com/Crisu83'
,
'linkOptions'
=>
array
(
'target'
=>
'_blank'
)),
),
),
'htmlOptions'
=>
array
(
'class'
=>
'pull-right'
),
'htmlOptions'
=>
array
(
'class'
=>
'pull-right
navbar-nav
'
),
),
),
),
),
));
?>
));
?>
...
@@ -92,7 +92,7 @@
...
@@ -92,7 +92,7 @@
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"
span
9"
>
<div
class=
"
col-md-
9"
>
<?php
$this
->
beginWidget
(
'bootstrap.widgets.TbHeroUnit'
,
array
(
<?php
$this
->
beginWidget
(
'bootstrap.widgets.TbHeroUnit'
,
array
(
'heading'
=>
Yii
::
app
()
->
name
,
'heading'
=>
Yii
::
app
()
->
name
,
...
@@ -116,7 +116,7 @@
...
@@ -116,7 +116,7 @@
</div>
</div>
<div
class=
"
span
3"
>
<div
class=
"
col-md-
3"
>
<div
class=
"donate"
>
<div
class=
"donate"
>
<h3>
Support development
</h3>
<h3>
Support development
</h3>
...
@@ -161,7 +161,7 @@
...
@@ -161,7 +161,7 @@
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"
span
6"
>
<div
class=
"
col-md-
6"
>
<p
class=
"powered"
>
<p
class=
"powered"
>
Powered by
<?php
echo
CHtml
::
link
(
'Yii'
,
'http://www.yiiframework.com'
,
array
(
'target'
=>
'_blank'
));
?>
/
Powered by
<?php
echo
CHtml
::
link
(
'Yii'
,
'http://www.yiiframework.com'
,
array
(
'target'
=>
'_blank'
));
?>
/
...
@@ -174,7 +174,7 @@
...
@@ -174,7 +174,7 @@
</div>
</div>
<div
class=
"
span
6"
>
<div
class=
"
col-md-
6"
>
<p
class=
"copy"
>
<p
class=
"copy"
>
©
Christoffer Niska
<?php
echo
date
(
'Y'
);
?>
©
Christoffer Niska
<?php
echo
date
(
'Y'
);
?>
...
...
demo/protected/views/site/index.php
View file @
833f801f
...
@@ -1961,11 +1961,12 @@ Yii::app()->user->setFlash('error', '<strong>Oh snap!</strong> Change a few thin
...
@@ -1961,11 +1961,12 @@ Yii::app()->user->setFlash('error', '<strong>Oh snap!</strong> Change a few thin
'fixed'
=>
'top'
,
'fixed'
=>
'top'
,
'brand'
=>
false
,
'brand'
=>
false
,
'collapse'
=>
true
,
'collapse'
=>
true
,
'htmlOptions'
=>
array
(
'class'
=>
'subnav'
),
'htmlOptions'
=>
array
(
'class'
=>
'subnav
navbar navbar-default navbar-nav
'
),
'items'
=>
array
(
'items'
=>
array
(
array
(
array
(
'class'
=>
'bootstrap.widgets.TbMenu'
,
'class'
=>
'bootstrap.widgets.TbMenu'
,
'scrollspy'
=>
'.navbar'
,
'scrollspy'
=>
'.navbar'
,
'htmlOptions'
=>
array
(
'class'
=>
'navbar-nav'
),
'items'
=>
array
(
'items'
=>
array
(
array
(
'label'
=>
'Buttons'
,
'url'
=>
'#tbButton'
),
array
(
'label'
=>
'Buttons'
,
'url'
=>
'#tbButton'
),
array
(
'label'
=>
'Buttons groups'
,
'url'
=>
'#tbButtonGroup'
),
array
(
'label'
=>
'Buttons groups'
,
'url'
=>
'#tbButtonGroup'
),
...
...
widgets/TbNavbar.php
View file @
833f801f
...
@@ -81,9 +81,9 @@ class TbNavbar extends CWidget
...
@@ -81,9 +81,9 @@ class TbNavbar extends CWidget
$this
->
brandOptions
[
'href'
]
=
CHtml
::
normalizeUrl
(
$this
->
brandUrl
);
$this
->
brandOptions
[
'href'
]
=
CHtml
::
normalizeUrl
(
$this
->
brandUrl
);
if
(
isset
(
$this
->
brandOptions
[
'class'
]))
if
(
isset
(
$this
->
brandOptions
[
'class'
]))
$this
->
brandOptions
[
'class'
]
.=
' brand'
;
$this
->
brandOptions
[
'class'
]
.=
'
navbar-
brand'
;
else
else
$this
->
brandOptions
[
'class'
]
=
'brand'
;
$this
->
brandOptions
[
'class'
]
=
'
navbar-
brand'
;
}
}
$classes
=
array
(
'navbar'
);
$classes
=
array
(
'navbar'
);
...
@@ -110,15 +110,16 @@ class TbNavbar extends CWidget
...
@@ -110,15 +110,16 @@ class TbNavbar extends CWidget
public
function
run
()
public
function
run
()
{
{
echo
CHtml
::
openTag
(
'div'
,
$this
->
htmlOptions
);
echo
CHtml
::
openTag
(
'div'
,
$this
->
htmlOptions
);
echo
'<div class="
navbar-inner"><div class="
'
.
$this
->
getContainerCssClass
()
.
'">'
;
echo
'<div class="'
.
$this
->
getContainerCssClass
()
.
'">'
;
$collapseId
=
TbCollapse
::
getNextContainerId
();
$collapseId
=
TbCollapse
::
getNextContainerId
();
if
(
$this
->
collapse
!==
false
)
if
(
$this
->
collapse
!==
false
)
{
{
echo
'<a class="btn btn-navbar" data-toggle="collapse" data-target="#'
.
$collapseId
.
'">'
;
echo
'<div class="navbar-header">'
;
echo
'<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#'
.
$collapseId
.
'">'
;
echo
'<span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span>'
;
echo
'<span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span>'
;
echo
'</
a
>'
;
echo
'</
button
>'
;
}
}
if
(
$this
->
brand
!==
false
)
if
(
$this
->
brand
!==
false
)
...
@@ -134,10 +135,11 @@ class TbNavbar extends CWidget
...
@@ -134,10 +135,11 @@ class TbNavbar extends CWidget
if
(
$this
->
collapse
!==
false
)
if
(
$this
->
collapse
!==
false
)
{
{
echo
'</div>'
;
$this
->
controller
->
beginWidget
(
'bootstrap.widgets.TbCollapse'
,
array
(
$this
->
controller
->
beginWidget
(
'bootstrap.widgets.TbCollapse'
,
array
(
'id'
=>
$collapseId
,
'id'
=>
$collapseId
,
'toggle'
=>
false
,
// navbars should be collapsed by default
'toggle'
=>
false
,
// navbars should be collapsed by default
'htmlOptions'
=>
array
(
'class'
=>
'nav-collapse collapse'
),
'htmlOptions'
=>
array
(
'class'
=>
'nav
bar
-collapse collapse'
),
));
));
}
}
...
@@ -160,7 +162,7 @@ class TbNavbar extends CWidget
...
@@ -160,7 +162,7 @@ class TbNavbar extends CWidget
if
(
$this
->
collapse
!==
false
)
if
(
$this
->
collapse
!==
false
)
$this
->
controller
->
endWidget
();
$this
->
controller
->
endWidget
();
echo
'</div></div>
</div>
'
;
echo
'</div></div>'
;
}
}
/**
/**
...
...
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