Commit 193d2591bbb27bf4d36ae8e536ceff626068d4b3

Authored by Brad Shuttleworth
1 parent 3921a7d2

- add user assistance infrastructure.

- incorporate basic information on the installation / howto side of things
- highlight the beta state.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4258 c91229c3-7414-0410-bfa2-8a42b809f60b
plugins/ktcore/KTCorePlugin.php
... ... @@ -18,9 +18,11 @@ require_once('KTPermissions.php');
18 18 require_once('KTAdminPlugins.php');
19 19 require_once('KTDashletPlugins.php');
20 20  
21   -$oPlugin->registerAdminPage('authentication', 'KTAuthenticationAdminPage', 'principals', 'Authentication', 'FIXME: describe authentication', 'authentication/authenticationadminpage.inc.php');
22 21  
  22 +$oPlugin->registerAdminPage('authentication', 'KTAuthenticationAdminPage', 'principals', 'Authentication', 'FIXME: describe authentication', 'authentication/authenticationadminpage.inc.php');
23 23 $oPlugin->register();
24 24  
  25 +require_once('assistance/KTUserAssistance.php');
  26 +
25 27 require_once(KT_LIB_DIR . '/storage/ondiskpathstoragemanager.inc.php');
26 28  
... ...
plugins/ktcore/KTDashletPlugins.php
... ... @@ -5,6 +5,11 @@ require_once(KT_LIB_DIR . '/plugins/plugin.inc.php');
5 5 require_once(KT_LIB_DIR . '/dashboard/dashlet.inc.php');
6 6 require_once(KT_LIB_DIR . "/templating/templating.inc.php");
7 7 require_once(KT_LIB_DIR . "/dashboard/Notification.inc.php");
  8 +require_once(KT_LIB_DIR . "/security/Permission.inc");
  9 +
  10 +
  11 +$oRegistry =& KTPluginRegistry::getSingleton();
  12 +$oPlugin =& $oRegistry->getPlugin('ktcore.plugin');
8 13  
9 14 /*
10 15 * The registration hooks.
... ... @@ -13,6 +18,23 @@ require_once(KT_LIB_DIR . "/dashboard/Notification.inc.php");
13 18 *
14 19 */
15 20  
  21 +// ultra simple skeleton for the admin tutorial
  22 +class KTBeta1InfoDashlet extends KTBaseDashlet {
  23 + function is_active($oUser) {
  24 + return true;
  25 + }
  26 +
  27 + function render() {
  28 + $oTemplating = new KTTemplating;
  29 + $oTemplate = $oTemplating->loadTemplate("ktcore/dashlets/beta1info");
  30 + $aTemplateData = array(
  31 + );
  32 + return $oTemplate->render($aTemplateData);
  33 + }
  34 +}
  35 +
  36 +$oPlugin->registerDashlet('KTBeta1InfoDashlet', 'ktcore.dashlet.beta1info', __FILE__);
  37 +
16 38 class KTNotificationDashlet extends KTBaseDashlet {
17 39  
18 40 var $oUser;
... ... @@ -36,10 +58,33 @@ class KTNotificationDashlet extends KTBaseDashlet {
36 58 }
37 59 }
38 60  
39   -$oRegistry =& KTPluginRegistry::getSingleton();
40   -$oPlugin =& $oRegistry->getPlugin('ktcore.plugin');
41 61  
42   -$oPlugin->registerDashlet('KTNotificationDashlet', 'ktcore.notifications.dashlet', __FILE__);
  62 +$oPlugin->registerDashlet('KTNotificationDashlet', 'ktcore.dashlet.notifications', __FILE__);
  63 +
  64 +// replace the old checked-out docs.
  65 +class KTCheckoutDashlet extends KTBaseDashlet {
  66 +
  67 + var $oUser;
  68 +
  69 + function is_active($oUser) {
  70 + $this->oUser = $oUser;
  71 + return true;
  72 + }
  73 +
  74 + function render() {
  75 +
  76 + $checked_out_documents = Document::getList(array("checked_out_user_id = ?", $this->oUser->getId()));
  77 +
  78 + $oTemplating = new KTTemplating;
  79 + $oTemplate = $oTemplating->loadTemplate("ktcore/dashlets/checkedout");
  80 + $aTemplateData = array(
  81 + "documents" => $checked_out_documents,
  82 + );
  83 + return $oTemplate->render($aTemplateData);
  84 + }
  85 +}
  86 +
  87 +$oPlugin->registerDashlet('KTCheckoutDashlet', 'ktcore.dashlet.checkout', __FILE__);
43 88  
44 89  
45 90 ?>
46 91 \ No newline at end of file
... ...
plugins/ktcore/assistance/KTUserAssistance.php 0 → 100644
  1 +<?php
  2 +
  3 +/* quick help / tutorial / introduction for KT users / administrators. */
  4 +
  5 +require_once(KT_LIB_DIR . '/plugins/pluginregistry.inc.php');
  6 +require_once(KT_LIB_DIR . '/plugins/plugin.inc.php');
  7 +require_once(KT_LIB_DIR . '/dashboard/dashlet.inc.php');
  8 +require_once(KT_LIB_DIR . "/templating/templating.inc.php");
  9 +require_once(KT_LIB_DIR . "/dashboard/Notification.inc.php");
  10 +require_once(KT_LIB_DIR . "/security/Permission.inc");
  11 +
  12 +/*
  13 +* The registration hooks.
  14 +*
  15 +* Since this is too small to _actually_ need a full plugin object, we go:
  16 +*
  17 +*/
  18 +
  19 +class KTUserAssistance extends KTPlugin {
  20 + var $sNamespace = 'ktcore.userassistance';
  21 +}
  22 +
  23 +$oRegistry =& KTPluginRegistry::getSingleton();
  24 +$oRegistry->registerPlugin('KTUserAssistance', 'ktcore.userassistance', __FILE__);
  25 +$oPlugin =& $oRegistry->getPlugin('ktcore.userassistance');
  26 +
  27 +// ultra simple skeleton for the user tutorial
  28 +class KTUserTutorialDashlet extends KTBaseDashlet {
  29 + function is_active($oUser) {
  30 + // FIXME check if the user has "turned this off" for themselves.
  31 + return true;
  32 + }
  33 +
  34 + function render() {
  35 + $oTemplating = new KTTemplating;
  36 + $oTemplate = $oTemplating->loadTemplate("ktcore/dashlets/usertutorial");
  37 + $aTemplateData = array(
  38 + );
  39 + return $oTemplate->render($aTemplateData);
  40 + }
  41 +}
  42 +
  43 +$oPlugin->registerDashlet('KTUserTutorialDashlet', 'ktcore.dashlet.usertutorial', __FILE__);
  44 +
  45 +// ultra simple skeleton for the admin tutorial
  46 +class KTAdminTutorialDashlet extends KTBaseDashlet {
  47 + function is_active($oUser) {
  48 + // FIXME check if the user has "turned this off" for themselves.
  49 + return Permission::userIsSystemAdministrator($oUser->getId());
  50 + return true;
  51 + }
  52 +
  53 + function render() {
  54 + $oTemplating = new KTTemplating;
  55 + $oTemplate = $oTemplating->loadTemplate("ktcore/dashlets/admintutorial");
  56 + $aTemplateData = array(
  57 + );
  58 + return $oTemplate->render($aTemplateData);
  59 + }
  60 +}
  61 +$oPlugin->registerDashlet('KTAdminTutorialDashlet', 'ktcore.dashlet.admintutorial', __FILE__);
  62 +
  63 +class KTUserAssistBasePage extends KTStandardDispatcher {
  64 + var $sSection = 'help';
  65 + var $aBreadcrumbs = array(
  66 + array('action' => 'dashboard', 'name' => 'Dashboard'),
  67 + array('name' => 'User Assistance')
  68 + );
  69 + var $pagefile = 'base';
  70 + var $title = 'User Assistance';
  71 + function do_main() {
  72 + $this->oPage->setBreadcrumbDetails($this->title);
  73 + $contents = @file_get_contents(dirname(__FILE__) . '/docs/' . $this->pagefile);
  74 + if ($contents === false) {
  75 + $contents = '<div class="ktError"><p>Unable to find requested documentation.</p></div>';
  76 + }
  77 + $this->oPage->setTitle($this->title);
  78 + $this->oPage->setShowPortlets(false);
  79 + return $contents;
  80 + }
  81 +}
  82 +
  83 +class KTUserAssistB1WhatIs extends KTUserAssistBasePage { var $pagefile = 'kt3b1-what-is-a-beta'; var $title = 'What is a Beta?'; }
  84 +$oPlugin->registerPage('kt3b1-what-is-a-beta', 'KTUserAssistB1WhatIs', __FILE__);
  85 +
  86 +class KTUserAssistBugReportingGUide extends KTUserAssistBasePage { var $pagefile = 'kt-bug-reporting-guide'; var $title = 'Help! Something went wrong'; }
  87 +$oPlugin->registerPage('kt-bug-reporting-guide', 'KTUserAssistBugReportingGUide', __FILE__);
  88 +
  89 +class KTUserAssistAdminQuickguide extends KTUserAssistBasePage { var $pagefile = 'admin-quickguide'; var $title = 'Quickstart Guide for Administrators'; }
  90 +$oPlugin->registerPage('admin-quickguide', 'KTUserAssistAdminQuickguide', __FILE__);
  91 +
  92 +class KTUserAssistAdminGuideWhatsNew extends KTUserAssistBasePage { var $pagefile = 'admin-guide-whats-new-in-kt3'; var $title = 'What\'s new in KT3 for Administrators'; }
  93 +$oPlugin->registerPage('admin-guide-whats-new-in-kt3', 'KTUserAssistAdminGuideWhatsNew', __FILE__);
  94 +
  95 +
  96 +$oPlugin->register();
  97 +
  98 +?>
0 99 \ No newline at end of file
... ...
plugins/ktcore/assistance/docs/admin-guide-whats-new-in-kt3 0 → 100644
  1 +<h2>What's different in KT3</h2>
  2 +
  3 +<p><strong>Almost Everything.</strong> We have rewritten almost all of the KnowledgeTree DMS, and hope that the changes
  4 +will be good.</p>
  5 +
  6 +<p>Things you need to be aware of in terms of major changes for administrators:</p>
  7 +
  8 +
  9 +<ul>
  10 + <li>Document Indexing is now done from PHP, and uses <strong>catdoc</strong> to do its work. More about this in the file <kbd>docs/INSTALL.txt</kbd></li>
  11 + <li>While we ship with a very basic set of icons, far better ones have been produced in the Open Source community. This means
  12 + that you can take advantage of <strong>icon themes</strong> which follow the <a href="http://tango-project.org/Standard_Icon_Naming_Specification">Icon Naming Theme Specification</a> from <a href="http://freedesktop.org">freedesktop.org</a>.
  13 +In particular, the <a href="http://tango-project.org/">Tango Project icons</a> are a superb, Creative Commons licensed set of icons
  14 +which provide an improved user interface experience. <strong>Note that these icons are transparent PNG files, and as such may not
  15 +appear correctly in Internet Explorer.</strong> We are exploring various solutions to that issue.
  16 +<p>To take advantage of a theme such as <strong>tango</strong>, copy its contents into the <kbd>thirdparty/icon-theme</kbd> directory.</p></li>
  17 +</ul>
... ...
plugins/ktcore/assistance/docs/admin-quickguide 0 → 100644
  1 +<h2>Admin Quickguide</h2>
  2 +
  3 +<p><strong>FIXME</strong> we need a guide to getting started as an administrator. Since this is Beta1, we
  4 +assume that you have <strong>some</strong> history with KnowledgeTree&trade;, so we ask that you start at
  5 +the "<a href="admin-guide-whats-new-in-kt3">what's new for administrators</a>" page.</p>
... ...
plugins/ktcore/assistance/docs/base 0 → 100644
  1 +OI! This doesn't work.
... ...
plugins/ktcore/assistance/docs/kt-bug-reporting-guide 0 → 100644
  1 +<h2>Help! Something went wrong!</h2>
  2 +
  3 +<p>Our community forums are a good place to ask questions about installing,
  4 +configuring or using KnowledgeTree. Our developers, along with other
  5 +members of the open source community and our partner network, will
  6 +endeavour to answer your questions.</p>
  7 +
  8 +<p>Find the <a href="http://forum.ktdms.com">KnowledgeTree forums</a> online at <a href="http://forum.ktdms.com">forum.ktdms.com</a></p>
  9 +
  10 +<p>You can report bugs in the open source KnowledgeTree server software by
  11 +accessing our online ticketing system. The ticketing system will also
  12 +provide feedback on the status of the issue. You may view issues
  13 +reported by other people and search the system to determine if your
  14 +issue has already been reported.</p>
  15 +
  16 +<p>Access the <a href="http://support.ktdms.com">KnowledgeTree support</a> website online at <a href="http://support.ktdms.com">support.ktdms.com</a>.</p>
