Yii Framework Forum: [Extension] Yiistrap - Yii Framework Forum

Jump to content

  • (5 Pages)
  • +
  • 1
  • 2
  • 3
  • 4
  • 5
  • You cannot start a new topic
  • You cannot reply to this topic

[Extension] Yiistrap The brand new version of the Yii-Bootstrap extension Rate Topic: ****- 1 Votes

#41 User is offline   Reza Bagheri 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 19-January 13
  • Location:Georgia

Posted 03 August 2013 - 12:18 AM

Hi,
How can in include css file in my project?
I use yiistrap and use this code in main.php:
<?php Yii::app()->bootstrap->register(); ?>
<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/style.css" />

but in client side, i see thi code:
<link rel="stylesheet" type="text/css" href="/ali/themes/reza/css/style.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="/ali/assets/7b69d932/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="/ali/assets/7b69d932/css/bootstrap-responsive.css" />
<link rel="stylesheet" type="text/css" href="/ali/assets/7b69d932/css/yiistrap.css" />


i want customize some class(like body) and yiistrap override this!
how can i do?

***update***
I can't undrestand but when i change this code:
<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/style.css" />
<title><?php echo CHtml::encode($this->pageTitle); ?></title>

to this:
<title><?php echo CHtml::encode($this->pageTitle); ?></title>
<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/style.css" />

thats promlem fixed!

This post has been edited by reza bagheri: 03 August 2013 - 01:17 AM

0

#42 User is offline   bonnie 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 70
  • Joined: 08-February 11

Posted 03 August 2013 - 03:46 PM

View Postbonnie, on 01 August 2013 - 09:58 PM, said:

Am trying to create a link button as per the following code but the link is not working. In yiibooster it used to work. Any idea how to fix it.
<?php
echo TbHtml::button('Forgot Password',
array(
'color' => TbHtml::BUTTON_COLOR_PRIMARY,
'url'   => Yii::app()->createUrl('user/forgotpassword'),
));
?>




I got it working by changing TbHtml::button to TbHtml::linkButton
0

#43 User is offline   The Nutz 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 09-August 13

Posted 12 August 2013 - 02:53 PM

Hi, i'm new to yiistrap and i've been trying to find a documentation with the parameters available for the Navbar widget with no success, my problem is the following:

with this code i dont see the navigation bar but the name of the app

<?php $this->widget('bootstrap.widgets.TbNavbar',array(
	'brandLabel' => '',
	'display' => null, // default is static to top
    'items'=>array(
        array(
            'class'=>'bootstrap.widgets.TbNavbar',
            'items'=>array(
                array('label'=>'Home', 'url'=>array('/site/index')),
                array('label'=>'About', 'url'=>array('/site/page', 'view'=>'about')),
                array('label'=>'Contact', 'url'=>array('/site/contact')),
                array('label'=>'Login', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest),
                array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest)
            ),
        ),
    ),
)); ?>


and when i go to the other views of the site, like index.php?r=site/contact, i get a CExeption "TbActiveForm"."type" not defined

and it shows the error in the following lines of CWidgetFactory.php

161         foreach($properties as $name=>$value)
162             $widget->$name=$value;
163         return $widget;


i would really appreciate your help
Also if there is a complete documentation available i could really use the link xD
and by the way you are doing a great work with your extensions!
0

#44 User is offline   btilley 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 23
  • Joined: 21-February 12

Posted 17 August 2013 - 09:51 PM

Thinking about switching to Yiistrap. Could not find this in the forums. Does anyone know if yiistrap supports scaffolding similar to twitter Bootstrap?

Thanks,
Brandon
0

#45 User is offline   Gerhardvr 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 18-August 13

Posted 18 August 2013 - 11:10 PM

View PostThe Nutz, on 12 August 2013 - 02:53 PM, said:

Hi, i'm new to yiistrap and i've been trying to find a documentation with the parameters available for the Navbar widget with no success, my problem is the following:

with this code i dont see the navigation bar but the name of the app

<?php $this->widget('bootstrap.widgets.TbNavbar',array(
	'brandLabel' => '',
	'display' => null, // default is static to top
    'items'=>array(
        array(
            'class'=>'bootstrap.widgets.TbNavbar',
            'items'=>array(
                array('label'=>'Home', 'url'=>array('/site/index')),
                array('label'=>'About', 'url'=>array('/site/page', 'view'=>'about')),
                array('label'=>'Contact', 'url'=>array('/site/contact')),
                array('label'=>'Login', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest),
                array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest)
            ),
        ),
    ),
)); ?>


and when i go to the other views of the site, like index.php?r=site/contact, i get a CExeption "TbActiveForm"."type" not defined

and it shows the error in the following lines of CWidgetFactory.php

161         foreach($properties as $name=>$value)
162             $widget->$name=$value;
163         return $widget;


