Intergrated a small introduction tour

This commit is contained in:
Andy Strobel 2014-07-21 19:04:17 +02:00
parent 4283ce19e5
commit cccb9bdc42
22 changed files with 682 additions and 8 deletions

View File

@ -36,6 +36,7 @@ class AdminMenuWidget extends MenuWidget
$this->addItem(array(
'label' => Yii::t('AdminModule.widgets_AdminMenuWidget', 'User approval'),
'id' => 'approval',
'url' => Yii::app()->createUrl('admin/approval'),
'icon' => '<i class="fa fa-check-circle"></i>',
'group' => 'manage',
@ -46,6 +47,7 @@ class AdminMenuWidget extends MenuWidget
));
$this->addItem(array(
'label' => Yii::t('AdminModule.widgets_AdminMenuWidget', 'Groups'),
'id' => 'groups',
'url' => Yii::app()->createUrl('admin/group'),
'icon' => '<i class="fa fa-group"></i>',
'group' => 'manage',
@ -56,6 +58,7 @@ class AdminMenuWidget extends MenuWidget
));
$this->addItem(array(
'label' => Yii::t('AdminModule.widgets_AdminMenuWidget', 'Spaces'),
'id' => 'spaces',
'url' => Yii::app()->createUrl('admin/space'),
'icon' => '<i class="fa fa-inbox"></i>',
'group' => 'manage',
@ -66,6 +69,7 @@ class AdminMenuWidget extends MenuWidget
));
$this->addItem(array(
'label' => Yii::t('AdminModule.widgets_AdminMenuWidget', 'Modules'),
'id' => 'modules',
'url' => Yii::app()->createUrl('admin/module'),
'icon' => '<i class="fa fa-rocket"></i>',
'sortOrder' => 500,

View File

@ -33,6 +33,7 @@ class DashboardModule extends HWebModule
// Is Module enabled on this workspace?
$event->sender->addItem(array(
'label' => Yii::t('DashboardModule.base', 'Dashboard'),
'id' => 'dashboard',
'icon' => '<i class="fa fa-tachometer"></i>',
'url' => Yii::app()->createUrl('//dashboard/dashboard'),
'sortOrder' => 100,

View File

@ -34,6 +34,7 @@ class DirectoryModule extends HWebModule
{
$event->sender->addItem(array(
'label' => Yii::t('DirectoryModule.base', 'Directory'),
'id' => 'directory',
'icon' => '<i class="fa fa-book"></i>',
'url' => Yii::app()->createUrl('//directory/directory'),
'sortOrder' => 400,

View File

@ -19,7 +19,7 @@
<div class="form-group">
<label>What do you want to call your space?</label>
<label><?php echo Yii::t('SpaceModule.views_create_create', 'How you want to name your space?'); ?></label>
<?php print $form->textField($model, 'title', array('class' => 'form-control', 'placeholder' => Yii::t('SpaceModule.views_create_create', 'space name'))); ?>
<?php echo $form->error($model, 'title'); ?>
@ -28,8 +28,8 @@
</div>
<div class="form-group">
<label>Which reason has the space?</label>
<?php print $form->textArea($model, 'description', array('class' => 'form-control', 'placeholder' => Yii::t('SpaceModule.views_create_create', 'space description'))); ?>
<label><?php echo Yii::t('SpaceModule.views_create_create', 'Please write down a small description for other users.'); ?></label>
<?php print $form->textArea($model, 'description', array('class' => 'form-control', 'rows' => '3', 'placeholder' => Yii::t('SpaceModule.views_create_create', 'space description'))); ?>
</div>
<a data-toggle="collapse" id="access-settings-link" href="#collapse-access-settings"

View File

@ -0,0 +1,31 @@
<?php
/**
* This module provides like support for Content and Content Addons
* Each wall entry will get a Like Button and a overview of likes.
*
* @package humhub.modules_core.like
* @since 0.5
*/
class TourModule extends HWebModule
{
public $isCoreModule = true;
/**
* On Init of Dashboard Sidebar, add the widget
*
* @param type $event
*/
public static function onTourWidgetInit($event)
{
/* if (HSetting::Get('active', 'breakingnews') && UserSetting::Get(Yii::app()->user->id, 'seen', 'breakingnews') != 1) {
UserSetting::Set(Yii::app()->user->id, 'seen', true, 'breakingnews');
$event->sender->addWidget('application.modules.breakingnews.widgets.BreakingNewsWidget', array(), array('sortOrder' => 1));
}*/
$event->sender->addWidget('application.modules_core.tour.widgets.TourWidget', array(), array());
}
}

View File

@ -0,0 +1,15 @@
<?php
Yii::app()->moduleManager->register(array(
'id' => 'tour',
'class' => 'application.modules_core.tour.TourModule',
'isCoreModule' => true,
'import' => array(
'application.modules_core.tour.*',
),
// Events to Catch
'events' => array(
//array('class' => 'PageAddonStackWidget', 'event' => 'onInit', 'callback' => array('TourModule', 'onTourWidgetInit')),
),
));
?>

View File

@ -0,0 +1,16 @@
<?php
/**
* TourController
*
* @author andystrobel
* @package humhub.modules_core.tour.controllers
* @since 0.5
*/
class TourController extends Controller {
public function actionSeen() {
$this->renderPartial('seen');
}
}

View File

@ -0,0 +1,59 @@
<?php
/**
* Message translations.
*
* This file is automatically generated by 'yiic message' command.
* It contains the localizable messages extracted from source code.
* You may modify this file by translating the extracted messages.
*
* Each array element represents the translation (value) of a message (key).
* If the value is empty, the message is considered as not translated.
* Messages that no longer need translation will have their translations
* enclosed between a pair of '@@' marks.
*
* Message string can be used with plural forms format. Check i18n section
* of the guide for details.
*
* NOTE, this file must be saved in UTF-8 encoding.
*/
return array (
'<strong>Account</strong> menu' => '',
'<strong>Administration</strong>' => '',
'<strong>Congratulations!</strong>' => '',
'<strong>Dashboard</strong>' => '',
'<strong>Find</strong> modules online' => '',
'<strong>Hurray!</strong> We\'re done.' => '',
'<strong>Module</strong> directory' => '',
'<strong>Modules</strong>' => '',
'<strong>Space</strong> info' => '',
'<strong>Space</strong> members' => '',
'<strong>Space</strong> menu' => '',
'<strong>Space</strong> preferences' => '',
'<strong>Space</strong> selector' => '',
'<strong>Welcome</strong> to %appName%' => '',
'<strong>Your</strong> Profil' => '',
'<strong>Your</strong> Profile' => '',
'As an administrator, you can make various settings to manage the platform, the spaces and the users.<br><br> Now click again on your account menu to open it.' => '',
'As mentioned already in the spaces, with modules you can extend the platform to do almost anything you can imagine.<br><br>This section allows you to manage the modules, so other users can use them, for example, in their spaces.' => '',
'At this panel you have a short overview about the space members.<br><br>But more important is, that you can invite new users to this space by clicking the invite button.' => '',
'But there is one important feature, we still have to show you. It\'s about how you are managing modules.<br><br>Now click on the menu item <strong>%modulesMenuEntry%</strong> to enter the Module directory.' => '',
'Click now on <strong>%administrationMenuEntry%</strong> to enter the administration section.' => '',
'End tour' => '',
'Here you will always find a list of all spaces in which you are a member.<br><br>Now, click on the bottom button <strong>%createSpaceButton%</strong> to create your first own space.' => '',
'In this area you can make all settings to adjust your platform. <br><br>We won\'t run through all the points with you, because they are most self-explanatory.<br><br>If you have any questions, don\'t hesitate to contact us via www.humhub.org.' => '',
'Next »' => '',
'Now, let\'s take look at your public profile. To do this, click on the menu entry <strong>%profileMenuEntry%</strong>.' => '',
'The heart of %appName% are Spaces.<br><br>A space can be a topic, a group or a project you can communicate about with others.<br><br>Click on the top menu item <strong>%spaceTopMenuEntry%</strong> to open the space selector.' => '',
'This info panel provides a small orientation for all space users.<br><br>You can change the default space image, simply by drag & drop or by clicking on this placeholder image.' => '',
'This is a little introduction tour, to gives you a quick overview about the most important functions... Let\'s go!' => '',
'This is the account menu. Within this menu you can manage your account and your public user profile.<br><br>Now click on it to open it.' => '',
'This menu is only visible for space administrators. You can change settings for the space, manage the members and enable or disable the just mentioned modules here.' => '',
'This were the most important things, you should know before using the platform.<br><br>We hope that your Social Network project will be successful for you and your users.<br><br>We always looking forward for every suggestion or help to support this project. Please contact us via www.humhub.org.<br><br>Stay tuned.' => '',
'With <strong> %browseOnlineButton% </strong> you will get access to the HumHub Marketplace where you can install existing modules written by developers from the HumHub Community.' => '',
'You can extend a space with any number of modules such as polls, tasks, events or a dropbox integration, for example.<br><br>Depending on which modules are enabled for this space, you can find the corresponding menu entries here.' => '',
'You\'re just on the dashboard.<br><br>This is the entry page, which always provides you a summary of the latest posts and activities.' => '',
'You\'ve just created your first own space.<br><br>In the middle you\'ll usually find the stream, which is still empty now. So let\'s take a look at the menus and panels on the sides more closely.' => '',
'Your profile is your figurehead on the platform.<br><br>You can simply change the profile- and title images by drag & drop and add more information about you by clicking the button <strong>%editAccountButton%</strong>.' => '',
'Your profile is your figurehead on the platform.<br><br>You can simply change the profile- and title images by drag & drop and add more information about you by clicking the button <strong>%editAccountButton%</strong>.<br><br>You can start with that right now, because the little introduction ends here. <br><br>Have fun.' => '',
'« Prev' => '',
);

View File

@ -0,0 +1,59 @@
<?php
/**
* Message translations.
*
* This file is automatically generated by 'yiic message' command.
* It contains the localizable messages extracted from source code.
* You may modify this file by translating the extracted messages.
*
* Each array element represents the translation (value) of a message (key).
* If the value is empty, the message is considered as not translated.
* Messages that no longer need translation will have their translations
* enclosed between a pair of '@@' marks.
*
* Message string can be used with plural forms format. Check i18n section
* of the guide for details.
*
* NOTE, this file must be saved in UTF-8 encoding.
*/
return array (
'<strong>Account</strong> menu' => '',
'<strong>Administration</strong>' => '',
'<strong>Congratulations!</strong>' => '',
'<strong>Dashboard</strong>' => '',
'<strong>Find</strong> modules online' => '',
'<strong>Hurray!</strong> We\'re done.' => '',
'<strong>Module</strong> directory' => '',
'<strong>Modules</strong>' => '',
'<strong>Space</strong> info' => '',
'<strong>Space</strong> members' => '',
'<strong>Space</strong> menu' => '',
'<strong>Space</strong> preferences' => '',
'<strong>Space</strong> selector' => '',
'<strong>Welcome</strong> to %appName%' => '',
'<strong>Your</strong> Profil' => '',
'<strong>Your</strong> Profile' => '',
'As an administrator, you can make various settings to manage the platform, the spaces and the users.<br><br> Now click again on your account menu to open it.' => '',
'As mentioned already in the spaces, with modules you can extend the platform to do almost anything you can imagine.<br><br>This section allows you to manage the modules, so other users can use them, for example, in their spaces.' => '',
'At this panel you have a short overview about the space members.<br><br>But more important is, that you can invite new users to this space by clicking the invite button.' => '',
'But there is one important feature, we still have to show you. It\'s about how you are managing modules.<br><br>Now click on the menu item <strong>%modulesMenuEntry%</strong> to enter the Module directory.' => '',
'Click now on <strong>%administrationMenuEntry%</strong> to enter the administration section.' => '',
'End tour' => '',
'Here you will always find a list of all spaces in which you are a member.<br><br>Now, click on the bottom button <strong>%createSpaceButton%</strong> to create your first own space.' => '',
'In this area you can make all settings to adjust your platform. <br><br>We won\'t run through all the points with you, because they are most self-explanatory.<br><br>If you have any questions, don\'t hesitate to contact us via www.humhub.org.' => '',
'Next »' => '',
'Now, let\'s take look at your public profile. To do this, click on the menu entry <strong>%profileMenuEntry%</strong>.' => '',
'The heart of %appName% are Spaces.<br><br>A space can be a topic, a group or a project you can communicate about with others.<br><br>Click on the top menu item <strong>%spaceTopMenuEntry%</strong> to open the space selector.' => '',
'This info panel provides a small orientation for all space users.<br><br>You can change the default space image, simply by drag & drop or by clicking on this placeholder image.' => '',
'This is a little introduction tour, to gives you a quick overview about the most important functions... Let\'s go!' => '',
'This is the account menu. Within this menu you can manage your account and your public user profile.<br><br>Now click on it to open it.' => '',
'This menu is only visible for space administrators. You can change settings for the space, manage the members and enable or disable the just mentioned modules here.' => '',
'This were the most important things, you should know before using the platform.<br><br>We hope that your Social Network project will be successful for you and your users.<br><br>We always looking forward for every suggestion or help to support this project. Please contact us via www.humhub.org.<br><br>Stay tuned.' => '',
'With <strong> %browseOnlineButton% </strong> you will get access to the HumHub Marketplace where you can install existing modules written by developers from the HumHub Community.' => '',
'You can extend a space with any number of modules such as polls, tasks, events or a dropbox integration, for example.<br><br>Depending on which modules are enabled for this space, you can find the corresponding menu entries here.' => '',
'You\'re just on the dashboard.<br><br>This is the entry page, which always provides you a summary of the latest posts and activities.' => '',
'You\'ve just created your first own space.<br><br>In the middle you\'ll usually find the stream, which is still empty now. So let\'s take a look at the menus and panels on the sides more closely.' => '',
'Your profile is your figurehead on the platform.<br><br>You can simply change the profile- and title images by drag & drop and add more information about you by clicking the button <strong>%editAccountButton%</strong>.' => '',
'Your profile is your figurehead on the platform.<br><br>You can simply change the profile- and title images by drag & drop and add more information about you by clicking the button <strong>%editAccountButton%</strong>.<br><br>You can start with that right now, because the little introduction ends here. <br><br>Have fun.' => '',
'« Prev' => '',
);

View File

@ -0,0 +1,59 @@
<?php
/**
* Message translations.
*
* This file is automatically generated by 'yiic message' command.
* It contains the localizable messages extracted from source code.
* You may modify this file by translating the extracted messages.
*
* Each array element represents the translation (value) of a message (key).
* If the value is empty, the message is considered as not translated.
* Messages that no longer need translation will have their translations
* enclosed between a pair of '@@' marks.
*
* Message string can be used with plural forms format. Check i18n section
* of the guide for details.
*
* NOTE, this file must be saved in UTF-8 encoding.
*/
return array (
'<strong>Account</strong> menu' => '',
'<strong>Administration</strong>' => '',
'<strong>Congratulations!</strong>' => '',
'<strong>Dashboard</strong>' => '',
'<strong>Find</strong> modules online' => '',
'<strong>Hurray!</strong> We\'re done.' => '',
'<strong>Module</strong> directory' => '',
'<strong>Modules</strong>' => '',
'<strong>Space</strong> info' => '',
'<strong>Space</strong> members' => '',
'<strong>Space</strong> menu' => '',
'<strong>Space</strong> preferences' => '',
'<strong>Space</strong> selector' => '',
'<strong>Welcome</strong> to %appName%' => '',
'<strong>Your</strong> Profil' => '',
'<strong>Your</strong> Profile' => '',
'As an administrator, you can make various settings to manage the platform, the spaces and the users.<br><br> Now click again on your account menu to open it.' => '',
'As mentioned already in the spaces, with modules you can extend the platform to do almost anything you can imagine.<br><br>This section allows you to manage the modules, so other users can use them, for example, in their spaces.' => '',
'At this panel you have a short overview about the space members.<br><br>But more important is, that you can invite new users to this space by clicking the invite button.' => '',
'But there is one important feature, we still have to show you. It\'s about how you are managing modules.<br><br>Now click on the menu item <strong>%modulesMenuEntry%</strong> to enter the Module directory.' => '',
'Click now on <strong>%administrationMenuEntry%</strong> to enter the administration section.' => '',
'End tour' => '',
'Here you will always find a list of all spaces in which you are a member.<br><br>Now, click on the bottom button <strong>%createSpaceButton%</strong> to create your first own space.' => '',
'In this area you can make all settings to adjust your platform. <br><br>We won\'t run through all the points with you, because they are most self-explanatory.<br><br>If you have any questions, don\'t hesitate to contact us via www.humhub.org.' => '',
'Next »' => '',
'Now, let\'s take look at your public profile. To do this, click on the menu entry <strong>%profileMenuEntry%</strong>.' => '',
'The heart of %appName% are Spaces.<br><br>A space can be a topic, a group or a project you can communicate about with others.<br><br>Click on the top menu item <strong>%spaceTopMenuEntry%</strong> to open the space selector.' => '',
'This info panel provides a small orientation for all space users.<br><br>You can change the default space image, simply by drag & drop or by clicking on this placeholder image.' => '',
'This is a little introduction tour, to gives you a quick overview about the most important functions... Let\'s go!' => '',
'This is the account menu. Within this menu you can manage your account and your public user profile.<br><br>Now click on it to open it.' => '',
'This menu is only visible for space administrators. You can change settings for the space, manage the members and enable or disable the just mentioned modules here.' => '',
'This were the most important things, you should know before using the platform.<br><br>We hope that your Social Network project will be successful for you and your users.<br><br>We always looking forward for every suggestion or help to support this project. Please contact us via www.humhub.org.<br><br>Stay tuned.' => '',
'With <strong> %browseOnlineButton% </strong> you will get access to the HumHub Marketplace where you can install existing modules written by developers from the HumHub Community.' => '',
'You can extend a space with any number of modules such as polls, tasks, events or a dropbox integration, for example.<br><br>Depending on which modules are enabled for this space, you can find the corresponding menu entries here.' => '',
'You\'re just on the dashboard.<br><br>This is the entry page, which always provides you a summary of the latest posts and activities.' => '',
'You\'ve just created your first own space.<br><br>In the middle you\'ll usually find the stream, which is still empty now. So let\'s take a look at the menus and panels on the sides more closely.' => '',
'Your profile is your figurehead on the platform.<br><br>You can simply change the profile- and title images by drag & drop and add more information about you by clicking the button <strong>%editAccountButton%</strong>.' => '',
'Your profile is your figurehead on the platform.<br><br>You can simply change the profile- and title images by drag & drop and add more information about you by clicking the button <strong>%editAccountButton%</strong>.<br><br>You can start with that right now, because the little introduction ends here. <br><br>Have fun.' => '',
'« Prev' => '',
);

View File

@ -0,0 +1,9 @@
{
"id": "tour",
"name": "Tour",
"description": "Tour Guide",
"keywords": [
"core"
],
"version": "1.0"
}

View File

@ -0,0 +1,19 @@
/* ===========================================================
# bootstrap-tour - v0.9.3
# http://bootstraptour.com
# ==============================================================
# Copyright 2012-2013 Ulrich Sossou
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
*/
.tour-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1100;background-color:#000;opacity:.3}.tour-step-backdrop{position:relative;z-index:1101;background:inherit}.tour-step-background{position:absolute;z-index:1100;background:inherit;border-radius:6px}.popover[class*=tour-]{z-index:1100}.popover[class*=tour-] .popover-navigation{padding:9px 14px}.popover[class*=tour-] .popover-navigation [data-role=end]{float:right}.popover[class*=tour-] .popover-navigation [data-role=prev],.popover[class*=tour-] .popover-navigation [data-role=next],.popover[class*=tour-] .popover-navigation [data-role=end]{cursor:pointer}.popover[class*=tour-] .popover-navigation [data-role=prev].disabled,.popover[class*=tour-] .popover-navigation [data-role=next].disabled,.popover[class*=tour-] .popover-navigation [data-role=end].disabled{cursor:default}.popover[class*=tour-].orphan{position:fixed;margin-top:0}.popover[class*=tour-].orphan .arrow{display:none}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,4 @@
<?php
// set tour status to seen for current user
Yii::app()->user->getModel()->setSetting("seen", "true", "tour");
?>

View File

@ -0,0 +1,35 @@
<?php
/**
* Will injected to dashboard sidebar to show a breaking news
*
* @package humhub.modules.breakingnews.widgets
* @since 0.5
* @author Luke
*/
class TourWidget extends HWidget {
/**
* Executes the widgets
*/
public function run() {
// save in variable, if this user seen the tour already
$tourSeen = Yii::app()->user->getModel()->getSetting("seen", "tour");
// if not...
if ($tourSeen != "true") {
// ...load resources
$assetPrefix = Yii::app()->assetManager->publish(dirname(__FILE__) . '/../resources', true, 0, defined('YII_DEBUG'));
Yii::app()->clientScript->registerScriptFile($assetPrefix . '/bootstrap-tour.min.js');
Yii::app()->clientScript->registerCssFile($assetPrefix . '/bootstrap-tour.min.css');
// ... render widget view
$this->render('index', array());
}
}
}
?>

View File

@ -0,0 +1,275 @@
<script type="text/javascript">
$(document).ready(function () {
// Create a new tour
var tour = new Tour({
//storage: false,
template: '<div class="popover tour"> <div class="arrow"></div> <h3 class="popover-title"></h3> <div class="popover-content"></div> <div class="popover-navigation"> <div class="btn-group"> <button class="btn btn-sm btn-default" data-role="prev"><?php echo Yii::t('TourModule.widgets_views_index', '« Prev'); ?></button> <button class="btn btn-sm btn-default" data-role="next"><?php echo Yii::t('TourModule.widgets_views_index', 'Next »'); ?></button> </div> <button class="btn btn-sm btn-default" data-role="end"><?php echo Yii::t('TourModule.widgets_views_index', 'End tour'); ?></button> </div> </div>',
onEnd: function (tour) {
tourSeen();
}
});
// Add your steps
tour.addSteps([
{
// step 0
orphan: true,
backdrop: true,
title: "<?php echo Yii::t('TourModule.widgets_views_index', '<strong>Welcome</strong> to %appName%', array('%appName%' => Yii::app()->name)); ?>",
content: "<?php echo Yii::t('TourModule.widgets_views_index', "This is a little introduction tour, to gives you a quick overview about the most important functions... Let's go!"); ?>"
},
{
// step 1
orphan: true,
backdrop: true,
title: "<?php echo Yii::t('TourModule.widgets_views_index', '<strong>Dashboard</strong>'); ?>",
content: "<?php echo Yii::t('TourModule.widgets_views_index', "You're just on the dashboard.<br><br>This is the entry page, which always provides you a summary of the latest posts and activities."); ?>"
},
{
// step 2
element: "#space-menu",
title: "<?php echo Yii::t('TourModule.widgets_views_index', '<strong>Space</strong> selector'); ?>",
content: "<?php echo Yii::t('TourModule.widgets_views_index', 'The heart of %appName% are Spaces.<br><br>A space can be a topic, a group or a project you can communicate about with others.<br><br>Click on the top menu item <strong>%spaceTopMenuEntry%</strong> to open the space selector.', array('%appName%' => Yii::app()->name, '%spaceTopMenuEntry%' => Yii::t('SpaceModule.widgets_views_spaceChooser', 'My spaces'))); ?>",
reflex: true,
next: -1,
placement: "bottom"
},
{
// step 3
element: "#space-menu-dropdown",
title: "<?php echo Yii::t('TourModule.widgets_views_index', '<strong>Space</strong> selector'); ?>",
content: "<?php echo Yii::t('TourModule.widgets_views_index', 'Here you will always find a list of all spaces in which you are a member.<br><br>Now, click on the bottom button <strong>%createSpaceButton%</strong> to create your first own space.', array('%createSpaceButton%' => Yii::t('SpaceModule.widgets_views_spaceChooser', 'Create new space'))); ?>",
reflex: true,
next: -1,
onShow: function (tour) {
clearInterval(newInterval);
},
placement: "right"
},
{
// step 4
orphan: true,
backdrop: true,
title: "<?php echo Yii::t('TourModule.widgets_views_index', '<strong>Congratulations!</strong>'); ?>",
prev: -1,
content: "<?php echo Yii::t('TourModule.widgets_views_index', "You've just created your first own space.<br><br>In the middle you'll usually find the stream, which is still empty now. So let's take a look at the menus and panels on the sides more closely."); ?>"
},
{
// step 5
element: ".space-nav-container .panel:eq(0)",
title: "<?php echo Yii::t('TourModule.widgets_views_index', '<strong>Space</strong> menu'); ?>",
content: "<?php echo Yii::t('TourModule.widgets_views_index', 'You can extend a space with any number of modules such as polls, tasks, events or a dropbox integration, for example.<br><br>Depending on which modules are enabled for this space, you can find the corresponding menu entries here.'); ?>",
placement: "right"
},
{
// step 6
element: ".space-nav-container .panel:eq(1)",
title: "<?php echo Yii::t('TourModule.widgets_views_index', '<strong>Space</strong> preferences'); ?>",
content: "<?php echo Yii::t('TourModule.widgets_views_index', 'This menu is only visible for space administrators. You can change settings for the space, manage the members and enable or disable the just mentioned modules here.'); ?>",
placement: "right"
},
{
// step 7
element: ".space-info",
title: "<?php echo Yii::t('TourModule.widgets_views_index', '<strong>Space</strong> info'); ?>",
content: "<?php echo Yii::t('TourModule.widgets_views_index', 'This info panel provides a small orientation for all space users.<br><br>You can change the default space image, simply by drag & drop or by clicking on this placeholder image.'); ?>",
placement: "left"
},
{
// step 8
element: "#space-members-panel",
title: "<?php echo Yii::t('TourModule.widgets_views_index', '<strong>Space</strong> members'); ?>",
content: "<?php echo Yii::t('TourModule.widgets_views_index', 'At this panel you have a short overview about the space members.<br><br>But more important is, that you can invite new users to this space by clicking the invite button.'); ?>",
placement: "left"
},
{
// step 9
element: ".dropdown.account",
title: "<?php echo Yii::t('TourModule.widgets_views_index', '<strong>Account</strong> menu'); ?>",
content: "<?php echo Yii::t('TourModule.widgets_views_index', 'This is the account menu. Within this menu you can manage your account and your public user profile.<br><br>Now click on it to open it.'); ?>",
reflex: true,
next: -1,
placement: "bottom"
},
{
// step 10
element: ".dropdown.account .dropdown-menu li:eq(0)",
title: "<?php echo Yii::t('TourModule.widgets_views_index', '<strong>Account</strong> menu'); ?>",
content: "<?php echo Yii::t('TourModule.widgets_views_index', "Now, let's take look at your public profile. To do this, click on the menu entry <strong>%profileMenuEntry%</strong>.", array('%profileMenuEntry%' => Yii::t('base', 'My profile'))); ?>",
next: -1,
onShow: function (tour) {
clearInterval(newInterval);
},
placement: "left"
},
<?php if (Yii::app()->user->isAdmin() == false) : ?>
{
// step 11
orphan: true,
backdrop: true,
title: "<?php echo Yii::t('TourModule.widgets_views_index', '<strong>Your</strong> Profile'); ?>",
next: -1,
content: "<?php echo Yii::t('TourModule.widgets_views_index', 'Your profile is your figurehead on the platform.<br><br>You can simply change the profile- and title images by drag & drop and add more information about you by clicking the button <strong>%editAccountButton%</strong>.<br><br>You can start with that right now, because the little introduction ends here. <br><br>Have fun.', array('%editAccountButton%' => Yii::t('UserModule.widgets_views_profileHeader', 'Edit account'))); ?>"
},
<?php else : ?>
{
// step 12
orphan: true,
backdrop: true,
title: "<?php echo Yii::t('TourModule.widgets_views_index', '<strong>Your</strong> Profil'); ?>",
content: "<?php echo Yii::t('TourModule.widgets_views_index', 'Your profile is your figurehead on the platform.<br><br>You can simply change the profile- and title images by drag & drop and add more information about you by clicking the button <strong>%editAccountButton%</strong>.', array('%editAccountButton%' => Yii::t('UserModule.widgets_views_profileHeader', 'Edit account'))); ?>"
},
<?php endif; ?>
{
// step 13
element: ".dropdown.account",
title: "<?php echo Yii::t('TourModule.widgets_views_index', '<strong>Administration</strong>'); ?>",
content: "<?php echo Yii::t('TourModule.widgets_views_index', 'As an administrator, you can make various settings to manage the platform, the spaces and the users.<br><br> Now click again on your account menu to open it.'); ?>",
reflex: true,
next: -1,
placement: "bottom"
},
{
// step 14
element: ".dropdown.account .dropdown-menu li:eq(3)",
title: "<?php echo Yii::t('TourModule.widgets_views_index', '<strong>Administration</strong>'); ?>",
content: "<?php echo Yii::t('TourModule.widgets_views_index', 'Click now on <strong>%administrationMenuEntry%</strong> to enter the administration section.', array('%administrationMenuEntry%' => Yii::t('base', 'Administration'))); ?>",
next: -1,
reflex: true,
onShow: function (tour) {
clearInterval(newInterval);
},
placement: "left"
},
{
// step 15
orphan: true,
backdrop: true,
title: "<?php echo Yii::t('TourModule.widgets_views_index', '<strong>Administration</strong>'); ?>",
content: "<?php echo Yii::t('TourModule.widgets_views_index', "In this area you can make all settings to adjust your platform. <br><br>We won't run through all the points with you, because they are most self-explanatory.<br><br>If you have any questions, don't hesitate to contact us via www.humhub.org."); ?>"
},
{
// step 16
element: ".list-group-item.modules",
title: "<?php echo Yii::t('TourModule.widgets_views_index', '<strong>Modules</strong>'); ?>",
content: "<?php echo Yii::t('TourModule.widgets_views_index', "But there is one important feature, we still have to show you. It's about how you are managing modules.<br><br>Now click on the menu item <strong>%modulesMenuEntry%</strong> to enter the Module directory.", array('%modulesMenuEntry%' => Yii::t('AdminModule.widgets_AdminMenuWidget', 'Modules'))); ?>",
next: -1,
reflex: true,
placement: "right"
},
{
// step 17
orphan: true,
backdrop: true,
title: "<?php echo Yii::t('TourModule.widgets_views_index', '<strong>Module</strong> directory'); ?>",
content: "<?php echo Yii::t('TourModule.widgets_views_index', 'As mentioned already in the spaces, with modules you can extend the platform to do almost anything you can imagine.<br><br>This section allows you to manage the modules, so other users can use them, for example, in their spaces.'); ?>"
},
{
// step 18
element: "#moduleTabs li:eq(1)",
title: "<?php echo Yii::t('TourModule.widgets_views_index', '<strong>Find</strong> modules online'); ?>",
content: "<?php echo Yii::t('TourModule.widgets_views_index', 'With <strong> %browseOnlineButton% </strong> you will get access to the HumHub Marketplace where you can install existing modules written by developers from the HumHub Community.', array('%browseOnlineButton%' => Yii::t('AdminModule.views_module_header', 'Browse online'))); ?>",
reflex: true,
placement: "bottom"
},
{
// step 19
orphan: true,
backdrop: true,
title: "<?php echo Yii::t('TourModule.widgets_views_index', "<strong>Hurray!</strong> We're done."); ?>",
content: "<?php echo Yii::t('TourModule.widgets_views_index', 'This were the most important things, you should know before using the platform.<br><br>We hope that your Social Network project will be successful for you and your users.<br><br>We always looking forward for every suggestion or help to support this project. Please contact us via www.humhub.org.<br><br>Stay tuned.'); ?>"
}
]);
// Initialize method on the Tour class. Get's everything loaded up and ready to go.
tour.init();
// This starts the tour itself
tour.restart();
// save current module and controller id's
var currentModuleId = '<?php echo Yii::app()->controller->module->id; ?>';
var currentControllerId = '<?php echo Yii::app()->controller->id; ?>';
if (currentModuleId == 'space') {
// go to the first step for spaces
tour.goTo(4);
}
if (currentModuleId == 'user') {
// go to the first step for users (profiles)
tour.goTo(11);
}
if (currentModuleId == 'admin') {
if (currentControllerId == 'setting') {
// go to the first step for admin setttings
tour.goTo(14);
} else if (currentControllerId == 'module') {
// go to the first step for admin modules
tour.goTo(16);
}
}
$('#space-menu').click(function () {
// show next step after clicking the space menu item
delayedGoTo(3);
})
$('.dropdown.account').click(function () {
// save current step in variable
_currentStep = tour.getCurrentStep();
if (_currentStep == 9) {
// show next step (profile) after clicking the account menu
delayedGoTo(10);
} else if (_currentStep == 12) {
// show next step (administration) after clicking the account menu
delayedGoTo(13);
}
})
// global variable for setInterval instances
var newInterval;
/**
* Call single steps delayed (for ajax loaded content)
* @param nextStep int
* @param delay int
*/
function delayedGoTo(nextStep) {
// create inerval
newInterval = setInterval(showStep, 10);
function showStep() {
// go to specific step
tour.goTo(nextStep);
}
}
function tourSeen() {
// load user spaces
$.ajax({
'url': '<?php echo Yii::app()->createAbsoluteUrl('tour/tour/seen'); ?>',
'cache': false,
'data': jQuery(this).parents("form").serialize()
});
}
}
)
;
</script>

View File

@ -142,7 +142,7 @@
<!-- end: second top navigation bar -->
<?php $this->widget('application.modules_core.tour.widgets.TourWidget', array()); ?>
<?php } ?>

View File

@ -0,0 +1,31 @@
<?php
/**
* HumHub
* Copyright © 2014 The HumHub Project
*
* The texts of the GNU Affero General Public License with an additional
* permission and of our proprietary license can be found at and
* in the LICENSE file you have received along with this program.
*
* According to our dual licensing model, this program can be used either
* under the terms of the GNU Affero General Public License, version 3,
* or under a proprietary license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*/
/**
* PageAddonStackWidget holds additional code for every pages
*
* @package humhub.widgets
* @since 0.6
* @author andystrobel
*/
class PageAddonStackWidget extends StackWidget
{
}

View File

@ -20,7 +20,7 @@
<div class="list-group">
<?php foreach ($items as $item) : ?>
<a href="<?php echo $item['url']; ?>"
class="list-group-item <?php if ($item['isActive']): ?>active<?php endif; ?>">
class="list-group-item <?php if ($item['isActive']): ?>active<?php endif; ?><?php if (isset($item['id'])) {echo $item['id'];} ?>">
<?php echo $item['icon']; ?>
<span><?php echo $item['label']; ?></span>
</a>

View File

@ -6,7 +6,7 @@
* @since 0.5 */
?>
<?php foreach ($this->getItems() as $item) : ?>
<li class="visible-md visible-lg <?php if ($item['isActive']): ?>active<?php endif; ?>">
<li class="visible-md visible-lg <?php if ($item['isActive']): ?>active<?php endif; ?> <?php if (isset($item['id'])) { echo $item['id']; } ?>">
<a href="<?php echo $item['url']; ?>">
<?php echo $item['icon']; ?><br/>
<?php echo $item['label']; ?>

View File

@ -387,11 +387,28 @@ h4 {
background-color: #7191a8;
color: white;
}
.popover {
border: 1px solid rgba(0, 0, 0, 0.15);
border-radius: 4px;
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
-moz-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
}
.popover .popover-title {
background: none;
border-bottom: none;
color: #555555;
font-weight: 300;
font-size: 18px;
font-size: 16px;
padding: 15px;
}
.popover .popover-content {
font-size: 13px;
padding: 5px 15px;
color: #555555;
}
.popover .popover-navigation {
padding: 15px;
}
.nav-pills > li.active > a,
.nav-pills > li.active > a:hover,

View File

@ -538,11 +538,31 @@ h4 {
}
.popover {
border: 1px solid rgba(0,0,0,0.15);
border-radius: 4px;
-webkit-box-shadow: 0 6px 12px rgba(0,0,0,0.175);
-moz-box-shadow: 0 6px 12px rgba(0,0,0,0.175);
box-shadow: 0 6px 12px rgba(0,0,0,0.175);
.popover-title {
background: none;
border-bottom: none;
color: #555555;
font-weight: 300;
font-size: 18px;
font-size: 16px;
padding: 15px;
}
.popover-content {
font-size: 13px;
padding: 5px 15px;
color: @colorFont3;
}
.popover-navigation {
padding: 15px;
}
}