mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-20 02:08:51 +00:00
The Topic Tools menu appears at the top of a topic page and again at the bottom of a topic page. When you use the Topic Tools menu to Bookmark or Subscribe to a Topic, the menu item you chose is updated to reflect that, by switching to say Unsubscribe topic or Remove from Bookmarks. However, this change is not mirrored in the other Topic Tools menu at the other location on the page. Both Topic Tools menus should be updated during the AJAX event, so that they always show the same options to the user. It is solved by creating a data-update-all attribute which contains all the class/ID that will update when topic tool is clicked PHPBB3-12355
39 lines
2.1 KiB
HTML
39 lines
2.1 KiB
HTML
<!-- IF not S_IS_BOT and (U_WATCH_TOPIC or U_BOOKMARK_TOPIC or U_BUMP_TOPIC or S_HAS_ATTACHMENTS or S_DISPLAY_TOPIC_TOOLS) -->
|
|
<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">
|
|
<!-- EVENT viewtopic_topic_tools_before -->
|
|
<!-- IF U_WATCH_TOPIC -->
|
|
<li class="small-icon icon-<!-- IF S_WATCHING_TOPIC -->unsubscribe<!-- ELSE -->subscribe<!-- ENDIF -->">
|
|
<a href="{U_WATCH_TOPIC}" class="watch-topic-link" 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}" data-update-all=".watch-topic-link">
|
|
{S_WATCH_TOPIC_TITLE}
|
|
</a>
|
|
</li>
|
|
<!-- ENDIF -->
|
|
<!-- IF U_BOOKMARK_TOPIC -->
|
|
<li class="small-icon icon-bookmark">
|
|
<a href="{U_BOOKMARK_TOPIC}" class="bookmark-link" title="{L_BOOKMARK_TOPIC}" data-ajax="alt_text" data-alt-text="{S_BOOKMARK_TOGGLE}" data-update-all=".bookmark-link">
|
|
{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 --> • <!-- ENDIF -->
|
|
<!-- END dl_method -->
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<!-- ENDIF -->
|
|
<!-- EVENT viewtopic_topic_tools_after -->
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- ENDIF -->
|