Merge branch 'master' of github.com:alchemy-fr/Phraseanet
74
README.md
@@ -1,10 +1,33 @@
|
||||
Phraseanet - Digital Asset Management application
|
||||
Phraseanet 3.5 - Digital Asset Management application
|
||||
=================================================
|
||||
|
||||
#Installation
|
||||
#Features :
|
||||
|
||||
**Nginx**
|
||||
Metadatas Management (include Thesaurus and DublinCore Mapping)
|
||||
Search Engine (Sphinx Search Integration)
|
||||
RestFull APIS (See Developer Documentation http://docs.phraseanet.com/Devel)
|
||||
Bridge to Youtube/Dailymotion/Flickr
|
||||
|
||||
#Documentation :
|
||||
|
||||
http://docs.phraseanet.com
|
||||
|
||||
#Easy Installation
|
||||
|
||||
**Fetch Sources**
|
||||
|
||||
<pre>
|
||||
|
||||
git clone git://github.com/alchemy-fr/Phraseanet.git Phraseanet
|
||||
cd Phraseanet
|
||||
./vendors.php
|
||||
|
||||
</pre>
|
||||
|
||||
|
||||
**Setup your webserver**
|
||||
|
||||
***Nginx***
|
||||
<pre>
|
||||
server {
|
||||
listen 80;
|
||||
@@ -15,58 +38,21 @@ server {
|
||||
|
||||
|
||||
location /web {
|
||||
alias /home/grosroro/workspace/Phraseanet-Trunk/datas/web;
|
||||
alias /path/to/Phraseanet/datas/web;
|
||||
}
|
||||
location /download {
|
||||
internal;
|
||||
alias /home/grosroro/workspace/Phraseanet-Trunk/tmp/download;
|
||||
alias /path/to/Phraseanet/tmp/download;
|
||||
}
|
||||
location /lazaret {
|
||||
internal;
|
||||
alias /home/grosroro/workspace/Phraseanet-Trunk/tmp/lazaret;
|
||||
alias /path/to/Phraseanet/tmp/lazaret;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
|
||||
#Pimp my install
|
||||
|
||||
**xsendfile**
|
||||
<pre>
|
||||
location /protected {
|
||||
internal;
|
||||
alias /home/grosroro/workspace/Phraseanet-Trunk/datas/noweb/;
|
||||
}
|
||||
</pre>
|
||||
|
||||
**MP4 pseudo stream**
|
||||
<pre>
|
||||
location /mp4_video {
|
||||
internal;
|
||||
mp4;
|
||||
alias /home/grosroro/workspace/Phraseanet-Trunk/datas/noweb/;
|
||||
}
|
||||
|
||||
location /mp4_videos {
|
||||
secure_download on;
|
||||
secure_download_secret S3cre3t;
|
||||
secure_download_path_mode file;
|
||||
|
||||
if ($secure_download = "-1") {
|
||||
return 403;
|
||||
}
|
||||
if ($secure_download = "-2") {
|
||||
return 403;
|
||||
}
|
||||
if ($secure_download = "-3") {
|
||||
return 500;
|
||||
}
|
||||
rewrite ^/mp4_videos(.*)/[0-9a-zA-Z]*/[0-9a-zA-Z]*$ /mp4_video$1 last;
|
||||
}
|
||||
</pre>
|
||||
|
||||
#RESTFULL APIs
|
||||
|
||||
See the [online developer reference] [1]
|
||||
Let's go !
|
||||
|
||||
#License
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/php
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
|
2
config/stamp/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
2
config/topics/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
2
config/wm/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
@@ -47,6 +47,7 @@ class ACL implements cache_cacheableInterface
|
||||
* @var Array
|
||||
*/
|
||||
protected $_rights_records_preview;
|
||||
|
||||
/**
|
||||
*
|
||||
* @var Array
|
||||
@@ -242,47 +243,88 @@ class ACL implements cache_cacheableInterface
|
||||
if (count($base_ids) == 0)
|
||||
return $this;
|
||||
|
||||
$params = array(
|
||||
':usr_id' => $this->user->get_id()
|
||||
, ':template_id' => $template_user->get_id()
|
||||
$sbas_ids = array();
|
||||
|
||||
foreach ($base_ids as $base_id)
|
||||
{
|
||||
$sbas_ids[] = phrasea::sbasFromBas($base_id);
|
||||
}
|
||||
|
||||
$sbas_ids = array_unique($sbas_ids);
|
||||
|
||||
$sbas_rights = array('bas_manage', 'bas_modify_struct', 'bas_modif_th', 'bas_chupub');
|
||||
|
||||
$sbas_to_acces = array();
|
||||
$rights_to_give = array();
|
||||
|
||||
foreach ($template_user->ACL()->get_granted_sbas() as $databox)
|
||||
{
|
||||
$sbas_id = $databox->get_sbas_id();
|
||||
|
||||
if (!in_array($sbas_id, $sbas_ids))
|
||||
continue;
|
||||
|
||||
|
||||
if (!$this->has_access_to_sbas($sbas_id))
|
||||
{
|
||||
$sbas_to_acces[] = $sbas_id;
|
||||
}
|
||||
|
||||
foreach ($sbas_rights as $right)
|
||||
{
|
||||
if ($template_user->ACL()->has_right_on_sbas($sbas_id, $right))
|
||||
{
|
||||
$rights_to_give[$sbas_id][$right] = '1';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->give_access_to_sbas($sbas_to_acces);
|
||||
|
||||
foreach ($rights_to_give as $sbas_id => $rights)
|
||||
{
|
||||
$this->update_rights_to_sbas($sbas_id, $rights);
|
||||
}
|
||||
|
||||
$bas_rights = array('canputinalbum', 'candwnldhd'
|
||||
, 'candwnldpreview', 'cancmd'
|
||||
, 'canadmin', 'actif', 'canreport', 'canpush'
|
||||
, 'canaddrecord', 'canmodifrecord', 'candeleterecord'
|
||||
, 'chgstatus', 'imgtools'
|
||||
, 'manage', 'modify_struct'
|
||||
, 'nowatermark', 'order_master'
|
||||
);
|
||||
|
||||
$sql = 'INSERT INTO sbasusr
|
||||
(SELECT distinct null as sbasusr_id, sb.sbas_id, :usr_id as usr_id, bas_manage
|
||||
, bas_modify_struct,bas_modif_th,bas_chupub
|
||||
FROM sbasusr sb, bas b
|
||||
WHERE b.base_id IN (' . implode(', ', $base_ids) . ')
|
||||
AND b.sbas_id = sb.sbas_id
|
||||
AND usr_id = :template_id)';
|
||||
$bas_to_acces = array();
|
||||
$rights_to_give = array();
|
||||
|
||||
$stmt = $this->appbox->get_connection()->prepare($sql);
|
||||
$stmt->execute($params);
|
||||
$stmt->closeCursor();
|
||||
foreach ($template_user->ACL()->get_granted_base() as $collection)
|
||||
{
|
||||
$base_id = $collection->get_base_id();
|
||||
|
||||
$this->delete_data_from_cache(self::CACHE_RIGHTS_SBAS);
|
||||
if (!in_array($base_id, $base_ids))
|
||||
continue;
|
||||
|
||||
$sql = "INSERT INTO basusr
|
||||
(SELECT null as id, base_id, :usr_id as usr_id, canputinalbum
|
||||
, candwnldhd, candwnldsubdef, candwnldpreview, cancmd
|
||||
, canadmin, actif, canreport, canpush, now() as creationdate
|
||||
, basusr_infousr, mask_and, mask_xor, restrict_dwnld
|
||||
, month_dwnld_max, remain_dwnld, time_limited, limited_from
|
||||
, limited_to, canaddrecord, canmodifrecord, candeleterecord
|
||||
, chgstatus, '0000-00-00 00:00:00' as lastconn, imgtools
|
||||
, manage, modify_struct, bas_manage, bas_modify_struct
|
||||
, nowatermark, order_master
|
||||
FROM basusr
|
||||
WHERE usr_id =
|
||||
(SELECT usr_id
|
||||
FROM usr WHERE usr_id = :template_id)
|
||||
AND base_id IN (" . implode(', ', $base_ids) . "))";
|
||||
if (!$this->has_access_to_base($base_id))
|
||||
{
|
||||
$bas_to_acces[] = $base_id;
|
||||
}
|
||||
|
||||
$stmt = $this->appbox->get_connection()->prepare($sql);
|
||||
$stmt->execute($params);
|
||||
$stmt->closeCursor();
|
||||
foreach ($bas_rights as $right)
|
||||
{
|
||||
if ($template_user->ACL()->has_right_on_base($base_id, $right))
|
||||
{
|
||||
$rights_to_give[$base_id][$right] = '1';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->inject_rights();
|
||||
$this->delete_data_from_cache(self::CACHE_RIGHTS_BAS);
|
||||
$this->give_access_to_base($bas_to_acces);
|
||||
|
||||
foreach ($rights_to_give as $sbas_id => $rights)
|
||||
{
|
||||
$this->update_rights_to_base($base_id, $rights);
|
||||
}
|
||||
|
||||
$this->user->set_last_template($template_user);
|
||||
|
||||
@@ -315,7 +357,7 @@ class ACL implements cache_cacheableInterface
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (!isset($this->_rights_bas[$base_id][$right]))
|
||||
throw new Exception('right ' . $right . ' does not exists');
|
||||
|
||||
@@ -750,7 +792,7 @@ class ACL implements cache_cacheableInterface
|
||||
{
|
||||
if ($this->_rights_bas && $this->_global_rights && is_array($this->_limited))
|
||||
return $this;
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
$this->_rights_bas = $this->get_data_from_cache(self::CACHE_RIGHTS_BAS);
|
||||
@@ -1399,12 +1441,12 @@ class ACL implements cache_cacheableInterface
|
||||
$this->load_rights_bas();
|
||||
|
||||
$datetime = new DateTime();
|
||||
|
||||
|
||||
if (!isset($this->_limited[$base_id]))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
$ret = ($this->_limited[$base_id]['dmin'] > $datetime
|
||||
|| $this->_limited[$base_id]['dmax'] < $datetime);
|
||||
|
||||
|
@@ -180,7 +180,7 @@ class Controller_Admin_Users implements ControllerProviderInterface
|
||||
}
|
||||
);
|
||||
|
||||
$controllers->post('/search/', function() use ($app)
|
||||
$controllers->match('/search/', function() use ($app)
|
||||
{
|
||||
$request = $app['request'];
|
||||
$users = new module_admin_route_users($request);
|
||||
@@ -194,17 +194,14 @@ class Controller_Admin_Users implements ControllerProviderInterface
|
||||
}
|
||||
);
|
||||
|
||||
$controllers->get('/search/', function() use ($app)
|
||||
$controllers->post('/apply_template/', function() use ($app)
|
||||
{
|
||||
$request = $app['request'];
|
||||
$users = new module_admin_route_users($request);
|
||||
$template = 'admin/users.html';
|
||||
$users = new module_admin_route_users_edit($request);
|
||||
|
||||
$users->apply_template();
|
||||
|
||||
$twig = new supertwig();
|
||||
$twig->addFilter(array('floor' => 'floor'));
|
||||
$twig->addFilter(array('getDate' => 'phraseadate::getDate'));
|
||||
|
||||
return $twig->render($template, $users->search($request));
|
||||
return new Symfony\Component\HttpFoundation\RedirectResponse('/admin/users/search/');
|
||||
}
|
||||
);
|
||||
|
||||
|
@@ -357,6 +357,16 @@ class Feed_Entry_Adapter implements Feed_Entry_Interface, cache_cacheableInterfa
|
||||
|
||||
return $this->publisher;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param User_adapter $user
|
||||
* @return boolean
|
||||
*/
|
||||
public function is_publisher(User_adapter $user)
|
||||
{
|
||||
return $user->get_id() === $this->get_publisher()->get_user()->get_id();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
|
3
lib/classes/PHPShortener.class.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../vendor/PHPShortener/phpshortener.class.php';
|
@@ -88,8 +88,7 @@ class Session_Handler
|
||||
if (!$this->is_authenticated())
|
||||
|
||||
return;
|
||||
$user = User_Adapter::getInstance($this->get_usr_id(), $this->appbox);
|
||||
$user->ACL()->delete_injected_rights();
|
||||
|
||||
$this->storage()->reset();
|
||||
$this->close_phrasea_session();
|
||||
|
||||
@@ -576,7 +575,7 @@ class Session_Handler
|
||||
$sql = 'SELECT v.id as validate_id, v.usr_id, v.ssel_id
|
||||
, s.usr_id as owner, t.value
|
||||
FROM (validate v, ssel s)
|
||||
LEFT JOIN tokens t
|
||||
INNER JOIN tokens t
|
||||
ON (t.datas = s.ssel_id
|
||||
AND v.usr_id=t.usr_id AND t.type="validate")
|
||||
WHERE expires_on < :expires_on
|
||||
@@ -594,7 +593,8 @@ class Session_Handler
|
||||
'ssel_id' => $row['ssel_id'],
|
||||
'from' => $row['owner'],
|
||||
'validate_id' => $row['validate_id'],
|
||||
'url' => $registry->get('GV_ServerName') . 'lightbox/validate/'.$row['ssel_id'].'/?LOG=' . $row['value']
|
||||
'url' => $registry->get('GV_ServerName')
|
||||
. 'lightbox/validate/'.$row['ssel_id'].'/?LOG=' . $row['value']
|
||||
);
|
||||
|
||||
$events_mngr->trigger('__VALIDATION_REMINDER__', $params);
|
||||
|
@@ -397,9 +397,16 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
*/
|
||||
public function set_email($email)
|
||||
{
|
||||
if (!trim($email))
|
||||
if (trim($email) == '')
|
||||
$email = null;
|
||||
|
||||
$test_user = User_Adapter::get_usr_id_from_email($email);
|
||||
|
||||
if($test_user && $test_user != $this->get_id())
|
||||
{
|
||||
throw new Exception_InvalidArgument (sprintf(_('A user already exists with email addres %s'), $email));
|
||||
}
|
||||
|
||||
$sql = 'UPDATE usr SET usr_mail = :new_email WHERE usr_id = :usr_id';
|
||||
$stmt = $this->appbox->get_connection()->prepare($sql);
|
||||
$stmt->execute(array(':new_email' => $email, ':usr_id' => $this->get_id()));
|
||||
@@ -864,8 +871,16 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
return $this->is_template;
|
||||
}
|
||||
|
||||
public function get_template_owner()
|
||||
{
|
||||
return $this->template_owner;
|
||||
}
|
||||
|
||||
public static function get_usr_id_from_email($email)
|
||||
{
|
||||
if(is_null($email))
|
||||
return false;
|
||||
|
||||
$conn = connection::getPDOConnection();
|
||||
$sql = 'SELECT usr_id FROM usr
|
||||
WHERE usr_mail = :email
|
||||
@@ -1231,6 +1246,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
protected function load_preferences()
|
||||
{
|
||||
if ($this->_prefs)
|
||||
|
||||
return $this;
|
||||
$sql = 'SELECT prop, value FROM usr_settings WHERE usr_id= :id';
|
||||
$stmt = $this->appbox->get_connection()->prepare($sql);
|
||||
@@ -1324,7 +1340,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
return $this;
|
||||
@@ -1556,6 +1572,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
$appbox = appbox::get_instance();
|
||||
$session = $appbox->get_session();
|
||||
if (!$session->is_authenticated())
|
||||
|
||||
return;
|
||||
|
||||
$ses_id = $session->get_ses_id();
|
||||
@@ -1614,7 +1631,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1678,7 +1695,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -1765,7 +1782,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
return $locale;
|
||||
@@ -1831,6 +1848,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
public function get_nonce()
|
||||
{
|
||||
if ($this->nonce)
|
||||
|
||||
return $this->nonce;
|
||||
$nonce = false;
|
||||
|
||||
@@ -1848,6 +1866,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
return $this->nonce;
|
||||
}
|
||||
|
||||
|
||||
public function __sleep()
|
||||
{
|
||||
$vars = array();
|
||||
|
@@ -88,6 +88,11 @@ class User_Query implements User_QueryInterface
|
||||
* @var boolean
|
||||
*/
|
||||
protected $include_templates = false;
|
||||
/**
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
protected $only_templates = false;
|
||||
/**
|
||||
*
|
||||
* @var Array
|
||||
@@ -123,10 +128,10 @@ class User_Query implements User_QueryInterface
|
||||
const SORT_FIRSTNAME= 'usr_prenom';
|
||||
const SORT_LASTNAME= 'usr_nom';
|
||||
const SORT_COMPANY = 'societe';
|
||||
const SORT_LOGIN = 'login';
|
||||
const SORT_LOGIN = 'usr_login';
|
||||
const SORT_EMAIL = 'usr_mail';
|
||||
const SORT_ID = 'usr_id';
|
||||
const SORT_CREATIONDATE = 'creationdate';
|
||||
const SORT_CREATIONDATE = 'usr_creationdate';
|
||||
const SORT_COUNTRY = 'pays';
|
||||
const SORT_LASTMODEL = 'lastModel';
|
||||
|
||||
@@ -191,18 +196,22 @@ class User_Query implements User_QueryInterface
|
||||
|
||||
$sql .= ' AND usr_login NOT LIKE "(#deleted_%" ';
|
||||
|
||||
if ($this->include_invite)
|
||||
if (!$this->include_invite)
|
||||
{
|
||||
$sql .= ' AND usr.invite=0 ';
|
||||
}
|
||||
|
||||
if ($this->include_templates === false)
|
||||
if ($this->only_templates === true)
|
||||
{
|
||||
$sql .= ' AND model_of = ' . $session->get_usr_id();
|
||||
}
|
||||
elseif ($this->include_templates === false)
|
||||
{
|
||||
$sql .= ' AND model_of=0';
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql .= ' AND (model_of=0 OR model_of= ' . $session->get_usr_id() . ' ) ';
|
||||
$sql .= ' AND (model_of=0 OR model_of = ' . $session->get_usr_id() . ' ) ';
|
||||
}
|
||||
|
||||
$baslist = array();
|
||||
@@ -355,6 +364,17 @@ class User_Query implements User_QueryInterface
|
||||
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param boolean $boolean
|
||||
* @return User_Query
|
||||
*/
|
||||
public function only_templates($boolean)
|
||||
{
|
||||
$this->only_templates = !!$boolean;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -390,6 +410,8 @@ class User_Query implements User_QueryInterface
|
||||
case self::SORT_COMPANY:
|
||||
case self::SORT_LOGIN:
|
||||
case self::SORT_EMAIL:
|
||||
$sorter[$k] = ' usr.`' . $sort . '` COLLATE utf8_unicode_ci ';
|
||||
break;
|
||||
case self::SORT_ID:
|
||||
case self::SORT_CREATIONDATE:
|
||||
case self::SORT_COUNTRY:
|
||||
@@ -410,7 +432,7 @@ class User_Query implements User_QueryInterface
|
||||
$sorter[$k] .= ' ASC ';
|
||||
break;
|
||||
case self::ORD_DESC:
|
||||
$sorter[$k] .= ' ASC ';
|
||||
$sorter[$k] .= ' DESC ';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -162,6 +162,7 @@ class bootstrap
|
||||
$loader->registerNamespaces(array(
|
||||
'Symfony\\Component\\Yaml' => __LIBDIR__ . '/vendor/symfony/src',
|
||||
'Symfony\\Component\\Console' => __LIBDIR__ . '/vendor/symfony/src',
|
||||
'Symfony\\Component\\BrowserKit' => __LIBDIR__ . '/vendor/symfony/src',
|
||||
));
|
||||
$loader->register();
|
||||
|
||||
|
@@ -206,6 +206,9 @@ class caption_field implements cache_cacheableInterface
|
||||
*/
|
||||
protected static function serialize_value(Array $value, $separator)
|
||||
{
|
||||
if(strlen($separator) > 1)
|
||||
$separator = $separator[0];
|
||||
|
||||
if (trim($separator) === '')
|
||||
$separator = ' ';
|
||||
else
|
||||
@@ -346,9 +349,9 @@ class caption_field implements cache_cacheableInterface
|
||||
if ($this->databox_field->is_multi() === true)
|
||||
{
|
||||
if ($as_string === true && $custom_separator === false)
|
||||
|
||||
{
|
||||
return $this->value;
|
||||
|
||||
}
|
||||
$separator = $this->databox_field->get_separator();
|
||||
$array_values = self::get_multi_values($this->value, $separator);
|
||||
|
||||
|
@@ -59,8 +59,7 @@ class caption_record implements caption_interface, cache_cacheableInterface
|
||||
|
||||
protected function retrieve_fields()
|
||||
{
|
||||
if(is_array($this->fields))
|
||||
|
||||
if (is_array($this->fields))
|
||||
return $this->fields;
|
||||
|
||||
$fields = array();
|
||||
@@ -97,7 +96,7 @@ class caption_record implements caption_interface, cache_cacheableInterface
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
$this->fields = $rec_fields;
|
||||
@@ -134,7 +133,6 @@ class caption_record implements caption_interface, cache_cacheableInterface
|
||||
{
|
||||
$fields = $this->retrieve_fields();
|
||||
if (isset($this->dces_elements[$label]))
|
||||
|
||||
return $fields[$this->dces_elements[$label]];
|
||||
return null;
|
||||
}
|
||||
@@ -172,7 +170,10 @@ class caption_record implements caption_interface, cache_cacheableInterface
|
||||
, $field->highlight_thesaurus()
|
||||
);
|
||||
|
||||
$fields[$field->get_name()] = $value;
|
||||
$fields[$field->get_name()] = array(
|
||||
'value' => $value
|
||||
, 'separator' => $field->get_databox_field()->get_separator()
|
||||
);
|
||||
}
|
||||
|
||||
if ($searchEngine instanceof searchEngine_adapter)
|
||||
@@ -185,7 +186,7 @@ class caption_record implements caption_interface, cache_cacheableInterface
|
||||
|
||||
foreach ($fields as $key => $value)
|
||||
{
|
||||
$fields[$key] = $ret[$n];
|
||||
$fields[$key]['value'] = $ret[$n];
|
||||
$n++;
|
||||
}
|
||||
}
|
||||
|
@@ -142,7 +142,7 @@ class databox extends base
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ class databox extends base
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
$conn = connection::getPDOConnection();
|
||||
@@ -277,6 +277,7 @@ class databox extends base
|
||||
SUM(1) AS n, SUM(size) AS siz FROM (record, subdef)
|
||||
LEFT JOIN coll ON record.coll_id=coll.coll_id
|
||||
WHERE record.record_id = subdef.record_id
|
||||
GROUP BY record.coll_id, name
|
||||
UNION
|
||||
SELECT coll.coll_id, 0, asciiname, '_' AS name, 0 AS n, 0 AS siz
|
||||
FROM coll LEFT JOIN record ON record.coll_id=coll.coll_id
|
||||
@@ -450,7 +451,6 @@ class databox extends base
|
||||
$stmt->closeCursor();
|
||||
|
||||
if ($row)
|
||||
|
||||
return self::get_instance((int) $row['sbas_id']);
|
||||
|
||||
try
|
||||
@@ -463,7 +463,7 @@ class databox extends base
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
$sql = 'USE `' . $dbname . '`';
|
||||
@@ -575,7 +575,6 @@ class databox extends base
|
||||
public function get_meta_structure()
|
||||
{
|
||||
if ($this->meta_struct)
|
||||
|
||||
return $this->meta_struct;
|
||||
|
||||
try
|
||||
@@ -698,7 +697,6 @@ class databox extends base
|
||||
}
|
||||
}
|
||||
if ($n > $limit)
|
||||
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@@ -959,16 +957,25 @@ class databox extends base
|
||||
}
|
||||
$this->saveStructure($dom_struct);
|
||||
|
||||
$type = isset($field['type']) ? $field['type'] : 'text';
|
||||
$type = in_array($type, array(databox_field::TYPE_DATE, databox_field::TYPE_NUMBER, databox_field::TYPE_TEXT)) ? $type : databox_field::TYPE_TEXT;
|
||||
$type = isset($field['type']) ? $field['type'] : 'string';
|
||||
$type = in_array($type
|
||||
, array(
|
||||
databox_field::TYPE_DATE
|
||||
, databox_field::TYPE_NUMBER
|
||||
, databox_field::TYPE_STRING
|
||||
, databox_field::TYPE_TEXT
|
||||
)
|
||||
) ? $type : databox_field::TYPE_STRING;
|
||||
|
||||
$meta_struct_field = databox_field::create($this, $fname);
|
||||
$meta_struct_field
|
||||
->set_readonly(isset($field['readonly']) ? $field['readonly'] : 0)
|
||||
->set_indexable(isset($field['index']) ? $field['index'] : '1')
|
||||
->set_separator(isset($field['separator']) ? $field['separator'] : '')
|
||||
->set_required((isset($field['required']) && $field['required'] == 1))
|
||||
->set_type($type)
|
||||
->set_tbranch(isset($field['tbranch']) ? $field['tbranch'] : '')
|
||||
->set_thumbtitle(isset($field['thumbtitle']) ? $field['thumbtitle'] : '0')
|
||||
->set_thumbtitle(isset($field['thumbtitle']) ? $field['thumbtitle'] : (isset($field['thumbTitle']) ? $field['thumbTitle'] : '0'))
|
||||
->set_multi(isset($field['multi']) ? $field['multi'] : 0)
|
||||
->set_report(isset($field['report']) ? $field['report'] : '1')
|
||||
->save();
|
||||
@@ -979,7 +986,7 @@ class databox extends base
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (isset($field['regname']))
|
||||
@@ -1213,7 +1220,6 @@ class databox extends base
|
||||
public function get_structure()
|
||||
{
|
||||
if ($this->structure)
|
||||
|
||||
return $this->structure;
|
||||
$this->structure = $this->retrieve_structure();
|
||||
|
||||
@@ -1228,7 +1234,7 @@ class databox extends base
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
$structure = null;
|
||||
@@ -1254,7 +1260,6 @@ class databox extends base
|
||||
public function get_cterms()
|
||||
{
|
||||
if ($this->cterms)
|
||||
|
||||
return $this->cterms;
|
||||
|
||||
$sql = "SELECT value FROM pref WHERE prop='cterms'";
|
||||
@@ -1421,7 +1426,6 @@ class databox extends base
|
||||
public function get_cgus()
|
||||
{
|
||||
if ($this->cgus)
|
||||
|
||||
return $this->cgus;
|
||||
|
||||
$this->load_cgus();
|
||||
@@ -1439,7 +1443,7 @@ class databox extends base
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
$sql = 'SELECT value, locale, updated_on FROM pref WHERE prop ="ToU"';
|
||||
|
@@ -124,6 +124,7 @@ class databox_field implements cache_cacheableInterface
|
||||
|
||||
const TYPE_TEXT = "text";
|
||||
const TYPE_DATE = "date";
|
||||
const TYPE_STRING = "string";
|
||||
const TYPE_NUMBER = "number";
|
||||
|
||||
/**
|
||||
@@ -176,7 +177,7 @@ class databox_field implements cache_cacheableInterface
|
||||
$this->required = !!$row['required'];
|
||||
$this->multi = !!$row['multi'];
|
||||
$this->report = !!$row['report'];
|
||||
$this->type = $row['type'];
|
||||
$this->type = $row['type'] ?: self::TYPE_STRING;
|
||||
$this->tbranch = $row['tbranch'];
|
||||
if ($row['dces_element'])
|
||||
{
|
||||
@@ -269,7 +270,21 @@ class databox_field implements cache_cacheableInterface
|
||||
$stmt->execute(array(':id' => $this->get_id()));
|
||||
$stmt->closeCursor();
|
||||
|
||||
$dom_struct = $this->databox->get_dom_structure();
|
||||
$xp_struct = $this->databox->get_xpath_structure();
|
||||
|
||||
$nodes = $xp_struct->query(
|
||||
'/record/description/*[@meta_id=' . $this->id . ']'
|
||||
);
|
||||
|
||||
foreach($nodes as $node)
|
||||
{
|
||||
/* @var $node DOMNode */
|
||||
$node->parentNode->removeChild($node);
|
||||
}
|
||||
|
||||
$this->delete_data_from_cache();
|
||||
$this->databox->saveStructure($dom_struct);
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -537,6 +552,9 @@ class databox_field implements cache_cacheableInterface
|
||||
*/
|
||||
public function set_separator($separator)
|
||||
{
|
||||
if (strpos($separator, ';') === false)
|
||||
$separator .= ';';
|
||||
|
||||
$this->separator = $separator;
|
||||
|
||||
return $this;
|
||||
|
@@ -255,8 +255,7 @@ class mail
|
||||
$mail->ConfirmReadingTo = $reading_confirm_to;
|
||||
}
|
||||
|
||||
$mail->MsgHTML(strip_tags($body));
|
||||
// $mail->MsgHTML(p4string::cleanTags($body));
|
||||
$mail->MsgHTML(strip_tags($body, '<div><br>'));
|
||||
|
||||
foreach ($files as $f)
|
||||
{
|
||||
|
@@ -106,12 +106,19 @@ class module_admin_route_users
|
||||
if (is_null($v))
|
||||
$this->query_parms[$k] = false;
|
||||
}
|
||||
|
||||
|
||||
$query = new User_Query($appbox);
|
||||
$templates = $query
|
||||
->only_templates(true)
|
||||
->execute()->get_results();
|
||||
|
||||
return array(
|
||||
'users' => $this->results,
|
||||
'parm' => $this->query_parms,
|
||||
'invite_user' => $invite,
|
||||
'autoregister_user' => $autoregister
|
||||
'autoregister_user' => $autoregister,
|
||||
'templates' => $templates
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -536,6 +536,13 @@ class module_admin_route_users_edit
|
||||
return $this;
|
||||
}
|
||||
|
||||
$user = User_adapter::getInstance(array_pop($this->users), appbox::get_instance());
|
||||
|
||||
if ($user->is_template())
|
||||
{
|
||||
return $this;
|
||||
}
|
||||
|
||||
$appbox = appbox::get_instance();
|
||||
$session = $appbox->get_session();
|
||||
$request = http_request::getInstance();
|
||||
@@ -580,6 +587,36 @@ class module_admin_route_users_edit
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function apply_template()
|
||||
{
|
||||
$appbox = appbox::get_instance();
|
||||
$session = $appbox->get_session();
|
||||
|
||||
$template = \User_adapter::getInstance($this->request->get('template'), $appbox);
|
||||
|
||||
if ($template->get_template_owner()->get_id() != $session->get_usr_id())
|
||||
{
|
||||
throw new \Exception_Forbidden('You are not the owner of the template');
|
||||
}
|
||||
|
||||
$current_user = \User_adapter::getInstance($session->get_usr_id(), $appbox);
|
||||
$base_ids = array_keys($current_user->ACL()->get_granted_base(array('canadmin')));
|
||||
|
||||
foreach ($this->users as $usr_id)
|
||||
{
|
||||
$user = \User_adapter::getInstance($usr_id, $appbox);
|
||||
|
||||
if($user->is_template())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$user->ACL()->apply_model($template, $base_ids);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function apply_quotas()
|
||||
{
|
||||
$this->base_id = (int) $this->request->get('base_id');
|
||||
|
@@ -148,9 +148,9 @@ $app->before(function($request) use ($app)
|
||||
|
||||
return;
|
||||
}
|
||||
catch (Exception $e)
|
||||
catch (\Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
$auth = new Session_Authentication_None($app['p4user']);
|
||||
|
@@ -36,9 +36,44 @@ class module_console_systemUpgrade extends Command
|
||||
|
||||
public function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
if(!setup::is_installed())
|
||||
if (!setup::is_installed())
|
||||
{
|
||||
throw new RuntimeException('Phraseanet is not set up');
|
||||
|
||||
if (file_exists(dirname(__FILE__) . "/../../../../config/connexion.inc")
|
||||
&& !file_exists(dirname(__FILE__) . "/../../../../config/config.inc")
|
||||
&& file_exists(dirname(__FILE__) . "/../../../../config/_GV.php"))
|
||||
{
|
||||
|
||||
$output->writeln('This version of Phraseanet requires a config/config.inc');
|
||||
$output->writeln('Would you like it to be created based on your settings ?');
|
||||
|
||||
$dialog = $this->getHelperSet()->get('dialog');
|
||||
do
|
||||
{
|
||||
$continue = mb_strtolower($dialog->ask($output, '<question>' . _('Create automatically') . ' (Y/n)</question>', 'y'));
|
||||
}
|
||||
while (!in_array($continue, array('y', 'n')));
|
||||
|
||||
if ($continue == 'y')
|
||||
{
|
||||
require __DIR__ . "/../../../../config/_GV.php";
|
||||
|
||||
$datas = '<?php'."\n"
|
||||
.'$servername = "'.GV_ServerName.'";'."\n"
|
||||
.'$maintenance=false;'."\n"
|
||||
.'$debug=false;'."\n"
|
||||
.'$debug=true;'."\n"
|
||||
.'';
|
||||
|
||||
file_put_contents(__DIR__ . "/../../../../config/config.inc", $datas);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new RuntimeException('Phraseanet is not set up');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
require_once dirname(__FILE__) . '/../../../../lib/bootstrap.php';
|
||||
@@ -59,12 +94,12 @@ class module_console_systemUpgrade extends Command
|
||||
{
|
||||
$output->write('<info>Upgrading...</info>', true);
|
||||
$appbox = appbox::get_instance();
|
||||
|
||||
if(count(User_Adapter::get_wrong_email_users($appbox)) > 0)
|
||||
|
||||
if (count(User_Adapter::get_wrong_email_users($appbox)) > 0)
|
||||
{
|
||||
return $output->writeln(sprintf('<error>You have to fix your database before upgrade with the system:mailCheck command </error>'));
|
||||
}
|
||||
|
||||
|
||||
$upgrader = new Setup_Upgrade($appbox);
|
||||
$advices = $appbox->forceUpgrade($upgrader);
|
||||
}
|
||||
|
@@ -49,7 +49,7 @@ class module_prod
|
||||
'sbas_id' => $sbas_id
|
||||
);
|
||||
|
||||
foreach($user->ACL()->get_granted_base(array(), array($databox->get_sbas_id())) as $coll)
|
||||
foreach ($user->ACL()->get_granted_base(array(), array($databox->get_sbas_id())) as $coll)
|
||||
{
|
||||
$selected = ($searchSet &&
|
||||
isset($searchSet->bases) &&
|
||||
@@ -75,12 +75,19 @@ class module_prod
|
||||
else
|
||||
$dates[$id] = array('sbas' => array($sbas_id), 'fieldname' => $name);
|
||||
}
|
||||
|
||||
if (isset($fields[$name]))
|
||||
{
|
||||
$fields[$name]['sbas'][] = $sbas_id;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isset($fields[$name]))
|
||||
$fields[$name]['sbas'][] = $sbas_id;
|
||||
else
|
||||
$fields[$name] = array('sbas' => array($sbas_id), 'fieldname' => $name, 'id' => $id);
|
||||
$fields[$name] = array(
|
||||
'sbas' => array($sbas_id)
|
||||
, 'fieldname' => $name
|
||||
, 'type' => $meta->get_type()
|
||||
, 'id' => $id
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -56,7 +56,7 @@ class random
|
||||
}
|
||||
}
|
||||
|
||||
$sql = 'DELETE FROM tokens WHERE expire_on < :date';
|
||||
$sql = 'DELETE FROM tokens WHERE expire_on < :date and type="download"';
|
||||
$stmt = $conn->prepare($sql);
|
||||
$stmt->execute(array(':date' => $date));
|
||||
$stmt->closeCursor();
|
||||
@@ -201,7 +201,9 @@ class random
|
||||
self::cleanTokens();
|
||||
|
||||
$conn = connection::getPDOConnection();
|
||||
$sql = 'SELECT * FROM tokens WHERE value = :token ';
|
||||
$sql = 'SELECT * FROM tokens
|
||||
WHERE value = :token
|
||||
AND (expire_on > NOW() OR expire_on IS NULL)';
|
||||
$stmt = $conn->prepare($sql);
|
||||
$stmt->execute(array(':token' => $token));
|
||||
$row = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
@@ -180,7 +180,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
$connbas = $this->databox->get_connection();
|
||||
@@ -530,7 +530,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
return null;
|
||||
@@ -580,7 +580,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
$sql = 'SELECT BIN(status) as status FROM record
|
||||
WHERE record_id = :record_id';
|
||||
@@ -617,7 +617,6 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
throw new Exception_Media_SubdefNotFound ();
|
||||
|
||||
if (isset($this->subdefs[$name]))
|
||||
|
||||
return $this->subdefs[$name];
|
||||
|
||||
if (!$this->subdefs)
|
||||
@@ -658,7 +657,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
$connbas = $this->get_databox()->get_connection();
|
||||
@@ -757,10 +756,8 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
if ($data)
|
||||
{
|
||||
if (isset($this->technical_datas[$data]))
|
||||
|
||||
return $this->technical_datas[$data];
|
||||
else
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -873,9 +870,9 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
$titles = array();
|
||||
foreach ($retrieved_fields as $key => $value)
|
||||
{
|
||||
if (trim($value === ''))
|
||||
if (trim($value['value'] === ''))
|
||||
continue;
|
||||
$titles[] = $value;
|
||||
$titles[] = $value['value'];
|
||||
}
|
||||
$title = trim(implode(' - ', $titles));
|
||||
}
|
||||
@@ -951,7 +948,6 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
$base_url = '';
|
||||
$original_file = $subdef_def = false;
|
||||
|
||||
|
||||
$subdefs = $this->get_databox()->get_subdef_structure();
|
||||
|
||||
foreach ($subdefs as $type => $datas)
|
||||
@@ -972,7 +968,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
try
|
||||
{
|
||||
$value = $this->get_subdef($name);
|
||||
$original_file = p4string::addEndSlash($value['path']) . $value['file'];
|
||||
$original_file = p4string::addEndSlash($value->get_path()) . $value->get_file();
|
||||
unlink($original_file);
|
||||
}
|
||||
catch (Exception $e)
|
||||
@@ -987,7 +983,9 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
if (trim($subdef_def->get_baseurl()) !== '')
|
||||
{
|
||||
$base_url = str_replace(
|
||||
array((string) $subdef_def->get_path(), $newfilename), array((string) $subdef_def->get_baseurl(), ''), $path_file_dest
|
||||
array((string) $subdef_def->get_path(), $newfilename)
|
||||
, array((string) $subdef_def->get_baseurl(), '')
|
||||
, $path_file_dest
|
||||
);
|
||||
}
|
||||
|
||||
@@ -997,7 +995,12 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
|
||||
$sql = 'DELETE FROM subdef WHERE record_id= :record_id AND name=:name';
|
||||
$stmt = $connbas->prepare($sql);
|
||||
$stmt->execute(array(':record_id' => $this->record_id, ':name' => $name));
|
||||
$stmt->execute(
|
||||
array(
|
||||
':record_id' => $this->record_id
|
||||
, ':name' => $name
|
||||
)
|
||||
);
|
||||
|
||||
$registry = registry::get_instance();
|
||||
|
||||
@@ -1032,7 +1035,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
|
||||
$sql = 'UPDATE record SET moddate=NOW() WHERE record_id=:record_id';
|
||||
$stmt = $connbas->prepare($sql);
|
||||
$stmt->bindParam(':record_id', $this->get_record_id());
|
||||
$stmt->execute(array(':record_id' => $this->get_record_id()));
|
||||
$stmt->execute();
|
||||
|
||||
$this->delete_data_from_cache(self::CACHE_SUBDEFS);
|
||||
@@ -1242,7 +1245,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
$this->delete_data_from_cache(self::CACHE_STATUS);
|
||||
|
||||
@@ -1257,7 +1260,6 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
public function get_reg_name()
|
||||
{
|
||||
if (!$this->is_grouping())
|
||||
|
||||
return false;
|
||||
|
||||
$balisename = '';
|
||||
@@ -1296,14 +1298,12 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
$registry = registry::get_instance();
|
||||
|
||||
if ($this->bitly_link !== null)
|
||||
|
||||
return $this->bitly_link;
|
||||
|
||||
$this->bitly_link = false;
|
||||
|
||||
if (trim($registry->get('GV_bitly_user')) == ''
|
||||
&& trim($registry->get('GV_bitly_key')) == '')
|
||||
|
||||
return $this->bitly_link;
|
||||
|
||||
try
|
||||
@@ -1356,7 +1356,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
else
|
||||
{
|
||||
$uuid = $system_file->read_uuid();
|
||||
if(!uuid::is_valid($uuid))
|
||||
if (!uuid::is_valid($uuid))
|
||||
{
|
||||
$uuid = uuid::generate_v4();
|
||||
}
|
||||
@@ -1504,7 +1504,6 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
{
|
||||
$hd = $this->get_subdef('document');
|
||||
if ($hd->is_physically_present())
|
||||
|
||||
return new system_file(p4string::addEndSlash($hd->get_path()) . $hd->get_file());
|
||||
return null;
|
||||
}
|
||||
@@ -1730,7 +1729,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
$this->delete_data_from_cache(self::CACHE_SUBDEFS);
|
||||
}
|
||||
@@ -1824,7 +1823,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1844,7 +1843,6 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
public function get_container_baskets()
|
||||
{
|
||||
if ($this->container_basket)
|
||||
|
||||
return $this->container_basket;
|
||||
|
||||
$appbox = appbox::get_instance();
|
||||
|
@@ -56,7 +56,7 @@ class searchEngine_adapter_phrasea_engine extends searchEngine_adapter_abstract
|
||||
|
||||
/**
|
||||
*
|
||||
* @var boolean
|
||||
* @var searchEngine_options
|
||||
*/
|
||||
protected $options = false;
|
||||
|
||||
@@ -142,6 +142,8 @@ class searchEngine_adapter_phrasea_engine extends searchEngine_adapter_abstract
|
||||
*/
|
||||
public function set_options(searchEngine_options $options)
|
||||
{
|
||||
$this->options = $options;
|
||||
|
||||
$this->opt_search_type = (int) $options->get_search_type();
|
||||
$this->opt_bases = $options->get_bases();
|
||||
$this->opt_fields = $options->get_fields();
|
||||
@@ -394,34 +396,37 @@ class searchEngine_adapter_phrasea_engine extends searchEngine_adapter_abstract
|
||||
|
||||
$total_time = 0;
|
||||
|
||||
$sort = '';
|
||||
|
||||
if($this->options->get_sortby())
|
||||
{
|
||||
switch($this->options->get_sortord())
|
||||
{
|
||||
case searchEngine_options::SORT_MODE_ASC:
|
||||
$sort = '+';
|
||||
break;
|
||||
case searchEngine_options::SORT_MODE_DESC:
|
||||
default:
|
||||
$sort = '-';
|
||||
break;
|
||||
}
|
||||
$sort .= '0' . $this->options->get_sortby();
|
||||
}
|
||||
|
||||
foreach ($this->queries as $sbas_id => $qry)
|
||||
{
|
||||
if ($this->opt_search_type == 1)
|
||||
{
|
||||
$this->results[$sbas_id] = phrasea_query2(
|
||||
$session->get_ses_id()
|
||||
, $sbas_id
|
||||
, $this->colls[$sbas_id]
|
||||
, $this->arrayq[$sbas_id]
|
||||
, $registry->get('GV_sit')
|
||||
, (string) $session->get_usr_id()
|
||||
, false
|
||||
, PHRASEA_MULTIDOC_REGONLY
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->results[$sbas_id] = phrasea_query2(
|
||||
$session->get_ses_id()
|
||||
, $sbas_id
|
||||
, $this->colls[$sbas_id]
|
||||
, $this->arrayq[$sbas_id]
|
||||
, $registry->get('GV_sit')
|
||||
, (string) $session->get_usr_id()
|
||||
, false
|
||||
, PHRASEA_MULTIDOC_DOCONLY
|
||||
);
|
||||
}
|
||||
$this->results[$sbas_id] = phrasea_query2(
|
||||
$session->get_ses_id()
|
||||
, $sbas_id
|
||||
, $this->colls[$sbas_id]
|
||||
, $this->arrayq[$sbas_id]
|
||||
, $registry->get('GV_sit')
|
||||
, (string) $session->get_usr_id()
|
||||
, false
|
||||
, $this->opt_search_type == 1 ? PHRASEA_MULTIDOC_REGONLY : PHRASEA_MULTIDOC_DOCONLY
|
||||
, $sort
|
||||
);
|
||||
|
||||
$total_time += $this->results[$sbas_id]['time_all'];
|
||||
|
||||
if ($this->results[$sbas_id])
|
||||
@@ -634,9 +639,20 @@ class searchEngine_adapter_phrasea_engine extends searchEngine_adapter_abstract
|
||||
foreach ($fields as $name => $field)
|
||||
{
|
||||
if ($sxe->description->$name)
|
||||
$ret[] = str_replace(array('[[em]]', '[[/em]]'), array('<em>', '</em>'), (string) $sxe->description->$name);
|
||||
{
|
||||
$val = array();
|
||||
foreach($sxe->description->$name as $value)
|
||||
{
|
||||
$val[] = str_replace(array('[[em]]', '[[/em]]'), array('<em>', '</em>'), (string) $value);
|
||||
}
|
||||
$val = implode(' '.$field['separator'].' ', $val);
|
||||
}
|
||||
else
|
||||
$ret[] = $field;
|
||||
{
|
||||
$val = $field['value'];
|
||||
}
|
||||
|
||||
$ret[] = $val;
|
||||
}
|
||||
|
||||
return $ret;
|
||||
|
@@ -752,8 +752,15 @@ class searchEngine_adapter_sphinx_engine extends searchEngine_adapter_abstract i
|
||||
'before_match' => "<em>",
|
||||
'after_match' => "</em>"
|
||||
);
|
||||
|
||||
$fields_to_send = array();
|
||||
|
||||
foreach($fields as $k=>$f)
|
||||
{
|
||||
$fields_to_send[$k] = $f['value'];
|
||||
}
|
||||
|
||||
return $this->sphinx->BuildExcerpts($fields, $index, $query, $opts);
|
||||
return $this->sphinx->BuildExcerpts($fields_to_send, $index, $query, $opts);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -436,7 +436,7 @@ class setup
|
||||
$message = 'Directory MUST be writable';
|
||||
break;
|
||||
case 'version':
|
||||
$result = version_compare($value, '1.17.0.2', '>=');
|
||||
$result = version_compare($value, '1.18.0.3', '>=');
|
||||
if ($result)
|
||||
$message = sprintf ('Phrasea version %s is ok', $value);
|
||||
else
|
||||
|
@@ -100,11 +100,10 @@ class supertwig
|
||||
$options = array_merge($default_options, $options);
|
||||
$extensions = array_merge($default_extensions, $extensions);
|
||||
|
||||
$this->init_twig();
|
||||
|
||||
try
|
||||
{
|
||||
$this->set_options($options);
|
||||
$this->init_twig();
|
||||
$this->set_extensions($extensions);
|
||||
$this->addFilter(array('round' => 'round'));
|
||||
}
|
||||
|
@@ -108,11 +108,16 @@ class task_Scheduler
|
||||
foreach ($task_manager->get_tasks() as $task)
|
||||
{
|
||||
if (!$task->is_active())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$tid = $task->get_task_id();
|
||||
|
||||
if (!$task->is_running())
|
||||
{
|
||||
/* @var $task task_abstract */
|
||||
$task->reset_crash_counter();
|
||||
$task->set_status(task_abstract::STATUS_TOSTART);
|
||||
}
|
||||
}
|
||||
|
@@ -38,8 +38,9 @@ abstract class task_appboxAbstract extends task_abstract
|
||||
$this->log(("Warning : abox connection lost, restarting in 10 min."));
|
||||
sleep(60 * 10);
|
||||
$this->running = false;
|
||||
$this->return_value = self::RETURNSTATUS_TORESTART;
|
||||
|
||||
return('');
|
||||
return;
|
||||
}
|
||||
|
||||
$this->set_last_exec_time();
|
||||
@@ -85,7 +86,7 @@ abstract class task_appboxAbstract extends task_abstract
|
||||
$this->pause($duration);
|
||||
}
|
||||
|
||||
return($this->return_value);
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -46,8 +46,9 @@ abstract class task_databoxAbstract extends task_abstract
|
||||
$this->log(("Warning : abox connection lost, restarting in 10 min."));
|
||||
sleep(60 * 10);
|
||||
$this->running = false;
|
||||
$this->return_value = self::RETURNSTATUS_TORESTART;
|
||||
|
||||
return('');
|
||||
return;
|
||||
}
|
||||
|
||||
$this->set_last_exec_time();
|
||||
@@ -104,7 +105,7 @@ abstract class task_databoxAbstract extends task_abstract
|
||||
$this->pause($duration);
|
||||
}
|
||||
|
||||
return($this->return_value);
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -112,5 +112,44 @@ class task_manager
|
||||
|
||||
return $row;
|
||||
}
|
||||
|
||||
public static function getAvailableTasks()
|
||||
{
|
||||
$registry = registry::get_instance();
|
||||
$taskdir = array( $registry->get('GV_RootPath') . "lib/classes/task/period/"
|
||||
, $registry->get('GV_RootPath') . "config/classes/task/period/"
|
||||
);
|
||||
|
||||
$tasks = array();
|
||||
foreach($taskdir as $path)
|
||||
{
|
||||
if( ($hdir = @opendir($path)) )
|
||||
{
|
||||
$tskin = array();
|
||||
$max = 9999;
|
||||
while (($max-- > 0) && (($file = readdir($hdir)) !== false))
|
||||
{
|
||||
if (!is_file($path . '/' . $file) || substr($file, 0, 1) == "." || substr($file, -10) != ".class.php")
|
||||
continue;
|
||||
|
||||
$classname = 'task_period_' . substr($file, 0, strlen($file) - 10);
|
||||
|
||||
try
|
||||
{
|
||||
// $testclass = new $classname(null);
|
||||
if ($classname::interfaceAvailable())
|
||||
{
|
||||
$tasks[] = array("class" => $classname, "name" => $classname::getName(), "err" => null);
|
||||
}
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
closedir($hdir);
|
||||
}
|
||||
}
|
||||
return $tasks;
|
||||
}
|
||||
}
|
||||
|
@@ -1541,6 +1541,7 @@ class task_period_archive extends task_abstract
|
||||
$record->set_metadatas($meta['metadatas']);
|
||||
$record->set_binary_status(databox_status::operation_or($stat0, $stat1));
|
||||
$record->rebuild_subdefs();
|
||||
$record->reindex();
|
||||
$rid = $record->get_record_id();
|
||||
$this->log(sprintf((' (recordId %s)'), $rid));
|
||||
$this->archivedFiles++;
|
||||
@@ -1881,6 +1882,7 @@ class task_period_archive extends task_abstract
|
||||
$record->set_metadatas($meta['metadatas']);
|
||||
$record->set_binary_status(databox_status::operation_or(databox_status::operation_or($stat0, $stat1), databox_status::hex2bin($hexstat)));
|
||||
$record->rebuild_subdefs();
|
||||
$record->reindex();
|
||||
|
||||
$rid = $record->get_record_id();
|
||||
if ($grp_rid !== NULL)
|
||||
|
@@ -57,7 +57,7 @@ class task_period_emptyColl extends task_appboxAbstract
|
||||
$collection = collection::get_from_base_id($this->base_id);
|
||||
$this->total_records = $collection->get_record_amount();
|
||||
$collection->empty_collection(200);
|
||||
$this->records_done +=200;
|
||||
$this->records_done += $this->total_records;
|
||||
$this->setProgress($this->records_done, $this->total_records);
|
||||
|
||||
if ($this->total_records == 0)
|
||||
|
@@ -67,8 +67,8 @@ class task_period_upgradetov32 extends task_abstract
|
||||
if (!$this->sbas_id)
|
||||
{
|
||||
printf("sbas_id '" . $this->sbas_id . "' invalide\n");
|
||||
|
||||
return 'stopped';
|
||||
$this->return_value = self::RETURNSTATUS_STOPPED;
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
@@ -78,6 +78,8 @@ class task_period_upgradetov32 extends task_abstract
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
$this->return_value = self::RETURNSTATUS_STOPPED;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -94,6 +96,7 @@ class task_period_upgradetov32 extends task_abstract
|
||||
catch (Exception $e)
|
||||
{
|
||||
printf("Please verify all your databox meta fields before migrating, It seems somes are wrong\n");
|
||||
$this->return_value = self::RETURNSTATUS_STOPPED;
|
||||
|
||||
return 'stopped';
|
||||
}
|
||||
@@ -194,7 +197,7 @@ class task_period_upgradetov32 extends task_abstract
|
||||
|
||||
$sql = 'select record_id, coll_id, xml, BIN(status) as status
|
||||
FROM record
|
||||
WHERE record_id NOT IN (select distinct record_id from technical_datas)
|
||||
WHERE migrated="0" AND record_id NOT IN (select distinct record_id from technical_datas)
|
||||
LIMIT 0, 500';
|
||||
|
||||
$stmt = $connbas->prepare($sql);
|
||||
@@ -238,7 +241,7 @@ class task_period_upgradetov32 extends task_abstract
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -280,9 +283,6 @@ class task_period_upgradetov32 extends task_abstract
|
||||
{
|
||||
$record = new record_adapter($this->sbas_id, $row['record_id']);
|
||||
|
||||
|
||||
// $sbas_id = $this->sbas_id;
|
||||
|
||||
$metas = $databox->get_meta_structure();
|
||||
|
||||
$metadatas = array();
|
||||
@@ -367,12 +367,16 @@ class task_period_upgradetov32 extends task_abstract
|
||||
$memory = memory_get_usage() >> 20;
|
||||
|
||||
if ($n_done >= 5000)
|
||||
|
||||
return task_abstract::RETURNSTATUS_TORESTART;
|
||||
{
|
||||
$this->return_value = task_abstract::RETURNSTATUS_TORESTART;
|
||||
return;
|
||||
}
|
||||
if ($memory > 100)
|
||||
|
||||
return task_abstract::RETURNSTATUS_TORESTART;
|
||||
}
|
||||
{
|
||||
$this->return_value = task_abstract::RETURNSTATUS_TORESTART;
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
@@ -393,8 +397,6 @@ class task_period_upgradetov32 extends task_abstract
|
||||
|
||||
$conn = connection::getPDOConnection();
|
||||
|
||||
$ret = 'stopped';
|
||||
|
||||
printf("taskid %s ending." . PHP_EOL, $this->get_task_id());
|
||||
sleep(1);
|
||||
printf("good bye world I was task upgrade to version 3.2" . PHP_EOL);
|
||||
@@ -406,11 +408,12 @@ class task_period_upgradetov32 extends task_abstract
|
||||
$stmt->closeCursor();
|
||||
|
||||
$this->setProgress(0, 0);
|
||||
$ret = 'todelete';
|
||||
|
||||
|
||||
$this->return_value = self::RETURNSTATUS_TODELETE;
|
||||
|
||||
flush();
|
||||
|
||||
return $ret;
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1349,16 +1349,6 @@
|
||||
|
||||
<comment></comment>
|
||||
</field>
|
||||
<field>
|
||||
<name>bas_manage</name>
|
||||
<type>int(1) unsigned</type>
|
||||
<null></null>
|
||||
<extra></extra>
|
||||
|
||||
|
||||
<default>0</default>
|
||||
<comment></comment>
|
||||
</field>
|
||||
<field>
|
||||
<name>bas_modify_struct</name>
|
||||
<type>int(1) unsigned</type>
|
||||
@@ -5131,7 +5121,7 @@
|
||||
</field>
|
||||
<field>
|
||||
<name>type</name>
|
||||
<type>enum('text','date','number')</type>
|
||||
<type>enum('string','text','date','number')</type>
|
||||
<null></null>
|
||||
<extra></extra>
|
||||
<default></default>
|
||||
|
@@ -246,7 +246,7 @@ class API_V1_test_adapter extends PhraseanetWebTestCaseAbstract
|
||||
$this->assertTrue((strlen($metadatas->separator) > 0));
|
||||
|
||||
$this->assertTrue(is_string($metadatas->thesaurus_branch));
|
||||
$this->assertTrue(in_array($metadatas->type, array(databox_field::TYPE_DATE, databox_field::TYPE_NUMBER, databox_field::TYPE_TEXT)));
|
||||
$this->assertTrue(in_array($metadatas->type, array(databox_field::TYPE_DATE,databox_field::TYPE_STRING, databox_field::TYPE_NUMBER, databox_field::TYPE_TEXT)));
|
||||
$this->assertTrue(is_bool($metadatas->indexable));
|
||||
$this->assertTrue(is_bool($metadatas->multivalue));
|
||||
$this->assertTrue(is_bool($metadatas->readonly));
|
||||
|
@@ -254,7 +254,7 @@ class API_V1_test_adapterYaml extends PhraseanetWebTestCaseAbstract
|
||||
$this->assertTrue((strlen($metadatas["separator"]) > 0));
|
||||
|
||||
$this->assertTrue(is_string($metadatas["thesaurus_branch"]));
|
||||
$this->assertTrue(in_array($metadatas["type"], array(databox_field::TYPE_DATE, databox_field::TYPE_NUMBER, databox_field::TYPE_TEXT)));
|
||||
$this->assertTrue(in_array($metadatas["type"], array(databox_field::TYPE_DATE,databox_field::TYPE_STRING, databox_field::TYPE_NUMBER, databox_field::TYPE_TEXT)));
|
||||
$this->assertTrue(is_bool($metadatas["indexable"]));
|
||||
$this->assertTrue(is_bool($metadatas["multivalue"]));
|
||||
$this->assertTrue(is_bool($metadatas["readonly"]));
|
||||
|
59
lib/unitTest/userTest.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2010 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
require_once dirname(__FILE__) . '/PhraseanetPHPUnitAbstract.class.inc';
|
||||
|
||||
/**
|
||||
*
|
||||
* @package
|
||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||
* @link www.phraseanet.com
|
||||
*/
|
||||
|
||||
|
||||
|
||||
class userTest extends PhraseanetPHPUnitAbstract
|
||||
{
|
||||
|
||||
|
||||
public function testMail()
|
||||
{
|
||||
$this->assertFalse(User_Adapter::get_usr_id_from_email(null));
|
||||
try
|
||||
{
|
||||
$appbox = appbox::get_instance();
|
||||
|
||||
self::$user->set_email(null);
|
||||
|
||||
$this->assertFalse(User_Adapter::get_usr_id_from_email(null));
|
||||
self::$user->set_email('');
|
||||
$this->assertFalse(User_Adapter::get_usr_id_from_email(null));
|
||||
self::$user->set_email('noone@example.com');
|
||||
$this->assertEquals(self::$user->get_id(), User_Adapter::get_usr_id_from_email('noone@example.com'));
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
$this->fail($e->getMessage());
|
||||
}
|
||||
try
|
||||
{
|
||||
|
||||
self::$user->set_email('noonealt1@example.com');
|
||||
$this->fail('A user already got this address');
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
|
||||
}
|
||||
$this->assertFalse(User_Adapter::get_usr_id_from_email(null));
|
||||
}
|
||||
}
|
2
lib/vendor/symfony
vendored
@@ -15,5 +15,5 @@
|
||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||
* @link www.phraseanet.com
|
||||
*/
|
||||
define('GV_version', '3.5.0.0RC1');
|
||||
define('GV_version_name', 'Archaeopteryx');
|
||||
define('GV_version', '3.5.5.0');
|
||||
define('GV_version_name', 'Baobab');
|
||||
|
@@ -227,55 +227,64 @@
|
||||
</div>
|
||||
<div>
|
||||
<button class="field_adder">
|
||||
{% trans 'boutton::ajouter' %}
|
||||
</button>
|
||||
</div>
|
||||
<form action="/admin/description.php" method="post" target="_self" id="form_struct">
|
||||
<input name="newfield" id="newfield" type="hidden" />
|
||||
<table class="admintable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
</th>
|
||||
<th>
|
||||
{% trans 'Nom' %}
|
||||
</th>
|
||||
<th>
|
||||
{% trans 'Source' %}Source
|
||||
</th>
|
||||
<th>
|
||||
<span title="{% trans 'DublinCore Element Set' %}">DCES</span>
|
||||
</th>
|
||||
<th>
|
||||
{% trans 'Multivalue' %}
|
||||
</th>
|
||||
<th>
|
||||
{% trans 'Indexable' %}
|
||||
</th>
|
||||
<th>
|
||||
{% trans 'Lecture seule' %}
|
||||
</th>
|
||||
<th>
|
||||
{% trans 'Branche Thesaurus' %}
|
||||
</th>
|
||||
<th>
|
||||
{% trans 'Affiche dans report' %}
|
||||
</th>
|
||||
<th>
|
||||
Regdate
|
||||
</th>
|
||||
<th>
|
||||
Regname
|
||||
</th>
|
||||
<th>
|
||||
Regdesc
|
||||
</th>
|
||||
<th>
|
||||
{% trans 'Afficher en titre' %}
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% trans 'boutton::ajouter' %}
|
||||
</button>
|
||||
</div>
|
||||
<form action="/admin/description.php" method="post" target="_self" id="form_struct">
|
||||
<input name="newfield" id="newfield" type="hidden" />
|
||||
<table class="admintable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
</th>
|
||||
<th>
|
||||
{% trans 'Nom' %}
|
||||
</th>
|
||||
<th>
|
||||
{% trans 'Source' %}Source
|
||||
</th>
|
||||
<th>
|
||||
<span title="{% trans 'DublinCore Element Set' %}">DCES</span>
|
||||
</th>
|
||||
<th>
|
||||
{% trans 'Multivalue' %}
|
||||
</th>
|
||||
<th>
|
||||
{% trans 'Indexable' %}
|
||||
</th>
|
||||
<th>
|
||||
{% trans 'Required' %}
|
||||
</th>
|
||||
<th>
|
||||
{% trans 'Lecture seule' %}
|
||||
</th>
|
||||
<th>
|
||||
{% trans 'Type' %}
|
||||
</th>
|
||||
<th>
|
||||
{% trans 'Separateur' %}
|
||||
</th>
|
||||
<th>
|
||||
{% trans 'Branche Thesaurus' %}
|
||||
</th>
|
||||
<th>
|
||||
{% trans 'Affiche dans report' %}
|
||||
</th>
|
||||
<th>
|
||||
Regdate
|
||||
</th>
|
||||
<th>
|
||||
Regname
|
||||
</th>
|
||||
<th>
|
||||
Regdesc
|
||||
</th>
|
||||
<th>
|
||||
{% trans 'Afficher en titre' %}
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for field in fields %}
|
||||
{% set disabled = '' %}
|
||||
{% if field.is_on_error() %}
|
||||
@@ -304,11 +313,26 @@
|
||||
<td>
|
||||
<input class="metafield_{{field.get_id()}}" {{disabled}} name="indexable_{{field.get_id()}}" type="checkbox" {% if field.is_indexable() %}checked="checked"{% endif %}/>
|
||||
</td>
|
||||
<td>
|
||||
<input class="metafield_{{field.get_id()}}" {{disabled}} name="required_{{field.get_id()}}" type="checkbox" {% if field.is_required() %}checked="checked"{% endif %}/>
|
||||
</td>
|
||||
<td>
|
||||
<input class="meta_readonly metafield_{{field.get_id()}}" {{disabled}} name="readonly_{{field.get_id()}}" type="checkbox" {% if field.is_readonly() %}checked="checked"{% endif %}/>
|
||||
<img class="alert alertTips alert_not_readonly" src="/skins/icons/alert.png" title="{% trans 'Attention, la source descriptive selectionne n\'est pas en lecture seule, vous devriez decocher cette case' %}" style="display:none;" />
|
||||
<img class="alert alertTips alert_is_readonly" src="/skins/icons/alert.png" title="{% trans 'Attention, la source descriptive selectionne est en lecture seule, vous devriez cocher cette case' %}" style="display:none;" />
|
||||
</td>
|
||||
<td>
|
||||
<select class="metafield_{{field.get_id()}}" {{disabled}} name="type_{{field.get_id()}}">
|
||||
<option value=""></option>
|
||||
<option {% if field.get_type() == 'string' %}selected{% endif %} value="string">string</option>
|
||||
<option {% if field.get_type() == 'text' %}selected{% endif %} value="text">text</option>
|
||||
<option {% if field.get_type() == 'number' %}selected{% endif %} value="number">number</option>
|
||||
<option {% if field.get_type() == 'date' %}selected{% endif %} value="date">date</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<input size="2" class="metafield_{{field.get_id()}}" {{disabled}} value="{{ field.get_separator() }}" name="separator_{{field.get_id()}}" type="text"/>
|
||||
</td>
|
||||
<td>
|
||||
<input style="width:100px;" class="metafield_{{field.get_id()}}" {{disabled}} name="tbranch_{{field.get_id()}}" type="text" value="{{field.get_tbranch()}}"/>
|
||||
</td>
|
||||
|
@@ -15,7 +15,7 @@
|
||||
|
||||
{% set display = 'block' %}
|
||||
|
||||
{% if right[name] != users|length and name != 'access' and right['access'] != users|length %}
|
||||
{% if right[name] != users|length and name != 'access' and right['access'] != users|length and type != 'sbas' %}
|
||||
{% set display = 'none' %}
|
||||
{% endif %}
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
<li>
|
||||
<a href="#rights_tab">Droits</a>
|
||||
</li>
|
||||
{% if main_user is not empty %}
|
||||
{% if main_user is not empty and main_user.is_template is empty %}
|
||||
<li>
|
||||
<a href="#user_infos_tab">Fiche</a>
|
||||
</li>
|
||||
@@ -142,7 +142,7 @@
|
||||
|
||||
</th>
|
||||
<th colspan="26">
|
||||
<img src="/skins/lng/inclin-{{session.get_I18n()}}.gif" >
|
||||
<img src="/skins/lng/inclin-{{session.get_I18n()}}.png" style="width:698px"/>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -402,7 +402,7 @@
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{% if main_user is not empty %}
|
||||
{% if main_user is not empty and main_user.is_template is empty %}
|
||||
<div id="user_infos_tab" class="PNB" style="top:40px;">
|
||||
<form id="user_infos_form">
|
||||
<table>
|
||||
|
@@ -48,7 +48,7 @@
|
||||
<th>{% trans 'Titre' %}</th>
|
||||
<th style="width:150px;">{% trans 'Date Creation' %}</th>
|
||||
<th style="width:220px;">{% trans 'Restriction' %}</th>
|
||||
<th style="width:80px;">{% trans 'Visible sur la homepage' %}</th>
|
||||
<th style="width:80px;">{% trans 'Public' %}</th>
|
||||
<th style="width:80px;"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -72,7 +72,7 @@
|
||||
</td>
|
||||
<td style="text-align:center;">
|
||||
{% if feed.is_public() %}
|
||||
<img src="/skins/icons/ok.png"/>
|
||||
<img src="/skins/icons/ligth-on.png" title="{% trans 'This feed is public' %}"/>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
|
@@ -1,440 +1,449 @@
|
||||
<html lang="{{session.get_I18n()}}">
|
||||
<head>
|
||||
<link type="text/css" rel="stylesheet" href="/include/minify/f=skins/common/main.css,skins/admin/admincolor.css" />
|
||||
<style type="text/css">
|
||||
BODY
|
||||
{
|
||||
margin:10px;
|
||||
}
|
||||
|
||||
*
|
||||
{
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.divTab
|
||||
{
|
||||
position:absolute;
|
||||
left:30px;
|
||||
top:-17px;
|
||||
}
|
||||
|
||||
.tabFront
|
||||
{
|
||||
z-index:30;
|
||||
font-size:9px;
|
||||
position:relative;
|
||||
top:0px;
|
||||
background-color:#aaaaaa;
|
||||
border-top:#ffffff 1px solid;
|
||||
border-left:#ffffff 1px solid;
|
||||
border-bottom:#aaaaaa 1px solid;
|
||||
border-right:#000000 1px solid;
|
||||
padding-top:1px;
|
||||
padding-bottom:0px;
|
||||
padding-left:15px;
|
||||
padding-right:15px;
|
||||
float:left;
|
||||
height:14px;
|
||||
cursor:pointer;
|
||||
color:#000000;
|
||||
text-decoration:none;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.tabBack
|
||||
{
|
||||
z-index:30;
|
||||
font-size:9px;
|
||||
position:relative;
|
||||
top:0px;
|
||||
background-color:#888888;
|
||||
border-top:#555555 1px solid;
|
||||
border-left:#555555 1px solid;
|
||||
border-bottom:#ffffff 1px solid;
|
||||
border-right:#bbbbbb 1px solid;
|
||||
padding-top:1px;
|
||||
padding-bottom:0px;
|
||||
padding-left:15px;
|
||||
padding-right:15px;
|
||||
float:left;
|
||||
height:14px;
|
||||
cursor:pointer;
|
||||
color:#000000;
|
||||
text-decoration:none;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
DIV.menu
|
||||
{
|
||||
font-size: 12px;
|
||||
border-left: 1px solid #ffffff;
|
||||
border-top: 1px solid #ffffff;
|
||||
border-right: 2px solid #000000;
|
||||
border-bottom: 2px solid #000000;
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
visibility:hidden;
|
||||
position:absolute;
|
||||
top:0px;
|
||||
left:0px;
|
||||
background-color:#d4d0c8;
|
||||
}
|
||||
DIV.menu IMG
|
||||
{
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
position:relative;
|
||||
left:-10px;
|
||||
top:2px;
|
||||
}
|
||||
DIV.menu A
|
||||
{
|
||||
font-size: 12px;
|
||||
display:block;
|
||||
position:relative;
|
||||
text-decoration: none;
|
||||
color:#000000;
|
||||
padding-top:1px;
|
||||
padding-bottom:1px;
|
||||
padding-left:13px;
|
||||
padding-right:3px;
|
||||
overflow:hidden;
|
||||
border:none 0px #FFFFFF;
|
||||
}
|
||||
DIV.menu A:hover
|
||||
{
|
||||
font-size: 12px;
|
||||
display:block;
|
||||
position:relative;
|
||||
text-decoration: none;
|
||||
color:#ffffff;
|
||||
background-color:#000080;
|
||||
}
|
||||
DIV.menu A.disabled
|
||||
{
|
||||
font-size: 12px;
|
||||
display:block;
|
||||
position:relative;
|
||||
text-decoration: none;
|
||||
color:#A0A0A0;
|
||||
padding-top:1px;
|
||||
padding-bottom:1px;
|
||||
padding-left:13px;
|
||||
padding-right:3px;
|
||||
overflow:hidden;
|
||||
}
|
||||
DIV.menu A.disabled:hover
|
||||
{
|
||||
font-size: 12px;
|
||||
display:block;
|
||||
position:relative;
|
||||
text-decoration: none;
|
||||
color:#A0A0A0;
|
||||
background-color:#d4d0c8;
|
||||
}
|
||||
DIV.menu .line
|
||||
{
|
||||
display:block;
|
||||
position:relative;
|
||||
height:0px;
|
||||
overflow:hidden;
|
||||
margin-top:5px;
|
||||
margin-bottom:4px;
|
||||
padding:0px;
|
||||
border-top: 1px solid #555555;
|
||||
border-bottom: 1px solid #ffffff;
|
||||
}
|
||||
</style>
|
||||
<!-- _____________ head added part of graphic interface of '{{task.getName()}}' _____________ -->
|
||||
{{task.printInterfaceHEAD()}}
|
||||
<!-- ______________ end of head part of graphic interface of '{{task.getName()}}' ______________ -->
|
||||
<script type="text/javascript">
|
||||
|
||||
jsTaskObj = {
|
||||
SettingsIsDirty:false,
|
||||
|
||||
currentView : null,
|
||||
|
||||
oldXML:"{{task.get_settings()|stripdoublequotes}}",
|
||||
|
||||
view:function(type)
|
||||
{
|
||||
var o;
|
||||
var f;
|
||||
switch(type)
|
||||
{
|
||||
case 'PRE_XML':
|
||||
{% if task.getGraphicForm() %}
|
||||
document.getElementById('divGraph').style.display = "none";
|
||||
document.getElementById('divXml').style.display = "";
|
||||
document.getElementById('linkviewxml').className = "tabFront";
|
||||
document.getElementById('linkviewgraph').className = "tabBack";
|
||||
{% endif %}
|
||||
this.currentView = "XML";
|
||||
break;
|
||||
case 'XML':
|
||||
if( (f = document.forms['graphicForm']) )
|
||||
{
|
||||
document.getElementById("__gxml").value = document.forms['fxml'].txtareaxml.value;
|
||||
document.getElementById("__gact").value = "FORM2XML";
|
||||
f.target = "hiddenFrame";
|
||||
f.action = "/admin/task2utils.php";
|
||||
f.submit();
|
||||
}
|
||||
break;
|
||||
|
||||
case 'PRE_GRAPHIC':
|
||||
case 'GRAPHIC':
|
||||
document.forms['fxml'].target = "hiddenFrame";
|
||||
document.forms['fxml'].__act.value = "XML2FORM";
|
||||
document.forms['fxml'].submit();
|
||||
this.currentView = "GRAPHIC";
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
saveTask:function(save)
|
||||
{
|
||||
if(save)
|
||||
{
|
||||
if(this.currentView == "GRAPHIC")
|
||||
{
|
||||
if( (f = document.forms['graphicForm']) )
|
||||
<head>
|
||||
<link type="text/css" rel="stylesheet" href="/include/minify/f=skins/common/main.css,skins/admin/admincolor.css" />
|
||||
<style type="text/css">
|
||||
BODY
|
||||
{
|
||||
document.getElementById("__gxml").value = document.forms['fxml'].txtareaxml.value;
|
||||
document.getElementById("__gtname").value = document.forms['__ftask'].__tname.value;
|
||||
document.getElementById("__gtactive").value = document.forms['__ftask'].__tactive.checked ? "1" : "0" ;
|
||||
document.getElementById("__gact").value = "SAVE_GRAPHIC";
|
||||
f.target = "hiddenFrame";
|
||||
f.action = "task2utils.php";
|
||||
f.submit();
|
||||
margin:10px;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
document.forms['fxml'].target = "hiddenFrame";
|
||||
document.forms['fxml'].__tname.value = document.forms['__ftask'].__tname.value;
|
||||
document.forms['fxml'].__tactive.value = document.forms['__ftask'].__tactive.checked ? "1" : "0" ;
|
||||
document.forms['fxml'].__act.value = "SAVE_XML";
|
||||
document.forms['fxml'].submit();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(document.forms["fxml"].__tid.value != "")
|
||||
{
|
||||
document.forms["__freturn"].submit();
|
||||
}
|
||||
else
|
||||
{
|
||||
document.forms["__freturn"].submit();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
getHTTPObject:function()
|
||||
{
|
||||
var ret = null ;
|
||||
try
|
||||
{
|
||||
ret = new XMLHttpRequest();
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
try
|
||||
{
|
||||
ret = new ActiveXObject("Msxml2.XMLHTTP");
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
try
|
||||
*
|
||||
{
|
||||
ret = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
ret = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
},
|
||||
|
||||
resetCrashCounter:function()
|
||||
{
|
||||
if(typeof(this.resetCrashCounter.x) == 'undefined') // simulate static : only 1 instance of getHTTPObject !
|
||||
{
|
||||
this.resetCrashCounter.x = {
|
||||
"xmlhttp":new this.getHTTPObject, // une seule instance
|
||||
"cb":function ()
|
||||
.divTab
|
||||
{
|
||||
var ret;
|
||||
if (this.readyState == 4)
|
||||
{
|
||||
try
|
||||
position:absolute;
|
||||
left:30px;
|
||||
top:-17px;
|
||||
}
|
||||
|
||||
.tabFront
|
||||
{
|
||||
z-index:30;
|
||||
font-size:9px;
|
||||
position:relative;
|
||||
top:0px;
|
||||
background-color:#aaaaaa;
|
||||
border-top:#ffffff 1px solid;
|
||||
border-left:#ffffff 1px solid;
|
||||
border-bottom:#aaaaaa 1px solid;
|
||||
border-right:#000000 1px solid;
|
||||
padding-top:1px;
|
||||
padding-bottom:0px;
|
||||
padding-left:15px;
|
||||
padding-right:15px;
|
||||
float:left;
|
||||
height:14px;
|
||||
cursor:pointer;
|
||||
color:#000000;
|
||||
text-decoration:none;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.tabBack
|
||||
{
|
||||
z-index:30;
|
||||
font-size:9px;
|
||||
position:relative;
|
||||
top:0px;
|
||||
background-color:#888888;
|
||||
border-top:#555555 1px solid;
|
||||
border-left:#555555 1px solid;
|
||||
border-bottom:#ffffff 1px solid;
|
||||
border-right:#bbbbbb 1px solid;
|
||||
padding-top:1px;
|
||||
padding-bottom:0px;
|
||||
padding-left:15px;
|
||||
padding-right:15px;
|
||||
float:left;
|
||||
height:14px;
|
||||
cursor:pointer;
|
||||
color:#000000;
|
||||
text-decoration:none;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
DIV.menu
|
||||
{
|
||||
font-size: 12px;
|
||||
border-left: 1px solid #ffffff;
|
||||
border-top: 1px solid #ffffff;
|
||||
border-right: 2px solid #000000;
|
||||
border-bottom: 2px solid #000000;
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
visibility:hidden;
|
||||
position:absolute;
|
||||
top:0px;
|
||||
left:0px;
|
||||
background-color:#d4d0c8;
|
||||
}
|
||||
DIV.menu IMG
|
||||
{
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
position:relative;
|
||||
left:-10px;
|
||||
top:2px;
|
||||
}
|
||||
DIV.menu A
|
||||
{
|
||||
font-size: 12px;
|
||||
display:block;
|
||||
position:relative;
|
||||
text-decoration: none;
|
||||
color:#000000;
|
||||
padding-top:1px;
|
||||
padding-bottom:1px;
|
||||
padding-left:13px;
|
||||
padding-right:3px;
|
||||
overflow:hidden;
|
||||
border:none 0px #FFFFFF;
|
||||
}
|
||||
DIV.menu A:hover
|
||||
{
|
||||
font-size: 12px;
|
||||
display:block;
|
||||
position:relative;
|
||||
text-decoration: none;
|
||||
color:#ffffff;
|
||||
background-color:#000080;
|
||||
}
|
||||
DIV.menu A.disabled
|
||||
{
|
||||
font-size: 12px;
|
||||
display:block;
|
||||
position:relative;
|
||||
text-decoration: none;
|
||||
color:#A0A0A0;
|
||||
padding-top:1px;
|
||||
padding-bottom:1px;
|
||||
padding-left:13px;
|
||||
padding-right:3px;
|
||||
overflow:hidden;
|
||||
}
|
||||
DIV.menu A.disabled:hover
|
||||
{
|
||||
font-size: 12px;
|
||||
display:block;
|
||||
position:relative;
|
||||
text-decoration: none;
|
||||
color:#A0A0A0;
|
||||
background-color:#d4d0c8;
|
||||
}
|
||||
DIV.menu .line
|
||||
{
|
||||
display:block;
|
||||
position:relative;
|
||||
height:0px;
|
||||
overflow:hidden;
|
||||
margin-top:5px;
|
||||
margin-bottom:4px;
|
||||
padding:0px;
|
||||
border-top: 1px solid #555555;
|
||||
border-bottom: 1px solid #ffffff;
|
||||
}
|
||||
</style>
|
||||
<!-- _____________ head added part of graphic interface of '{{task.getName()}}' _____________ -->
|
||||
{{task.printInterfaceHEAD()}}
|
||||
<!-- ______________ end of head part of graphic interface of '{{task.getName()}}' ______________ -->
|
||||
<script type="text/javascript" src="/include/jslibs/jquery-1.5.2.js"></script>
|
||||
<script type="text/javascript" src="/include/jslibs/jquery-ui-1.8.12/js/jquery-ui-1.8.12.custom.min.js"></script>
|
||||
<script type="text/javascript" src="/include/minify/g=admin"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
var p4 = {users:{sel:[]}};
|
||||
var bodySize = {x:0,y:0};
|
||||
|
||||
var language = {
|
||||
};
|
||||
|
||||
jsTaskObj = {
|
||||
SettingsIsDirty:false,
|
||||
|
||||
currentView : null,
|
||||
|
||||
oldXML:"{{task.get_settings()|stripdoublequotes}}",
|
||||
|
||||
view:function(type)
|
||||
{
|
||||
document.getElementById("idCrashLine").style.visibility = "hidden";
|
||||
ret = this.responseXML;
|
||||
}
|
||||
catch(e)
|
||||
var o;
|
||||
var f;
|
||||
switch(type)
|
||||
{
|
||||
case 'PRE_XML':
|
||||
{% if task.getGraphicForm() %}
|
||||
document.getElementById('divGraph').style.display = "none";
|
||||
document.getElementById('divXml').style.display = "";
|
||||
document.getElementById('linkviewxml').className = "tabFront";
|
||||
document.getElementById('linkviewgraph').className = "tabBack";
|
||||
{% endif %}
|
||||
this.currentView = "XML";
|
||||
break;
|
||||
case 'XML':
|
||||
if( (f = document.forms['graphicForm']) )
|
||||
{
|
||||
document.getElementById("__gxml").value = document.forms['fxml'].txtareaxml.value;
|
||||
document.getElementById("__gact").value = "FORM2XML";
|
||||
f.target = "hiddenFrame";
|
||||
f.action = "/admin/task2utils.php";
|
||||
f.submit();
|
||||
}
|
||||
break;
|
||||
|
||||
case 'PRE_GRAPHIC':
|
||||
case 'GRAPHIC':
|
||||
document.forms['fxml'].target = "hiddenFrame";
|
||||
document.forms['fxml'].__act.value = "XML2FORM";
|
||||
document.forms['fxml'].submit();
|
||||
this.currentView = "GRAPHIC";
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
saveTask:function(save)
|
||||
{
|
||||
if(save)
|
||||
{
|
||||
if(this.currentView == "GRAPHIC")
|
||||
{
|
||||
if( (f = document.forms['graphicForm']) )
|
||||
{
|
||||
document.getElementById("__gxml").value = document.forms['fxml'].txtareaxml.value;
|
||||
document.getElementById("__gtname").value = document.forms['__ftask'].__tname.value;
|
||||
document.getElementById("__gtactive").value = document.forms['__ftask'].__tactive.checked ? "1" : "0" ;
|
||||
document.getElementById("__gact").value = "SAVE_GRAPHIC";
|
||||
f.target = "hiddenFrame";
|
||||
f.action = "task2utils.php";
|
||||
f.submit();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
document.forms['fxml'].target = "hiddenFrame";
|
||||
document.forms['fxml'].__tname.value = document.forms['__ftask'].__tname.value;
|
||||
document.forms['fxml'].__tactive.value = document.forms['__ftask'].__tactive.checked ? "1" : "0" ;
|
||||
document.forms['fxml'].__act.value = "SAVE_XML";
|
||||
document.forms['fxml'].submit();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(document.forms["fxml"].__tid.value != "")
|
||||
{
|
||||
document.forms["__freturn"].submit();
|
||||
}
|
||||
else
|
||||
{
|
||||
document.forms["__freturn"].submit();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
getHTTPObject:function()
|
||||
{
|
||||
var ret = null ;
|
||||
try
|
||||
{
|
||||
ret = new XMLHttpRequest();
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
try
|
||||
{
|
||||
ret = new ActiveXObject("Msxml2.XMLHTTP");
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
try
|
||||
{
|
||||
ret = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
ret = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
},
|
||||
|
||||
resetCrashCounter:function()
|
||||
{
|
||||
if(typeof(this.resetCrashCounter.x) == 'undefined') // simulate static : only 1 instance of getHTTPObject !
|
||||
{
|
||||
this.resetCrashCounter.x = {
|
||||
"xmlhttp":new this.getHTTPObject, // une seule instance
|
||||
"cb":function ()
|
||||
{
|
||||
var ret;
|
||||
if (this.readyState == 4)
|
||||
{
|
||||
try
|
||||
{
|
||||
document.getElementById("idCrashLine").style.visibility = "hidden";
|
||||
ret = this.responseXML;
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
}
|
||||
delete this.responseText;
|
||||
delete this.responseXML;
|
||||
delete this.onreadystatechange;
|
||||
|
||||
this.abort();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
var url = "/admin/adminFeedback.php?action=RESETTASKCRASHCOUNTER&task_id={{task.get_task_id()}}";
|
||||
this.resetCrashCounter.x.xmlhttp.onreadystatechange = this.resetCrashCounter.x.cb; // ping_stateChange;
|
||||
this.resetCrashCounter.x.xmlhttp.open("POST", url, true);
|
||||
this.resetCrashCounter.x.xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
||||
this.resetCrashCounter.x.xmlhttp.send(null);
|
||||
}
|
||||
delete this.responseText;
|
||||
delete this.responseXML;
|
||||
delete this.onreadystatechange;
|
||||
};
|
||||
|
||||
this.abort();
|
||||
}
|
||||
function redrawme()
|
||||
{
|
||||
hauteur = document.body.clientHeight;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
var url = "/admin/adminFeedback.php?action=RESETTASKCRASHCOUNTER&task_id={{task.get_task_id()}}";
|
||||
this.resetCrashCounter.x.xmlhttp.onreadystatechange = this.resetCrashCounter.x.cb; // ping_stateChange;
|
||||
this.resetCrashCounter.x.xmlhttp.open("POST", url, true);
|
||||
this.resetCrashCounter.x.xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
||||
this.resetCrashCounter.x.xmlhttp.send(null);
|
||||
}
|
||||
};
|
||||
function loaded()
|
||||
{
|
||||
var o;
|
||||
if( (f = document.forms['graphicForm']) )
|
||||
{
|
||||
o = document.createElement('input');
|
||||
o.setAttribute("name", "__class");
|
||||
o.setAttribute("type", "hidden");
|
||||
o.setAttribute("value", "{{task.get_class_name()}}");
|
||||
f.appendChild(o);
|
||||
|
||||
function redrawme()
|
||||
{
|
||||
hauteur = document.body.clientHeight;
|
||||
}
|
||||
o = document.createElement('input');
|
||||
o.setAttribute("id", "__gact");
|
||||
o.setAttribute("name", "__act");
|
||||
o.setAttribute("type", "hidden");
|
||||
o.setAttribute("value", "");
|
||||
f.appendChild(o);
|
||||
|
||||
function loaded()
|
||||
{
|
||||
var o;
|
||||
if( (f = document.forms['graphicForm']) )
|
||||
{
|
||||
o = document.createElement('input');
|
||||
o.setAttribute("name", "__class");
|
||||
o.setAttribute("type", "hidden");
|
||||
o.setAttribute("value", "{{task.get_class_name()}}");
|
||||
f.appendChild(o);
|
||||
o = document.createElement('input');
|
||||
o.setAttribute("id", "__gtname");
|
||||
o.setAttribute("name", "__tname");
|
||||
o.setAttribute("type", "hidden");
|
||||
o.setAttribute("value", "");
|
||||
f.appendChild(o);
|
||||
|
||||
o = document.createElement('input');
|
||||
o.setAttribute("id", "__gact");
|
||||
o.setAttribute("name", "__act");
|
||||
o.setAttribute("type", "hidden");
|
||||
o.setAttribute("value", "");
|
||||
f.appendChild(o);
|
||||
o = document.createElement('input');
|
||||
o.setAttribute("id", "__gtactive");
|
||||
o.setAttribute("name", "__tactive");
|
||||
o.setAttribute("type", "hidden");
|
||||
o.setAttribute("value", "");
|
||||
f.appendChild(o);
|
||||
|
||||
o = document.createElement('input');
|
||||
o.setAttribute("id", "__gtname");
|
||||
o.setAttribute("name", "__tname");
|
||||
o.setAttribute("type", "hidden");
|
||||
o.setAttribute("value", "");
|
||||
f.appendChild(o);
|
||||
o = document.createElement('input');
|
||||
o.setAttribute("id", "__gxml");
|
||||
o.setAttribute("name", "__xml");
|
||||
o.setAttribute("type", "hidden");
|
||||
o.setAttribute("value", "");
|
||||
f.appendChild(o);
|
||||
|
||||
o = document.createElement('input');
|
||||
o.setAttribute("id", "__gtactive");
|
||||
o.setAttribute("name", "__tactive");
|
||||
o.setAttribute("type", "hidden");
|
||||
o.setAttribute("value", "");
|
||||
f.appendChild(o);
|
||||
o = document.createElement('input');
|
||||
o.setAttribute("id", "__gtid");
|
||||
o.setAttribute("name", "__tid");
|
||||
o.setAttribute("type", "hidden");
|
||||
o.setAttribute("value", "{{task.get_task_id()}}");
|
||||
f.appendChild(o);
|
||||
}
|
||||
redrawme();
|
||||
jsTaskObj.view("PRE_{{view}}");
|
||||
if( (o = document.getElementById("iddivloading")) )
|
||||
o.style.visibility = "hidden";
|
||||
}
|
||||
|
||||
o = document.createElement('input');
|
||||
o.setAttribute("id", "__gxml");
|
||||
o.setAttribute("name", "__xml");
|
||||
o.setAttribute("type", "hidden");
|
||||
o.setAttribute("value", "");
|
||||
f.appendChild(o);
|
||||
|
||||
o = document.createElement('input');
|
||||
o.setAttribute("id", "__gtid");
|
||||
o.setAttribute("name", "__tid");
|
||||
o.setAttribute("type", "hidden");
|
||||
o.setAttribute("value", "{{task.get_task_id()}}");
|
||||
f.appendChild(o);
|
||||
}
|
||||
redrawme();
|
||||
jsTaskObj.view("PRE_{{view}}");
|
||||
if( (o = document.getElementById("iddivloading")) )
|
||||
o.style.visibility = "hidden";
|
||||
}
|
||||
|
||||
function setDirty()
|
||||
{
|
||||
jsTaskObj.SettingsIsDirty = true;
|
||||
}
|
||||
function setDirty()
|
||||
{
|
||||
jsTaskObj.SettingsIsDirty = true;
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<!-- _____________ javascript of graphic interface of '{{task.getName()}}' _____________ -->
|
||||
{{task.printInterfaceJS()}}
|
||||
<!-- _____________ end javascript of graphic interface of '{{task.getName()}}' _____________ -->
|
||||
</script>
|
||||
<!-- _____________ javascript of graphic interface of '{{task.getName()}}' _____________ -->
|
||||
{{task.printInterfaceJS()}}
|
||||
<!-- _____________ end javascript of graphic interface of '{{task.getName()}}' _____________ -->
|
||||
|
||||
</head>
|
||||
</head>
|
||||
|
||||
<body id="idBody" onResize="redrawme();" onLoad="loaded();" style="background-color:#AAAAAA; overflow:hidden" scroll="no" >
|
||||
<div style="position:absolute; top:0px; left:5px; right:5px; height:45px; " nowrap>
|
||||
<h4 style="padding:2px; text-align:center">{{task.getName()}} <span id="taskid">id : {{task.get_task_id()}}</span></h4>
|
||||
<form name="__ftask" onsubmit="return(false);" method="post" method="post">
|
||||
<label>{% trans 'admin::tasks: nom de la tache' %}</label>
|
||||
<input type="text" name="__tname" style="width:200px" value="{{task.get_title()}}" onchange="setDirty();" />
|
||||
<input type="checkbox" name="__tactive" {% if task.is_active() %}checked="checked"{% endif %} onchange="setDirty();" />
|
||||
<label>{% trans 'admin::tasks: lancer au demarrage du scheduler' %}</label>
|
||||
</form>
|
||||
<div id="idCrashLine" style="visibility:{% if task.get_crash_counter() == 0 %}hidden{% endif %}">
|
||||
{% trans 'admin::tasks: Nombre de crashes : ' %} {{task.get_crash_counter()}}
|
||||
|
||||
<a href="javascript:void();" onclick="jsTaskObj.resetCrashCounter();return(false);">
|
||||
{% trans 'admin::tasks: reinitialiser el compteur de crashes' %}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="position:absolute; top:65px; bottom:30px; left:0px; width:100%;">
|
||||
<div id="idBox2" style="position:absolute; top:20px; left:5px; bottom:5px; right:5px; z-index:2; border-top:#ffffff 1px solid; border-left:#ffffff 1px solid; border-bottom:#000000 1px solid; border-right:#000000 1px solid;">
|
||||
<div class="divTab">
|
||||
{% if task.printInterfaceHTML %}
|
||||
<div id="linkviewgraph" class="tabFront" onClick="jsTaskObj.view('GRAPHIC');" style="width:100px;">
|
||||
{% trans 'boutton::vue graphique' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div id="linkviewxml" class="{% if task.printInterfaceHTML %}tabBack{% else %}tabFront{% endif %}" onClick="jsTaskObj.view('XML');" style="width:100px;">
|
||||
{% trans 'boutton::vue xml' %}
|
||||
</div>
|
||||
</div>
|
||||
{% if task.getGraphicForm %}
|
||||
<div id="divGraph" style="position:absolute; top:5px; left:5px; bottom:5px; right:5px; display:auto; overflow:scroll;" >
|
||||
{% if task.printInterfaceHTML %}
|
||||
{{task.printInterfaceHTML()|raw}}
|
||||
{% else %}
|
||||
<form name="graphicForm" onsubmit="return false;"></form>
|
||||
{% endif %}
|
||||
</div>
|
||||
<!-- _____________ end graphic interface '{{task.getName()}}' _________________ -->
|
||||
{% endif %}
|
||||
<!-- _____________ xml interface _____________ -->
|
||||
<div id="divXml" style="position:absolute; top:5px; left:5px; bottom:5px; right:5px; {% if task.printInterfaceHTML() %}display:none;{% endif %}">
|
||||
<form style="position:absolute; top:0px; left:0px; right:4px; bottom:20px;" action="./task2utils.php" onsubmit="return(false);" name="fxml" method="post">
|
||||
<input type="hidden" name="__act" value="???" />
|
||||
<input type="hidden" name="__class" value="{{task.get_class_name()}}" />
|
||||
<input type="hidden" name="__tid" value="{{task.get_task_id()}}" />
|
||||
<input type="hidden" name="__tname" value="" />
|
||||
<input type="hidden" name="__tactive" value="" />
|
||||
<textarea nowrap id="txtareaxml" style="position:absolute; top:0px; left:0px; width:100%; height:100%; white-space:pre;" onchange="setDirty();" name="txtareaxml" >{{task.get_settings()}}</textarea>
|
||||
<body id="idBody" onResize="redrawme();" onLoad="loaded();" style="background-color:#AAAAAA; overflow:hidden" scroll="no" >
|
||||
<div style="position:absolute; top:0px; left:5px; right:5px; height:45px; " nowrap>
|
||||
<h4 style="padding:2px; text-align:center">{{task.getName()}} <span id="taskid">id : {{task.get_task_id()}}</span></h4>
|
||||
<form name="__ftask" onsubmit="return(false);" method="post" method="post">
|
||||
<label>{% trans 'admin::tasks: nom de la tache' %}</label>
|
||||
<input type="text" name="__tname" style="width:200px" value="{{task.get_title()}}" onchange="setDirty();" />
|
||||
<input type="checkbox" name="__tactive" {% if task.is_active() %}checked="checked"{% endif %} onchange="setDirty();" />
|
||||
<label>{% trans 'admin::tasks: lancer au demarrage du scheduler' %}</label>
|
||||
</form>
|
||||
</div>
|
||||
<!-- _____________ xml interface _____________ -->
|
||||
<div id="idCrashLine" style="visibility:{% if task.get_crash_counter() == 0 %}hidden{% endif %}">
|
||||
{% trans 'admin::tasks: Nombre de crashes : ' %} {{task.get_crash_counter()}}
|
||||
|
||||
<a href="javascript:void();" onclick="jsTaskObj.resetCrashCounter();return(false);">
|
||||
{% trans 'admin::tasks: reinitialiser el compteur de crashes' %}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div style="position:absolute; top:65px; bottom:30px; left:0px; width:100%;">
|
||||
<div id="idBox2" style="position:absolute; top:20px; left:5px; bottom:5px; right:5px; z-index:2; border-top:#ffffff 1px solid; border-left:#ffffff 1px solid; border-bottom:#000000 1px solid; border-right:#000000 1px solid;">
|
||||
<div class="divTab">
|
||||
{% if task.printInterfaceHTML %}
|
||||
<div id="linkviewgraph" class="tabFront" onClick="jsTaskObj.view('GRAPHIC');" style="width:100px;">
|
||||
{% trans 'boutton::vue graphique' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div id="linkviewxml" class="{% if task.printInterfaceHTML %}tabBack{% else %}tabFront{% endif %}" onClick="jsTaskObj.view('XML');" style="width:100px;">
|
||||
{% trans 'boutton::vue xml' %}
|
||||
</div>
|
||||
</div>
|
||||
{% if task.getGraphicForm %}
|
||||
<div id="divGraph" style="position:absolute; top:5px; left:5px; bottom:5px; right:5px; display:auto; overflow:scroll;" >
|
||||
{% if task.printInterfaceHTML %}
|
||||
{{task.printInterfaceHTML()|raw}}
|
||||
{% else %}
|
||||
<form name="graphicForm" onsubmit="return false;"></form>
|
||||
{% endif %}
|
||||
</div>
|
||||
<!-- _____________ end graphic interface '{{task.getName()}}' _________________ -->
|
||||
{% endif %}
|
||||
<!-- _____________ xml interface _____________ -->
|
||||
<div id="divXml" style="position:absolute; top:5px; left:5px; bottom:5px; right:5px; {% if task.printInterfaceHTML() %}display:none;{% endif %}">
|
||||
<form style="position:absolute; top:0px; left:0px; right:4px; bottom:20px;" action="./task2utils.php" onsubmit="return(false);" name="fxml" method="post">
|
||||
<input type="hidden" name="__act" value="???" />
|
||||
<input type="hidden" name="__class" value="{{task.get_class_name()}}" />
|
||||
<input type="hidden" name="__tid" value="{{task.get_task_id()}}" />
|
||||
<input type="hidden" name="__tname" value="" />
|
||||
<input type="hidden" name="__tactive" value="" />
|
||||
<textarea nowrap id="txtareaxml" style="position:absolute; top:0px; left:0px; width:100%; height:100%; white-space:pre;" onchange="setDirty();" name="txtareaxml" >{{task.get_settings()}}</textarea>
|
||||
</form>
|
||||
</div>
|
||||
<!-- _____________ xml interface _____________ -->
|
||||
</div>
|
||||
|
||||
<div style="position:absolute; bottom:0px; height:30px; right:5px">
|
||||
<div style="text-align:right; xdisplay:none;" id="saveButtons">
|
||||
<form onsubmit="return(false)">
|
||||
<input type="button" onclick="jsTaskObj.saveTask(false);" style="width:180px;" id="cancel_button" value="{% trans 'boutton::annuler' %}">
|
||||
<input type="button" onclick="jsTaskObj.saveTask(true);" style="width:180px;" id="submit_button" value="{% trans 'boutton::valider' %}">
|
||||
</form>
|
||||
</div>
|
||||
<form action="./taskmanager.php" method="post" name="__freturn" method="post">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<iframe id="hiddenFrame" name="hiddenFrame" src="about:blank" style="position:absolute; bottom:0px; left:0px; width:100px; height:100px; visibility:hidden" ></iframe>
|
||||
</body>
|
||||
<div style="position:absolute; bottom:0px; height:30px; right:5px">
|
||||
<div style="text-align:right; xdisplay:none;" id="saveButtons">
|
||||
<form onsubmit="return(false)">
|
||||
<input type="button" onclick="jsTaskObj.saveTask(false);" style="width:180px;" id="cancel_button" value="{% trans 'boutton::annuler' %}">
|
||||
<input type="button" onclick="jsTaskObj.saveTask(true);" style="width:180px;" id="submit_button" value="{% trans 'boutton::valider' %}">
|
||||
</form>
|
||||
</div>
|
||||
<form action="./taskmanager.php" method="post" name="__freturn" method="post">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<iframe id="hiddenFrame" name="hiddenFrame" src="about:blank" style="position:absolute; bottom:0px; left:0px; width:100px; height:100px; visibility:hidden" ></iframe>
|
||||
</body>
|
||||
</html>
|
@@ -52,33 +52,91 @@
|
||||
<button type="submit">{% trans 'boutton::chercher' %}</button>
|
||||
</p>
|
||||
</form>
|
||||
<form id="users_apply_template" method="post" action="/admin/users/apply_template/" target="_self">
|
||||
<p class="admin_head_opts">
|
||||
{% trans 'Apply a template' %}
|
||||
<select name="template_chooser">
|
||||
<option value="">{% trans 'boutton::choisir' %}</option>
|
||||
{% for template in templates %}
|
||||
<option value="{{ template.get_id() }}">{{ template.get_display_name() }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<button type="submit">{% trans 'boutton::appliquer' %}</button>
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<table id="users" cellspacing="0" cellpadding="0" border="0" class="admintable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align: center;">
|
||||
<th style="text-align: center;" class="sortable {{ parm.srt == 'usr_id' ? 'sorted' : '' }} {{ parm.ord == 'asc' ? 'sort_asc' : 'sort_desc' }}">
|
||||
{% trans 'admin::compte-utilisateur id utilisateur' %}
|
||||
<span class="ord_notifier">
|
||||
{{ parm.ord == 'asc' ? '▼' : '▲' }}
|
||||
</span>
|
||||
<input type="hidden" name="srt" value="usr_id" />
|
||||
</th>
|
||||
<th>
|
||||
<th class="sortable {{ parm.srt == 'usr_login' ? 'sorted' : '' }} ">
|
||||
<span>
|
||||
{% trans 'admin::compte-utilisateur identifiant' %}
|
||||
</span>
|
||||
<span class="ord_notifier">
|
||||
{{ parm.ord == 'asc' ? '▼' : '▲' }}
|
||||
</span>
|
||||
<input type="hidden" name="srt" value="usr_login" />
|
||||
</th>
|
||||
<th>
|
||||
<th class="sortable {{ parm.srt == 'usr_nom' ? 'sorted' : '' }} {{ parm.ord == 'asc' ? 'sort_asc' : 'sort_desc' }}">
|
||||
<span>
|
||||
{% trans 'admin::compte-utilisateur nom/prenom' %}
|
||||
</span>
|
||||
<span class="ord_notifier">
|
||||
{{ parm.ord == 'asc' ? '▼' : '▲' }}
|
||||
</span>
|
||||
<input type="hidden" name="srt" value="usr_nom" />
|
||||
</th>
|
||||
<th>
|
||||
<th class="sortable {{ parm.srt == 'societe' ? 'sorted' : '' }} {{ parm.ord == 'asc' ? 'sort_asc' : 'sort_desc' }}">
|
||||
<span>
|
||||
{% trans 'admin::compte-utilisateur societe' %}
|
||||
</span>
|
||||
<span class="ord_notifier">
|
||||
{{ parm.ord == 'asc' ? '▼' : '▲' }}
|
||||
</span>
|
||||
<input type="hidden" name="srt" value="societe" />
|
||||
</th>
|
||||
<th>
|
||||
<th class="sortable {{ parm.srt == 'usr_mail' ? 'sorted' : '' }} {{ parm.ord == 'asc' ? 'sort_asc' : 'sort_desc' }}">
|
||||
<span>
|
||||
{% trans 'admin::compte-utilisateur email' %}
|
||||
</span>
|
||||
<span class="ord_notifier">
|
||||
{{ parm.ord == 'asc' ? '▼' : '▲' }}
|
||||
</span>
|
||||
<input type="hidden" name="srt" value="usr_mail" />
|
||||
</th>
|
||||
<th>
|
||||
<th class="sortable {{ parm.srt == 'pays' ? 'sorted' : '' }} {{ parm.ord == 'asc' ? 'sort_asc' : 'sort_desc' }}">
|
||||
<span>
|
||||
{% trans 'admin::compte-utilisateur pays' %}
|
||||
</span>
|
||||
<span class="ord_notifier">
|
||||
{{ parm.ord == 'asc' ? '▼' : '▲' }}
|
||||
</span>
|
||||
<input type="hidden" name="srt" value="pays" />
|
||||
</th>
|
||||
<th>
|
||||
<th class="sortable {{ parm.srt == 'lastModel' ? 'sorted' : '' }} {{ parm.ord == 'asc' ? 'sort_asc' : 'sort_desc' }}">
|
||||
<span>
|
||||
{% trans 'admin::compte-utilisateur dernier modele applique' %}
|
||||
</span>
|
||||
<span class="ord_notifier">
|
||||
{{ parm.ord == 'asc' ? '▼' : '▲' }}
|
||||
</span>
|
||||
<input type="hidden" name="srt" value="lastModel" />
|
||||
</th>
|
||||
<th>
|
||||
<th class="sortable {{ parm.srt == 'usr_creationdate' ? 'sorted' : '' }} {{ parm.ord == 'asc' ? 'sort_asc' : 'sort_desc' }}">
|
||||
<span>
|
||||
{% trans 'admin::compte-utilisateur date de creation' %}
|
||||
</span>
|
||||
<span class="ord_notifier">
|
||||
{{ parm.ord == 'asc' ? '▼' : '▲' }}
|
||||
</span>
|
||||
<input type="hidden" name="srt" value="usr_creationdate" />
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -120,8 +178,8 @@
|
||||
<form id="users_page_form" method="post" target="_self" action="/admin/users/search/">
|
||||
{{users.get_total}} resultats
|
||||
|
||||
{% set pages = users.get_total() / 20 %}
|
||||
{% set modulo = users.get_total() % 20 %}
|
||||
{% set pages = users.get_total() / parm['per_page'] %}
|
||||
{% set modulo = users.get_total() % parm['per_page'] %}
|
||||
|
||||
{% if modulo > 0 %}{% set pages = pages + 1 %}{% endif %}
|
||||
{{pages|floor}} pages
|
||||
@@ -188,6 +246,9 @@
|
||||
el.addClass('selected');
|
||||
}
|
||||
});
|
||||
$('#users_page_form select[name="per_page"]').bind('change', function(){
|
||||
$(this).closest('form').submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{% macro format_caption(record, highlight, searchEngine) %}
|
||||
{% for name, value in record.get_caption().get_highlight_fields(highlight, null, searchEngine) %}
|
||||
<div class="desc{% if loop.index is odd %}im{% endif %}pair"><b>{{name}}</b> : {{value|raw}}</div>
|
||||
<div class="desc{% if loop.index is odd %}im{% endif %}pair"><b>{{name}}</b> : {{value.value|raw}}</div>
|
||||
{% endfor %}
|
||||
{% endmacro %}
|
@@ -1,5 +1,5 @@
|
||||
{% macro format_caption(record) %}
|
||||
{% for name, value in record.get_caption().get_highlight_fields() %}
|
||||
<div class="desc{% if loop.index is odd %}im{% endif %}pair"><b>{{name}}</b> : {{value|raw}}</div>
|
||||
<div class="desc{% if loop.index is odd %}im{% endif %}pair"><b>{{name}}</b> : {{value.value|raw}}</div>
|
||||
{% endfor %}
|
||||
{% endmacro %}
|
@@ -1,5 +1,5 @@
|
||||
{% macro format_caption(record) %}
|
||||
{% for name, value in record.get_caption().get_highlight_fields() %}
|
||||
<div class="desc{% if loop.index is odd %}im{% endif %}pair"><b>{{name}}</b> : {{value|raw}}</div>
|
||||
<div class="desc{% if loop.index is odd %}im{% endif %}pair"><b>{{name}}</b> : {{value.value|raw}}</div>
|
||||
{% endfor %}
|
||||
{% endmacro %}
|
@@ -1,5 +1,5 @@
|
||||
{% macro format_caption(record) %}
|
||||
{% for name, value in record.get_caption().get_highlight_fields() %}
|
||||
<div class="desc{% if loop.index is odd %}im{% endif %}pair"><b>{{name}}</b> : {{value|raw}}</div>
|
||||
<div class="desc{% if loop.index is odd %}im{% endif %}pair"><b>{{name}}</b> : {{value.value|raw}}</div>
|
||||
{% endfor %}
|
||||
{% endmacro %}
|
@@ -1,5 +1,5 @@
|
||||
{% macro format_caption(record) %}
|
||||
{% for name, value in record.get_caption().get_highlight_fields() %}
|
||||
<div><b>{{name}}</b> : {{value|raw}}</div>
|
||||
<div><b>{{name}}</b> : {{value.value|raw}}</div>
|
||||
{% endfor %}
|
||||
{% endmacro %}
|
@@ -1,5 +1,5 @@
|
||||
{% macro format_caption(record, highlight, searchEngine) %}
|
||||
{% for name, value in record.get_caption().get_highlight_fields(highlight, null, searchEngine) %}
|
||||
<div class="desc{% if loop.index is odd %}im{% endif %}pair"><b>{{name}}</b> : {{value|raw}}</div>
|
||||
<div class="desc{% if loop.index is odd %}im{% endif %}pair"><b>{{name}}</b> : {{value.value|raw}}</div>
|
||||
{% endfor %}
|
||||
{% endmacro %}
|
@@ -376,7 +376,7 @@
|
||||
</div>
|
||||
<div id="ftp_form">
|
||||
<div id="ftp_form_stock">
|
||||
{% for datas in download.ftp_datas %}
|
||||
{% for datas in download.get_ftp_datas() %}
|
||||
{{ _self.print_ftp_form(datas) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
@@ -14,7 +14,7 @@
|
||||
<div id="mainContainer" class="PNB">
|
||||
{% include 'common/menubar.twig' %}
|
||||
<div class="PNB" style="top:30px;overflow-y:auto;overflow-x:auto;">
|
||||
<div class="PNB" id="mainContent" style="min-height:500px;min-width:900px;">
|
||||
<div class="PNB" id="mainContent" style="min-width:900px;">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -55,6 +55,9 @@
|
||||
{% if feed.is_publisher(user) %}
|
||||
<div class="feed {% if loop.index is odd%}odd{% endif %}">
|
||||
<span>{{ feed.get_title() }}</span>
|
||||
{% if feed.is_public() %}
|
||||
<img src="/skins/icons/ligth-on.png" title="{% trans 'This feed is public' %}"/>
|
||||
{% endif %}
|
||||
<input type="hidden" value="{{ feed.get_id() }}"/>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
@@ -15,7 +15,7 @@
|
||||
</h1>
|
||||
</td>
|
||||
<td style="width:60px;text-align:right;">
|
||||
{% if entry.get_feed().is_owner(user) %}
|
||||
{% if entry.get_feed().is_owner(user) or entry.is_publisher(user) %}
|
||||
<a class="tools options feed_edit" href="/prod/feeds/entry/{{ entry.get_id() }}/edit/">
|
||||
<img src="/skins/icons/file-edit.png" title="{% trans 'boutton::editer' %}"/>
|
||||
</a>
|
||||
@@ -55,8 +55,8 @@
|
||||
<div class="contents selectable">
|
||||
{% for item in entry.get_content() %}
|
||||
{% set record = item.get_record() %}
|
||||
{% set prefix = 'PUBLI' %}
|
||||
{{record_format.block(record, user, session, false, null, prefix, entry.get_id(), item.get_id())}}
|
||||
{% set prefix = 'PUBLI_' ~ item.get_id() %}
|
||||
{{record_format.block(record, user, session, false, null, prefix, entry.get_id())}}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -372,18 +372,31 @@
|
||||
<div>
|
||||
{% if registry.get('GV_sphinx') %}
|
||||
{% trans 'Trier par ' %}
|
||||
<select name="sort">
|
||||
<option value="relevance">{% trans 'pertinence'%}</option>
|
||||
<option value="created_on">{% trans 'date dajout'%}</option>
|
||||
<option value="random">{% trans 'aleatoire'%}</option>
|
||||
</select>
|
||||
<select name="ord">
|
||||
<option value="desc">{% trans 'descendant'%}</option>
|
||||
<option value="asc">{% trans 'ascendant'%}</option>
|
||||
</select>
|
||||
<input type="checkbox" checked="checked" name="stemme" /> {% trans 'rechercher par stemme' %}
|
||||
<select name="sort">
|
||||
<option value="relevance">{% trans 'pertinence'%}</option>
|
||||
<option value="created_on">{% trans 'date dajout'%}</option>
|
||||
<option value="random">{% trans 'aleatoire'%}</option>
|
||||
</select>
|
||||
<select name="ord">
|
||||
<option value="desc">{% trans 'descendant'%}</option>
|
||||
<option value="asc">{% trans 'ascendant'%}</option>
|
||||
</select>
|
||||
<input type="checkbox" checked="checked" name="stemme" /> {% trans 'rechercher par stemme' %}
|
||||
{% else %}
|
||||
<input type="hidden" name="ord" id="searchOrd" value="PHRASEA_ORDER_DESC" />
|
||||
{% trans 'Trier par ' %}
|
||||
<select name="sort">
|
||||
<option value=""></option>
|
||||
{% for field_id, field in search_datas['fields'] %}
|
||||
{% if field['type'] == 'date' %}
|
||||
<option class="field_switch field_{{field['sbas']|implode(' field_')}}" value="{{field_id}}">{{field['fieldname']}}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
<select name="ord">
|
||||
<option value="desc">{% trans 'descendant'%}</option>
|
||||
<option value="asc">{% trans 'ascendant'%}</option>
|
||||
</select>
|
||||
<input type="hidden" name="ord" id="searchOrd" value="PHRASEA_ORDER_DESC" />
|
||||
{% endif %}
|
||||
<div class="field_filter">
|
||||
<div>
|
||||
@@ -392,7 +405,9 @@
|
||||
<select size="8" multiple onchange="checkFilters(true);" name="fields[]" style="vertical-align:middle;width:100%;">
|
||||
<option value="phraseanet--all--fields">{% trans 'rechercher dans tous les champs' %}</option>
|
||||
{% for field_id, field in search_datas['fields'] %}
|
||||
<option class="field_switch field_{{field['sbas']|implode(' field_')}}" value="{{field_id}}">{{field['fieldname']}}</option>
|
||||
{% if field['type'] != 'date' %}
|
||||
<option class="field_switch field_{{field['sbas']|implode(' field_')}}" value="{{field_id}}">{{field['fieldname']}}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
{% macro block(record, user, session, highlight, searchEngine, prefix, entry_id, suffix)%}
|
||||
{% macro block(record, user, session, highlight, searchEngine, prefix, entry_id)%}
|
||||
{% import 'common/thumbnail.html' as thumbnail %}
|
||||
{% import 'common/doctype_icons.html' as doctype_icons %}
|
||||
{% import 'common/drop_down_options.html' as drop_down %}
|
||||
@@ -6,7 +6,7 @@
|
||||
{% set sbas_id = record.get_base_id|sbasFromBas %}
|
||||
{% if entry_id %}
|
||||
<div style="width:{{th_size+30}}px;" sbas="{{sbas_id}}"
|
||||
id="{{ prefix|default('IMGT') }}_{{record.get_sbas_id}}_{{record.get_record_id}}_{{ suffix|default('') }}"
|
||||
id="{{ prefix|default('IMGT') }}_{{record.get_sbas_id}}_{{record.get_record_id}}"
|
||||
class="IMGT diapo grouping type-{{record.get_type}}"
|
||||
onDblClick="openPreview('FEED',{{record.get_number()}},{{entry_id}});">
|
||||
{% elseif record.is_grouping() %}
|
||||
|
2
tmp/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
@@ -63,7 +63,6 @@ phrasea::headers();
|
||||
|
||||
$code = _('Propositions de modifications des tables')
|
||||
. '<blockquote>' . $code . '</blockquote>';
|
||||
|
||||
?>
|
||||
<pre>
|
||||
<?php echo $code; ?>
|
||||
@@ -87,10 +86,11 @@ phrasea::headers();
|
||||
{
|
||||
if (!$parm['new_settings'] && $parm['new_dbname'] && $parm['new_data_template'])
|
||||
{
|
||||
|
||||
if (p4string::hasAccent($parm['new_dbname']))
|
||||
$error['new_dbname'] = 'No special chars in dbname';
|
||||
|
||||
{
|
||||
$error[] = _('Database name can not contains special characters');
|
||||
}
|
||||
|
||||
if (count($error) === 0)
|
||||
{
|
||||
try
|
||||
@@ -99,23 +99,34 @@ phrasea::headers();
|
||||
$data_template = new system_file($registry->get('GV_RootPath') . 'lib/conf.d/data_templates/' . $parm['new_data_template'] . '.xml');
|
||||
|
||||
$connbas = new connection_pdo('databox_creation', $hostname, $port, $user, $password, $parm['new_dbname']);
|
||||
$base = databox::create($appbox, $connbas, $data_template, $registry);
|
||||
$base->registerAdmin($user_obj);
|
||||
$createBase = $sbas_id = $base->get_sbas_id();
|
||||
|
||||
try
|
||||
{
|
||||
$base = databox::create($appbox, $connbas, $data_template, $registry);
|
||||
$base->registerAdmin($user_obj);
|
||||
$createBase = $sbas_id = $base->get_sbas_id();
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
$error[] = $e->getMessage();
|
||||
}
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
$errors = $e->getMessage();
|
||||
$error[] = _('Database does not exists or can not be accessed');
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif ($parm['new_settings'] && $parm['new_hostname'] && $parm['new_port'] && $parm['new_user'] && $parm['new_password']
|
||||
elseif ($parm['new_settings'] && $parm['new_hostname'] && $parm['new_port']
|
||||
&& $parm['new_user'] && $parm['new_password']
|
||||
&& $parm['new_dbname'] && $parm['new_data_template'])
|
||||
{
|
||||
|
||||
if (p4string::hasAccent($parm['new_dbname']))
|
||||
$error['new_dbname'] = 'No special chars in dbname';
|
||||
|
||||
{
|
||||
$error[] = _('Database name can not contains special characters');
|
||||
}
|
||||
|
||||
if (count($error) === 0)
|
||||
{
|
||||
|
||||
@@ -129,7 +140,7 @@ phrasea::headers();
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
$errors = $e->getMessage();
|
||||
$error[] = $e->getMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -140,7 +151,7 @@ phrasea::headers();
|
||||
{
|
||||
|
||||
if (p4string::hasAccent($parm['new_dbname']))
|
||||
$error['new_dbname'] = 'No special chars in dbname';
|
||||
$error[] = _('Database name can not contains special characters');
|
||||
|
||||
if (count($error) === 0)
|
||||
{
|
||||
@@ -156,7 +167,7 @@ phrasea::headers();
|
||||
catch (Exception $e)
|
||||
{
|
||||
$appbox->get_connection()->rollBack();
|
||||
$errors = $e->getMessage();
|
||||
$error[] = $e->getMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -165,7 +176,7 @@ phrasea::headers();
|
||||
{
|
||||
|
||||
if (p4string::hasAccent($parm['new_dbname']))
|
||||
$error['new_dbname'] = 'No special chars in dbname';
|
||||
$error[] = 'No special chars in dbname';
|
||||
|
||||
if (count($error) === 0)
|
||||
{
|
||||
@@ -174,13 +185,12 @@ phrasea::headers();
|
||||
$appbox->get_connection()->beginTransaction();
|
||||
$base = databox::mount($appbox, $parm['new_hostname'], $parm['new_port'], $parm['new_user'], $parm['new_password'], $parm['new_dbname'], $registry);
|
||||
$base->registerAdmin($user_obj);
|
||||
// $createBase = $sbas_id = $base->get_sbas_id();
|
||||
$appbox->get_connection()->commit();
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
$appbox->get_connection()->rollBack();
|
||||
$errors = $e->getMessage();
|
||||
$error[] = $e->getMessage() . '@' . $e->getFile() . $e->getLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -216,7 +226,7 @@ phrasea::headers();
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -227,7 +237,7 @@ if ($createBase || $mountBase)
|
||||
$user = User_Adapter::getInstance($session->get_usr_id(), $appbox);
|
||||
$user->ACL()->delete_data_from_cache();
|
||||
?>
|
||||
parent.reloadTree('bases:bases');
|
||||
parent.reloadTree('bases:bases');
|
||||
<?php
|
||||
if ($createBase)
|
||||
{
|
||||
@@ -240,9 +250,18 @@ if ($createBase || $mountBase)
|
||||
phrasea::redirect('/admin/databases.php');
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</script>
|
||||
<?php
|
||||
foreach($error as $e)
|
||||
{
|
||||
?>
|
||||
<span style="background-color:red;color:white;padding:3px"><?php echo $e; ?></span>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div style="position:relative;float:left;width:100%;">
|
||||
<h2>Bases actuelles :</h2>
|
||||
<ul>
|
||||
@@ -306,20 +325,20 @@ if ($createBase || $mountBase)
|
||||
</div>
|
||||
<div id="server_opts" style="display:none;">
|
||||
<div>
|
||||
<label><?php echo _('phraseanet:: hostname'); ?></label><input name="new_hostname" value="" type="text"/><span class="error"><?php echo isset($error['new_hostname']) ? $error['new_hostname'] : ''; ?></span>
|
||||
<label><?php echo _('phraseanet:: hostname'); ?></label><input name="new_hostname" value="" type="text"/>
|
||||
</div>
|
||||
<div>
|
||||
<label><?php echo _('phraseanet:: port'); ?></label><input name="new_port" value="3306" type="text"/><span class="error"><?php echo isset($error['new_port']) ? $error['new_port'] : ''; ?></span>
|
||||
<label><?php echo _('phraseanet:: port'); ?></label><input name="new_port" value="3306" type="text"/>
|
||||
</div>
|
||||
<div>
|
||||
<label><?php echo _('phraseanet:: user'); ?></label><input name="new_user" value="" type="text"/><span class="error"><?php echo isset($error['new_user']) ? $error['new_user'] : ''; ?></span>
|
||||
<label><?php echo _('phraseanet:: user'); ?></label><input name="new_user" value="" type="text"/>
|
||||
</div>
|
||||
<div>
|
||||
<label><?php echo _('phraseanet:: password'); ?></label><input name="new_password" value="" type="password"/><span class="error"><?php echo isset($error['new_password']) ? $error['new_password'] : ''; ?></span>
|
||||
<label><?php echo _('phraseanet:: password'); ?></label><input name="new_password" value="" type="password"/>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label><?php echo _('phraseanet:: dbname'); ?></label><input name="new_dbname" value="" type="text"/><span class="error"><?php echo isset($error['new_dbname']) ? $error['new_dbname'] : ''; ?></span>
|
||||
<label><?php echo _('phraseanet:: dbname'); ?></label><input name="new_dbname" value="" type="text"/>
|
||||
</div>
|
||||
<div>
|
||||
<label><?php echo _('phraseanet:: Modele de donnees'); ?></label>
|
||||
@@ -358,20 +377,20 @@ if ($createBase || $mountBase)
|
||||
</div>
|
||||
<div id="servermount_opts" style="display:none;">
|
||||
<div>
|
||||
<label><?php echo _('phraseanet:: hostname'); ?></label><input name="new_hostname" value="" type="text"/><span class="error"><?php echo isset($error['new_hostname']) ? $error['new_hostname'] : ''; ?></span>
|
||||
<label><?php echo _('phraseanet:: hostname'); ?></label><input name="new_hostname" value="" type="text"/>
|
||||
</div>
|
||||
<div>
|
||||
<label><?php echo _('phraseanet:: port'); ?></label><input name="new_port" value="3306" type="text"/><span class="error"><?php echo isset($error['new_port']) ? $error['new_port'] : ''; ?></span>
|
||||
<label><?php echo _('phraseanet:: port'); ?></label><input name="new_port" value="3306" type="text"/>
|
||||
</div>
|
||||
<div>
|
||||
<label><?php echo _('phraseanet:: user'); ?></label><input name="new_user" value="" type="text"/><span class="error"><?php echo isset($error['new_user']) ? $error['new_user'] : ''; ?></span>
|
||||
<label><?php echo _('phraseanet:: user'); ?></label><input name="new_user" value="" type="text"/>
|
||||
</div>
|
||||
<div>
|
||||
<label><?php echo _('phraseanet:: password'); ?></label><input name="new_password" value="" type="password"/><span class="error"><?php echo isset($error['new_password']) ? $error['new_password'] : ''; ?></span>
|
||||
<label><?php echo _('phraseanet:: password'); ?></label><input name="new_password" value="" type="password"/>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label><?php echo _('phraseanet:: dbname'); ?></label><input name="new_dbname" value="" type="text"/><span class="error"><?php echo isset($error['new_dbname']) ? $error['new_dbname'] : ''; ?></span>
|
||||
<label><?php echo _('phraseanet:: dbname'); ?></label><input name="new_dbname" value="" type="text"/>
|
||||
</div>
|
||||
<div>
|
||||
<input type="hidden" name="mount_base" value="yes"/>
|
||||
|
@@ -21,7 +21,7 @@ $session = $appbox->get_session();
|
||||
|
||||
$request = http_request::getInstance();
|
||||
$parm = $request->get_parms("srt", "ord", "act", "p0", // base_id
|
||||
"str" // si act=CHGSTRUCTURE, structure en xml
|
||||
"str" // si act=CHGSTRUCTURE, structure en xml
|
||||
);
|
||||
|
||||
|
||||
@@ -61,7 +61,18 @@ if (!empty($_POST))
|
||||
try
|
||||
{
|
||||
$local_parms = $httpRequest->get_parms(
|
||||
'name_' . $id, 'thumbtitle_' . $id, 'src_' . $id, 'multi_' . $id, 'indexable_' . $id, 'readonly_' . $id, 'tbranch_' . $id, 'report_' . $id, 'dces_' . $id
|
||||
'name_' . $id
|
||||
, 'thumbtitle_' . $id
|
||||
, 'src_' . $id
|
||||
, 'multi_' . $id
|
||||
, 'indexable_' . $id
|
||||
, 'readonly_' . $id
|
||||
, 'required_' . $id
|
||||
, 'separator_' . $id
|
||||
, 'type_' . $id
|
||||
, 'tbranch_' . $id
|
||||
, 'report_' . $id
|
||||
, 'dces_' . $id
|
||||
);
|
||||
|
||||
$field = databox_field::get_instance($databox, $id);
|
||||
@@ -70,7 +81,10 @@ if (!empty($_POST))
|
||||
$field->set_source($local_parms['src_' . $id]);
|
||||
$field->set_multi($local_parms['multi_' . $id]);
|
||||
$field->set_indexable($local_parms['indexable_' . $id]);
|
||||
$field->set_required($local_parms['required_' . $id]);
|
||||
$field->set_separator($local_parms['separator_' . $id]);
|
||||
$field->set_readonly($local_parms['readonly_' . $id]);
|
||||
$field->set_type($local_parms['type_' . $id]);
|
||||
$field->set_tbranch($local_parms['tbranch_' . $id]);
|
||||
$field->set_report($local_parms['report_' . $id]);
|
||||
|
||||
@@ -107,7 +121,7 @@ if (!empty($_POST))
|
||||
|
||||
$parms = $httpRequest->get_parms('newfield');
|
||||
|
||||
if($parms['newfield'])
|
||||
if ($parms['newfield'])
|
||||
{
|
||||
databox_field::create($databox, $parms['newfield']);
|
||||
}
|
||||
@@ -124,7 +138,7 @@ if (!empty($_POST))
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -76,4 +76,10 @@ function stripdoublequotes($value)
|
||||
}
|
||||
$twig = new supertwig();
|
||||
$twig->addFilter(array('stripdoublequotes'=>'stripdoublequotes'));
|
||||
|
||||
if(!$task->getGraphicForm())
|
||||
{
|
||||
$parm['view'] = 'XML';
|
||||
}
|
||||
|
||||
$twig->display('admin/task.html', array('task'=>$task, 'view'=>$parm['view']));
|
||||
|
@@ -33,35 +33,6 @@ $registry = $appbox->get_registry();
|
||||
$task_manager = new task_manager($appbox);
|
||||
|
||||
|
||||
$tasks = array();
|
||||
$path = $registry->get('GV_RootPath') . "lib/classes/task/period/";
|
||||
if ($hdir = opendir($path))
|
||||
{
|
||||
$tskin = array();
|
||||
$max = 9999;
|
||||
while (($max-- > 0) && (($file = readdir($hdir)) !== false))
|
||||
{
|
||||
if (!is_file($path . '/' . $file) || substr($file, 0, 1) == "." || substr($file, -10) != ".class.php")
|
||||
continue;
|
||||
|
||||
$classname = 'task_period_' . substr($file, 0, strlen($file) - 10);
|
||||
|
||||
try
|
||||
{
|
||||
// $testclass = new $classname(null);
|
||||
if ($classname::interfaceAvailable())
|
||||
{
|
||||
$tasks[] = array("class" => $classname, "name" => $classname::getName(), "err" => null);
|
||||
}
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
closedir($hdir);
|
||||
}
|
||||
|
||||
?>
|
||||
<html lang="<?php echo $session->get_I18n(); ?>">
|
||||
<head>
|
||||
@@ -346,6 +317,7 @@ if ($hdir = opendir($path))
|
||||
var menuNewTask = [
|
||||
<?php
|
||||
// fill the 'new task' menu
|
||||
$tasks = task_manager::getAvailableTasks();
|
||||
$ntasks = count($tasks);
|
||||
foreach ($tasks as $t)
|
||||
{
|
||||
|
@@ -18,6 +18,29 @@ $(document).ready(function(){
|
||||
$(n).addClass('selected');
|
||||
return true;
|
||||
}
|
||||
|
||||
$('#users th.sortable').live('click', function(){
|
||||
|
||||
var $this = $(this);
|
||||
|
||||
var sort = $('input', $this).val();
|
||||
|
||||
if((sort == $('#users_page_form input[name="srt"]').val())
|
||||
&& ($('#users_page_form input[name="ord"]').val() == 'asc'))
|
||||
{
|
||||
var ord = 'desc';
|
||||
}
|
||||
else
|
||||
{
|
||||
var ord = 'asc';
|
||||
}
|
||||
|
||||
$('#users_page_form input[name="srt"]').val(sort);
|
||||
$('#users_page_form input[name="ord"]').val(ord);
|
||||
|
||||
$('#users_page_form').trigger('submit');
|
||||
}).live('mouseover', function(){$(this).addClass('hover');})
|
||||
.live('mouseout', function(){$(this).removeClass('hover');});
|
||||
|
||||
var buttons = {};
|
||||
buttons[language.create_user] = function(){
|
||||
@@ -168,8 +191,9 @@ $(document).ready(function(){
|
||||
}
|
||||
if($(this).hasClass('last'))
|
||||
{
|
||||
offset_start = Math.floor(parseInt($('input[name=total_results]').val()) / perPage);
|
||||
offset_start = (Math.floor(parseInt($('input[name=total_results]').val()) / perPage))* perPage;
|
||||
}
|
||||
|
||||
$('input[name="offset_start"]', form).val(offset_start);
|
||||
});
|
||||
|
||||
@@ -261,6 +285,39 @@ $(document).ready(function(){
|
||||
evt.cancelBubble = true;
|
||||
evt.preventDefault();
|
||||
});
|
||||
|
||||
$('#users_apply_template').live('submit', function(){
|
||||
var users = p4.users.sel.join(';');
|
||||
if(users === '')
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var $this = $(this);
|
||||
var template = $('select[name="template_chooser"]', $this).val();
|
||||
|
||||
if(template === '')
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$('#right-ajax').empty().addClass('loading');
|
||||
p4.users.sel = [];
|
||||
|
||||
$.ajax({
|
||||
type: $this.attr('method'),
|
||||
url: $this.attr('action'),
|
||||
data: {
|
||||
users : users,
|
||||
template : template
|
||||
},
|
||||
success: function(data){
|
||||
$('#right-ajax').removeClass('loading').html(data);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#users_page_form .user_modifier').live('click', function(){
|
||||
var users = p4.users.sel.join(';');
|
||||
if(users === '')
|
||||
|
@@ -1,37 +1,37 @@
|
||||
|
||||
$(document).ready(function(){
|
||||
var date = new Date();
|
||||
date.setMonth(date.getMonth() + 2);
|
||||
$.cookie('screen', screen.width+"x"+screen.height, { path: '/', expires: date });
|
||||
|
||||
var test_cookie = date.getTime();
|
||||
$.cookie('test_cookie'+test_cookie, 'accepted', { path: '/', expires: date });
|
||||
if(!$.cookie('test_cookie'+test_cookie))
|
||||
{
|
||||
$('.notice.notice_cookie').show();
|
||||
}
|
||||
else
|
||||
{
|
||||
date.setMonth(date.getMonth() - 5);
|
||||
$.cookie('test_cookie'+test_cookie, '', { path: '/', expires: date });
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
function setLanguage()
|
||||
{
|
||||
var date = new Date();
|
||||
date.setMonth(date.getMonth() + 2);
|
||||
$.cookie('locale', $('#lng-select')[0].value, { path: '/', expires: date });
|
||||
window.location.replace(window.location.protocol+"//"+window.location.host+window.location.pathname);
|
||||
}
|
||||
|
||||
function setTab(tab,el)
|
||||
{
|
||||
$('.tab').removeClass('click');
|
||||
$(el).addClass('click');
|
||||
$('.tab-content').hide();
|
||||
$('#id-'+tab).show();
|
||||
}
|
||||
|
||||
|
||||
jQuery(document).ready(function(){
|
||||
var date = new Date();
|
||||
date.setMonth(date.getMonth() + 2);
|
||||
jQuery.cookie('screen', screen.width+"x"+screen.height, { path: '/', expires: date });
|
||||
|
||||
var test_cookie = date.getTime();
|
||||
jQuery.cookie('test_cookie'+test_cookie, 'accepted', { path: '/', expires: date });
|
||||
if(!jQuery.cookie('test_cookie'+test_cookie))
|
||||
{
|
||||
jQuery('.notice.notice_cookie').show();
|
||||
}
|
||||
else
|
||||
{
|
||||
date.setMonth(date.getMonth() - 5);
|
||||
jQuery.cookie('test_cookie'+test_cookie, '', { path: '/', expires: date });
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
function setLanguage()
|
||||
{
|
||||
var date = new Date();
|
||||
date.setMonth(date.getMonth() + 2);
|
||||
jQuery.cookie('locale', jQuery('#lng-select')[0].value, { path: '/', expires: date });
|
||||
window.location.replace(window.location.protocol+"//"+window.location.host+window.location.pathname);
|
||||
}
|
||||
|
||||
function setTab(tab,el)
|
||||
{
|
||||
jQuery('.tab').removeClass('click');
|
||||
jQuery(el).addClass('click');
|
||||
jQuery('.tab-content').hide();
|
||||
jQuery('#id-'+tab).show();
|
||||
}
|
||||
|
||||
|
@@ -125,7 +125,7 @@ if (!$registry->get('GV_maintenance')
|
||||
<div style="text-align:center;float: left;width:300px;margin:0 15px 0px;">
|
||||
<span class="recaptcha_only_if_image">' . _('login::captcha: recopier les mots ci dessous') . ' : </span>
|
||||
<input name="recaptcha_response_field" id="recaptcha_response_field" value="" type="text" style="width:180px;"/>
|
||||
</div>' . recaptcha_get_html(GV_captcha_public_key) . '</div>';
|
||||
</div>' . recaptcha_get_html($registry->get('GV_captcha_public_key')) . '</div>';
|
||||
}
|
||||
|
||||
$public_feeds = Feed_Collection::load_public_feeds($appbox);
|
||||
|
@@ -48,6 +48,7 @@ FFFA00 9E9C3C 777400 FFFC65 FFFEB5
|
||||
|
||||
#left{
|
||||
background-color:#fffbcd;
|
||||
overflow:auto;
|
||||
}
|
||||
#FNDR{
|
||||
overflow:auto;
|
||||
@@ -141,4 +142,20 @@ table.admintable tbody .dropdown{
|
||||
.users_col.options{
|
||||
cursor:pointer;
|
||||
color:#AFAFAF;
|
||||
}
|
||||
#users th.sortable span{
|
||||
margin:0 5px;
|
||||
}
|
||||
#users th.sortable{
|
||||
cursor:pointer;
|
||||
}
|
||||
#users th.sortable.hover,
|
||||
#users th.sortable.sorted{
|
||||
background-color:#F0AD30;
|
||||
}
|
||||
#users th.sortable span.ord_notifier{
|
||||
display:none;
|
||||
}
|
||||
#users th.sortable.sorted span.ord_notifier{
|
||||
display:inline;
|
||||
}
|
Before Width: | Height: | Size: 437 B After Width: | Height: | Size: 437 B |
Before Width: | Height: | Size: 127 KiB After Width: | Height: | Size: 127 KiB |
Before Width: | Height: | Size: 7.1 KiB |
BIN
www/skins/lng/inclin-ar.png
Normal file
After Width: | Height: | Size: 75 KiB |
Before Width: | Height: | Size: 7.1 KiB |
BIN
www/skins/lng/inclin-de.png
Normal file
After Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 7.1 KiB |
BIN
www/skins/lng/inclin-en.png
Normal file
After Width: | Height: | Size: 75 KiB |
Before Width: | Height: | Size: 6.7 KiB |
BIN
www/skins/lng/inclin-fr.png
Normal file
After Width: | Height: | Size: 70 KiB |