Commit 59e687f1 authored by xavidp's avatar xavidp

[FIX]Fix visual consistency between the previous wizards (admin, profiles) ...

[FIX]Fix visual consistency between the previous wizards (admin, profiles)  and the user wizard. Step 2 out of 2: adapt titles in user wizard, add toc, similar user wizard icon as in the other wizards, last screen added with pointers for easy workflow for new users.
parent 26859490
......@@ -1118,6 +1118,7 @@ img/icons/large/wizard32x32.png -text
img/icons/large/wizard48x48.png -text
img/icons/large/wizard_admin48x48.png -text
img/icons/large/wizard_profiles48x48.png -text
img/icons/large/wizard_user48x48.png -text
img/icons/large/wysiwyg.png -text
img/icons/large/wysiwyg48x48.png -text
img/icons/large/xfce4-appfinder.png -text
......@@ -4916,6 +4917,7 @@ lib/wizard/pages/user_preferences_notifications.php -text
lib/wizard/pages/user_preferences_params.php -text
lib/wizard/pages/user_preferences_reports.php -text
lib/wizard/pages/user_wizard.php -text
lib/wizard/pages/user_wizard_completed.php -text
lib/wizard/readme.txt -text
lib/wizard/wizard.php -text
lib/wizard/wizardlib.php -text
......@@ -6711,6 +6713,7 @@ templates/wizard/user_preferences_notifications.tpl -text
templates/wizard/user_preferences_params.tpl -text
templates/wizard/user_preferences_reports.tpl -text
templates/wizard/user_wizard.tpl -text
templates/wizard/user_wizard_completed.tpl -text
templates/wizard/wizard_bar_admin.tpl -text
templates/wizard/wizard_bar_user.tpl -text
templates/workspace/add_template.tpl -text
......
......@@ -13,6 +13,11 @@ include_once('lib/userprefs/userprefslib.php');
*/
class UserWizardPreferencesInfo extends Wizard
{
function pageTitle ()
{
return tra('User Preferences:') . ' ' . tra('Personal Information');
}
function isEditable ()
{
return true;
......
......@@ -14,7 +14,12 @@ include_once ('lib/userprefs/userprefslib.php');
*/
class UserWizardPreferencesNotifications extends Wizard
{
function isEditable ()
function pageTitle ()
{
return tra('User Watches:') . ' ' . tra('Notification Preferences');
}
function isEditable ()
{
return true;
}
......
......@@ -14,6 +14,11 @@ include_once('lib/userprefs/userprefslib.php');
*/
class UserWizardPreferencesParams extends Wizard
{
function pageTitle ()
{
return tra('User Preferences:') . ' ' . tra('Settings');
}
function isEditable ()
{
return true;
......
......@@ -14,6 +14,11 @@ include_once ('lib/userprefs/userprefslib.php');
*/
class UserWizardPreferencesReports extends Wizard
{
function pageTitle ()
{
return tra('User Watches:') . ' ' . tra('Report Preferences');
}
function isEditable ()
{
return true;
......
......@@ -8,10 +8,15 @@
require_once('lib/wizard/wizard.php');
/**
* Set up the wysiwyg editor, including inline editing
* The Wizard's first page and frame handler
*/
class UserWizard extends Wizard
{
function pageTitle ()
{
return tra('Welcome to the User Wizard');
}
function isEditable ()
{
return false;
......@@ -24,7 +29,8 @@ class UserWizard extends Wizard
// Run the parent first
parent::onSetupPage($homepageUrl);
// Assign the page temaplte
// Assign the page template
$smarty->assign('pageTitle', $this->pageTitle());
$wizardTemplate = 'wizard/user_wizard.tpl';
$smarty->assign('wizardBody', $wizardTemplate);
......
<?php
// (c) Copyright 2002-2013 by authors of the Tiki Wiki CMS Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id$
require_once('lib/wizard/wizard.php');
/**
* The Wizard's last screen
*/
class UserWizardCompleted extends Wizard
{
function pageTitle ()
{
return tra('User Wizard Completed!');
}
function isEditable ()
{
return false;
}
public function onSetupPage ($homepageUrl)
{
global $smarty;
// Run the parent first
parent::onSetupPage($homepageUrl);
// Assign the page template
$wizardTemplate = 'wizard/user_wizard_completed.tpl';
$smarty->assign('wizardBody', $wizardTemplate);
return true;
}
function onContinue ($homepageUrl)
{
global $tikilib;
// Run the parent first
parent::onContinue($homepageUrl);
}
}
......@@ -5,6 +5,19 @@
<form action="tiki-wizard_user.php" method="post">
{include file="wizard/wizard_bar_user.tpl"}
<div id="wizardBody">
{include file="{$wizardBody}"}
<table class="adminWizardTable">
<tr>
{if !empty($wizard_toc)}
<td class="adminWizardTOC">
<span class="adminWizardTOCTitle">{tr}Wizard Steps{/tr}</span><br>
{$wizard_toc}
</td>
{/if}
<td class="adminWizardBody">
{include file="{$wizardBody}"}
</td>
</tr>
</table>
</div>
{include file="wizard/wizard_bar_user.tpl"}
</form>
{* $Id$ *}
<h1>{tr}User Preferences{/tr}: {tr}Personal Information{/tr}</h1>
<div class="userWizardIconleft"><img src="img/icons/large/user.png" alt="{tr}User Preferences{/tr}" /></div>
<div class="userWizardIconleft"><img src="img/icons/large/wizard_user48x48.png" alt="{tr}User Wizard{/tr}" /></div>
{tr}Set up basic information as a user on this site{/tr}.<br/><br/><br/>
<div class="userWizardContent">
<fieldset>
{if $prefs.feature_userPreferences eq 'y'}
<legend>{tr}Personal Information{/tr}</legend>
<div class="userWizardIconright"><img src="img/icons/large/vcard48x48.png" alt="{tr}User Preferences{/tr}" /></div>
<table class="formcolor">
<tr>
<td>{tr}User:{/tr}</td>
......
{* $Id$ *}
<h1>{tr}User Watches{/tr}: {tr}Notification Preferences{/tr}</h1>
<div class="userWizardIconleft"><img src="img/icons/large/user.png" alt="{tr}Notification Preferences{/tr}" /></div>
<div class="userWizardIconleft"><img src="img/icons/large/wizard_user48x48.png" alt="{tr}User Wizard{/tr}" /></div>
{tr}Use 'watches' to monitor wiki pages or other objects.{/tr} {tr}Watch new items by clicking the {icon _id=eye} button on specific pages.{/tr}<br/>
{tr}Set up below preferences related to receiving notifications by email about changes in the site{/tr}.<br/><br/><br/>
......@@ -16,6 +15,7 @@
<fieldset>
{if $prefs.feature_user_watches eq 'y'}
<legend>{tr}Notification Preferences{/tr}</legend>
<div class="userWizardIconright"><img src="img/icons/large/evolution48x48.png" alt="{tr}Notification Preferences{/tr}" /></div>
<table class="formcolor">
<p>{tr}Send notification when I am the editor{/tr}:</p>
<p><input type="checkbox" name="user_wiki_watch_editor" {if $user_wiki_watch_editor eq 'y'}checked{/if}> {tr}Wiki{/tr}</p>
......
{* $Id$ *}
<h1>{tr}User Preferences{/tr}: {tr}Settings{/tr}</h1>
<div class="userWizardIconleft"><img src="img/icons/large/user.png" alt="{tr}User Dummy{/tr} 3" /></div>
{tr}Set up your general settings for your account{/tr}.<br/><br/><br/>
<div class="userWizardIconleft"><img src="img/icons/large/wizard_user48x48.png" alt="{tr}User Wizard{/tr}" /></div>
{tr}Set up the general settings for your account{/tr}.<br/><br/><br/>
<div class="userWizardContent">
{if $prefs.feature_userPreferences eq 'y'}
<fieldset>
<legend>{tr}General settings{/tr}</legend>
<div class="userWizardIconright"><img src="img/icons/large/user.png" alt="{tr}User Params{/tr}" /></div>
<table class="formcolor">
<tr>
<td>{tr}Is email public? (uses scrambling to prevent spam){/tr}</td>
......@@ -192,6 +191,8 @@
{/if}
<fieldset>
<legend>{tr}My Tiki{/tr}</legend>
<div class="userWizardIconright"><img src="img/icons/project.gif" alt="{tr}My Tiki{/tr}" /></div>
<table class="formcolor">
{if $prefs.feature_wiki eq 'y'}
......
{* $Id$ *}
<h1>{tr}User Watches{/tr}: {tr}Report Preferences{/tr}</h1>
<div class="userWizardIconleft"><img src="img/icons/large/user.png" alt="{tr}Report Preferences{/tr}" /></div>
<div class="userWizardIconleft"><img src="img/icons/large/wizard_user48x48.png" alt="{tr}User Wizard{/tr}" /></div>
{tr}Use "watches" to monitor wiki pages or other objects.{/tr} {tr}Watch new items by clicking the {icon _id=eye} button on specific pages.{/tr}<br/>
{tr}Use reports to summarise notifications about objects you are watching{/tr}.<br/><br/>
......@@ -9,6 +8,7 @@
<fieldset>
{if $prefs.feature_daily_report_watches eq 'y'}
<legend>{tr}Report Preferences{/tr}</legend>
<div class="userWizardIconright"><img src="img/icons/large/stock_mail48x48.png" alt="{tr}Report Preferences{/tr}" /></div>
<table class="formcolor">
{if isset($remove_user_watch_error) && $remove_user_watch_error}
......
{* $Id$ *}
<h1>{tr}Welcome to the User Wizard{/tr}</h1>
<div class="userWizardIconleft"><img src="img/icons/large/wizard48x48.png" alt="{tr}Tiki User Wizard{/tr}" /></div>
<div class="userWizardIconleft"><img src="img/icons/large/wizard_user48x48.png" alt="{tr}Tiki User Wizard{/tr}" /></div>
{tr}This wizard will help you fill in data and main settings for your account on this website{/tr}.
{tr}Depending on the features enabled by the site admin, you will be offered more or less options{/tr}.
{tr}If you can't set up your user preferences (Real name, keep your information public or private, time settings, ...), you can request the site admin to enable the user preferences feature{/tr}.<br/><br/>
......@@ -9,17 +8,10 @@
<div class=userWizardContent">
<fieldset>
<legend>{tr}User Wizard{/tr}</legend>
<img src="img/icons/large/user.png" class="userWizardIconright" />
<p class="wizard_page_title">
<b>{tr}Welcome to the Tiki User Wizard{/tr}</b>.<br>
{tr}The user wizard will help you set up your personal Tiki preferences.{/tr}
{tr}Click at the "Start" button above to launch it{/tr}
</p>
<p>
{tr}If you don't want to run the wizard, you can close it using the button below, or use the "Close" button on top (available on all wizard pages){/tr}.<br>
<input type="submit" class="btn btn-default" name="close" value="{tr}Close the wizard{/tr}" />
</p>
<p>
<b>Tiki version {$tiki_version}</b>. {tr}To learn more about this Tiki release, go to <a href="http://doc.tiki.org/tiki12">Tiki 12</a>{/tr}.<br/><br/>
</p>
</fieldset>
......
{* $Id$ *}
<div class="userWizardIconleft"><img src="img/icons/large/wizard_user48x48.png" alt="{tr}Wizard completed{/tr}" /></div>
<div class="userWizardContent">
<img src="img/icons/tick.png" alt="{tr}Ok{/tr}" />{tr}Congratulations{/tr}. {tr}You are done with the user wizard{/tr}.<br>
<fieldset>
<legend>{tr}Next?{/tr}</legend>
<ul>
<li>{tr}Visit the Full <a href="tiki-user_preferences.php">User Preferences</a> page to set the rest of your user preferences{/tr}.</li>
<li>{tr}Or click at the button <strong>Finish</strong> to end the user wizard and go back to the where you were{/tr}.</li>
</ul>
</fieldset>
</div>
......@@ -2,18 +2,29 @@
<table style="width:100%">
<tr>
<td style="text-align:left; width:270px">
<div style="float:left; width:20px"><img src="img/icons/wizard16x16.png" alt="{tr}Tiki User Wizard{/tr}" /></div>
<td colspan="3" style="text-align:left; width:270px">
<div style="float:left; width:20px"><img src="img/icons/wizard16x16.png" alt="{tr}Tiki User Wizard{/tr}" /></div>
<input type="submit" class="btn btn-warning" name="close" value="{tr}Close{/tr}" />
&nbsp;&nbsp;&nbsp;
{if !isset($firstWizardPage)}<input type="submit" class="btn btn-default" name="back" value="{tr}Back{/tr}" />{/if}
</td>
<td style="text-align:left">
<input type="submit" class="btn btn-warning" name="close" value="{tr}Close{/tr}" />
&nbsp;&nbsp;&nbsp;
{if !isset($firstWizardPage)}<input type="submit" class="btn btn-default" name="back" value="{tr}Back{/tr}" />{/if}
<td ></td>
<td style="text-align:right">
<input type="hidden" name="url" value="{$homepageUrl}">
<input type="hidden" name="wizard_step" value="{$wizard_step}">
<input type="submit" class="btn btn-default" name="continue" value="{if isset($lastWizardPage)}{tr}Finish{/tr}{elseif isset($firstWizardPage)}{tr}Start{/tr}{else}{if $isEditable eq true}{tr}Save and Continue{/tr}{else}{tr}Next{/tr}{/if}{/if}" />
</td>
<td style="text-align:right">
<input type="hidden" name="url" value="{$homepageUrl}">
<input type="hidden" name="wizard_step" value="{$wizard_step}">
<input type="submit" class="btn btn-default" name="continue" value="{if isset($lastWizardPage)}{tr}Finish{/tr}{elseif isset($firstWizardPage)}{tr}Start{/tr}{else}{if $isEditable eq true}{tr}Save and Continue{/tr}{else}{tr}Next{/tr}{/if}{/if}" />
</tr>
<tr>
<td style="width:240px">
</td>
<td style="text-align:left">
{if !isset($showWizardPageTitle) or $showWizardPageTitle neq 'y'}
<h1 class="adminWizardPageTitle">{$pageTitle}</h1>
{assign var="showWizardPageTitle" value="y" scope="root"}
{/if}
</td>
<td style="text-align:right">
</td>
</tr>
</table>
......
......@@ -11,6 +11,10 @@
require 'tiki-setup.php';
require_once('lib/headerlib.php');
$headerlib->add_cssfile('css/wizards.css');
// Hide the display of the preference dependencies in the wizard
$headerlib->add_css('.pref_dependency{display:none !important;}');
$accesslib = TikiLib::lib('access');
$accesslib->check_user($user);
......@@ -37,6 +41,9 @@ $pages[] = new UserWizardPreferencesReports();
require_once('lib/wizard/pages/user_preferences_notifications.php');
$pages[] = new UserWizardPreferencesNotifications();
require_once('lib/wizard/pages/user_wizard_completed.php');
$pages[] = new UserWizardCompleted();
/////////////////////////////////////
// END User Wizard page section
/////////////////////////////////////
......@@ -44,8 +51,53 @@ $pages[] = new UserWizardPreferencesNotifications();
// Step the wizard pages
$wizardlib = TikiLib::lib('wizard');
$wizardlib->showPages($pages);
$wizardlib->showPages($pages, true);
// Build the TOC
$toc = '';
$stepNr = 0;
$reqStepNr = $wizardlib->wizard_stepNr;
$homepageUrl = $_REQUEST['url'];
foreach ($pages as $page) {
global $base_url;
$cssClasses = '';
// Start the user wizard
$url = $base_url.'tiki-wizard_user.php?&amp;stepNr=' . $stepNr . '&amp;url=' . rawurlencode($homepageUrl);
$cnt = $stepNr+1;
if ($cnt <= 9) {
$cnt = '&nbsp;&nbsp;'.$cnt;
}
$toc .= '<li><a ';
$cssClasses .= 'adminWizardTOCItem ';
if ($stepNr == $reqStepNr) {
$cssClasses .= 'highlight ';
}
if (!$page->isVisible()) {
$cssClasses .= 'disabledTOCSelection ';
}
$css = '';
if (strlen($cssClasses) > 0) {
$css = 'class="'.$cssClasses.'" ';
}
$toc .= $css;
$toc .= 'href="'.$url.'">'.$page->pageTitle().'</a></li>';
$stepNr++;
}
// Hide the left and right sidebars when the admin wizard is run
$headerlib = TikiLib::lib('header');
$headerlib->add_js(
<<<JS
hideCol('col2','left', 'col1');
hideCol('col3','right', 'col1');
JS
);
if ($reqStepNr > 0) {
$smarty->assign('wizard_toc', $toc);
}
// disallow robots to index page:
$smarty->assign('metatag_robots', 'NOINDEX, NOFOLLOW');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment