patricktalmadge / bootstrapper Goto Github PK
View Code? Open in Web Editor NEWLaravel Twitter Bootstrap Bundle
Laravel Twitter Bootstrap Bundle
Not sure if this is a problem or not, but I've noticed there are a lot of extra spaces added to class attributes here and there:
Two examples:
<button class=" btn-primary btn" type="submit">Save</button>
<div class="control-group ">
Why is this? And, could this cause any problems in certain circumstances?
Add the ability to do Stacked progress bars
Close table function
tr and td created based of model or array?
I can't figure out why but it appears that the tables helper is broken. I tried this code and it did not work:
$body = array(
array(
'id' => '1',
'fname' => 'Patrick',
'lname' => 'Talmadge'
)
);
echo Table::open();
echo Table::headers('#', 'First Name', 'Last Name');
echo Table::body($body);
echo Table::close();
Other things like creating buttons works fine. I'm doing this from within a view - not sure if that makes a difference. I'm not seeing any PHP errors getting thrown but the server just responds with an exception.
Also I believe on your examples page you have a echo Table::open();
at the bottom of the example code when it should be echo Table::close()
To be able to use other prefixes (e.g. fa-icon) this needs to be removed / adaptable somehow. Right now its forcing icon-
in front of the icon.
on navigation.php on line 202 i change this
$title = ' '.$title;
to this
$title = ' '.$title;
Now when i build i navigation bar a can use my icons css custom class's and steel use the bootstraps icons
Example
echo Navbar::create( __('admin::admin.administration'), '#',
array(
array(
'attributes' => array(),
'items' => array(
array('label'=>'Home', 'icon' => 'fam-home','url' => '#', 'active' => true),
and if a want to use bootstrap icons i do this
array('label'=>'Home', 'icon' => 'icon-home','url' => '#', 'active' => true),
It would be nice if someone would take the initiative to make sublime snippets for this useful bundle. I wish I could.
The install command php artisan bundle:install bootstrapper
is giving the error below:
file_get_contents(http://nodeload.github.com/patricktalmadge/bootstrapper/zipball/master): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
Hi,
I've installed this via Artisan, put the code where it needs to be and published the assets - but when I looked at the generated CSS/JS references in the header, they didn't point to a bundle directory, just to directories like '/js', /css' even though a bundle directory named 'bootstrapper' had been generated properly.
Turns out that in the Bundles start.php, line 34 states:
Asset::container('bootstrapperbootstrapper')->bundle('bootstrapper');
Should be:
Asset::container('bootstrapper')->bundle('bootstrapper');
Making that change, it worked perfectly.
Thanks for the bundle - looks great!
it would be nice if the Form could handle showing its own validation errors.
If there is an error, it should be able to set the error class + show the text. Right now its way to complicated to get that to work properly.
Hi,
//Asset::container('bootstrapper')->add('jquery', 'js/jquery-1.7.2.js');
Asset::container('bootstrapper')->add('jquery', 'js/jquery-1.7.2.min.js');
Shouldn't publish copy only 'min' files //not commented ?
<button type="submit" name="controls" value="prev" class="btn btn-large btn-inverse"><i class="icon-step-backward icon-white"></i></button>
Typography Emphasis Classes for paragraphs
In a lot of Bootstrapper classes users are asked to format their links the following way :array('label' => 'link', 'url' => '#')
. There is also an active key to manually specify active link but that's facultative since Bootstrapper automatically calculates the current link (I found a way to enhance that actually) and an attributes key for other cases.
Now for everyday life that's quite verbose and one of the reasons creating navigation elements is so code-heavy. So I suggest two helpers :
Navigation::link('label', '#')
// returns array('label', => 'label', 'url' => '#')
Navigation::links(array(
'label' => '#',
'label2' => '#',
));
// returns an array of Navigation::link()-formatted links, ready to be fed into any function
This will helper making whatever the users input future-proof, if for any reason you one day want to change the key to use or whatever, and will help formatting the user's data faster for use with the classes and functions.
Others way to speed-up the transition – from whatever the user has to however you want the data to be formatted – should be thought about.
With the latest Laravel update (3.2.7), Bootstrapper Form:: doesn't match a few calls any more:
submit
reset
button
they have a default value of 'null' in Laravel Form::
I'd like to add an helper to the Tables
class but I'm not sure about a thing or two : the helper would basically print out the following :
<tr>
<td colspan="50">
{content}
</td>
</tr>
It's a pattern I use all the time to create a table row that spans the whole table but I'm unsure about if other people also do this or about maybe a better way to achieve that that just remained unknown to me all those years (or just maybe that doesn't fit into Bootstrapper's scope).
Unsure about a possible function name too. What do you think ?
I've almost finished writing the tests, now we need to hook up Bootstrapper to Travis. I already created the file, but to test it you need to go in your travis profile and turn on the bootstrapper repo – as collaborator I can't myself. :)
Hi,
I have a problem with pagination. The NEXT button is not visible, because there is no text :
<li class=""><a href="http://localhost/artykuly?page=5"></a></li>
See http://forums.laravel.com/viewtopic.php?id=2014
I'll try to look into it if I have some time soon.
Typography Description - Takes array with title and text elements
in bundles/bootstrapper/tabbable.php on line 41
i tried to use the tabbed bar like in the example:
{{ Tabbable::tabs_left(
array(
array('label'=>'Section 1',
'active' => true,
'content' => "
I'm in Section 1.
"),Howdy, I'm in Section 2.
"),What up girl, this is Section 3.
"),but it throws that exception
Why are some of the class names plural, while others are singular? In my opinion it's very confusing. I overcome it by changing the alias, but I think you should make a choice to go with one or the other. I prefer singular :)
Form::control_group(
Form::label('password', 'Password'),
Form::large_password('password', array('value' => 'hi') )
);
<?php echo Form::control_group(
Form::label('heh', 'heh'),
Form::text('heh', '', array('value' => 'hi') )
);?>
Is value disallowed or something?
Hi! Thanks for great job, your bundle is excellent!
But today when I'am trying to install it with Artisan, I received an error:
PHP Warning: file_get_contents(http://nodeload.github.com/patricktalmadge/bootstrapper/zipball/master): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /www/mypj.dev/laravel/cli/tasks/bundle/providers/provider.php on line 69
Fetching [bootstrapper]...
Warning: file_get_contents(http://nodeload.github.com/patricktalmadge/bootstrapper/zipball/master): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /www/mypj.dev/laravel/cli/tasks/bundle/providers/provider.php on line 69
Error downloading the requested bundle.
What's happen?
Otherwise, the HTML source looks so so ugly in the browser.
One example
https://github.com/patricktalmadge/bootstrapper/blob/master/buttons.php#L67
Appending ."\n"
to the end.
Images class for creating img-rounded, img-circle, and img-polariod images.
When wii upgrade to twitter bootstrap 2.2.1 and JQuery 1.8.2, does there any plan to upgrade?
Can you please make it possible for the Navigation headers to have icons as well?
Verify block buttons work
Vertical buttons group
As you all know (or may know after I finish that sentence), Laravel 4 will unveil a lot of changes, not necessarily in the way you use it but behind the curtains. The biggest change is that every part of Laravel will be a separated Composer package, and as far as recent interviews of Taylor go, bundles should also be managed by Composer as PHP packages.
Now, although we're not talking near future here (the first alpha should come in the next months) that means bundles will at one point have to conform to PHP standarts in order to be accepted on Composer. That means following PSR and that means somewhat big coding style changes like switching from tabs to spaces indentation.
I didn't want to make those changes right now without Patrick's approval but in any case Boostrapper needs some cleanup standards-wise. So if that's ok I can work on it, if not that can be put off to the future. Your pick.
Note that there are some standard guidelines you can't enforce in Laravel 3, like if you want to use camelCase in unit testing (which is the standard) you won't completely be able to.
I think you should set a version id for this lovely bundle so we may know if there has been a new release soon we haven't checked. Ex: Bootstrapper V. 3.6.7.2
I am also having another issue with assets. When I publish assets, js, img and css folders are created under bundle's folder and not published to the real assets folder. It publishes to the right assets folder when I make a fresh laravel install.
Thanks.
After i updated with artisan my application does this.
Unhandled Exception
Message:
Cannot use object of type Laravel\Lang as array
Location:
... \bundles\bootstrapper\src\Bootstrapper\Helpers.php on line 32
It driving me nots
http://laravel.com/docs/views/html#links
{{ Buttons::primary_link('hi im a link', $url); }}
Params should be backwards to be consistent with Laravel
Add Disabled state to tabs, pills, and list
I pushed a pull request today and it's just when I looked at the script that I saw a typo that was there before but got past me :
start.php:32
<?php
'BootstrapperBootstrapper\\Badges' => __DIR__.'/badges.php',
I'm not at work so I can't make a pull request but I though you should know :)
Add Deemphasized button type to Button class
https://github.com/patricktalmadge/bootstrapper/blob/master/buttons.php#L94
You're converting the $value variable to entities. This prevents me from doing:
{{ Buttons::mini_inverse_link('<i class="icon-download-alt icon-white"></i>', $url); }}
at the top of my template I used:
echo Asset::container('bootstrapper')->styles();
this output the following lines:
<link href="http://localhost/bundles/bootstrapper/css/bootstrap.min.css" media="all" type="text/css" rel="stylesheet">
<link href="http://localhost/bundles/bootstrapper/css/bootstrap-responsive.min.css" media="all" type="text/css" rel="stylesheet">
<link href="http://localhost/bundles/bootstrapper/css/nav-fix.css" media="all" type="text/css" rel="stylesheet">
This is incorrect, because nav-fix.css
should come after bootstrap and before the responsive css, as noted here.
An example of the issue it causes is here:
(there is whitespace above the nav bar)
This is fixed if the nav-fix.css
is loaded second and not third.
The readme provides a link to showcase the bundles features, but that link ( http://laravelbootstrapper.phpfogapp.com ) does not work... it gives a warning: For security reasons, framing is not allowed.
I'm kind of busy at work these days so I don't have much time to work on Bootstrapper, all the more considering I now have two other bundles to work on.
I still found time to create a quick class to implement the new media object in Bootstrap 2.1.2 :
// Simple media object
MediaObject::create('content', 'path/to/image', array(attributes))
// Add a more detailed image
MediaObject::create('content')
->with_image('path/to/image', 'alt text', array(attributes))
// Add a title to the media object
MediaObject::create('content')
->with_title('<h5 class="media-heading">My custom title</h5>')
// Automatic titles wrapping
MediaObject::create('content')
->with_h2('My title', array(attributes))
// Pull the image to any side
MediaObject::create('content', 'path/to/image')
->pull([left/right])
->pull_left()
->pull_right()
// Nest a media object inside a media object
MediaObject::create('content', 'path/to/image')
->nest(MediaObject::create('content bis', 'image bis')->with_h3('submedia object'))
// You can nest as many objects as you want
MediaObject::create('content', 'path/to/image')
->nest(MediaObject::create('content bis', 'image bis')->with_h3('submedia object'))
->nest(MediaObject::create('content bis', 'image bis')->with_h3('submedia object'))
->nest(MediaObject::create('content bis', 'image bis')->with_h3('submedia object'))
// Display the media objects as a media list
MediaObject::open_list(array(attributes))
MediaObject::create('content', 'path/to/image')
MediaObject::create('content', 'path/to/image')
MediaObject::close_list()
And there you go. This thread is for comments/additions/fixes you deem relevant.
Tests are added and everything is a-ok. Go crazy kids !
Hi,
I keep my assets in assets folder in main folder.
{{ Asset::container('bootstrapper')->styles(); }}
{{ Asset::container('bootstrapper')->scripts(); }}
creates:
link href="assets/bundles/bootstrapper/css/bootstrap.min.css" media="all" type="text/css" rel="stylesheet"
link href="assets/bundles/bootstrapper/css/nav-fix.css" media="all" type="text/css" rel="stylesheet"
link href="assets/bundles/bootstrapper/css/bootstrap-responsive.min.css" media="all" type="text/css" rel="stylesheet"
script src="assets/bundles/bootstrapper/js/jquery-1.7.2.min.js" /script
script src="assets/bundles/bootstrapper/js/bootstrap.min.js" /script
( I have removed < > chars from the code above to seem right)
so I copied you css, img and js folders into the assets/bundles/bootstrapper
This doesn't seem to be a clever way. What do I mistaken?
Thanks.
Add sub menus to dropdowns
I posted the docs site code to github. Here is the link:
https://github.com/patricktalmadge/Bootstrapper-docs
@Anahkiasen I added you as a collaborator to this repo.
Add Inverted variation to navbar
Is this compatible w/ bootstrap 2.1.0?
In your installation instructions, you say to change the class which laravel\database\query.php uses for pagination. Couldn't you come up with a different way to make sure that your class is used? Editing a core Laravel file seems like a very bad idea.
Does anyone see any value in creating unit tests for Bootstrapper?
Opening a thread to track code improvement ideas for bootstrapper.
Weird, Laravel can't find class after upgrade to bootstrapper v4.
=== Here comes the error messages ===
Unhandled Exception
Message:
Class 'Bootstrapper\Buttons' not found
Location:
/home/www/sites/myproject/laravel/autoloader.php on line 55
Stack Trace:
0 /home/www/sites/myproject/laravel/laravel.php(40): Laravel\Error::native(2, 'Class 'Bootstra...', '/home/www/sites...', 55)
1 [internal function]: Laravel{closure}(2, 'Class 'Bootstra...', '/home/www/sites...', 55, Array)
2 /home/www/sites/myproject/laravel/autoloader.php(55): class_alias('Bootstrapper\Bu...', 'Buttons')
3 [internal function]: Laravel\Autoloader::load('Buttons')
4 /home/www/sites/myproject/laravel/view.php(366) : eval()'d code(11): spl_autoload_call('Buttons')
5 /home/www/sites/myproject/laravel/view.php(366): eval()
6 /home/www/sites/myproject/laravel/blade.php(71): Laravel\View->get()
7 [internal function]: Laravel{closure}(Object(Laravel\View))
8 /home/www/sites/myproject/laravel/event.php(199): call_user_func_array(Object(Closure), Array)
9 /home/www/sites/myproject/laravel/event.php(138): Laravel\Event::fire('laravel.view.en...', Array, true)
10 /home/www/sites/myproject/laravel/view.php(337): Laravel\Event::until('laravel.view.en...', Array)
11 /home/www/sites/myproject/laravel/view.php(570): Laravel\View->render()
12 /home/www/sites/myproject/laravel/response.php(246): Laravel\View->__toString()
13 /home/www/sites/myproject/laravel/laravel.php(178): Laravel\Response->render()
14 /home/www/sites/myproject/public/index.php(34): require('/home/www/sites...')
15 {main}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.