dm/helpsystemtest

此包的最新版本(dev-master)没有可用的许可证信息。

Yii 框架的帮助系统集成

安装: 25

依赖: 0

建议: 0

安全: 0

星星: 0

关注者: 1

分支: 0

开放问题: 0

语言:JavaScript

类型:yii2-extension

dev-master 2015-07-13 04:29 UTC

This package is not auto-updated.

Last update: 2024-09-24 16:18:08 UTC


README

需求

  • 与 Yii 2 测试
  • ckeditor 4

快速入门

1. 安装

a. 使用 composer
运行

php composer.phar require --prefer-dist dm/helpsystemtest "@dev" 

b. 手动安装

Download yii2-helpsystem  in application yii root folder.

Add the module details in extensions.php 
			'dm/helpsystem' =>
				array (
						'name' => 'dm/yii2-helpsystem',
						'version' => '1.0.0.0',
						'alias' =>
						 array (
							'@dm/helpsystem'          => $vendorDir . '/dm/yii2-helpsystem',
							'@dm/helpsystem/admin'    => $vendorDir . '/dm/yii2-helpsystem/modules/admin',
							'@dm/helpsystem/client'   => $vendorDir . '/dm/yii2-helpsystem/modules/client',
							'@dm/helpsystem/dmeditor' => $vendorDir . '/dm/yii2-helpsystem/vendor/dmeditor',
						),
				),
			    

2. 将模块添加到您的应用程序配置

<?php
    // ...
    'modules'=>[
        // ...
       	'modules'=>[
                    'helpsystem' =>
			['class' => 'dm\helpsystem\Module',
					'modules' => ['admin' => [
							'class'=>'dm\helpsystem\admin\Module',
					],
							'client' =>  'dm\helpsystem\client\Module',
							'dmeditor' => [
									'class'             => 'dm\helpsystem\dmeditor\Module',
									'allowedImageSize'  => 2, // add the maximum upload size in MB. Enter int value.
									'imageUploadPath'   => 'images/EditorImages',// the path to which image uploaded.
									'allowedImageTypes' => ['gif', 'jpeg', 'jpg', 'png']
							]
					],
					'bootstrap' => 'off' // on/off : set 'on' to apply helpsystem bootstrap style
                                                             // set to on when the application is not using bootstrap style,
                                       'userRole'=> ['admin'] ,//Add roles if any. eg ['admin','editor']
				       'pageLayout'=>'//layout/main' // set the page layout path here
			]
	],
    ]
    // ...

3. 运行 mysql 脚本

a. /yii2-helpsystem/database/1_DDL/1_helpSystem_base_script.sql

b. /yii2-helpsystem/database/4_DML/1_hlp_Language_Insert_script.sql

4. 最后将帮助小部件添加到您的视图模板

<?= dm\helpsystem\client\components\HelpWidgetHelpWidget::widget(
			
				[
						'title'=>'CLIENT DEMO', // help link title
						  'header'=>'Survey',
					      'wrapperClass'=>'', // the class added to the wrapper div if any
					      'linkClass'=>'', // class name if we wish to add any
					      'sectionId'=>1,	// section reference mandatory
					      'topicId'=>0, // If you wanted to load a specific topic in help box give its primary key
						  'headerBackGroundColor'=>'#EAE8E9',		
				]
			);
?>