i would really appreciate your help
Also if there is a complete documentation available i could really use the link xD
and by the way you are doing a great work with your extensions!


I think you problem might be that for you dropdown menu you are also using tbNavbar. Try changing the class of the droptdown menu to tbNav.

<?php $this->widget('bootstrap.widgets.TbNavbar',array(
        'brandLabel' => '',
        'display' => null, // default is static to top
    'items'=>array(
        array(
            class'=>'bootstrap.widgets.TbNav',
            'items'=>array(
                array('label'=>'Home', 'url'=>array('/site/index')),
                array('label'=>'About', 'url'=>array('/site/page', 'view'=>'about')),
                array('label'=>'Contact', 'url'=>array('/site/contact')),
                array('label'=>'Login', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest),
                array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest)
            ),
        ),
    ),
)); ?>

0

#46 User is offline   speculatius 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 12
  • Joined: 13-December 11

Posted 19 August 2013 - 02:04 PM

Hi,

thanks for this valuable extension. I would like to ask if TbHtml::customActiveControlGroup is supposed to render validation errors. I posted also more concrete question in separate thread here. Thank you for answer.
0

#47 User is offline   Gerhardvr 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 18-August 13

Posted 19 August 2013 - 05:02 PM

Note that I solved the below issue. Follow the link in the post to see how I did it.

Hi,

I would like to append to the class of the prepend and append option of the textFieldControlGroup. I have a more complete description of what I'm trying to achieve here.

Looking at the API code it seems that it can be done by setting HTMLOptions for the prepend and append option itself but it is not clear to me whether it can be done or how to do so.

Any assistance will be appreciated.
0

#48 User is offline   speculatius 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 12
  • Joined: 13-December 11

Posted 20 August 2013 - 12:25 PM

View Postspeculatius, on 19 August 2013 - 02:04 PM, said:

Hi,

thanks for this valuable extension. I would like to ask if TbHtml::customActiveControlGroup is supposed to render validation errors. I posted also more concrete question in separate thread here. Thank you for answer.


Solution found and mentioned here. Feel free to add it into yiistrap if needed.
0

#49 User is offline   Lukatone 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 05-February 12

Posted 24 August 2013 - 10:40 AM

View PostX-Loading, on 20 July 2013 - 06:33 AM, said:

Hi Chris,

Thanks a lot for all the great work you're doing!

I have a couple of questions regarding TbModal widget which is currently present in both Yiistrap and Yiiwheels:

1) Which one I should use? What is the difference between them?

2) How I can place another widget in the body of modal using Yiistrap or Yiiwheels? Previously I've used YiiBooster and it allowed to place anything in between of beginWidget and endWidget but in these new widgets I'm supposed to fill in 'header', 'content' and 'footer' attributes instead so it is not clear to me how I can place my custom php code (e.g. widgets, renderpartial etc.) in there?

Thank you in advance!


Hello Yii users!
Could anyone solve the second point. I´m dealing with the same problem and i´m stuck...

Thanks and cheers!
Lukatone
0

#50 User is offline   Gerhardvr 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 18-August 13

Posted 29 August 2013 - 06:43 PM

View Postspeculatius, on 20 August 2013 - 12:25 PM, said:

Solution found and mentioned here. Feel free to add it into yiistrap if needed.


Please see the update to this. The original solutions proposed were in essence hacks. The correct solution has now been posted and should be included in YiiStrap in the tbActiveForm class.

I will submit it to the authors of YiiStrap for inclusion.
0

#51 User is offline   leo4all 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 31
  • Joined: 01-April 13
  • Location:Alajuela, Costa Rica

Posted 11 September 2013 - 09:23 PM

Hi All,

Why if I get rid of ControlGroup on each element doesn't load jquery.yiiactiveform.js file.

The validation only work if I have ControlGroup on each element.

on main layout.
<?php $this->renderPartial('_login', array('model'=>$model)); ?>

_login file.

<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm', array(
	'id'=>'login-form',
	'action' => $this->createUrl('user/login'),
	'enableClientValidation'=>true,
 	'htmlOptions'=>array('class'=>'well'),
	'clientOptions'=>array(
		'validateOnSubmit'=>true,
	),
	
)); ?>
<!-- your form elements here -->
  	<?php echo $form->textFieldControlGroup($model, 'username', 
    	    array('placeholder' => 'Email', 'size' => TbHtml::INPUT_SIZE_SMALL)); ?>

    <?php echo $form->passwordFieldControlGroup($model, 'password', 
    	array('placeholder' => 'Password', 'size' => TbHtml::INPUT_SIZE_SMALL)); ?>

    <?php echo $form->checkBoxControlGroup($model, 'rememberMe', 
		array('label' => 'Remember me')); ?>
    <?php echo TbHtml::submitButton('Submit'); ?>
<?php $this->endWidget(); ?>


