Krang::CGI::Media - web interface to manage media
use Krang::ClassLoader 'CGI::Media';
my $app = pkg('CGI::Media')->new();
$app->run();
Krang::CGI::Media provides a web-based system
through which users can add, modify, delete,
check out, or publish media.
Following are descriptions of all the run-modes
provided by Krang::CGI::Media.
The default run-mode (start_mode) for Krang::CGI::Media
is 'add'.
- find
The find mode allows the user to run simple and advanced searches on
live media objects, which will be listed on paging view 'Find Media'.
From this paging view the user may choose to view, edit or retire an
object, or select a set of objects to be checked out to the workspace,
published or deleted (depending on the user's permission set).
- list_retired
The list_retired mode allows the user to run simple and advanced
searches on retired media objects, which will be listed on paging
view 'Retired Media'.
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).
- advanced_find
This method is deprecated, but left in here for backwards
compatibility.
The find mode allows the user to run an ``advanced search'' on
media objects, which will be listed on a paging view.
From this paging view the user may choose to edit or view
an object, or select a set of objects to be deleted.
- list_active
List all active media. Provide links to view each media object. If the
user has 'checkin all' admin abilities then checkboxes are provided to
allow the media to be checked-in.
- add_media
The ``add_media'' run-mode displays the form through which
new Media objects may be added to Krang.
- checkin_add
Save the new media object, then check it in. Redirect to
My Workspace afterwards, even tho the media object will not be there.
- save_stay_add
Saves the new object and redirects to edit screen
(Triggered by 'create' button.)
- checkout_and_edit
Checks out the media object identified by media_id and sends the user
to edit.
- edit
The ``edit'' mode displays the form through which
users may edit existing Media objects.
- save_edit
Validate and save the form content to the media object.
Redirect the user to their Workspace.
- checkin_edit
Validate and save the form content to the media object.
Checkin media object.
Redirect the user to their Workspace.
- save_stay_edit
Validate and save the form content to the media object.
Return the user to the edit screen.
- delete
Trashes the media object specified by CGI form
parameter 'media_id'. Redirect user to Workspace.
- delete_selected
Trashes the media objects which have been selected (checked) from the
find mode list view. This mode expects selected media objects to be
specified in the CGI param krang_pager_rows_checked.
- retire_selected
Retires the media objects which have been selected (checked) from the
find mode list view. This mode expects selected media objects to be
specified in the CGI param krang_pager_rows_checked.
- save_and_edit_schedule
This mode saves the current data to the session and passes control to
edit schedule for media.
- save_and_associate_media
The purpose of this mode is to hand the user off to the
associate contribs screen. This mode writes changes back
to the media object without calling save(). When done,
it performs an HTTP redirect to:
contributor.pl?rm=associate_media
save_and_publish
This mode writes changes back to the media object, calls save() and
then redirects to publisher.pl to publish the media object.
This mode writes changes back to the media object, calls save() and
then redirects to publisher.pl to preview the media object.
save_and_view_log
The purpose of this mode is to hand the user off to the log viewing
screen. This mode writes changes back to the media object without
calling save(). When done, it performs an HTTP redirect to
history.pl.
view_log
The purpose of this mode is to hand the user off to the log viewing
screen but preserving where we came from.
view
Display the specified media object in a view form.
view_version
Display the specified version of the media object in a view form.
revert_version
Send the user to an edit screen, replacing the object with the
specified version of itself.
checkin_selected
Checkin all the media which were checked on the list_active screen.
checkout_selected
Checkout all the media which were checked on the list_active screen.
save_and_jump
This mode saves the current data to the session and jumps to editing
an element within the media.
save_and_bulk_edit
This mode saves the current element data to the session and goes to
the bulk edit mode.
save_and_change_bulk_edit_sep
Saves and changes the bulk edit separator, returning to edit.
save_and_leave_bulk_edit
This mode saves the current element data to the session and goes to
the edit mode.
save_and_go_up
This mode saves the current element data to the session and jumps to
edit the parent of this element.
retire
Move media to the retire and return to the Find Media screen.
unretire
Move media from retire back to live. If a DuplicateURL conflict
occurs, leave the media retired and alert the user.