mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-27 19:59:56 +03:00
feature 2564: display picture infos as list
git-svn-id: http://piwigo.org/svn/trunk@13084 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
a25fe0c7e8
commit
d0303b4ff0
2 changed files with 32 additions and 52 deletions
|
@ -296,30 +296,15 @@ SELECT '.$conf['user_fields']['username'].' AS username
|
||||||
$result = pwg_query($query);
|
$result = pwg_query($query);
|
||||||
while ($user_row = pwg_db_fetch_assoc($result))
|
while ($user_row = pwg_db_fetch_assoc($result))
|
||||||
{
|
{
|
||||||
$added_by = $user_row['username'];
|
$row['added_by'] = $user_row['username'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$intro = sprintf(
|
$intro_vars = array(
|
||||||
l10n('This photo was posted on %s by %s.'),
|
'file' => sprintf(l10n('Original file : %s'), $row['file']),
|
||||||
format_date($row['date_available']),
|
'added' => sprintf(l10n('Posted %s on %s by %s'), time_since($row['date_available'], 'month'), format_date($row['date_available'], false, false), $row['added_by']),
|
||||||
$added_by
|
'size' => $row['width'].'×'.$row['height'].' pixels, '.sprintf('%.2f', $row['filesize']/1024).'MB',
|
||||||
);
|
'hits' => sprintf(l10n('%d visits'), $row['hit']),
|
||||||
|
'id' => sprintf(l10n('Numeric identifier : %d'), $row['id']),
|
||||||
$intro.= ' ';
|
|
||||||
|
|
||||||
$intro.= sprintf(
|
|
||||||
l10n('Original file is %s, %ux%u pixels, %.2fMB.'),
|
|
||||||
$row['file'],
|
|
||||||
$row['width'],
|
|
||||||
$row['height'],
|
|
||||||
$row['filesize']/1024
|
|
||||||
);
|
|
||||||
|
|
||||||
$intro.= ' ';
|
|
||||||
|
|
||||||
$intro.= sprintf(
|
|
||||||
l10n('%u visits'),
|
|
||||||
$row['hit']
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($conf['rate'] and !empty($row['rating_score']))
|
if ($conf['rate'] and !empty($row['rating_score']))
|
||||||
|
@ -330,23 +315,13 @@ SELECT
|
||||||
FROM '.RATE_TABLE.'
|
FROM '.RATE_TABLE.'
|
||||||
WHERE element_id = '.$_GET['image_id'].'
|
WHERE element_id = '.$_GET['image_id'].'
|
||||||
;';
|
;';
|
||||||
list($nb_rates) = pwg_db_fetch_row(pwg_query($query));
|
list($row['nb_rates']) = pwg_db_fetch_row(pwg_query($query));
|
||||||
|
|
||||||
$intro.= sprintf(
|
$intro_vars['rate'] = sprintf(l10n('Rated %d times, score : %f'), $row['nb_rates'], $row['rating_score']);
|
||||||
l10n(', %u rates, rating score %s'),
|
|
||||||
$nb_rates,
|
|
||||||
$row['rating_score']
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$intro.= '. ';
|
$template->assign('INTRO', $intro_vars);
|
||||||
|
|
||||||
$intro.= sprintf(
|
|
||||||
l10n('Numeric identifier is %u.'),
|
|
||||||
$row['id']
|
|
||||||
);
|
|
||||||
|
|
||||||
$template->assign('INTRO', $intro);
|
|
||||||
|
|
||||||
if (in_array(get_extension($row['path']),$conf['picture_ext']))
|
if (in_array(get_extension($row['path']),$conf['picture_ext']))
|
||||||
{
|
{
|
||||||
|
|
|
@ -44,24 +44,29 @@ pwg_initialization_datepicker("#date_creation_day", "#date_creation_month", "#da
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td id="albumThumbnail">
|
<td id="albumThumbnail">
|
||||||
<img src="{$TN_SRC}" alt="{'Thumbnail'|@translate}" class="Thumbnail">
|
<img src="{$TN_SRC}" alt="{'Thumbnail'|@translate}" class="Thumbnail">
|
||||||
</td>
|
</td>
|
||||||
|
<td id="albumLinks" style="width:500px;vertical-align:top;">
|
||||||
|
<ul>
|
||||||
|
<li>{$INTRO.file}</li>
|
||||||
|
<li>{$INTRO.added}</li>
|
||||||
|
<li>{$INTRO.size}</li>
|
||||||
|
<li>{$INTRO.hits}</li>
|
||||||
|
{if $INTRO.rate}<li>{$INTRO.rate}</li>{/if}
|
||||||
|
<li>{$INTRO.id}</li>
|
||||||
|
</ul>
|
||||||
|
</td>
|
||||||
|
<td style="vertical-align:top;">
|
||||||
|
<ul style="padding-left:15px;">
|
||||||
|
{if isset($U_JUMPTO) }
|
||||||
|
<li><a href="{$U_JUMPTO}">{'jump to photo'|@translate} →</a></li>
|
||||||
|
{/if}
|
||||||
|
{if !url_is_remote($PATH)}
|
||||||
|
<li><a href="{$U_SYNC}">{'Synchronize metadata'|@translate}</a></li>
|
||||||
|
|
||||||
<td id="albumLinks">
|
<li><a href="{$U_DELETE}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');">{'delete photo'|@translate}</a></li>
|
||||||
<p style="text-align:left">{$INTRO}</p>
|
{/if}
|
||||||
|
</ul>
|
||||||
<ul style="padding-left:15px;">
|
|
||||||
{if isset($U_JUMPTO) }
|
|
||||||
<li><a href="{$U_JUMPTO}">{'jump to photo'|@translate} →</a></li>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
{if !url_is_remote($PATH)}
|
|
||||||
<li><a href="{$U_SYNC}">{'Synchronize metadata'|@translate}</a></li>
|
|
||||||
|
|
||||||
<li><a href="{$U_DELETE}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');">{'delete photo'|@translate}</a></li>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue