Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop
This commit is contained in:
commit
e74f4b8b11
@ -211,11 +211,11 @@ class Dolistore
|
||||
|
||||
// add image or default ?
|
||||
if ($product->id_default_image != '') {
|
||||
$image_url = DOL_URL_ROOT.'/dolistore/ajax/image.php?id_product='.$product->id.'&id_image='.$product->id_default_image;
|
||||
$image_url = DOL_URL_ROOT.'/admin/dolistore/ajax/image.php?id_product='.$product->id.'&id_image='.$product->id_default_image;
|
||||
$images = '<a href="'.$image_url.'" class="fancybox" rel="gallery'.$product->id.'" title="'.$product->name->language[$this->lang].', '.$langs->trans('Version').' '.$product->module_version.'">'.
|
||||
'<img src="'.$image_url.'&quality=home_default" style="max-height:250px;max-width: 210px;" alt="" /></a>';
|
||||
} else {
|
||||
$images = '<img src="'.DOL_URL_ROOT.'/dolistore/img/NoImageAvailable.png" />';
|
||||
$images = '<img src="'.DOL_URL_ROOT.'/admin/dolistore/img/NoImageAvailable.png" />';
|
||||
}
|
||||
|
||||
// free or pay ?
|
||||
|
||||
@ -1,72 +0,0 @@
|
||||
<html><head><title>CRUD Tutorial - Customer's list</title></head><body>
|
||||
<?php
|
||||
/*
|
||||
* 2007-2013 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/osl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2013 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
* PrestaShop Webservice Library
|
||||
* @package PrestaShopWebservice
|
||||
*/
|
||||
// Here we define constants /!\ You need to replace this parameters
|
||||
//https://dolistorecatalogpublickey1234567@vmdevwww.dolistore.com/api/
|
||||
define('DEBUG', true); // Debug mode
|
||||
define('PS_SHOP_PATH', 'https://www.dolistore.com/'); // Root path of your PrestaShop store
|
||||
define('PS_WS_AUTH_KEY', 'dolistorecatalogpublickey1234567'); // Auth key (Get it in your Back Office)
|
||||
require_once('./PSWebServiceLibrary.php');
|
||||
// Here we make the WebService Call
|
||||
try
|
||||
{
|
||||
$webService = new PrestaShopWebservice(PS_SHOP_PATH, PS_WS_AUTH_KEY, DEBUG);
|
||||
|
||||
// Here we set the option array for the Webservice : we want customers resources
|
||||
$opt['resource'] = 'categories';
|
||||
$opt['id'] = '1';
|
||||
|
||||
// Call
|
||||
$xml = $webService->get($opt);
|
||||
// Here we get the elements from children of customers markup "customer"
|
||||
$resources = $xml->categories->children();
|
||||
}
|
||||
catch (PrestaShopWebserviceException $e)
|
||||
{
|
||||
// Here we are dealing with errors
|
||||
$trace = $e->getTrace();
|
||||
if ($trace[0]['args'][0] == 404) echo 'Bad ID';
|
||||
else if ($trace[0]['args'][0] == 401) echo 'Bad auth key';
|
||||
else echo 'Other error';
|
||||
}
|
||||
// We set the Title
|
||||
echo "<h1>Categories's List</h1>";
|
||||
echo '<table border="5">';
|
||||
// if $resources is set we can lists element in it otherwise do nothing cause there's an error
|
||||
if (isset($resources))
|
||||
{
|
||||
echo '<tr><th>Id</th></tr>';
|
||||
foreach ($resources as $resource)
|
||||
{
|
||||
// Iterates on the found IDs
|
||||
echo '<tr><td>'.$resource->attributes().'</td></tr>';
|
||||
}
|
||||
}
|
||||
echo '</table>';
|
||||
?>
|
||||
</body></html>
|
||||
@ -254,7 +254,7 @@ if ($action == 'reset' && $user->admin)
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
$morejs = array("/admin/dolistore/js/dolistore.js.php");
|
||||
//$morejs = array("/admin/dolistore/js/dolistore.js.php");
|
||||
$morecss = array("/admin/dolistore/css/dolistore.css");
|
||||
|
||||
// Set dir where external modules are installed
|
||||
|
||||
@ -175,7 +175,7 @@ function task_prepare_head($object)
|
||||
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'task');
|
||||
|
||||
|
||||
// Manage discussion
|
||||
if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_TASK))
|
||||
{
|
||||
@ -198,7 +198,7 @@ function task_prepare_head($object)
|
||||
$head[$h][2] = 'task_notes';
|
||||
$h++;
|
||||
}
|
||||
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/document.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':'');
|
||||
$filesdir = $conf->projet->dir_output . "/" . dol_sanitizeFileName($object->project->ref) . '/' .dol_sanitizeFileName($object->ref);
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
@ -971,8 +971,9 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
|
||||
}
|
||||
$tableCell.='<input type="text" alt="'.($disabledtask?'':$alttitle).'" title="'.($disabledtask?'':$alttitle).'" '.($disabledtask?'disabled':$placeholder).' class="center smallpadd" size="2" id="timeadded['.$inc.']['.$idw.']" name="task['.$lines[$i]->id.']['.$idw.']" value="" cols="2" maxlength="5"';
|
||||
$tableCell.=' onkeypress="return regexEvent(this,event,\'timeChar\')"';
|
||||
$tableCell.= 'onblur="regexEvent(this,event,\''.$modeinput.'\'); updateTotal('.$idw.',\''.$modeinput.'\')" />';
|
||||
$tableCell.='</td>';
|
||||
$tableCell.=' onkeyup="updateTotal('.$idw.',\''.$modeinput.'\')"';
|
||||
$tableCell.=' onblur="regexEvent(this,event,\''.$modeinput.'\'); updateTotal('.$idw.',\''.$modeinput.'\')" />';
|
||||
$tableCell.='</td>';
|
||||
print $tableCell;
|
||||
}
|
||||
|
||||
|
||||
@ -1382,6 +1382,18 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
$newmenu->add("/expensereport/list.php?search_status=2&leftmenu=expensereport&mainmenu=hrm", $langs->trans("ListToApprove"), 2, $user->rights->expensereport->approve);
|
||||
$newmenu->add("/expensereport/stats/index.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("Statistics"), 1, $user->rights->expensereport->lire);
|
||||
}
|
||||
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
$langs->load("projects");
|
||||
|
||||
$search_project_user = GETPOST('search_project_user','int');
|
||||
|
||||
$newmenu->add("/projet/activity/perweek.php?leftmenu=tasks".($search_project_user?'&search_project_user='.$search_project_user:''), $langs->trans("NewTimeSpent"), 0, $user->rights->projet->lire);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user