mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
Refactor regname regdesc regdate
This commit is contained in:
@@ -99,18 +99,6 @@ class Description implements ControllerProviderInterface
|
|||||||
$field->set_dces_element($dces_element);
|
$field->set_dces_element($dces_element);
|
||||||
$field->save();
|
$field->save();
|
||||||
|
|
||||||
if ($request->get('regname') == $field->get_id())
|
|
||||||
{
|
|
||||||
$field->set_regname();
|
|
||||||
}
|
|
||||||
if ($request->get('regdate') == $field->get_id())
|
|
||||||
{
|
|
||||||
$field->set_regdate();
|
|
||||||
}
|
|
||||||
if ($request->get('regdesc') == $field->get_id())
|
|
||||||
{
|
|
||||||
$field->set_regdesc();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (\Exception $e)
|
catch (\Exception $e)
|
||||||
{
|
{
|
||||||
|
@@ -70,10 +70,8 @@ class Story implements ControllerProviderInterface
|
|||||||
|
|
||||||
foreach ($collection->get_databox()->get_meta_structure() as $meta)
|
foreach ($collection->get_databox()->get_meta_structure() as $meta)
|
||||||
{
|
{
|
||||||
if ($meta->is_regname())
|
if ($meta->get_thumbtitle())
|
||||||
$value = $request->get('name');
|
$value = $request->get('name');
|
||||||
elseif ($meta->is_regdesc())
|
|
||||||
$value = $request->get('description');
|
|
||||||
else
|
else
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@@ -441,8 +441,6 @@ class Edit extends RecordHelper
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$regfield = ($meta->is_regname() || $meta->is_regdesc() || $meta->is_regdate());
|
|
||||||
|
|
||||||
$source = $meta->get_source();
|
$source = $meta->get_source();
|
||||||
$separator = $meta->get_separator();
|
$separator = $meta->get_separator();
|
||||||
|
|
||||||
@@ -460,7 +458,6 @@ class Edit extends RecordHelper
|
|||||||
, 'tbranch' => $meta->get_tbranch()
|
, 'tbranch' => $meta->get_tbranch()
|
||||||
, 'maxLength' => $source ? $source->maxlength() : 0
|
, 'maxLength' => $source ? $source->maxlength() : 0
|
||||||
, 'minLength' => $source ? $source->minLength() : 0
|
, 'minLength' => $source ? $source->minLength() : 0
|
||||||
, 'regfield' => $regfield
|
|
||||||
, 'multi' => $meta->is_multi()
|
, 'multi' => $meta->is_multi()
|
||||||
, 'separator' => $separator
|
, 'separator' => $separator
|
||||||
, 'vocabularyControl' => $meta->getVocabularyControl() ? $meta->getVocabularyControl()->getType() : null
|
, 'vocabularyControl' => $meta->getVocabularyControl() ? $meta->getVocabularyControl()->getType() : null
|
||||||
@@ -615,55 +612,6 @@ class Edit extends RecordHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
|
||||||
// foreach ($trecchanges as $fname => $fchange)
|
|
||||||
// {
|
|
||||||
// $bool = false;
|
|
||||||
// if ($regfields && $parm['act_option'] == 'SAVEGRP'
|
|
||||||
// && $fname == $regfields['regname'])
|
|
||||||
// {
|
|
||||||
// try
|
|
||||||
// {
|
|
||||||
// $basket = basket_adapter::getInstance($parm['ssel']);
|
|
||||||
// $basket->name = implode(' ', $fchange['values']);
|
|
||||||
// $basket->save();
|
|
||||||
// $bool = true;
|
|
||||||
// }
|
|
||||||
// catch (Exception $e)
|
|
||||||
// {
|
|
||||||
// echo $e->getMessage();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if ($regfields && $parm['act_option'] == 'SAVEGRP'
|
|
||||||
// && $fname == $regfields['regdesc'])
|
|
||||||
// {
|
|
||||||
// try
|
|
||||||
// {
|
|
||||||
// $basket = basket_adapter::getInstance($parm['ssel']);
|
|
||||||
// $basket->desc = implode(' ', $fchange['values']);
|
|
||||||
// $basket->save();
|
|
||||||
// $bool = true;
|
|
||||||
// }
|
|
||||||
// catch (Exception $e)
|
|
||||||
// {
|
|
||||||
// echo $e->getMessage();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if ($bool)
|
|
||||||
// {
|
|
||||||
// try
|
|
||||||
// {
|
|
||||||
// $basket = basket_adapter::getInstance($parm['ssel']);
|
|
||||||
// $basket->delete_cache();
|
|
||||||
// }
|
|
||||||
// catch (Exception $e)
|
|
||||||
// {
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// return $this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -991,13 +991,6 @@ class databox extends base
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($field['regname']))
|
|
||||||
$meta_struct_field->set_regname();
|
|
||||||
if (isset($field['regdate']))
|
|
||||||
$meta_struct_field->set_regdate();
|
|
||||||
if (isset($field['regdesc']))
|
|
||||||
$meta_struct_field->set_regdesc();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
@@ -98,24 +98,6 @@ class databox_field implements cache_cacheableInterface
|
|||||||
*/
|
*/
|
||||||
protected $thumbtitle;
|
protected $thumbtitle;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @var <type>
|
|
||||||
*/
|
|
||||||
protected $regdate;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @var <type>
|
|
||||||
*/
|
|
||||||
protected $regdesc;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @var <type>
|
|
||||||
*/
|
|
||||||
protected $regname;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
@@ -163,7 +145,7 @@ class databox_field implements cache_cacheableInterface
|
|||||||
|
|
||||||
$connbas = $this->get_connection();
|
$connbas = $this->get_connection();
|
||||||
|
|
||||||
$sql = "SELECT `regdate`, `regdesc`, `regname`, `thumbtitle`, `separator`
|
$sql = "SELECT `thumbtitle`, `separator`
|
||||||
, `dces_element`, `tbranch`, `type`, `report`, `multi`, `required`
|
, `dces_element`, `tbranch`, `type`, `report`, `multi`, `required`
|
||||||
, `readonly`, `indexable`, `name`, `src`
|
, `readonly`, `indexable`, `name`, `src`
|
||||||
, `VocabularyControlType`, `RestrictToVocabularyControl`
|
, `VocabularyControlType`, `RestrictToVocabularyControl`
|
||||||
@@ -216,10 +198,6 @@ class databox_field implements cache_cacheableInterface
|
|||||||
$this->separator = $separator;
|
$this->separator = $separator;
|
||||||
$this->thumbtitle = $row['thumbtitle'];
|
$this->thumbtitle = $row['thumbtitle'];
|
||||||
|
|
||||||
$this->regdesc = !!$row['regdesc'];
|
|
||||||
$this->regname = !!$row['regname'];
|
|
||||||
$this->regdate = !!$row['regdate'];
|
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -621,39 +599,6 @@ class databox_field implements cache_cacheableInterface
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @return databox_field
|
|
||||||
*/
|
|
||||||
public function set_regdate()
|
|
||||||
{
|
|
||||||
$this->set_reg_attr('date');
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @return databox_field
|
|
||||||
*/
|
|
||||||
public function set_regdesc()
|
|
||||||
{
|
|
||||||
$this->set_reg_attr('desc');
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @return databox_field
|
|
||||||
*/
|
|
||||||
public function set_regname()
|
|
||||||
{
|
|
||||||
$this->set_reg_attr('name');
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param string $attr
|
* @param string $attr
|
||||||
@@ -683,33 +628,6 @@ class databox_field implements cache_cacheableInterface
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @return boolean
|
|
||||||
*/
|
|
||||||
public function is_regname()
|
|
||||||
{
|
|
||||||
return $this->regname;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @return boolean
|
|
||||||
*/
|
|
||||||
public function is_regdesc()
|
|
||||||
{
|
|
||||||
return $this->regdesc;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @return boolean
|
|
||||||
*/
|
|
||||||
public function is_regdate()
|
|
||||||
{
|
|
||||||
return $this->regdate;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
@@ -870,7 +788,7 @@ class databox_field implements cache_cacheableInterface
|
|||||||
|
|
||||||
$sql = "INSERT INTO metadatas_structure
|
$sql = "INSERT INTO metadatas_structure
|
||||||
(`id`, `name`, `src`, `readonly`, `indexable`, `type`, `tbranch`,
|
(`id`, `name`, `src`, `readonly`, `indexable`, `type`, `tbranch`,
|
||||||
`thumbtitle`, `multi`, `regname`, `regdesc`, `regdate` ,
|
`thumbtitle`, `multi`,
|
||||||
`report`, `sorter`)
|
`report`, `sorter`)
|
||||||
VALUES (null, :name, '', 0, 1, 'text', '',
|
VALUES (null, :name, '', 0, 1, 'text', '',
|
||||||
null, 0, null, null, null,
|
null, 0, null, null, null,
|
||||||
|
@@ -95,8 +95,6 @@ interface record_Interface
|
|||||||
|
|
||||||
public function set_binary_status($status);
|
public function set_binary_status($status);
|
||||||
|
|
||||||
public function get_reg_name();
|
|
||||||
|
|
||||||
public function get_hd_file();
|
public function get_hd_file();
|
||||||
|
|
||||||
public function delete();
|
public function delete();
|
||||||
|
@@ -140,8 +140,6 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
|||||||
const CACHE_GROUPING = 'grouping';
|
const CACHE_GROUPING = 'grouping';
|
||||||
const CACHE_STATUS = 'status';
|
const CACHE_STATUS = 'status';
|
||||||
|
|
||||||
protected static $_regfields;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param <int> $base_id
|
* @param <int> $base_id
|
||||||
@@ -895,16 +893,6 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
|||||||
*/
|
*/
|
||||||
public function get_title($highlight = false, searchEngine_adapter $searchEngine = null)
|
public function get_title($highlight = false, searchEngine_adapter $searchEngine = null)
|
||||||
{
|
{
|
||||||
$sbas_id = $this->get_sbas_id();
|
|
||||||
$record_id = $this->get_record_id();
|
|
||||||
|
|
||||||
if ($this->is_grouping())
|
|
||||||
{
|
|
||||||
$regfield = self::getRegFields($sbas_id, $this->get_caption());
|
|
||||||
|
|
||||||
return $regfield['regname'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$title = '';
|
$title = '';
|
||||||
$appbox = appbox::get_instance(\bootstrap::getCore());
|
$appbox = appbox::get_instance(\bootstrap::getCore());
|
||||||
$session = $appbox->get_session();
|
$session = $appbox->get_session();
|
||||||
@@ -944,98 +932,6 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
|||||||
return $title;
|
return $title;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function get_description()
|
|
||||||
{
|
|
||||||
|
|
||||||
if (!$this->is_grouping())
|
|
||||||
throw new \Exception('This record is not a story');
|
|
||||||
|
|
||||||
$regfield = self::getRegFields($this->get_sbas_id(), $this->get_caption());
|
|
||||||
|
|
||||||
return $regfield['regdesc'];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param <type> $sbas_id
|
|
||||||
* @param caption_record $desc
|
|
||||||
* @return <type>
|
|
||||||
*/
|
|
||||||
protected static function getRegFields($sbas_id, caption_record $desc)
|
|
||||||
{
|
|
||||||
if (!self::$_regfields)
|
|
||||||
self::load_regfields();
|
|
||||||
|
|
||||||
$arrayRegFields = self::$_regfields[$sbas_id];
|
|
||||||
|
|
||||||
$array = array();
|
|
||||||
|
|
||||||
foreach ($arrayRegFields as $k => $f)
|
|
||||||
{
|
|
||||||
$array[$f] = $k;
|
|
||||||
}
|
|
||||||
|
|
||||||
$fields = array();
|
|
||||||
$fields["regname"] = "";
|
|
||||||
$fields["regdesc"] = "";
|
|
||||||
$fields["regdate"] = "";
|
|
||||||
|
|
||||||
foreach ($desc->get_fields() as $caption_field)
|
|
||||||
{
|
|
||||||
/* @var $caption_field caption_field */
|
|
||||||
$meta_struct_id = $caption_field->get_meta_struct_id();
|
|
||||||
if (array_key_exists($meta_struct_id, $array))
|
|
||||||
{
|
|
||||||
$fields[$array[$meta_struct_id]] = $caption_field->get_serialized_values();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $fields;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* get databox reg fields
|
|
||||||
*
|
|
||||||
* @todo change this shit
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
protected static function load_regfields()
|
|
||||||
{
|
|
||||||
$appbox = appbox::get_instance(\bootstrap::getCore());
|
|
||||||
self::$_regfields = array();
|
|
||||||
foreach ($appbox->get_databoxes() as $databox)
|
|
||||||
{
|
|
||||||
self::$_regfields[$databox->get_sbas_id()] = self::searchRegFields($databox->get_meta_structure());
|
|
||||||
}
|
|
||||||
|
|
||||||
return self::$_regfields;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param databox_descriptionStructure $meta_struct
|
|
||||||
* @return <type>
|
|
||||||
*/
|
|
||||||
protected function searchRegFields(databox_descriptionStructure $meta_struct)
|
|
||||||
{
|
|
||||||
$fields = null;
|
|
||||||
$fields["regname"] = "";
|
|
||||||
$fields["regdesc"] = "";
|
|
||||||
$fields["regdate"] = "";
|
|
||||||
|
|
||||||
foreach ($meta_struct as $meta)
|
|
||||||
{
|
|
||||||
if ($meta->is_regname())
|
|
||||||
$fields["regname"] = $meta->get_id();
|
|
||||||
elseif ($meta->is_regdesc())
|
|
||||||
$fields["regdesc"] = $meta->get_id();
|
|
||||||
elseif ($meta->is_regdate())
|
|
||||||
$fields['regdate'] = $meta->get_id();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $fields;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return media_subdef
|
* @return media_subdef
|
||||||
@@ -1487,42 +1383,6 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function get_reg_name()
|
|
||||||
{
|
|
||||||
if (!$this->is_grouping())
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
$balisename = '';
|
|
||||||
|
|
||||||
$struct = $this->databox->get_structure();
|
|
||||||
|
|
||||||
if ($sxe = simplexml_load_string($struct))
|
|
||||||
{
|
|
||||||
$z = $sxe->xpath('/record/description');
|
|
||||||
if ($z && is_array($z))
|
|
||||||
{
|
|
||||||
foreach ($z[0] as $ki => $vi)
|
|
||||||
{
|
|
||||||
if ($vi['regname'] == '1')
|
|
||||||
{
|
|
||||||
$balisename = $ki;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$regname = '';
|
|
||||||
if ($sxe = simplexml_load_string($this->get_xml()))
|
|
||||||
$regname = (string) $sxe->description->$balisename;
|
|
||||||
|
|
||||||
return $regname;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@@ -5160,30 +5160,6 @@
|
|||||||
<default></default>
|
<default></default>
|
||||||
<comment></comment>
|
<comment></comment>
|
||||||
</field>
|
</field>
|
||||||
<field>
|
|
||||||
<name>regdate</name>
|
|
||||||
<type>tinyint(1) unsigned</type>
|
|
||||||
<null>YES</null>
|
|
||||||
<extra></extra>
|
|
||||||
<default></default>
|
|
||||||
<comment></comment>
|
|
||||||
</field>
|
|
||||||
<field>
|
|
||||||
<name>regname</name>
|
|
||||||
<type>tinyint(1) unsigned</type>
|
|
||||||
<null>YES</null>
|
|
||||||
<extra></extra>
|
|
||||||
<default></default>
|
|
||||||
<comment></comment>
|
|
||||||
</field>
|
|
||||||
<field>
|
|
||||||
<name>regdesc</name>
|
|
||||||
<type>tinyint(1) unsigned</type>
|
|
||||||
<null>YES</null>
|
|
||||||
<extra></extra>
|
|
||||||
<default></default>
|
|
||||||
<comment></comment>
|
|
||||||
</field>
|
|
||||||
<field>
|
<field>
|
||||||
<name>report</name>
|
<name>report</name>
|
||||||
<type>tinyint(1) unsigned</type>
|
<type>tinyint(1) unsigned</type>
|
||||||
@@ -5261,27 +5237,6 @@
|
|||||||
<field>required</field>
|
<field>required</field>
|
||||||
</fields>
|
</fields>
|
||||||
</index>
|
</index>
|
||||||
<index>
|
|
||||||
<name>regname</name>
|
|
||||||
<type>UNIQUE</type>
|
|
||||||
<fields>
|
|
||||||
<field>regname</field>
|
|
||||||
</fields>
|
|
||||||
</index>
|
|
||||||
<index>
|
|
||||||
<name>regdate</name>
|
|
||||||
<type>UNIQUE</type>
|
|
||||||
<fields>
|
|
||||||
<field>regdate</field>
|
|
||||||
</fields>
|
|
||||||
</index>
|
|
||||||
<index>
|
|
||||||
<name>regdesc</name>
|
|
||||||
<type>UNIQUE</type>
|
|
||||||
<fields>
|
|
||||||
<field>regdesc</field>
|
|
||||||
</fields>
|
|
||||||
</index>
|
|
||||||
<index>
|
<index>
|
||||||
<name>sorter</name>
|
<name>sorter</name>
|
||||||
<type>UNIQUE</type>
|
<type>UNIQUE</type>
|
||||||
|
@@ -149,7 +149,7 @@
|
|||||||
<SpecialInstruct src="/rdf:RDF/rdf:Description/IPTC:SpecialInstructions"/>
|
<SpecialInstruct src="/rdf:RDF/rdf:Description/IPTC:SpecialInstructions"/>
|
||||||
|
|
||||||
<!-- 2:55 -->
|
<!-- 2:55 -->
|
||||||
<Date src="/rdf:RDF/rdf:Description/IPTC:DateCreated" type="date" regdate="1" />
|
<Date src="/rdf:RDF/rdf:Description/IPTC:DateCreated" type="date" />
|
||||||
|
|
||||||
<!-- 2:80 -->
|
<!-- 2:80 -->
|
||||||
<Byline src="/rdf:RDF/rdf:Description/IPTC:By-line"/>
|
<Byline src="/rdf:RDF/rdf:Description/IPTC:By-line"/>
|
||||||
@@ -170,7 +170,7 @@
|
|||||||
<OriginalRef src="/rdf:RDF/rdf:Description/IPTC:OriginalTransmissionReference" />
|
<OriginalRef src="/rdf:RDF/rdf:Description/IPTC:OriginalTransmissionReference" />
|
||||||
|
|
||||||
<!-- 2:105 -->
|
<!-- 2:105 -->
|
||||||
<Headline src="/rdf:RDF/rdf:Description/IPTC:Headline" report="1" regname="1" />
|
<Headline src="/rdf:RDF/rdf:Description/IPTC:Headline" report="1" />
|
||||||
|
|
||||||
<!-- 2:110 -->
|
<!-- 2:110 -->
|
||||||
<Credit src="/rdf:RDF/rdf:Description/IPTC:Credit" report="1" />
|
<Credit src="/rdf:RDF/rdf:Description/IPTC:Credit" report="1" />
|
||||||
@@ -179,7 +179,7 @@
|
|||||||
<Source src="/rdf:RDF/rdf:Description/IPTC:Source" />
|
<Source src="/rdf:RDF/rdf:Description/IPTC:Source" />
|
||||||
|
|
||||||
<!-- 2:120 -->
|
<!-- 2:120 -->
|
||||||
<Caption src="/rdf:RDF/rdf:Description/IPTC:Caption-Abstract" regdesc="1" />
|
<Caption src="/rdf:RDF/rdf:Description/IPTC:Caption-Abstract" />
|
||||||
|
|
||||||
<!-- 2:122 -->
|
<!-- 2:122 -->
|
||||||
<CaptionWriter src="/rdf:RDF/rdf:Description/IPTC:Writer-Editor" />
|
<CaptionWriter src="/rdf:RDF/rdf:Description/IPTC:Writer-Editor" />
|
||||||
|
@@ -149,7 +149,7 @@
|
|||||||
<Observations src="/rdf:RDF/rdf:Description/IPTC:SpecialInstructions"/>
|
<Observations src="/rdf:RDF/rdf:Description/IPTC:SpecialInstructions"/>
|
||||||
|
|
||||||
<!-- 2:55 -->
|
<!-- 2:55 -->
|
||||||
<Date src="/rdf:RDF/rdf:Description/IPTC:DateCreated" type="date" regdate="1" />
|
<Date src="/rdf:RDF/rdf:Description/IPTC:DateCreated" type="date" />
|
||||||
|
|
||||||
<!-- 2:80 -->
|
<!-- 2:80 -->
|
||||||
<Signature src="/rdf:RDF/rdf:Description/IPTC:By-line"/>
|
<Signature src="/rdf:RDF/rdf:Description/IPTC:By-line"/>
|
||||||
@@ -170,7 +170,7 @@
|
|||||||
<ReferencesOriginales src="/rdf:RDF/rdf:Description/IPTC:OriginalTransmissionReference" />
|
<ReferencesOriginales src="/rdf:RDF/rdf:Description/IPTC:OriginalTransmissionReference" />
|
||||||
|
|
||||||
<!-- 2:105 -->
|
<!-- 2:105 -->
|
||||||
<Titre src="/rdf:RDF/rdf:Description/IPTC:Headline" report="1" regname="1" />
|
<Titre src="/rdf:RDF/rdf:Description/IPTC:Headline" report="1" />
|
||||||
|
|
||||||
<!-- 2:110 -->
|
<!-- 2:110 -->
|
||||||
<Credit src="/rdf:RDF/rdf:Description/IPTC:Credit" report="1" />
|
<Credit src="/rdf:RDF/rdf:Description/IPTC:Credit" report="1" />
|
||||||
@@ -179,7 +179,7 @@
|
|||||||
<Source src="/rdf:RDF/rdf:Description/IPTC:Source" />
|
<Source src="/rdf:RDF/rdf:Description/IPTC:Source" />
|
||||||
|
|
||||||
<!-- 2:120 -->
|
<!-- 2:120 -->
|
||||||
<Legende src="/rdf:RDF/rdf:Description/IPTC:Caption-Abstract" regdesc="1" />
|
<Legende src="/rdf:RDF/rdf:Description/IPTC:Caption-Abstract" />
|
||||||
|
|
||||||
<!-- 2:122 -->
|
<!-- 2:122 -->
|
||||||
<Redacteur src="/rdf:RDF/rdf:Description/IPTC:Writer-Editor" />
|
<Redacteur src="/rdf:RDF/rdf:Description/IPTC:Writer-Editor" />
|
||||||
|
@@ -59,9 +59,6 @@ class DescriptionTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
|
|||||||
, 'readonly_' . $id => 0
|
, 'readonly_' . $id => 0
|
||||||
, 'type_' . $id => 'string'
|
, 'type_' . $id => 'string'
|
||||||
, 'vocabulary_' . $id => 'User'
|
, 'vocabulary_' . $id => 'User'
|
||||||
, 'regname' => $id
|
|
||||||
, 'regdate' => $id
|
|
||||||
, 'regdesc' => $id
|
|
||||||
));
|
));
|
||||||
|
|
||||||
$this->assertTrue($this->client->getResponse()->isRedirect());
|
$this->assertTrue($this->client->getResponse()->isRedirect());
|
||||||
@@ -149,9 +146,6 @@ class DescriptionTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
|
|||||||
, 'readonly_' . $id => 0
|
, 'readonly_' . $id => 0
|
||||||
, 'type_' . $id => 'string'
|
, 'type_' . $id => 'string'
|
||||||
, 'vocabulary_' . $id => 'Unknow_Vocabulary'
|
, 'vocabulary_' . $id => 'Unknow_Vocabulary'
|
||||||
, 'regname' => $id
|
|
||||||
, 'regdate' => $id
|
|
||||||
, 'regdesc' => $id
|
|
||||||
));
|
));
|
||||||
|
|
||||||
$this->assertTrue($this->client->getResponse()->isRedirect());
|
$this->assertTrue($this->client->getResponse()->isRedirect());
|
||||||
@@ -169,9 +163,6 @@ class DescriptionTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
|
|||||||
, 'readonly_' . $id => 0
|
, 'readonly_' . $id => 0
|
||||||
, 'type_' . $id => 'string'
|
, 'type_' . $id => 'string'
|
||||||
, 'vocabulary_' . $id => 'Unknow_Vocabulary'
|
, 'vocabulary_' . $id => 'Unknow_Vocabulary'
|
||||||
, 'regname' => $id
|
|
||||||
, 'regdate' => $id
|
|
||||||
, 'regdesc' => $id
|
|
||||||
));
|
));
|
||||||
|
|
||||||
$this->assertTrue($this->client->getResponse()->isRedirect());
|
$this->assertTrue($this->client->getResponse()->isRedirect());
|
||||||
@@ -194,9 +185,6 @@ class DescriptionTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
|
|||||||
, 'readonly_' . $id => 0
|
, 'readonly_' . $id => 0
|
||||||
, 'type_' . $id => 'string'
|
, 'type_' . $id => 'string'
|
||||||
, 'vocabulary_' . $id => 'Unknow_Vocabulary'
|
, 'vocabulary_' . $id => 'Unknow_Vocabulary'
|
||||||
, 'regname' => $id
|
|
||||||
, 'regdate' => $id
|
|
||||||
, 'regdesc' => $id
|
|
||||||
));
|
));
|
||||||
|
|
||||||
$this->assertTrue($this->client->getResponse()->isRedirect());
|
$this->assertTrue($this->client->getResponse()->isRedirect());
|
||||||
@@ -220,9 +208,6 @@ class DescriptionTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
|
|||||||
, 'readonly_' . $id => 0
|
, 'readonly_' . $id => 0
|
||||||
, 'type_' . $id => 'string'
|
, 'type_' . $id => 'string'
|
||||||
, 'vocabulary_' . $id => 'Unknow_Vocabulary'
|
, 'vocabulary_' . $id => 'Unknow_Vocabulary'
|
||||||
, 'regname' => $id
|
|
||||||
, 'regdate' => $id
|
|
||||||
, 'regdesc' => $id
|
|
||||||
));
|
));
|
||||||
|
|
||||||
$this->assertTrue($this->client->getResponse()->isRedirect());
|
$this->assertTrue($this->client->getResponse()->isRedirect());
|
||||||
@@ -251,9 +236,6 @@ class DescriptionTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
|
|||||||
, 'readonly_' . $id => 0
|
, 'readonly_' . $id => 0
|
||||||
, 'type_' . $id => 'string'
|
, 'type_' . $id => 'string'
|
||||||
, 'vocabulary_' . $id => 'User'
|
, 'vocabulary_' . $id => 'User'
|
||||||
, 'regname' => $id
|
|
||||||
, 'regdate' => $id
|
|
||||||
, 'regdesc' => $id
|
|
||||||
));
|
));
|
||||||
$this->assertTrue($this->client->getResponse()->isOk());
|
$this->assertTrue($this->client->getResponse()->isOk());
|
||||||
$this->assertEquals("You are not allowed to access this zone", $this->client->getResponse()->getContent());
|
$this->assertEquals("You are not allowed to access this zone", $this->client->getResponse()->getContent());
|
||||||
|
@@ -300,72 +300,6 @@ class databox_fieldTest extends PhraseanetPHPUnitAbstract
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @todo Implement testSet_regdate().
|
|
||||||
*/
|
|
||||||
public function testSet_regdate()
|
|
||||||
{
|
|
||||||
// Remove the following lines when you implement this test.
|
|
||||||
$this->markTestIncomplete(
|
|
||||||
'This test has not been implemented yet.'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @todo Implement testSet_regdesc().
|
|
||||||
*/
|
|
||||||
public function testSet_regdesc()
|
|
||||||
{
|
|
||||||
// Remove the following lines when you implement this test.
|
|
||||||
$this->markTestIncomplete(
|
|
||||||
'This test has not been implemented yet.'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @todo Implement testSet_regname().
|
|
||||||
*/
|
|
||||||
public function testSet_regname()
|
|
||||||
{
|
|
||||||
// Remove the following lines when you implement this test.
|
|
||||||
$this->markTestIncomplete(
|
|
||||||
'This test has not been implemented yet.'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @todo Implement testIs_regname().
|
|
||||||
*/
|
|
||||||
public function testIs_regname()
|
|
||||||
{
|
|
||||||
// Remove the following lines when you implement this test.
|
|
||||||
$this->markTestIncomplete(
|
|
||||||
'This test has not been implemented yet.'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @todo Implement testIs_regdesc().
|
|
||||||
*/
|
|
||||||
public function testIs_regdesc()
|
|
||||||
{
|
|
||||||
// Remove the following lines when you implement this test.
|
|
||||||
$this->markTestIncomplete(
|
|
||||||
'This test has not been implemented yet.'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @todo Implement testIs_regdate().
|
|
||||||
*/
|
|
||||||
public function testIs_regdate()
|
|
||||||
{
|
|
||||||
// Remove the following lines when you implement this test.
|
|
||||||
$this->markTestIncomplete(
|
|
||||||
'This test has not been implemented yet.'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @todo Implement testGet_thumbtitle().
|
* @todo Implement testGet_thumbtitle().
|
||||||
*/
|
*/
|
||||||
|
@@ -468,11 +468,6 @@ class record_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGet_reg_name()
|
|
||||||
{
|
|
||||||
$this->assertTrue(is_string(self::$story_1->get_reg_name()));
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testGet_record_by_sha()
|
public function testGet_record_by_sha()
|
||||||
{
|
{
|
||||||
$tmp_records = record_adapter::get_record_by_sha(self::$record_1->get_sbas_id(), self::$record_1->get_sha256());
|
$tmp_records = record_adapter::get_record_by_sha(self::$record_1->get_sbas_id(), self::$record_1->get_sha256());
|
||||||
|
@@ -281,15 +281,6 @@
|
|||||||
<th>
|
<th>
|
||||||
{% trans 'Affiche dans report' %}
|
{% trans 'Affiche dans report' %}
|
||||||
</th>
|
</th>
|
||||||
<th>
|
|
||||||
Regdate
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
Regname
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
Regdesc
|
|
||||||
</th>
|
|
||||||
<th>
|
<th>
|
||||||
{% trans 'Afficher en titre' %}
|
{% trans 'Afficher en titre' %}
|
||||||
</th>
|
</th>
|
||||||
@@ -363,15 +354,6 @@
|
|||||||
<td>
|
<td>
|
||||||
<input class="metafield_{{field.get_id()}}" {{disabled}} name="report_{{field.get_id()}}" type="checkbox" {% if field.is_report() %}checked="checked"{% endif %}/>
|
<input class="metafield_{{field.get_id()}}" {{disabled}} name="report_{{field.get_id()}}" type="checkbox" {% if field.is_report() %}checked="checked"{% endif %}/>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
|
||||||
<input class="metafield_{{field.get_id()}}" {{disabled}} type="radio" {% if field.is_regdate() %}checked="checked"{% endif %} name="regdate" value="{{field.get_id()}}"/>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input class="metafield_{{field.get_id()}}" {{disabled}} type="radio" {% if field.is_regname() %}checked="checked"{% endif %} name="regname" value="{{field.get_id()}}"/>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input class="metafield_{{field.get_id()}}" {{disabled}} type="radio" {% if field.is_regdesc() %}checked="checked"{% endif %} name="regdesc" value="{{field.get_id()}}"/>
|
|
||||||
</td>
|
|
||||||
<td>
|
<td>
|
||||||
<select class="metafield_{{field.get_id()}}" {{disabled}} name="thumbtitle_{{field.get_id()}}">
|
<select class="metafield_{{field.get_id()}}" {{disabled}} name="thumbtitle_{{field.get_id()}}">
|
||||||
{{_self.thumbtitle_selector(field.get_thumbtitle())}}
|
{{_self.thumbtitle_selector(field.get_thumbtitle())}}
|
||||||
|
@@ -6,7 +6,6 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin:5px 0">
|
<div style="margin:5px 0">
|
||||||
{{ Story.get_description()|nl2br }}
|
|
||||||
</div>
|
</div>
|
||||||
<div style="margin:5px 0;text-align:right;font-style:italic;position:relative;">
|
<div style="margin:5px 0;text-align:right;font-style:italic;position:relative;">
|
||||||
{% set nb_records = Story.get_children().get_elements()|length %}
|
{% set nb_records = Story.get_children().get_elements()|length %}
|
||||||
|
@@ -82,7 +82,10 @@
|
|||||||
<img id="editSGtri_{{i}}" style="visibility:hidden;" src="/skins/prod/{{cssfile}}/images/suggested.gif" />
|
<img id="editSGtri_{{i}}" style="visibility:hidden;" src="/skins/prod/{{cssfile}}/images/suggested.gif" />
|
||||||
<img src="/skins/icons/info.gif" tooltipsrc="/prod/tooltip/metas/FieldInfos/{{field.get_databox().get_sbas_id()}}/{{field.get_id()}}/" class="fieldTips" alt=""/>
|
<img src="/skins/icons/info.gif" tooltipsrc="/prod/tooltip/metas/FieldInfos/{{field.get_databox().get_sbas_id()}}/{{field.get_id()}}/" class="fieldTips" alt=""/>
|
||||||
{% if field.get_dces_element %}
|
{% if field.get_dces_element %}
|
||||||
<img src="/skins/icons/dublincore.png" tooltipsrc="/prod/tooltip/DCESInfos/{{field.get_databox().get_sbas_id()}}/{{field.get_id()}}/" alt="{% trans 'Ce champ est decrit comme un element DublinCore' %}" class="DCESTips" alt=""/>
|
<img src="/skins/icons/dublincore.png" tooltipsrc="/prod/tooltip/DCESInfos/{{field.get_databox().get_sbas_id()}}/{{field.get_id()}}/" alt="{% trans 'Ce champ est decrit comme un element DublinCore' %}" class="DCESTips" />
|
||||||
|
{% endif %}
|
||||||
|
{% if field.get_thumbtitle %}
|
||||||
|
<img src="/skins/icons/titre16.png" title="{% trans 'This field is represent the title of the document' %}" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<span id="spanidEditFieldBox_{{i}}">
|
<span id="spanidEditFieldBox_{{i}}">
|
||||||
{{field.get_name()}} {% if field.is_required() %}<span style="font-weight:bold;font-size:16px;"> * </span>{% endif %} :
|
{{field.get_name()}} {% if field.is_required() %}<span style="font-weight:bold;font-size:16px;"> * </span>{% endif %} :
|
||||||
|
BIN
www/skins/icons/titre16.png
Normal file
BIN
www/skins/icons/titre16.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 429 B |
Reference in New Issue
Block a user