Krang::CGI::Contrib - web interface to manage Contributors
use Krang::ClassLoader 'CGI::Contrib';
my $app = pkg('CGI::Contrib')->new();
$app->run();
Krang::CGI::Contrib provides a web-based system through which users can add, modify or delete Contributors in a Krang instance.
This web application also provides facilities through which Contributors may be associated with Media and Story objects.
Krang::CGI::Contrib is expected to be invoked via a CGI ``instance script''. The requested run-mode is specified via the query parameter ``rm''. For example, the following request would invoke the ``add'' run-mode:
http://server-name/contributor.pl?rm=add
Following are descriptions of all the run-modes provided by Krang::CGI::Contrib. The default run-mode (start_mode) for Krang::CGI::Contrib is 'search'.
This run-mode expects an optional parameters ``search_filter'' which is expected to contain the text string which is used to query contributors.
It is expected that the story object with which we are to associate contributors be available via the %session in the key 'story'.
When the user clicks ``save'' or ``cancel'' they will be returned to the ``edit'' run-mode of Krang::CGI::Story, e.g.:
http://server/story.pl?rm=edit
It is expected that the media object with which we are to associate contributors be available via the %session in the key 'media'.
When the user clicks ``save'' or ``cancel'' they will be returned to the ``edit'' run-mode of Krang::CGI::Media, e.g.:
http://server/media.pl?rm=edit
This run-mode expects the parameter ``associate_mode'' to exist in the query, and for it to contain either ``story'' or ``media''. It also expects that a story or media object will be stored in the %session in a key ``story'' or ``media'', respectively.
This run-mode expects the parameter ``associate_mode'' to exist in the query, and for it to contain either ``story'' or ``media''. It also expects that a story or media object will be stored in the %session in a key ``story'' or ``media'', respectively.
This run-mode expects the parameter ``associate_mode'' to exist in the query, and for it to contain either ``story'' or ``media''. It also expects that a story or media object will be stored in the %session in a key ``story'' or ``media'', respectively.
This run-mode expects the parameter ``associate_mode'' to exist in the query, and for it to contain either ``story'' or ``media''. It also expects that a story or media object will be stored in the %session in a key ``story'' or ``media'', respectively.
This mode expects the query param ``krang_pager_rows_checked'' to contain an array of contrib_id values which correspond to contributor records to be deleted.
This run-mode retrieves a temporary $contributor which was created and stored in the %session by the ``add'' mode. By working with a temporary contributor object we don't have to worry about the user inadvertantly creating a deplicate contributor if thay hit reload/refresh on their web browser.
This mode expects to receive parameters which match the name of the contrib properties, excluding ``contrib_id''.
This mode functions exactly the same as ``save_add'', with the exception that the user is returned to the ``edit'' mode when they are done.
This run-mode expects to receive the required
parameter ``contrib_id''. It will croak() if this
parameter is missing or invalid.
This run-mode retrieves the $contributor which was created and stored in the %session by the ``edit'' mode.
This mode expects to receive parameters which match the name of the contrib properties. This parameters will override the properties of the contributor which are in the database, except for ``contrib_id'' which cannot be changed.
This mode functions exactly the same as ``save_edit'', with the exception that the user is returned to the ``edit'' mode when they are done.
This mode expects to receive a query parameter ``contrib_id'' which contains the contributor to be deleted.