Krang::CGI::Template - Module what manages templates
use Krang::ClassLoader 'CGI::Template';
my $app = pkg('CGI::Template')->new();
$app->run();
This module provide the end-user interface to template objects. Here, users may search for, view, edit, and create templates.
This screen allows the end-user to add a new Template object.
Saves changes to the template object the end-user enacted on the 'Add' screen, then checks in. The user is sent to 'My Workspace' if save succeeds and back to the 'Add' screen if it fails.
Saves changes to the template object the end-user enacted on the 'Add' screen. The user is sent to 'My Workspace' if save succeeds and back to the 'Add' screen if it fails.
Validates changes to the template from the 'Add' screen, saves the updated object to the database, and redirects to the 'Edit' screen.
Checkin all the templates which were checked on the list_active screen.
Checks out the template object identified by template_id and sends the user to edit.
Trashes a template object from the 'Edit' screen. The user is sent back to the 'search' mode afterwards.
The mode expects the query parameter 'template_id'.
Trashes template objects selected from the 'search' screen and returns to 'search'. If the object associated with a particular template_id cannot be trashed, the user is returned to 'search' screen with an error message.
This mode expects the 'krang_pager_rows_checked' query param to contain the ids of the objects to be deleted. If none are passed, the user is returned to the 'search' screen.
Retires template objects selected from the 'search' screen and returns to 'search'.
This mode expects the krang_pager_rows_checked query param to contain
the ids of the objects to be retired. If none are passed, the user is
returned to the 'search' screen.
Saves, deploys and checks in template. Redirects to My Workspace.
Deploys selected templates from the find interface.
Displays the properties of a template object and allows the user to modify the writable fields of the object.
This runmode expects the query parameter 'template_id'.
Saves changes to the template object the end-user enacted on the 'Edit' screen, then checks in. The user is sent to 'My Workspace' if save succeeds and back to the 'Edit' screen if it fails.
Saves changes to the template object the end-user enacted on the 'Edit' screen. The user is sent to 'My Workspace' if save succeeds and back to the 'Edit' screen if it fails.
Validates changes to the template from the 'Edit' screen, saves the updated object to the database, and redirects to the 'Edit' screen.
Reverts the template to a prior incarnation then redirects to the 'Edit' screen.
The purpose of this mode is to hand the user off to the log viewng screen. This mode writes changes back to the template object without calling save(). When done, it performs an HTTP redirect to history.pl.
The purpose of this mode is to hand the user off to the log viewng screen to view the template in question.
Displays a list of live Template objects based on the passed search criteria. If no criteria are passed, a list of all templates on the system are returned. As a simple search, the 'element', 'site', and 'url' fields are searched.
The run mode accepts the parameter ``search_filter'' which is used to perform simple searches.
From this paging view the user may choose to view, edit or retire an object, or select a set of objects to be deployed or deleted (depending on the user's permission set).
Displays a list of retired Template objects based on the passed search criteria. If no criteria are passed, a list of all templates on the system are returned. As a simple search, the 'element', 'site', and 'url' fields are searched.
The run mode accepts the parameter ``search_filter'' which is used to perform simple searches.
From this paging view the user may choose to view or unretire an object, or select a set of objects to be deleted (depending on the user's permission set).
View the attributes of the template object.
Display the specified version of the template object in a view form.
List all active templates. Provide links to view each template. If the user has 'checkin all' admin abilities then checkboxes are provided to allow the template to be checked-in.
Move template to the retire and return to the Find Template screen
Move template from retire back to live. If a DuplicateURL conflict occurs, leave the template retired and alert the user.