@@ -119,6 +119,7 @@ public function configure(DataTable $dataTable, array $options): void
119119 $ dataTable ->add ('internal_link ' , TextColumn::class, [
120120 'label ' => 'attachment.table.internal_file ' ,
121121 'propertyPath ' => 'filename ' ,
122+ 'orderField ' => 'NATSORT(attachment.original_filename) ' ,
122123 'render ' => function ($ value , Attachment $ context ) {
123124 if ($ this ->attachmentHelper ->isInternalFileExisting ($ context )) {
124125 return sprintf (
@@ -135,12 +136,14 @@ public function configure(DataTable $dataTable, array $options): void
135136 $ dataTable ->add ('external_link ' , TextColumn::class, [
136137 'label ' => 'attachment.table.external_link ' ,
137138 'propertyPath ' => 'host ' ,
139+ 'orderField ' => 'attachment.external_path ' ,
138140 'render ' => function ($ value , Attachment $ context ) {
139141 if ($ context ->hasExternal ()) {
140142 return sprintf (
141- '<a href="%s" class="link-external">%s</a> ' ,
143+ '<a href="%s" class="link-external" title="%s" target="_blank" rel="noopener" >%s</a> ' ,
142144 htmlspecialchars ((string ) $ context ->getExternalPath ()),
143- htmlspecialchars ($ value )
145+ htmlspecialchars ((string ) $ context ->getExternalPath ()),
146+ htmlspecialchars ($ value ),
144147 );
145148 }
146149
0 commit comments