aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorCesar G <prototech91@gmail.com>2013-10-11 18:48:09 -0700
committerCesar G <prototech91@gmail.com>2013-12-06 00:56:24 -0800
commite110d591a93b518edca00f01823d62c4d1a0ca91 (patch)
tree992f00a724cf8ba7ab001a1519824c89cbfbe80c /phpBB
parent4b0410a9d9ab9a405722f0d14d659ab3b7096f11 (diff)
downloadforums-e110d591a93b518edca00f01823d62c4d1a0ca91.tar
forums-e110d591a93b518edca00f01823d62c4d1a0ca91.tar.gz
forums-e110d591a93b518edca00f01823d62c4d1a0ca91.tar.bz2
forums-e110d591a93b518edca00f01823d62c4d1a0ca91.tar.xz
forums-e110d591a93b518edca00f01823d62c4d1a0ca91.zip
[ticket/11241] Consolidate topic actions into "Topic tools" dropdown.
PHPBB3-11241
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/functions_display.php2
-rw-r--r--phpBB/language/en/viewtopic.php1
-rw-r--r--phpBB/styles/prosilver/template/overall_footer.html3
-rw-r--r--phpBB/styles/prosilver/template/viewtopic_body.html51
-rw-r--r--phpBB/viewtopic.php9
5 files changed, 49 insertions, 17 deletions
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index 5592aa89ba..0ff842ea6a 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -1464,6 +1464,8 @@ function phpbb_gen_download_links($param_key, $param_val, $phpbb_root_path, $php
}
$methods = compress::methods();
+ // Sort by preferred type.
+ $methods = array_intersect(array('.zip', '.tar.bz2', '.tar.gz', '.tar'), $methods);
$links = array();
foreach ($methods as $method)
diff --git a/phpBB/language/en/viewtopic.php b/phpBB/language/en/viewtopic.php
index 6f318c39f1..424cb9da3e 100644
--- a/phpBB/language/en/viewtopic.php
+++ b/phpBB/language/en/viewtopic.php
@@ -104,6 +104,7 @@ $lang = array_merge($lang, array(
'SUBMIT_VOTE' => 'Submit vote',
+ 'TOPIC_TOOLS' => 'Topic tools',
'TOTAL_VOTES' => 'Total votes',
'UNLOCK_TOPIC' => 'Unlock topic',
diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html
index 6f297660a2..bbffe8dc3d 100644
--- a/phpBB/styles/prosilver/template/overall_footer.html
+++ b/phpBB/styles/prosilver/template/overall_footer.html
@@ -12,9 +12,6 @@
</li>
<!-- IF not S_IS_BOT -->
<!-- IF U_WATCH_FORUM_LINK --><li class="small-icon icon-<!-- IF S_WATCHING_FORUM -->unsubscribe<!-- ELSE -->subscribe<!-- ENDIF -->"><a href="{U_WATCH_FORUM_LINK}" title="{S_WATCH_FORUM_TITLE}" data-ajax="toggle_link" data-toggle-class="small-icon icon-<!-- IF not S_WATCHING_FORUM -->unsubscribe<!-- ELSE -->subscribe<!-- ENDIF -->" data-toggle-text="{S_WATCH_FORUM_TOGGLE}" data-toggle-url="{U_WATCH_FORUM_TOGGLE}">{S_WATCH_FORUM_TITLE}</a></li><!-- ENDIF -->
- <!-- IF U_WATCH_TOPIC --><li class="small-icon icon-<!-- IF S_WATCHING_TOPIC -->unsubscribe<!-- ELSE -->subscribe<!-- ENDIF -->"><a href="{U_WATCH_TOPIC}" title="{S_WATCH_TOPIC_TITLE}" data-ajax="toggle_link" data-toggle-class="small-icon icon-<!-- IF not S_WATCHING_TOPIC -->unsubscribe<!-- ELSE -->subscribe<!-- ENDIF -->" data-toggle-text="{S_WATCH_TOPIC_TOGGLE}" data-toggle-url="{U_WATCH_TOPIC_TOGGLE}">{S_WATCH_TOPIC_TITLE}</a></li><!-- ENDIF -->
- <!-- IF U_BOOKMARK_TOPIC --><li class="small-icon icon-bookmark"><a href="{U_BOOKMARK_TOPIC}" title="{L_BOOKMARK_TOPIC}" data-ajax="alt_text" data-alt-text="{S_BOOKMARK_TOGGLE}">{S_BOOKMARK_TOPIC}</a></li><!-- ENDIF -->
- <!-- IF U_BUMP_TOPIC --><li class="small-icon icon-bump"><a href="{U_BUMP_TOPIC}" title="{L_BUMP_TOPIC}" data-ajax="true">{L_BUMP_TOPIC}</a></li><!-- ENDIF -->
<!-- ENDIF -->
<li class="rightside">{S_TIMEZONE}</li>
<!-- IF not S_IS_BOT --><li class="rightside"><a href="{U_DELETE_COOKIES}" data-ajax="true" data-refresh="true">{L_DELETE_COOKIES}</a></li><!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html
index 46881d3b03..b4d6a67712 100644
--- a/phpBB/styles/prosilver/template/viewtopic_body.html
+++ b/phpBB/styles/prosilver/template/viewtopic_body.html
@@ -33,6 +33,46 @@
<!-- ENDIF -->
</div>
+ {% block topic_tools %}
+ <!-- IF not S_IS_BOT and (U_WATCH_TOPIC or U_BOOKMARK_TOPIC or U_BUMP_TOPIC or S_HAS_ATTACHMENTS) -->
+ <div class="dropdown-container dropdown-button-control topic-tools">
+ <span title="{L_TOPIC_TOOLS}" class="dropdown-trigger dropdown-select dropdown-select-icon tools-icon"><span></span></span>
+ <div class="dropdown hidden">
+ <div class="pointer"><div class="pointer-inner"></div></div>
+ <ul class="dropdown-contents">
+ <!-- IF U_WATCH_TOPIC -->
+ <li class="small-icon <!-- IF S_WATCHING_TOPIC -->icon-unsubscribe<!-- ELSE -->icon-subscribe<!-- ENDIF -->">
+ <a href="{U_WATCH_TOPIC}" title="{S_WATCH_TOPIC_TITLE}" data-ajax="toggle_link" data-toggle-class="small-icon <!-- IF not S_WATCHING_TOPIC -->icon-unsubscribe<!-- ELSE -->icon-subscribe<!-- ENDIF -->" data-toggle-text="{S_WATCH_TOPIC_TOGGLE}" data-toggle-url="{U_WATCH_TOPIC_TOGGLE}">
+ {S_WATCH_TOPIC_TITLE}
+ </a>
+ </li>
+ <!-- ENDIF -->
+ <!-- IF U_BOOKMARK_TOPIC -->
+ <li class="small-icon icon-bookmark">
+ <a href="{U_BOOKMARK_TOPIC}" title="{L_BOOKMARK_TOPIC}" data-ajax="alt_text" data-alt-text="{S_BOOKMARK_TOGGLE}">
+ {S_BOOKMARK_TOPIC}
+ </a>
+ </li>
+ <!-- ENDIF -->
+ <!-- IF U_BUMP_TOPIC --><li class="small-icon icon-bump"><a href="{U_BUMP_TOPIC}" title="{L_BUMP_TOPIC}" data-ajax="true">{L_BUMP_TOPIC}</a></li><!-- ENDIF -->
+ <!-- IF S_HAS_ATTACHMENTS -->
+ <li class="small-icon icon-download">
+ <a class="dropdown-toggle-submenu" href="{U_DOWNLOAD_ALL_ATTACHMENTS}" title="{L_DOWNLOAD_ALL_ATTACHMENTS}">{L_DOWNLOAD_ALL_ATTACHMENTS}</a>
+ <ul class="dropdown-submenu hidden">
+ <li>
+ <!-- BEGIN dl_method -->
+ <a href="{dl_method.LINK}">{dl_method.TYPE}</a><!-- IF not dl_method.S_LAST_ROW --> &bull; <!-- ENDIF -->
+ <!-- END dl_method -->
+ </li>
+ </ul>
+ </li>
+ <!-- ENDIF -->
+ </ul>
+ </div>
+ </div>
+ <!-- ENDIF -->
+ {% endblock %}
+
<!-- IF S_DISPLAY_SEARCHBOX -->
<div class="search-box">
<form method="get" id="topic-search" action="{S_SEARCHBOX_ACTION}">
@@ -299,16 +339,7 @@
<!-- ENDIF -->
</div>
- <!-- IF S_HAS_ATTACHMENTS -->
- <div class="dl_links">
- <strong>{L_DOWNLOAD_ALL_ATTACHMENTS}{L_COLON}</strong>
- <ul>
- <!-- BEGIN dl_method -->
- <li>[ <a href="{dl_method.LINK}">{dl_method.TYPE}</a> ]</li>
- <!-- END dl_method -->
- </ul>
- </div>
- <!-- ENDIF -->
+ {{ block('topic_tools') }}
<!-- IF .pagination or TOTAL_POSTS -->
<div class="pagination">
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 3735bca83d..dd4f7e1b19 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -1384,16 +1384,17 @@ if (sizeof($attach_list))
}
}
-$template->assign_vars(array(
- 'S_HAS_ATTACHMENTS' => $topic_data['topic_attachment'],
-));
-
$methods = phpbb_gen_download_links('topic_id', $topic_id, $phpbb_root_path, $phpEx);
foreach ($methods as $method)
{
$template->assign_block_vars('dl_method', $method);
}
+$template->assign_vars(array(
+ 'S_HAS_ATTACHMENTS' => $topic_data['topic_attachment'],
+ 'U_DOWNLOAD_ALL_ATTACHMENTS' => $methods[0]['LINK'],
+));
+
// Instantiate BBCode if need be
if ($bbcode_bitfield !== '')
{