... ...
plugins/ktcore/assistance/docs/kt3b1-what-is-a-beta 0 → 100644
  1 +<h2>What is a beta?</h2>
  2 +
  3 +<p>Beta software is pre-production quality software. It is released with
  4 +the intention of providing the software's users with insight into where
  5 +the software feature-set is going for a particular release cycle,
  6 +getting as wide a base of testers for the release as possible and
  7 +gauging the uptake of new features. </p>
  8 +
  9 +<p>The software may not be entirely complete yet and may be buggy. We
  10 +highly value your input and urge you to evaluate the software in a test
  11 +environment. We do however strongly suggest you do not to implement this
  12 +version of KnowledgeTree in a production environment as we can't warrant
  13 +it functioning correctly.</p>
... ...
templates/ktcore/dashlets/admintutorial.smarty 0 → 100644
  1 +<h2>KnowledgeTree administrator's Guide</h2>
  2 +<p class="descriptiveText">If this is your first KnowledgeTree installation,
  3 +or if you've just upgraded from KnowledgeTree 2.x, we've put together some information
  4 +which might help you get to grips with the new system.</p>
  5 +
  6 +<div class="ktError"><p class="descriptiveText"><strong>FIXME</strong> This currently doesn't work.</p></div>
  7 +
  8 +<a href="{$rootUrl}/plugin.php/ktcore.userassistance/admin-quickguide">Read the admin introduction.</a> |
  9 +<a href="{$rootUrl}/plugin.php/ktcore.userassistance/admin-guide-whats-new-in-kt3">Find out what's different in <strong>KT 3</strong>.</a> |
  10 +<a href="#">Don't show me this again.</a>
... ...
templates/ktcore/dashlets/beta1info.smarty 0 → 100644
  1 +<h2>Welcome to the KnowledgeTree 3 Beta</h2>
  2 +<p class="descriptiveText">If this is your first KnowledgeTree installation,
  3 +or if you've just upgraded from KnowledgeTree 2.x, we've put together some information
  4 +which might help you get to grips with the new system.</p>
  5 +
  6 +<a href="{$rootUrl}/plugin.php/ktcore.userassistance/kt3b1-what-is-a-beta">What's a Beta?</a> |
  7 +<a href="{$rootUrl}/plugin.php/ktcore.userassistance/kt-bug-reporting-guide">Help! Something went wrong!</a>
... ...
templates/ktcore/dashlets/checkedout.smarty 0 → 100644
  1 +<h2>Your Checked-out Documents</h2>
  2 +<p class="descriptiveText">Since a document
  3 +which is checked out cannot be modified by anyone else,
  4 +it is important to check them back in as soon as you have made
  5 +the apppriate changes.</p>
  6 +{if (!empty($documents))}
  7 +<dl>
  8 +{foreach item=oNotification from=$notifications}
  9 +{$oNotification->render()}
  10 +{/foreach}
  11 +</dl>
  12 +{else}
  13 +<div class="ktInfo"><p>You have no documents which are currently checked out.</p></div>
  14 +{/if}
0 15 \ No newline at end of file
... ...
templates/ktcore/dashlets/usertutorial.smarty 0 → 100644
  1 +<h2>Crash Course in KnowledgeTree</h2>
  2 +<p class="descriptiveText">New to Document Management, or to
  3 +KnowledgeTree&trade; 3? We've written some quick documentation</p>
  4 +
  5 +<div class="ktError"><p class="descriptiveText"><strong>FIXME</strong> This currently doesn't work.</p></div>
  6 +
  7 +<a href="#">Take the crash course.</a> |
  8 +<a href="#">Learn about KnowledgeTree 3.</a> |
  9 +<a href="#">Don't show me this again.</a>
... ...
thirdparty/.htaccess
1 1 Order deny,allow
2 2 Deny from all
  3 +
  4 +Options +FollowSymlinks
... ...