mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
fixed #1783 added image filter from the edit image page
This commit is contained in:
@@ -101,10 +101,11 @@ else
|
||||
}
|
||||
|
||||
$form_param['ip'] = isset($_GET['filter_ip']) ? $_GET['filter_ip'] : @$form['ip'];
|
||||
$form_param['image_id'] = isset($_GET['filter_image_id']) ? $_GET['filter_image_id'] : @$form['image_id'];
|
||||
|
||||
$template->assign(
|
||||
array(
|
||||
'IMAGE_ID' => @$form['image_id'],
|
||||
'IMAGE_ID' => $form_param['image_id'],
|
||||
'FILENAME' => @$form['filename'],
|
||||
'IP' => $form_param['ip'],
|
||||
'START' => @$form['start'],
|
||||
|
||||
@@ -241,6 +241,7 @@ $template->assign(
|
||||
'U_DOWNLOAD' => 'action.php?id='.$_GET['image_id'].'&part=e&pwg_token='.get_pwg_token().'&download',
|
||||
'U_SYNC' => $admin_url_start.'&sync_metadata=1',
|
||||
'U_DELETE' => $admin_url_start.'&delete=1&pwg_token='.get_pwg_token(),
|
||||
'U_HISTORY' => get_root_url().'admin.php?page=history&filter_image_id='.$_GET['image_id'],
|
||||
|
||||
'PATH'=>$row['path'],
|
||||
|
||||
|
||||
@@ -6,6 +6,9 @@ $(document).ready(() => {
|
||||
if (current_param.ip != "") {
|
||||
addIpFilter(current_param.ip);
|
||||
}
|
||||
if (current_param.image_id != "") {
|
||||
addImageFilter(current_param.image_id);
|
||||
}
|
||||
|
||||
$(".elem-type-select").on("change", function (e) {
|
||||
console.log($(".elem-type-select option:selected").attr("value"));
|
||||
|
||||
@@ -25,7 +25,7 @@ var current_param = {
|
||||
3: "other"
|
||||
},
|
||||
user_id: "-1",
|
||||
image_id: "",
|
||||
image_id: {if isset($IMAGE_ID)}"{$IMAGE_ID}"{else}""{/if},
|
||||
filename: "",
|
||||
ip:{if isset($IP)}"{$IP}"{else}""{/if},
|
||||
display_thumbnail: "display_thumbnail_classic",
|
||||
|
||||
@@ -108,6 +108,7 @@ $('#action-delete-picture').on('click', function() {
|
||||
<a class="icon-eye unavailable" title="{'You don\'t have access to this photo'|translate}"></a>
|
||||
{/if}
|
||||
<a class="icon-download" href="{$U_DOWNLOAD}" title="{'Download'|translate}"></a>
|
||||
<a class="icon-signal" href="{$U_HISTORY}" title="{'cONSULTER L\'HISTORIQU'|translate}"></a>
|
||||
{if !url_is_remote($PATH)}
|
||||
<a class="icon-arrows-cw" href="{$U_SYNC}" title="{'Synchronize metadata'|@translate}"></a>
|
||||
<a class="icon-trash" title="{'delete photo'|@translate}" id='action-delete-picture'></a>
|
||||
|
||||
Reference in New Issue
Block a user