mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 05:23:21 +00:00
Fix client
This commit is contained in:
@@ -14,11 +14,10 @@
|
|||||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||||
* @link www.phraseanet.com
|
* @link www.phraseanet.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* @var $Core \Alchemy\Phrasea\Core */
|
/* @var $Core \Alchemy\Phrasea\Core */
|
||||||
require_once __DIR__ . "/../../lib/bootstrap.php";
|
require_once __DIR__ . "/../../lib/bootstrap.php";
|
||||||
|
|
||||||
$Core= \bootstrap::getCore();
|
$Core = \bootstrap::getCore();
|
||||||
$appbox = appbox::get_instance($Core);
|
$appbox = appbox::get_instance($Core);
|
||||||
$session = $appbox->get_session();
|
$session = $appbox->get_session();
|
||||||
$registry = $appbox->get_registry();
|
$registry = $appbox->get_registry();
|
||||||
@@ -102,9 +101,9 @@ $options->set_bases($parm['bas'], $user->ACL());
|
|||||||
if (!is_array($parm['infield']))
|
if (!is_array($parm['infield']))
|
||||||
$parm['infield'] = array();
|
$parm['infield'] = array();
|
||||||
|
|
||||||
foreach($parm['infield'] as $offset=>$value)
|
foreach ($parm['infield'] as $offset => $value)
|
||||||
{
|
{
|
||||||
if(trim($value) === '')
|
if (trim($value) === '')
|
||||||
unset($parm['infield'][$offset]);
|
unset($parm['infield'][$offset]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -201,7 +200,7 @@ $max = (2 * $ecart) + 3;
|
|||||||
|
|
||||||
if ($npages > $max)
|
if ($npages > $max)
|
||||||
{
|
{
|
||||||
for ($p = 1; $p < $npages; $p++)
|
for ($p = 1; $p <= $npages; $p++)
|
||||||
{
|
{
|
||||||
if ($p == $page)
|
if ($p == $page)
|
||||||
$pages .= '<span class="naviButton sel">' . ($p) . '</span>';
|
$pages .= '<span class="naviButton sel">' . ($p) . '</span>';
|
||||||
@@ -227,7 +226,7 @@ if ($npages > $max)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for ($p = 1; $p < $npages; $p++)
|
for ($p = 1; $p <= $npages; $p++)
|
||||||
{
|
{
|
||||||
if ($p == $page)
|
if ($p == $page)
|
||||||
$pages .= '<span class="naviButton sel">' . ($p) . '</span>';
|
$pages .= '<span class="naviButton sel">' . ($p) . '</span>';
|
||||||
@@ -271,10 +270,9 @@ else
|
|||||||
?>
|
?>
|
||||||
$("#NEXT_PAGE").unbind('click');
|
$("#NEXT_PAGE").unbind('click');
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$layoutmode = "grid";
|
$layoutmode = "grid";
|
||||||
if ($mod_col == 1)
|
if ($mod_col == 1)
|
||||||
$layoutmode = "list";
|
$layoutmode = "list";
|
||||||
@@ -316,7 +314,16 @@ if (count($result->get_datas()) > 0)
|
|||||||
$docType = $record->get_type();
|
$docType = $record->get_type();
|
||||||
|
|
||||||
$title = $record->get_title();
|
$title = $record->get_title();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$record->get_subdef('document');
|
||||||
$light_info = $twig->render('common/technical_datas.twig', array('record' => $record));
|
$light_info = $twig->render('common/technical_datas.twig', array('record' => $record));
|
||||||
|
}
|
||||||
|
catch (\Exception $e)
|
||||||
|
{
|
||||||
|
$light_info = '';
|
||||||
|
}
|
||||||
$caption = $twig->render('common/caption.html', array('view' => 'answer', 'record' => $record));
|
$caption = $twig->render('common/caption.html', array('view' => 'answer', 'record' => $record));
|
||||||
|
|
||||||
|
|
||||||
@@ -345,8 +352,6 @@ if (count($result->get_datas()) > 0)
|
|||||||
}
|
}
|
||||||
?><div class="diapo w160px" style="margin-bottom:0;border-bottom:none;">
|
?><div class="diapo w160px" style="margin-bottom:0;border-bottom:none;">
|
||||||
<div class="title"><?php echo $title ?></div><?php
|
<div class="title"><?php echo $title ?></div><?php
|
||||||
|
|
||||||
|
|
||||||
$status = '';
|
$status = '';
|
||||||
$status .= '<div class="status">';
|
$status .= '<div class="status">';
|
||||||
$status .= $record->get_status_icons();
|
$status .= $record->get_status_icons();
|
||||||
@@ -368,7 +373,6 @@ if (count($result->get_datas()) > 0)
|
|||||||
{
|
{
|
||||||
$isImage = true;
|
$isImage = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
?><table cellpadding="0" cellspacing="0" style="margin: 0pt auto;"><?php
|
?><table cellpadding="0" cellspacing="0" style="margin: 0pt auto;"><?php
|
||||||
?><tr class="h160px"><?php
|
?><tr class="h160px"><?php
|
||||||
?><td class="image w160px h160px"><?php
|
?><td class="image w160px h160px"><?php
|
||||||
@@ -403,9 +407,12 @@ if (count($result->get_datas()) > 0)
|
|||||||
|
|
||||||
$pic_roll = str_replace(array('&', '"'), array('&', '"'), $pic_roll);
|
$pic_roll = str_replace(array('&', '"'), array('&', '"'), $pic_roll);
|
||||||
?><img style="<?php if ($thumbnail->get_width() > $thumbnail->get_height())
|
?><img style="<?php if ($thumbnail->get_width() > $thumbnail->get_height())
|
||||||
{ ?>width:128px;<?php }
|
{
|
||||||
|
?>width:128px;<?php
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{ ?>height:128px;<?php } ?>" onclick="<?php echo $onclick ?>" class=" captionTips" id="IMG<?php echo $record->get_base_id() ?>_<?php echo $record->get_record_id() ?>" src="<?php echo $thumbnail->get_url() ?>" tooltipsrc="<?php echo ($pic_roll) ?>" />
|
{
|
||||||
|
?>height:128px;<?php } ?>" onclick="<?php echo $onclick ?>" class=" captionTips" id="IMG<?php echo $record->get_base_id() ?>_<?php echo $record->get_record_id() ?>" src="<?php echo $thumbnail->get_url() ?>" tooltipsrc="<?php echo ($pic_roll) ?>" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -102,6 +102,14 @@ $user = User_Adapter::getInstance($usr_id, $appbox);
|
|||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
<style>
|
||||||
|
#PREVIEWCURRENTCONT{
|
||||||
|
top:0;
|
||||||
|
left:0;
|
||||||
|
right:0;
|
||||||
|
bottom:0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body class="PNB" style="overflow:hidden;">
|
<body class="PNB" style="overflow:hidden;">
|
||||||
<div id="container" style="position:absolute;top:0;left:0;overflow:hidden;width:100%;height:100%;">
|
<div id="container" style="position:absolute;top:0;left:0;overflow:hidden;width:100%;height:100%;">
|
||||||
@@ -230,17 +238,6 @@ $user = User_Adapter::getInstance($usr_id, $appbox);
|
|||||||
$options .= '<option value="' . implode(';', $allbcol) . '">`' . $databox->get_viewname() . '`' . '</option>';
|
$options .= '<option value="' . implode(';', $allbcol) . '">`' . $databox->get_viewname() . '`' . '</option>';
|
||||||
}
|
}
|
||||||
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)
|
||||||
{
|
|
||||||
if ($showbases)
|
|
||||||
{
|
|
||||||
$options .= '<optgroup label="' . $databox->get_viewname() . '">';
|
|
||||||
$allbcol = array();
|
|
||||||
$n_allbcol = 0;
|
|
||||||
if (count($databox->get_collections()) > 0)
|
|
||||||
{
|
|
||||||
$options .= '<option value="' . implode(';', $allbcol) . '">`' . $databox->get_viewname() . '`' . '</option>';
|
|
||||||
}
|
|
||||||
foreach ($databox->get_collections() as $coll)
|
|
||||||
{
|
{
|
||||||
$allbcol[] = $coll->get_base_id();
|
$allbcol[] = $coll->get_base_id();
|
||||||
$n_allbcol++;
|
$n_allbcol++;
|
||||||
@@ -262,8 +259,6 @@ $user = User_Adapter::getInstance($usr_id, $appbox);
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo '<select id="basSelector" onchange="beforeAnswer();" style="width:245px;"><option value="' . implode(';', $allbases) . '">' . _('client::recherche: rechercher dans toutes les bases') . '</option>' . $options . '</select>';
|
echo '<select id="basSelector" onchange="beforeAnswer();" style="width:245px;"><option value="' . implode(';', $allbases) . '">' . _('client::recherche: rechercher dans toutes les bases') . '</option>' . $options . '</select>';
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
@@ -364,8 +359,6 @@ $user = User_Adapter::getInstance($usr_id, $appbox);
|
|||||||
{
|
{
|
||||||
if ($registry->get('GV_view_bas_and_coll'))
|
if ($registry->get('GV_view_bas_and_coll'))
|
||||||
{
|
{
|
||||||
if ($registry->get('GV_view_bas_and_coll'))
|
|
||||||
{
|
|
||||||
?>
|
?>
|
||||||
<div class="basContainer">
|
<div class="basContainer">
|
||||||
<div class="basContTitle">
|
<div class="basContTitle">
|
||||||
@@ -415,28 +408,6 @@ $user = User_Adapter::getInstance($usr_id, $appbox);
|
|||||||
{
|
{
|
||||||
$dateFilters = $fieldsFilters = '';
|
$dateFilters = $fieldsFilters = '';
|
||||||
if ($sxe->description)
|
if ($sxe->description)
|
||||||
{
|
|
||||||
foreach ($sxe->description->children() as $f => $field)
|
|
||||||
{
|
|
||||||
if ($field['type'] == 'date' && $field['searchclient'] == '1')
|
|
||||||
{
|
|
||||||
$dateFilters .= '<div><table style="width:98%;text-align:left;" cellspacing="0" cellpadding="0"><tr><td colspan="2">' .
|
|
||||||
$f . '</td></tr>' .
|
|
||||||
'<tr><td style="width:50%;">' . _('phraseanet::time:: de') .
|
|
||||||
'</td><td style="width:50%;">' .
|
|
||||||
_('phraseanet::time:: a') .
|
|
||||||
'</td></tr>' .
|
|
||||||
'<tr><td style="width:50%;">' .
|
|
||||||
'<input type="hidden" name="dateminfield[]" value="' . $databox->get_sbas_id() . '_' . $f . '">' .
|
|
||||||
' <input db="' . $databox->get_sbas_id() . '" onchange="checkFilters();" class="datepicker" type="text" name="datemin[]"></td><td style="width:50%;">' .
|
|
||||||
'<input type="hidden" name="datemaxfield[]" value="' . $databox->get_sbas_id() . '_' . $f . '">' .
|
|
||||||
' <input db="' . $databox->get_sbas_id() . '" onchange="checkFilters();" class="datepicker" type="text" name="datemax[]"></td></tr>' .
|
|
||||||
'</table>' .
|
|
||||||
'</div>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($sxe->description)
|
|
||||||
{
|
{
|
||||||
foreach ($sxe->description->children() as $f => $field)
|
foreach ($sxe->description->children() as $f => $field)
|
||||||
{
|
{
|
||||||
@@ -481,7 +452,7 @@ $user = User_Adapter::getInstance($usr_id, $appbox);
|
|||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?><div class="basGrp"><?php
|
?><div class="basGrp"><?php
|
||||||
foreach ($databox->get_collections() as $coll)
|
foreach ($user->ACL()->get_granted_base(array(), array($databox->get_sbas_id())) as $coll)
|
||||||
{
|
{
|
||||||
$s = "checked";
|
$s = "checked";
|
||||||
echo '<div><input type="checkbox" class="checkbox basItem basItem' . $databox->get_sbas_id() . '" ' . $s . ' name="bas[]" id="basChk' . $coll->get_base_id() . '" value="' . $coll->get_base_id() . '"><label for="basChk' . $coll->get_base_id() . '">' . $coll->get_name() . '</label></div>';
|
echo '<div><input type="checkbox" class="checkbox basItem basItem' . $databox->get_sbas_id() . '" ' . $s . ' name="bas[]" id="basChk' . $coll->get_base_id() . '" value="' . $coll->get_base_id() . '"><label for="basChk' . $coll->get_base_id() . '">' . $coll->get_name() . '</label></div>';
|
||||||
@@ -497,7 +468,6 @@ $user = User_Adapter::getInstance($usr_id, $appbox);
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if ($registry->get('GV_thesaurus'))
|
if ($registry->get('GV_thesaurus'))
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
@@ -576,7 +546,7 @@ $user = User_Adapter::getInstance($usr_id, $appbox);
|
|||||||
<div id="PREVIEWRIGHT" class="preview_col" style="width:49%;position:relative;float:right;overflow:hidden;">
|
<div id="PREVIEWRIGHT" class="preview_col" style="width:49%;position:relative;float:right;overflow:hidden;">
|
||||||
<div style="margin-right:10px;">
|
<div style="margin-right:10px;">
|
||||||
<div id="PREVIEWIMGDESC" class="preview_col_cont" style="overflow-x:hidden;overflow-y:auto;">
|
<div id="PREVIEWIMGDESC" class="preview_col_cont" style="overflow-x:hidden;overflow-y:auto;">
|
||||||
<ul style="height:30px;">
|
<ul style="height:30px;overflow:hidden;">
|
||||||
<li><a href="#PREVIEWIMGDESCINNER-BOX"><?php echo _('preview:: Description'); ?></a></li>
|
<li><a href="#PREVIEWIMGDESCINNER-BOX"><?php echo _('preview:: Description'); ?></a></li>
|
||||||
<li><a href="#HISTORICOPS-BOX"><?php echo _('preview:: Historique'); ?></a></li>
|
<li><a href="#HISTORICOPS-BOX"><?php echo _('preview:: Historique'); ?></a></li>
|
||||||
<li><a href="#popularity-BOX"><?php echo _('preview:: Popularite'); ?></a></li>
|
<li><a href="#popularity-BOX"><?php echo _('preview:: Popularite'); ?></a></li>
|
||||||
@@ -737,8 +707,10 @@ setBaskStatus();
|
|||||||
<?php
|
<?php
|
||||||
if (trim($registry->get('GV_bitly_user')) !== '' && trim($registry->get('GV_bitly_key')) !== '')
|
if (trim($registry->get('GV_bitly_user')) !== '' && trim($registry->get('GV_bitly_key')) !== '')
|
||||||
{
|
{
|
||||||
|
$request = new http_request();
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript" src="http://bit.ly/javascript-api.js?version=latest&login=<?php echo $registry->get('GV_bitly_user') ?>&apiKey=<?php echo $registry->get('GV_bitly_key') ?>"></script>
|
|
||||||
|
<script type="text/javascript" src="http<?php echo $request->is_secure() ? 's' : '' ?>://bit.ly/javascript-api.js?version=latest&login=<?php echo $registry->get('GV_bitly_user') ?>&apiKey=<?php echo $registry->get('GV_bitly_key') ?>"></script>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
Reference in New Issue
Block a user