0.0
No commit activity in last 3 years
No release in over 3 years
Provide help anywhere in web applications.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 3.2.13
 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:migrate

Finish 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'
end

This will allow every resource located at 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
end

By 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