2
2
/**
3
3
* Ajax interface for attachments.
4
4
*
5
- * PHP Version 5.5
5
+ * PHP Version 5.6
6
6
*
7
7
* This Source Code Form is subject to the terms of the Mozilla Public License,
8
8
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
56
56
<table class="table table-striped">
57
57
<thead>
58
58
<tr>
59
+ <th>#</th>
59
60
<th><?php echo $ PMF_LANG ['msgAttachmentsFilename ' ] ?> </th>
60
61
<th><?php echo $ PMF_LANG ['msgTransToolLanguage ' ] ?> </th>
61
62
<th><?php echo $ PMF_LANG ['msgAttachmentsFilesize ' ] ?> </th>
62
- <th colspan="2 "><?php echo $ PMF_LANG ['msgAttachmentsMimeType ' ] ?> </th>
63
+ <th colspan="3 "><?php echo $ PMF_LANG ['msgAttachmentsMimeType ' ] ?> </th>
63
64
</tr>
64
65
</thead>
65
66
<tbody>
66
67
<?php foreach ($ crumbs as $ item ): ?>
67
68
<tr class="att_<?php echo $ item ->id ?> " title="<?php echo $ item ->thema ?> ">
69
+ <td><?php echo $ item ->id ?> </td>
68
70
<td><?php echo $ item ->filename ?> </td>
69
71
<td><?php echo $ item ->record_lang ?> </td>
70
72
<td><?php echo $ item ->filesize ?> </td>
@@ -75,6 +77,12 @@ class="btn btn-danger" title="<?php echo $PMF_LANG['ad_gen_delete'] ?>">
75
77
<i aria-hidden="true" class="fa fa-trash-o"></i>
76
78
</a>
77
79
</td>
80
+ <td>
81
+ <a title="<?php echo $ PMF_LANG ['ad_entry_faq_record ' ] ?> " class="btn btn-info"
82
+ href="../index.php?action=artikel&id=<?php echo $ item ->record_id ?> &lang=<?php echo $ item ->record_lang ?> ">
83
+ <i aria-hidden="true" class="fa fa-external-link"></i>
84
+ </a>
85
+ </td>
78
86
</tr>
79
87
<?php endforeach ; ?>
80
88
</tbody>
@@ -87,25 +95,26 @@ class="btn btn-danger" title="<?php echo $PMF_LANG['ad_gen_delete'] ?>">
87
95
</div>
88
96
</div>
89
97
90
- <script type="text/javascript" >
98
+ <script>
91
99
/**
92
100
* Ajax call for deleting attachments
93
101
*
94
102
* @param att_id Attachment id
95
103
*/
96
- function deleteAttachment(att_id)
97
- {
98
- if (confirm('<?php echo $ PMF_LANG ['msgAttachmentsWannaDelete ' ] ?> ')) {
99
- $('#saving_data_indicator').html('<i aria-hidden="true" class="fa fa-spinner fa-spin"></i> Deleting ...');
100
- $.ajax({
101
- type: "GET",
102
- url: "index.php?action=ajax&ajax=att&ajaxaction=delete",
103
- data: {attId: att_id},
104
- success: function(msg) {
105
- $('.att_' + att_id).fadeOut('slow');
106
- $('#saving_data_indicator').html('<p class="alert alert-success">' + msg + '</p>');
107
- }
108
- });
109
- }
104
+ function deleteAttachment(att_id) {
105
+ if (confirm('<?php echo $ PMF_LANG ['msgAttachmentsWannaDelete ' ] ?> ')) {
106
+ $('#saving_data_indicator').html('<i aria-hidden="true" class="fa fa-spinner fa-spin"></i> Deleting ...');
107
+ $.ajax(
108
+ {
109
+ type: "GET",
110
+ url: "index.php?action=ajax&ajax=att&ajaxaction=delete",
111
+ data: {attId: att_id},
112
+ success: function (msg) {
113
+ $('.att_' + att_id).fadeOut('slow');
114
+ $('#saving_data_indicator').html('<p class="alert alert-success">' + msg + '</p>');
115
+ }
116
+ }
117
+ );
118
+ }
110
119
}
111
120
</script>
0 commit comments