Module HistoryHelper
In: app/helpers/history_helper.rb

HistoryHelper

Original by:Sysphonic
Authors:MORITA Shintaro
Copyright:Copyright (c) 2007 MORITA Shintaro, Sysphonic. All rights reserved.
License:New BSD License (See LICENSE file)
URL:http://sysphonic.com/

Methods added to this helper will be available to all templates in the application.

Note:

*

Methods

Constants

HISTORY_ACCEPTS = [ 'desktop/show', 'items/bbs', 'items/list', 'items/search', 'items/show', 'items/edit', 'folders/show_tree', 'schedules/day', 'schedules/week', 'schedules/group', 'schedules/team', 'schedules/month', 'equipment/schedule_all', 'workflows/list', 'researches/users', 'researches/settings', 'users/list', 'users/edit', 'users/show', 'groups/show_tree', 'teams/list', 'templates/list', 'logs/list', 'frames/admin'   Pages to move backward to.
HISTORY_RESETS = [ 'desktop/show', 'items/bbs', 'items/list', 'folders/show_tree', 'schedules/day', 'schedules/month', 'equipment/schedule_all', 'workflows/list', 'researches/users', 'users/list', 'groups/show_tree', 'teams/list', 'paintmail/index', 'logs/list', 'frames/admin'   Pages without Back button.
HISTORY_MAX = 5
LAST_REQ_NUM = 2

Public Class methods

self.acceptable?

Checks if the specified request parameters is acceptable to the history.

prms:Parameters to check.

self.get_path_token

Gets path token to identify the page.

prms:Parameters.

self.keep_last

Keep the last request to move backward.

request:Request.

self.reset?

Checks if the specified request parameters demand to reset history.

prms:Parameters to check.

self.set_back

Adds the last request to the history to move backward.

request:Request to get session data.

[Validate]