Also I tried to add renderPartial(, false, true) and it load twice bootstrap files.

Can anyone explain me, why is happen this way.

Best Regards.
0

#52 User is offline   Ednei 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 39
  • Joined: 16-May 13

Posted 20 September 2013 - 02:21 PM

Hi!

Someone has an example of TbCollapse?

Tks!
0

#53 User is offline   Ednei 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 39
  • Joined: 16-May 13

Posted 25 September 2013 - 08:08 AM

I'm using TbGridView, but the row search does not work! How do I activate this feature?
0

#54 User is offline   MistaMoh 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 18
  • Joined: 23-August 13

Posted 26 September 2013 - 11:46 PM

Hi all,

I've been struggling for many hours with a crazy bootstrap issue.
Your help would be very much appreciated.

Context :
I am using a few widgets with those standard icons (glyphicons) provided @ ext/bootstrap/assets/images. It works fine (sample code below) .
Then, I thought : let's customize the icons, shoul be child play. Actually, the process is quite complicated and needs some css overriding, but that's not the issue.

Issue :
The thing is, whatever I do to those damned CSS files @ ext/bootstrap/assets/css, nothing would change.
Worse thant that : I removed the whole content of the assets folder, and my web site is still displaying the same pages with the same bootstrap style.

Of course, I did reset firefox, reset wamp, tried chrome, reset the server (my pc) and even upgraded and adapted to yiistrap, and I still get the same issue.

Could someone please give me a clue on :
1. How can bootstrap extensions work without their css files (at least those i spotted, css and LESS)
2. Then, if anyone succeeded in customizing the icons, I'm very interested in guidance there too

Thanks people, hope you'll find this more entertaining than I do.

Here's a sample of my main.php layout file.
I'm using a bootstrap widget with icons :

	
<?php $this->widget('bootstrap.widgets.TbNav', array(
		'type'=>'list',
		'items'=>array(
			TbHtml::menuDivider(),
			array('label'=>t('PROFILE BUSINESS')),
			array('label'=>t('Login'), 'icon'=>'user', 'url'=>array('/home/login'), 'visible'=>Yii::app()->user->isGuest),
			array('label'=>t('Register'), 'icon'=>'pencil', 'url'=>'#', 'visible'=>Yii::app()->user->isGuest),
			array('label'=>t('Logout').' ('.Yii::app()->user->name.')', 'icon'=>'off', 'url'=>array('/home/logout'), 'visible'=>!Yii::app()->user->isGuest),
			array('label'=>t('Profile'), 'icon'=>'user', 'url'=>'#', 'visible'=>!Yii::app()->user->isGuest),
			array('label'=>t('Profile settings'), 'icon'=>'cog', 'url'=>'#', 'visible'=>!Yii::app()->user->isGuest),
			array('label'=>t('ADDITIONNAL FEATURES')),
			array('label'=>t('Messages'), 'icon'=>'envelope', 'url'=>'#', 'visible'=> !Yii::app()->user->isGuest),
			array('label'=>t('Suggestions'), 'icon'=>'flag', 'url'=>'#', 'visible'=> !Yii::app()->user->isGuest),
			array('label'=>t('Announcements'), 'icon'=>'home', 'url'=>array('/home'),
		)),
	)); ?>



Believe me, this is displaying real bootstrap style although no css is available...
0

#55 User is offline   ekerazha 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 532
  • Joined: 10-October 08
  • Location:European Union

Posted 27 September 2013 - 04:55 AM

Is a Bootstrap 3.0 version planned?
Yii user #37
0

#56 User is offline   robawtic 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 22-August 13

Posted 27 September 2013 - 02:31 PM

How do I render a labelTD in a YiiWheels GridView?
0

#57 User is offline   almix 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 29
  • Joined: 23-September 11

Posted 29 September 2013 - 03:34 AM

How to set 'url' for image in TbHtml::medias ? Now it is "#".
0

#58 User is offline   Constantin Chuprik 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 28-January 12

Posted 30 September 2013 - 12:26 AM

How to migrate from yii-bootstrap to YiiStrap?
0

#59 User is offline   Ednei 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 39
  • Joined: 16-May 13

Posted 30 September 2013 - 10:44 AM

View PostEdnei, on 20 September 2013 - 02:21 PM, said:

<br />Hi!<br /><br />Someone has an example of TbCollapse? <br /><br />Tks!<br />
<br /><br /><br />
Someone?
0

#60 User is offline   laz2719 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 24-September 13

Posted 02 October 2013 - 08:25 PM

Hello Chris,

I just want to know if you have a downloadable documentation for yiistrap and yiiwheels? Or just examples how to use those.. If you have please could you tell me how to get it...
0

Share this topic:


  • (5 Pages)
  • +
  • 1
  • 2
  • 3
  • 4
  • 5
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users