diff --git a/src/admin/components/other/activity/activity-details-modal.vue b/src/admin/components/other/activity/activity-details-modal.vue index 9cf16c245..907328a9c 100644 --- a/src/admin/components/other/activity/activity-details-modal.vue +++ b/src/admin/components/other/activity/activity-details-modal.vue @@ -34,6 +34,48 @@ + +
+

+ {{ attributeName }} + {{ `(${$i18n.get('info_logs_before')})` }} +

+
+ +
+
+

{{ infoEmpty }}

+
+
+
@@ -108,6 +150,48 @@
+ +
+

+ {{ attributeName }} + {{ `(${$i18n.get('info_logs_after')})` }} +

+
+ +
+
+

{{ infoEmpty }}

+
+
+
@@ -288,4 +372,11 @@ .modal-card-body { min-height: 400px; } + + .tainacan-attachments-in-modal { + display: flex; + flex-wrap: wrap; + flex-direction: row; + justify-content: space-between; + } \ No newline at end of file diff --git a/src/classes/repositories/class-tainacan-logs.php b/src/classes/repositories/class-tainacan-logs.php index 76a7da29e..61045c10f 100644 --- a/src/classes/repositories/class-tainacan-logs.php +++ b/src/classes/repositories/class-tainacan-logs.php @@ -246,16 +246,8 @@ class Logs extends Repository { // get all attachments except the new $old_attachments = $tainacan_post->get_attachments( $post_ID ); - foreach ( $old_attachments as $index => $a ) { - unset( $old_attachments[ $index ]['id'] ); - } - - $new_attachments[] = [ - 'title' => $attachment->post_title, - 'description' => $attachment->post_content, - 'mime_type' => $attachment->post_mime_type, - 'url' => $attachment->guid, - ]; + // get all attachments + $new_attachments = $tainacan_post->get_attachments(); $array_diff_with_index = array_map( 'unserialize', array_diff_assoc( array_map( 'serialize', $new_attachments ), array_map( 'serialize', $old_attachments ) ) );