mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-13 13:03:20 +00:00
Fix client
This commit is contained in:
@@ -14,11 +14,10 @@
|
||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||
* @link www.phraseanet.com
|
||||
*/
|
||||
|
||||
/* @var $Core \Alchemy\Phrasea\Core */
|
||||
require_once __DIR__ . "/../../lib/bootstrap.php";
|
||||
|
||||
$Core= \bootstrap::getCore();
|
||||
$Core = \bootstrap::getCore();
|
||||
$appbox = appbox::get_instance($Core);
|
||||
$session = $appbox->get_session();
|
||||
$registry = $appbox->get_registry();
|
||||
@@ -102,9 +101,9 @@ $options->set_bases($parm['bas'], $user->ACL());
|
||||
if (!is_array($parm['infield']))
|
||||
$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]);
|
||||
}
|
||||
|
||||
@@ -201,7 +200,7 @@ $max = (2 * $ecart) + 3;
|
||||
|
||||
if ($npages > $max)
|
||||
{
|
||||
for ($p = 1; $p < $npages; $p++)
|
||||
for ($p = 1; $p <= $npages; $p++)
|
||||
{
|
||||
if ($p == $page)
|
||||
$pages .= '<span class="naviButton sel">' . ($p) . '</span>';
|
||||
@@ -227,7 +226,7 @@ if ($npages > $max)
|
||||
}
|
||||
else
|
||||
{
|
||||
for ($p = 1; $p < $npages; $p++)
|
||||
for ($p = 1; $p <= $npages; $p++)
|
||||
{
|
||||
if ($p == $page)
|
||||
$pages .= '<span class="naviButton sel">' . ($p) . '</span>';
|
||||
@@ -271,10 +270,9 @@ else
|
||||
?>
|
||||
$("#NEXT_PAGE").unbind('click');
|
||||
<?php } ?>
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
|
||||
$layoutmode = "grid";
|
||||
if ($mod_col == 1)
|
||||
$layoutmode = "list";
|
||||
@@ -316,7 +314,16 @@ if (count($result->get_datas()) > 0)
|
||||
$docType = $record->get_type();
|
||||
|
||||
$title = $record->get_title();
|
||||
|
||||
try
|
||||
{
|
||||
$record->get_subdef('document');
|
||||
$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));
|
||||
|
||||
|
||||
@@ -345,8 +352,6 @@ if (count($result->get_datas()) > 0)
|
||||
}
|
||||
?><div class="diapo w160px" style="margin-bottom:0;border-bottom:none;">
|
||||
<div class="title"><?php echo $title ?></div><?php
|
||||
|
||||
|
||||
$status = '';
|
||||
$status .= '<div class="status">';
|
||||
$status .= $record->get_status_icons();
|
||||
@@ -368,7 +373,6 @@ if (count($result->get_datas()) > 0)
|
||||
{
|
||||
$isImage = true;
|
||||
}
|
||||
|
||||
?><table cellpadding="0" cellspacing="0" style="margin: 0pt auto;"><?php
|
||||
?><tr class="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);
|
||||
?><img style="<?php if ($thumbnail->get_width() > $thumbnail->get_height())
|
||||
{ ?>width:128px;<?php }
|
||||
{
|
||||
?>width:128px;<?php
|
||||
}
|
||||
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>
|
||||
</tr>
|
||||
</table>
|
||||
|
@@ -102,6 +102,14 @@ $user = User_Adapter::getInstance($usr_id, $appbox);
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
#PREVIEWCURRENTCONT{
|
||||
top:0;
|
||||
left:0;
|
||||
right:0;
|
||||
bottom:0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="PNB" style="overflow:hidden;">
|
||||
<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>';
|
||||
}
|
||||
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();
|
||||
$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>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?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'))
|
||||
{
|
||||
?>
|
||||
<div class="basContainer">
|
||||
<div class="basContTitle">
|
||||
@@ -415,28 +408,6 @@ $user = User_Adapter::getInstance($usr_id, $appbox);
|
||||
{
|
||||
$dateFilters = $fieldsFilters = '';
|
||||
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)
|
||||
{
|
||||
@@ -481,7 +452,7 @@ $user = User_Adapter::getInstance($usr_id, $appbox);
|
||||
<?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";
|
||||
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
|
||||
}
|
||||
}
|
||||
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 style="margin-right:10px;">
|
||||
<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="#HISTORICOPS-BOX"><?php echo _('preview:: Historique'); ?></a></li>
|
||||
<li><a href="#popularity-BOX"><?php echo _('preview:: Popularite'); ?></a></li>
|
||||
@@ -737,8 +707,10 @@ setBaskStatus();
|
||||
<?php
|
||||
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
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user