diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 4e979613a..a5da8399e 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -80,6 +80,8 @@ - add: Database Links now have a 'Allow access from macro's' setting - All help except for hoverHelp and template variables has been removed from WebGUI and put into the WebGUI Community Wiki, http://www.webgui.org/community-wiki. + - The Table of Contents view was removed from the Help system. The only view + is now the Help Index. 7.3.21 - fix: Self-deactivation doesn't show login screen after success diff --git a/lib/WebGUI/AdminConsole.pm b/lib/WebGUI/AdminConsole.pm index 4ffc77e7c..4d8c110a9 100644 --- a/lib/WebGUI/AdminConsole.pm +++ b/lib/WebGUI/AdminConsole.pm @@ -311,7 +311,7 @@ sub getAdminFunction { namespace=>"WebGUI" }, icon=>"help.gif", - op=>"viewHelpTOC", + op=>"viewHelpIndex", group=>"7" }, "statistics"=>{ diff --git a/lib/WebGUI/Operation.pm b/lib/WebGUI/Operation.pm index 6d1651430..137d016eb 100644 --- a/lib/WebGUI/Operation.pm +++ b/lib/WebGUI/Operation.pm @@ -159,9 +159,7 @@ sub getOperations { 'manageUsersInGroup' => 'WebGUI::Operation::Group', 'viewHelp' => 'WebGUI::Operation::Help', - 'viewHelpChapter' => 'WebGUI::Operation::Help', 'viewHelpIndex' => 'WebGUI::Operation::Help', - 'viewHelpTOC' => 'WebGUI::Operation::Help', 'viewInbox' => 'WebGUI::Operation::Inbox', 'viewInboxMessage' => 'WebGUI::Operation::Inbox', diff --git a/lib/WebGUI/Operation/Help.pm b/lib/WebGUI/Operation/Help.pm index 93001be78..a5785b7da 100644 --- a/lib/WebGUI/Operation/Help.pm +++ b/lib/WebGUI/Operation/Help.pm @@ -407,102 +407,6 @@ sub www_viewHelpIndex { #------------------------------------------------------------------- -=head2 www_viewHelpTOC ( $session ) - -Display the table of contents for the Help system. This generates a list of -the assetName,macroName,topicNames for each installed Help file. - -=cut - -sub www_viewHelpTOC { - my $session = shift; - return $session->privilege->insufficient() unless ($session->user->isInGroup(7)); - my $i18n = WebGUI::International->new($session); - my %tabs; - tie %tabs, 'Tie::IxHash'; - %tabs = ( - other => { - label => $i18n->get('topicName', 'WebGUI'), - uiLevel => 1, - }, - asset => { - label => $i18n->get('topicName', 'Asset'), - uiLevel => 1, - }, - macro => { - label => $i18n->get('topicName', 'Macros'), - uiLevel => 1, - }, - ); - - my @files = _getHelpFilesList($session,); - my %entries; - foreach my $fileSet (@files) { - my $moduleName = $fileSet->[1]; - ##This whole sorting routine sucks and should be replaced - my $tab = lc substr $moduleName, 0, 5; - unless (exists $tabs{$tab} or $tab eq "wobje" or $tab eq "workf") { - $tab = 'other'; - } - my $helpTopic = _loadHelp($session, "WebGUI::Help::".$moduleName); - my @helpEntries = keys %{ $helpTopic }; - my $link; - if (scalar @helpEntries > 1) { - ##Chapter - $link = _linkTOC($session, $moduleName); - } - else { - ##Single page - $link = _link($session, $helpEntries[0], $moduleName); - } - push @{ $entries{$tab} } , - { - link => $link, - name => _getHelpName($session,$moduleName), - }; - } - - my $tabForm = WebGUI::TabForm->new($session, \%tabs); - foreach my $tab ( keys %tabs ) { - my $tabPut = '
'; - $tabPut .= _columnar(3, $entries{$tab}); - $tabPut .= '
'; - $tabForm->getTab($tab)->raw($tabPut); - } - my $ac = WebGUI::AdminConsole->new($session,"help"); - $ac->addSubmenuItem($session->url->page('op=viewHelpIndex'),$i18n->get(95)); - $tabForm->{_submit} = $tabForm->{_cancel} = ''; - return $ac->render(wikiHelpLink($session).$tabForm->print, join(': ',$i18n->get(93), $i18n->get('help toc'))); -} -#------------------------------------------------------------------- - -=head2 www_viewHelpChapter ( $session ) - -Display all entries in one chapter of the help. The namespace is passed in via -the form paramter "namespace". - -=cut - -sub www_viewHelpChapter { - my $session = shift; - return $session->privilege->insufficient() unless ($session->user->isInGroup(7)); - my $namespace = $session->form->process("namespace","className"); - my $help = _load($session,$namespace); - my @entries = sort keys %{ $help }; - my $output = ''; - my $i18n = WebGUI::International->new($session); - foreach my $id (@entries) { - next if $help->{$id}{private}; - $output .= '

'.$i18n->get($help->{$id}{title},$namespace).'

'; - } - my $ac = WebGUI::AdminConsole->new($session,"help"); - $ac->addSubmenuItem($session->url->page('op=viewHelpIndex'),$i18n->get(95)); - $ac->addSubmenuItem($session->url->page('op=viewHelpTOC'),$i18n->get('help contents')); - return $ac->render(wikiHelpLink($session).$output, join ': ',$i18n->get(93), _getHelpName($session,$namespace)); -} - -#------------------------------------------------------------------- - =head2 wikiHelpLink ( $session ) Utility method that returns link to the WebGUI Community Wiki with i18n'ed text.