diff --git a/core/modules/entity/entity.module b/core/modules/entity/entity.module index a88a10a..db3482c 100644 --- a/core/modules/entity/entity.module +++ b/core/modules/entity/entity.module @@ -159,3 +159,75 @@ function entity_entity_bundle_delete($entity_type, $bundle) { } entity_delete_multiple('entity_form_display', $ids); } + +/** + * Implements kook_help() +*/ +function entity_help($path, $arg) { + switch($path) { + case 'admin/help#entity': + $output = '

'.t('About').'

'; + $output .= '

'.t('The entity module controls the display modes for entities. The interface provided by the module is only for creating, deleting and naming of display modes. The management for the output of display modes is handled in the admin section of the content types they are assigned to.').'

'; + $output .= '

'.t('You can manage the display modes available in the display modes admin section.', array('@display_mode_link' => '/admin/structure/display-modes')).'

'; + $output .= '

'.t('You can edit user\'s permission to manage display modes on the permissions page.', array('@permissions_link' => '/admin/people/permissions')).'

'; + return $output; + case 'admin/structure/display-modes' : + return '

'.t('Configure what display modes are available for your content and forms.').'

'; + // View modes. + case 'admin/structure/display-modes/view' : + return '

'.t('Manage custom view modes. You can create, rename or delete display modes from here.').'

'; + case 'admin/structure/display-modes/view/list' : + // I don't think this has an actual page? + case 'admin/structure/display-modes/view/add' : + return '

'.t('First pick which entity type you want a new display mode for.').'

'; + case 'admin/structure/display-modes/view/add/%' : + return '

'.t('Choose a label for the new display mode for a @type.', array('@type' => str_replace('_', ' ', $arg[5]))).'

'; + case 'admin/structure/display-modes/view/manage/%' : + $arg_list = explode('.', $arg[5]); + $entity_type = $arg_list[0]; + switch($entity_type) { + case 'node' : + $edit_option = ' '.t('Detailed settings for node display modes can be found in the content type admin section.'); + break; + case 'user' : + $edit_option = ' '.t('Detailed settings for user display modes can be found in the account settings section.'); + break; + case 'taxonomy_term' : + $edit_option = ' '.t('Detailed settings for taxonomy display modes can be found in the taxonomy admin section.'); + break; + case 'comment' : + $edit_option = ' '.t('Detailed settings for comment display modes can be found in the content type admin section.'); + break; + case 'custom_block' : + $edit_option = ' '.t('Detailed settings for block display modes can be found in the custom block admin section.'); + break; + } + return '

'.t('You can edit the display mode name or delete the display mode.').$edit_option.'

'; + case 'admin/structure/display-modes/view/manage/%/delete' : + return '

'.t('Deleting a display mode can not be undone. If an entity was using this display mode then it will use the default display mode instead.').'

'; + // Form modes. + case 'admin/structure/display-modes/form' : + return '

'.t('Manage custom form display modes. You can create, rename or delete form display modes from here.').'

'; + case 'admin/structure/display-modes/form/list' : +// I don't think this has an actual page? + case 'admin/structure/display-modes/form/add' : + return '

'.t('First pick which entity type you want a new form display mode for.').'

'; + case 'admin/structure/display-modes/form/add/%' : + return '

'.t('Choose a label for the new form display mode for a @type.', array('@type' => str_replace('_', ' ', $arg[5]))).'

'; + case 'admin/structure/display-modes/form/manage/%' : + $arg_list = explode('.', $arg[5]); + $entity_type = $arg_list[0]; + switch($entity_type) { + case 'node' : + $edit_option = ' '.t('Detailed settings for node form display modes can be found in the content type admin section.'); + break; + case 'user' : + $edit_option = ' '.t('Detailed settings for user form display modes can be found in the account settings section.'); + break; + } + return '

'.t('You can edit the display mode name or delete the display mode.').$edit_option.'

'; + case 'admin/structure/display-modes/form/manage/%/delete' : + return '

'.t('Deleting a display mode can not be undone. If a form was using this display mode it will use the default display mode instead.').'

'; + } + +} \ No newline at end of file