Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anykeyh/help-anywhere
Provide help everywhere in your rails application or website.
https://github.com/anykeyh/help-anywhere
Last synced: 30 days ago
JSON representation
Provide help everywhere in your rails application or website.
- Host: GitHub
- URL: https://github.com/anykeyh/help-anywhere
- Owner: anykeyh
- License: mit
- Created: 2013-10-01T10:48:27.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-10-02T15:03:17.000Z (over 11 years ago)
- Last Synced: 2024-11-24T17:14:54.257Z (about 2 months ago)
- Language: Ruby
- Size: 199 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rdoc
- License: LICENSE
Awesome Lists containing this project
README
= Help Anywhere
This plugin for rails provides a powerful help system for every websites
built with ruby on rails.Users can read the help, and administrator can update help pages.
You can select on or more elements in your website,
add help box on it, save it, create "step by step" help page.== Usage
Add in your Gemfile:
gem 'help-anywhere'
Then
bundle install
rake help-anywhere:install:migrations
rake help-anywhere:setup
rake db:migrateFinish by setup css and javascript files in your application.js/css:
//= require help_anywhere
That's all!
Finally, update the file `config/help-anywhere.rb` to change the permission strategy and the help routes!
See help-anywhere-example project for more information!Log-in has edit mode, and create new help page with our editor. Enjoy!
== Require authorization for edit mode.
If you just follow the steps before, there is no authorization needed to edit the pages and components of your help.
But you can add it easily:in `yourapp/config/initializers/help_anywhere.rb` just set:
HelpAnywhere.configure do |config|
# Set here the method which is called to allow or disallow edition mode
# You can create this method in your ApplicationController class.
# By default, this will always return always true: every one can edit help.
config.edition_role = :can_user_edit_help?
end== Routing the content
You can route dynamically for your help resource. A route will match an url with a specific help resource name.
Example:
config.routes do |routes|
routes.match '/articles/*/show...', 'articles#show'
endThis will allow every resource located at http://mywebsite/articles/xxxx/show(/xxx/yyy/zzz...) to share the same help (here articles#show page).
You can use `*` to wilcard a path level, and `...` to wilcard everything after. Samely, you can use `?` and `??` to use it in output:
Example:
config.routes do |routes|
routes.match '/?/*/?', '$1#$2' # ex: url /resource/1/edit <=> resource#edit help page
endBy default, every url create a new help resource. Keep in mind the hash part of the url is not used. For plugins for ajax which use hash part (like jquery-bbq), you need to refine manually the route like this:
$(window).bind( 'hashchange', function(e) {
//Force help-anywhere to get resource manually
HelpAnywhere.retrieveResource(HelpAnywhere.selectRoute($.param.fragment()));
});== Version
0.1.4
- Now you can bind a bubble to an element without typing the selector manually. A button provide an interface to select an object into the page.
You can select anything, but take care about dynamic content (over routes), otherwise your block can be missplaced!0.1.1
- This is the first stable release!
- HelpAnywhere is provided with Bubble component, but you can also build your own. Check `app/javascript/bubble.coffee.js`
for more informations.
You can ignore this component. Just `require help_anywhere_core_only` in both application.js and .css