aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/ucp/ucp_attachments.php22
-rw-r--r--phpBB/styles/subSilver/template/ucp_attachments.html60
2 files changed, 40 insertions, 42 deletions
diff --git a/phpBB/includes/ucp/ucp_attachments.php b/phpBB/includes/ucp/ucp_attachments.php
index 7b731300b3..ab7c6dfeff 100644
--- a/phpBB/includes/ucp/ucp_attachments.php
+++ b/phpBB/includes/ucp/ucp_attachments.php
@@ -100,25 +100,23 @@ class ucp_attachments extends module
$i = 0;
while ($row = $db->sql_fetchrow($result))
{
- $topic_title = (strlen($row['topic_title']) > 32) ? substr($row['topic_title'], 0, 30) . '...' : $row['topic_title'];
$view_topic = "{$phpbb_root_path}viewtopic.$phpEx$SID&t=" . $row['topic_id'] . '&p=' . $row['post_id'] . '#' . $row['post_id'];
- $topic_title = '<a href="' . $view_topic . '" class="gen" target="_blank">' . $topic_title . '</a>';
$template->assign_block_vars('attachrow', array(
- 'ROW_NUMBER' => $i + ($start + 1),
- 'S_ROW_COUNT' => $i,
-
- 'ATTACH_ID' => $row['attach_id'],
- 'FILENAME' => $row['real_filename'],
- 'COMMENT' => str_replace("\n", '<br />', $row['comment']),
- 'EXTENSION' => $row['extension'],
-
+ 'ROW_NUMBER' => $i + ($start + 1),
+ 'ATTACH_ID' => $row['attach_id'],
+ 'FILENAME' => $row['real_filename'],
+ 'COMMENT' => str_replace("\n", '<br />', $row['comment']),
+ 'EXTENSION' => $row['extension'],
'SIZE' => ($row['filesize'] >= 1048576) ? (round($row['filesize'] / 1048576 * 100) / 100) . ' ' . $user->lang['MB'] : (($row['filesize'] >= 1024) ? (round($row['filesize'] / 1024 * 100) / 100) . ' ' . $user->lang['KB'] : $row['filesize'] . ' ' . $user->lang['BYTES']),
'DOWNLOAD_COUNT' => $row['download_count'],
'POST_TIME' => $user->format_date($row['filetime'], $user->lang['DATE_FORMAT']),
- 'TOPIC_TITLE' => $topic_title,
+ 'TOPIC_TITLE' => $row['topic_title'],
+
+ 'S_ROW_COUNT' => $i,
- 'U_VIEW_ATTACHMENT' => $phpbb_root_path . 'download.' . $phpEx . $SID . '&amp;id=' . $row['attach_id'])
+ 'U_VIEW_ATTACHMENT' => $phpbb_root_path . 'download.' . $phpEx . $SID . '&amp;id=' . $row['attach_id'],
+ 'U_VIEW_TOPIC' => $view_topic)
);
$i++;
}
diff --git a/phpBB/styles/subSilver/template/ucp_attachments.html b/phpBB/styles/subSilver/template/ucp_attachments.html
index adc8cede47..f6cabb4972 100644
--- a/phpBB/styles/subSilver/template/ucp_attachments.html
+++ b/phpBB/styles/subSilver/template/ucp_attachments.html
@@ -4,28 +4,26 @@
<!-- IF S_CONFIRM_DELETE -->
<table class="tablebg" width="80%" cellspacing="1" cellpadding="4" border="0" align="right">
-<tr>
- <th height="28" valign="middle">{MESSAGE_TITLE}</th>
-</tr>
-<tr>
- <td class="row1" align="center"><span class="gen"><br />{MESSAGE_TEXT}<br /><br />{S_HIDDEN_FIELDS}<input type="submit" name="confirm" value="{L_YES}" class="btnmain" />&nbsp;&nbsp;<input type="submit" name="cancel" value="{L_NO}" class="btnlite" /></span></td>
-</tr>
+ <tr>
+ <th height="28" valign="middle">{MESSAGE_TITLE}</th>
+ </tr>
+ <tr>
+ <td class="row1" align="center"><span class="gen"><br />{MESSAGE_TEXT}<br /><br />{S_HIDDEN_FIELDS}<input class="btnmain" type="submit" name="confirm" value="{L_YES}" />&nbsp;&nbsp;<input class="btnlite" type="submit" name="cancel" value="{L_NO}" /></span></td>
+ </tr>
</table>
<!-- ELSEIF attachrow -->
<table class="tablebg" width="80%" cellspacing="1" cellpadding="4" border="0" align="right">
-<tr>
- <th height="28" nowrap="nowrap">#</th>
- <th nowrap="nowrap" width="15%"><a class="th" href="{U_SORT_FILENAME}">{L_FILENAME}</a></th>
- <th nowrap="nowrap" width="25%"><a class="th" href="{U_SORT_FILE_COMMENT}">{L_FILE_COMMENT}</a></th>
- <th nowrap="nowrap" width="5%"><a class="th" href="{U_SORT_EXTENSION}">{L_EXTENSION}</a></th>
- <th nowrap="nowrap" width="5%"><a class="th" href="{U_SORT_FILESIZE}">{L_FILESIZE}</a></th>
- <th nowrap="nowrap" width="5%"><a class="th" href="{U_SORT_DOWNLOADS}">{L_DOWNLOADS}</a></th>
- <th nowrap="nowrap" width="5%"><a class="th" href="{U_SORT_POST_TIME}">{L_POST_TIME}</a></th>
- <th nowrap="nowrap" width="15%"><a class="th" href="{U_SORT_TOPIC_TITLE}">{L_TOPIC_TITLE}</a></th>
- <th width="2%" nowrap="nowrap">{L_DELETE}</th>
-</tr>
+ <tr>
+ <th nowrap="nowrap">#</th>
+ <th nowrap="nowrap" width="15%"><a class="th" href="{U_SORT_FILENAME}">{L_FILENAME}</a></th>
+ <th nowrap="nowrap" width="5%"><a class="th" href="{U_SORT_POST_TIME}">{L_POST_TIME}</a></th>
+ <!-- th nowrap="nowrap" width="25%"><a class="th" href="{U_SORT_FILE_COMMENT}">{L_FILE_COMMENT}</a></th -->
+ <th nowrap="nowrap" width="5%"><a class="th" href="{U_SORT_FILESIZE}">{L_FILESIZE}</a></th>
+ <th nowrap="nowrap" width="5%"><a class="th" href="{U_SORT_DOWNLOADS}">{L_DOWNLOADS}</a></th>
+ <th width="2%" nowrap="nowrap">{L_DELETE}</th>
+ </tr>
<!-- BEGIN attachrow -->
@@ -36,31 +34,33 @@
<!-- ENDIF -->
<td class="gen" align="center" width="2%">&nbsp;{attachrow.ROW_NUMBER}&nbsp;</td>
- <td class="gen" align="center"><a href="{attachrow.U_VIEW_ATTACHMENT}" target="file">{attachrow.FILENAME}</a></td>
- <td class="gen" align="center">{attachrow.COMMENT}</td>
- <td class="gen" align="center">{attachrow.EXTENSION}</td>
+ <td><a class="gen" href="{attachrow.U_VIEW_ATTACHMENT}" target="file">{attachrow.FILENAME}</a><br /><span class="gensmall">{L_TOPIC}: <a href="{attachrow.U_VIEW_TOPIC}">{attachrow.TOPIC_TITLE}</a></span></td>
+ <td class="gensmall" align="center" valign="middle" nowrap="nowrap">&nbsp;{attachrow.POST_TIME}&nbsp;</td>
+ <!-- td class="gen" align="center">{attachrow.COMMENT}</td -->
<td class="gen" align="center" valign="middle" nowrap="nowrap">{attachrow.SIZE}</td>
<td class="gen" align="center">{attachrow.DOWNLOAD_COUNT}</td>
- <td class="gensmall" align="center" valign="middle" nowrap="nowrap">&nbsp;{attachrow.POST_TIME}&nbsp;</td>
- <td class="gen" align="center">{attachrow.TOPIC_TITLE}</td>
<td align="center" valign="middle"><input type="checkbox" name="attachment[{attachrow.ATTACH_ID}]" value="1" /></td>
</tr>
<!-- END attachrow -->
-<tr>
- <td class="cat" colspan="7" height="28"><div align="center"><span class="gen">{L_SORT_BY}: </span><select name="sk">{S_SORT_OPTIONS}</select> <select name="sd">{S_ORDER_SELECT}</select>&nbsp;<input type="submit" name="sort" value="{L_SORT}" class="btnlite" /></div></td>
- <td class="cat" colspan="2" height="28" align="right"><input type="submit" name="delete" value="{L_DELETE_MARKED}" class="btnlite" /></td>
-</tr>
+ <tr>
+ <td class="cat" colspan="6"><table width="100%" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td width="100%" align="center"><span class="gensmall">{L_SORT_BY}: </span><select name="sk">{S_SORT_OPTIONS}</select> <select name="sd">{S_ORDER_SELECT}</select>&nbsp;<input class="btnlite" type="submit" name="sort" value="{L_SORT}" /></td>
+ <td align="right"><input class="btnlite" type="submit" name="delete" value="{L_DELETE_MARKED}" /></td>
+ </tr>
+ </table></td>
+ </tr>
</table>
<!-- ELSE -->
<table class="tablebg" width="80%" cellspacing="1" cellpadding="4" border="0" align="right">
-<tr>
- <th>{L_UCP_NO_ATTACHMENTS}</th>
-</tr>
+ <tr>
+ <th>{L_UCP_NO_ATTACHMENTS}</th>
+ </tr>
</table>
<!-- ENDIF -->
-<!-- INCLUDE ucp_footer.html -->
+<!-- INCLUDE ucp_footer.html --> \ No newline at end of file