Twitter Bootstrap with Sass in Rails Layout - ruby-on-rails

I am attempting to learn Rails layouts and am trying to do so using the bootstrap-sass gem.
I want to add a navbar to the top of my view, as well as the side. The bars should connect fluidly, with no breaks in between the two.
I have made it as far as adding a top navbar, but now I need to add a sidebar to the left. There doesn't seem to be a "navbar left" feature within Twitter Bootstrap. How can I add a menu to the left as well as the top within my rails layout?

There is a class called navbar-left that will left justify that component in the navbar (check out the Documentation
You could also create a nav (see the Documentation and add the classes nav-stacked and pull-left
Hope this helps

You could try using navs or list groups.
Two of many ways to go about it.
Don't forget about .pull-left!

Related

Ant Design Table: can I have pagination shown at both top and bottom?

I'm using Ant.design Table for pagination. I am wondering if it's possible to add the pagination item both top and bottom since the table is quite large and I would need to scroll down a lot otherwise?
Yes it is possible
Link to example in documentation
https://ant.design/components/table/#components-table-demo-pagination

How to customize the collapsing point of navbar in bootstrap

How do i customize the collapsing point of the navbar in bootstrap using this gem https://github.com/metaskills/less-rails-bootstrap
https://s3-us-west-1.amazonaws.com/tenant-dev/Capture.PNG?AWSAccessKeyId=ASIAIPMD4H42JKYZFXEA&Expires=1390640628&Signature=rd4dCKYk%2BMlut8AAwJ6nXG5oF4Y%3D&x-amz-security-token=AQoDYXdzEFoawAKE6ucn61yjRPyPjNUoowSVPHHZyOp5LgCc10IL3hjCiNGnFYeug6%2B%2B0BLq8nS6mQN6aHQm%2B7t554Xp%2B2PYSiCisxayFlVXCiXiRX5F2v4X2kPQ/paKy5W24h9QrNDDAij0zaMO/ym6UkBrwE23TUJbd3VXdnDB3izZSk6oShV7edLK5RUMu6TsQDQsurp9Mxd9jkVT5AKWo7yMjLebCe6vkA9RgEsM99hdbq73xv4A4VhWNieBgKMxest8%2BpLtC0XiL%2BRywVO9Qnwiwuc%2BmvTcKvDHmXzAgbo9NcSZK4rZl87yUFO8qDVCUgmeQeeCL2DVR54Aiou/BoCfAIW1ukmRUe4sNgiqjRAFv1ESaHyMJIaecsMIk9oB5R8HiUMMRzga6XqJ569cjkP0EqoLfzP0z1ldXj8mlttK7wWwTIVO9iD3942XBQ%3D%3D
What do you mean with collapsing point and where are you stuck? I assume you mean something like hiding the navbar.
Normally Bootstrap doesn't provide a navbar "collapsing". But if it does have a look at the official documentation: http://getbootstrap.com/

Jquery-mobile: page layout with fixed left hand menu

I would like to make a jquery-mobile app having a left hand menu.
Is there a way to have it fixed like the fixed NavBar can be set? I think I need a vertical NavBar on the left side.
Thank you, F.
If you put the css "position:fixed" into the containing div of the list view, this produces a fixed effect.
Related:
JQuery mobile pageslide, new facebook menu
Examples:
http://jsfiddle.net/LwrqY/5/
http://jsfiddle.net/LwrqY/5/embedded/result/ (view on mobile)
Now these are just examples and will need to be tweaked to work, just a concept

Extjs with Rails- Problem in adding button dynamically on Panel

I am using ExtJS 3.2.1 with Rails 3.x.
I have a Panel on which I want to add ExtJS Buttons "dynamically" depending upon the number of records in the db. I tried googling but no luck.
Any Suggestions?
Thanks in advance !
It not clear in your question where you are adding the button. Are you adding it into a toolbar or into buttons section of a panel. Either way, you should be able to use the addButton method available for Toolbar and Panel.
panel.addButton({your button config});
Now, to create buttons you will have to wrap it in a loop. Before that you will have to get the necessary data from DB. For getting data, you can use the Ext.Ajax class and according to the response, iterate and create the buttons.

Ajax pagination like Twitter

Is there any plugin/gem or an easy way for accomplish a pagination functionality like Twitter?
This means, showing a "More" button that shows more posts (for example) below once it's clicked, using Ajax.
If there's any easy way for modifying something from will_paginate plugin, that would be useful too.
I use this for easy pageless pagination. Seems to be a better solution w/o the more button.
http://github.com/jney/jquery.pageless
I've added a Twitter-like 'more' button on the app I'm currently working on. I used the exact method from http://railscasts.com/episodes/114-endless-page.
In this solution, more results are added to the bottom of the div once you scroll down to the bottom of the page resulting in an endless page. I changed the javascript so that it would send off the ajax request to add more results to the bottom of the div only when the 'load more' button is clicked.
The will_paginate project wiki has an entry on Ajax pagination. It's really quite straightforward.
I use Twitter-like pagination in one of my apps, so I'll just point you to that:
http://github.com/tsigo/jugglf/blob/master/lib/twitter_pagination.rb - Hooks into will_paginate to display the "More" button
http://github.com/tsigo/jugglf/blob/master/app/views/members/raids/index.html.haml - The view using the renderer from above
http://github.com/tsigo/jugglf/blob/master/app/views/members/raids/index.js.erb - The RJS view that appends the next set to the page

Resources