{"id":14969811,"url":"https://github.com/telecta/buttons_for","last_synced_at":"2026-02-26T05:25:37.797Z","repository":{"id":62554762,"uuid":"41719536","full_name":"telecta/buttons_for","owner":"telecta","description":"ActionView Helper for generating Bootstrap buttons.","archived":false,"fork":false,"pushed_at":"2017-07-07T08:20:49.000Z","size":67,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2026-01-14T10:41:32.541Z","etag":null,"topics":["bootstrap-buttons","fontawesome","icons","rails"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/telecta.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-01T05:49:16.000Z","updated_at":"2017-01-30T09:15:12.000Z","dependencies_parsed_at":"2022-11-03T05:15:36.703Z","dependency_job_id":null,"html_url":"https://github.com/telecta/buttons_for","commit_stats":null,"previous_names":["blacktangent/buttons_for"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/telecta/buttons_for","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telecta%2Fbuttons_for","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telecta%2Fbuttons_for/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telecta%2Fbuttons_for/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telecta%2Fbuttons_for/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/telecta","download_url":"https://codeload.github.com/telecta/buttons_for/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telecta%2Fbuttons_for/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29849551,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T22:37:40.667Z","status":"online","status_checked_at":"2026-02-26T02:00:06.774Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap-buttons","fontawesome","icons","rails"],"created_at":"2024-09-24T13:42:25.762Z","updated_at":"2026-02-26T05:25:37.774Z","avatar_url":"https://github.com/telecta.png","language":"Ruby","readme":"[travis]: https://travis-ci.org/blacktangent/buttons_for\n[codeclimate]: https://codeclimate.com/github/blacktangent/buttons_for\n[fontawesome]: https://fortawesome.github.io/Font-Awesome\n[fontawesomerails]: https://github.com/bokmann/font-awesome-rails\n[coveralls]: https://coveralls.io/r/blacktangent/buttons_for\n[rubygems]: https://rubygems.org/gems/buttons_for\n[gemnasium]: https://gemnasium.com/blacktangent/buttons_for\n\n# ButtonsFor\n\n[![Build Status](https://travis-ci.org/blacktangent/buttons_for.svg?branch=master)][travis]\n[![Code Climate](https://codeclimate.com/github/blacktangent/buttons_for/badges/gpa.svg)][codeclimate]\n[![Test Coverage](http://img.shields.io/coveralls/blacktangent/buttons_for/master.svg)][coveralls]\n[![Gem Version](http://img.shields.io/gem/v/buttons_for.svg)][rubygems]\n[![Dependency Status](https://gemnasium.com/blacktangent/buttons_for.png)][gemnasium]\n\nActiveView helper to generate Bootstrap buttons and dropdown-buttons.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'buttons_for'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install buttons_for\n\nRun generator to add I18n locales:\n\n    $ rails generate buttons_for:install\n\nThe gem depends on [Bootstrap 3](http://getbootstrap.com/) to create buttons and dropdown-buttons. Bring bootstrap into\nyour project by using [Bootstrap for Sass](https://github.com/twbs/bootstrap-sass) or you preferred method.\n\n`buttons_for` depends on [Font Awesome][fontawesome] icon and CSS\nframework, bring [Font Awesome][fontawesome] into your project using\n[font-awesome-rails][fontawesomerails] or your preferred method.\n\n## Screenshot\n![Screenshot](https://cloud.githubusercontent.com/assets/1222916/9902312/b08d89bc-5c97-11e5-94c6-7a0e78934556.png)\n\n## Usage\n\n`buttons_for` has multiple helper methods. The API is intentionally made\nquite simple and does not support url generation or any advanced\nfunctionallity. It's just ment as a thin wrapper around `link_to` and\nshould pass the options transparently.\n\nThe helpers you'll use the most provide buttons with a color and a\nleading icon. The following standard buttons can be used: `new`, `edit`,\n`delete` and `export`. These buttons are just wrappers around the `button` helper\ngiving it options containing icon and button class.\n\n`buttons_for` also provides a helper for creating dropdown buttons. Use\n`dropdown` with a block containing `link` elements to achive this.\n\nExample show button menu:\n\n```erb\n\u003c%= buttons_for do |b| %\u003e\n  \u003c%= b.dropdown :actions do %\u003e\n    \u003c%= b.link \"Projects\", company_projects_path(@company), icon: \"list\" %\u003e\n  \u003c% end %\u003e\n  \u003c%= b.button t(\".lock\"), lock_company_path(@company), icon: \"lock\", class: \"btn-default\" %\u003e\n  \u003c%= b.edit edit_company_path(@company) %\u003e\n  \u003c%= b.delete company_path(@company) %\u003e\n\u003c% end %\u003e\n\u003c/div\u003e\n```\n\nExample index button menu:\n\n```erb\n\u003c%= buttons_for do |b| %\u003e\n  \u003c%= b.new url_for(action: :new) %\u003e\n  \u003c%= b.export url_for(format: :csv) %\u003e\n\u003c% end %\u003e\n```\n\n## Options\n\nAvailable options:\n\n* __:label__ - Override standard label.\n* __:class__ - Appendse given string to existing CSS classes.\n* __:icon__  - Prefix or replace exsiting icon.\n\n## Translations\n\nThe installer copies the file `buttons_for.en.yml` into your\n`config/locales/` directory. Add a corresponding file with your own\nlocale to translate the buttons.\n\n## Sample\nSample applicaiton using `buttons_for` can be found [here](https://github.com/blacktangent/buttons_for-demo).\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/blacktangent/buttons_for. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.\n\n## Testing\n\nTo test against all supported Rails versions, run:\n\n```\nappraisal rake test\n```\n\nTo update all supported Rails to latest patch version:\n\n```\nappraisal update\n```\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftelecta%2Fbuttons_for","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftelecta%2Fbuttons_for","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftelecta%2Fbuttons_for/lists"}