[ticket/12649] Change sort & display options in footers to dropdown menu

PHPBB3-12649
This commit is contained in:
Richard McGirr 2015-11-01 06:51:03 -05:00
parent 6a7567459d
commit 5d7f67105b
17 changed files with 91 additions and 128 deletions

View file

@ -693,8 +693,10 @@ $lang = array_merge($lang, array(
'SORRY_AUTH_READ' => 'You are not authorised to read this forum.', 'SORRY_AUTH_READ' => 'You are not authorised to read this forum.',
'SORRY_AUTH_VIEW_ATTACH' => 'You are not authorised to download this attachment.', 'SORRY_AUTH_VIEW_ATTACH' => 'You are not authorised to download this attachment.',
'SORT_BY' => 'Sort by', 'SORT_BY' => 'Sort by',
'SORT_DIRECTION' => 'Direction',
'SORT_JOINED' => 'Joined date', 'SORT_JOINED' => 'Joined date',
'SORT_LOCATION' => 'Location', 'SORT_LOCATION' => 'Location',
'SORT_OPTIONS' => 'Display and sorting options',
'SORT_RANK' => 'Rank', 'SORT_RANK' => 'Rank',
'SORT_POSTS' => 'Posts', 'SORT_POSTS' => 'Posts',
'SORT_TOPIC_TITLE' => 'Topic title', 'SORT_TOPIC_TITLE' => 'Topic title',

View file

@ -0,0 +1,24 @@
<div class="dropdown-container dropdown-container-{S_CONTENT_FLOW_BEGIN} dropdown-button-control sort-tools">
<span title="{L_SORT_OPTIONS}" class="button icon-button sort-icon dropdown-trigger dropdown-select"></span>
<div class="dropdown hidden">
<div class="pointer"><div class="pointer-inner"></div></div>
<div class="dropdown-contents">
<fieldset class="display-options">
<!-- IF S_SORT_OPTIONS -->
<label>{L_SORT_BY}{L_COLON} <select name="sk" id="sk">{S_SORT_OPTIONS}</select></label>
<label>{L_SORT_DIRECTION}{L_COLON} <select name="sd" id="sd">{S_ORDER_SELECT}</select></label>
<hr class="dashed" />
<input type="submit" class="button2" name="sort" value="{L_SORT}" />
<!-- ELSE -->
<label>{L_DISPLAY}{L_COLON} {S_SELECT_SORT_DAYS}</label>
<!-- IF S_SELECT_SORT_KEY -->
<label>{L_SORT_BY}{L_COLON} {S_SELECT_SORT_KEY}</label>
<label>{L_SORT_DIRECTION}{L_COLON} {S_SELECT_SORT_DIR}</label>
<!-- ENDIF -->
<hr class="dashed" />
<input type="submit" class="button2" name="sort" value="{L_GO}" />
<!-- ENDIF -->
</fieldset>
</div>
</div>
</div>

View file

@ -97,16 +97,9 @@
</ul> </ul>
<!-- ENDIF --> <!-- ENDIF -->
<fieldset class="display-options">
<label>{L_DISPLAY_TOPICS}{L_COLON} {S_SELECT_SORT_DAYS}</label>
<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label>
<label>{S_SELECT_SORT_DIR}</label>
<input type="submit" name="sort" value="{L_GO}" class="button2" />
</fieldset>
<hr />
<div class="action-bar bottom"> <div class="action-bar bottom">
<!-- INCLUDE display_options.html -->
<div class="pagination"> <div class="pagination">
{TOTAL_TOPICS} {TOTAL_TOPICS}
<!-- IF .pagination --> <!-- IF .pagination -->

View file

@ -51,16 +51,9 @@
</table> </table>
<!-- IF .log --> <!-- IF .log -->
<fieldset class="display-options">
<label>{L_DISPLAY_POSTS}{L_COLON} {S_SELECT_SORT_DAYS}</label>
<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label>
<label>{S_SELECT_SORT_DIR}</label>
<input type="submit" name="sort" value="{L_GO}" class="button2" />
</fieldset>
<hr />
<div class="action-bar bottom"> <div class="action-bar bottom">
<!-- INCLUDE display_options.html -->
<div class="pagination"> <div class="pagination">
{TOTAL} {TOTAL}
<!-- IF .pagination --> <!-- IF .pagination -->

View file

@ -90,17 +90,9 @@
</tbody> </tbody>
</table> </table>
<hr />
<fieldset class="display-options">
<label>{L_DISPLAY_LOG}{L_COLON} {S_SELECT_SORT_DAYS}</label>
<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label><label>{S_SELECT_SORT_DIR}</label>
<input type="submit" name="sort" value="{L_GO}" class="button2" />
</fieldset>
<hr />
<div class="action-bar bottom"> <div class="action-bar bottom">
<!-- INCLUDE display_options.html -->
<div class="pagination"> <div class="pagination">
{TOTAL_REPORTS} {TOTAL_REPORTS}
<!-- IF .pagination --> <!-- IF .pagination -->

View file

@ -73,16 +73,10 @@
<!-- END postrow --> <!-- END postrow -->
</ul> </ul>
<fieldset class="display-options">
<label>{L_DISPLAY_POSTS}{L_COLON} {S_SELECT_SORT_DAYS}</label>
<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label><label>{S_SELECT_SORT_DIR}</label>
<!-- IF TOPIC_ID --><label><input type="checkbox" class="radio" name="t" value="{TOPIC_ID}" checked="checked" />&nbsp; <strong>{L_ONLY_TOPIC}</strong></label><!-- ENDIF -->
<input type="submit" name="sort" value="{L_GO}" class="button2" />
</fieldset>
<hr />
<div class="action-bar bottom"> <div class="action-bar bottom">
<!-- INCLUDE display_options.html -->
<!-- IF TOPIC_ID --><label><input type="checkbox" class="radio" name="t" value="{TOPIC_ID}" checked="checked" onClick="document.getElementById('mcp').submit()" /> <strong>{L_ONLY_TOPIC}</strong></label><!-- ENDIF -->
<div class="pagination"> <div class="pagination">
{TOTAL} {TOTAL}
<!-- IF .pagination --> <!-- IF .pagination -->

View file

@ -79,16 +79,10 @@
<!-- END postrow --> <!-- END postrow -->
</ul> </ul>
<fieldset class="display-options">
<label>{L_DISPLAY_POSTS}{L_COLON} {S_SELECT_SORT_DAYS}</label>
<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label><label>{S_SELECT_SORT_DIR}</label>
<!-- IF TOPIC_ID --><label><input type="checkbox" class="radio" name="t" value="{TOPIC_ID}" checked="checked" />&nbsp; <strong>{L_ONLY_TOPIC}</strong></label><!-- ENDIF -->
<input type="submit" name="sort" value="{L_GO}" class="button2" />
</fieldset>
<hr />
<div class="action-bar bottom"> <div class="action-bar bottom">
<!-- INCLUDE display_options.html -->
<!-- IF TOPIC_ID --><label><input type="checkbox" class="radio" name="t" value="{TOPIC_ID}" checked="checked" onClick="document.getElementById('mcp').submit()" /> <strong>{L_ONLY_TOPIC}</strong></label><!-- ENDIF -->
<div class="pagination"> <div class="pagination">
{TOTAL_REPORTS} {TOTAL_REPORTS}
<!-- IF .pagination --> <!-- IF .pagination -->

View file

@ -43,15 +43,9 @@
</tbody> </tbody>
</table> </table>
<fieldset class="display-options">
<label>{L_DISPLAY_POSTS}{L_COLON} {S_SELECT_SORT_DAYS}</label>
<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label><label>{S_SELECT_SORT_DIR}</label>
<input type="submit" name="sort" value="{L_GO}" class="button2" />
</fieldset>
<hr />
<div class="action-bar bottom"> <div class="action-bar bottom">
<!-- INCLUDE display_options.html -->
<div class="pagination"> <div class="pagination">
{TOTAL_USERS} {TOTAL_USERS}
<!-- IF .pagination --> <!-- IF .pagination -->

View file

@ -165,24 +165,13 @@
<!-- END searchresults --> <!-- END searchresults -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF .pagination or .searchresults or S_SELECT_SORT_KEY or S_SELECT_SORT_DAYS -->
<form method="post" action="{S_SEARCH_ACTION}">
<fieldset class="display-options">
<!-- IF S_SELECT_SORT_DAYS or S_SELECT_SORT_KEY -->
<label><!-- IF S_SHOW_TOPICS -->{L_DISPLAY_POSTS}<!-- ELSE -->{L_SORT_BY}</label><label><!-- ENDIF --> {S_SELECT_SORT_DAYS}<!-- IF S_SELECT_SORT_KEY --></label> <label>{S_SELECT_SORT_KEY}</label>
<label>{S_SELECT_SORT_DIR}<!-- ENDIF --></label>
<input type="submit" name="sort" value="{L_GO}" class="button2" />
<!-- ENDIF -->
</fieldset>
</form>
<hr />
<!-- ENDIF -->
<!-- IF .pagination or .searchresults or PAGE_NUMBER -->
<div class="action-bar bottom"> <div class="action-bar bottom">
<!-- IF .searchresults and (S_SELECT_SORT_DAYS or S_SELECT_SORT_KEY) -->
<form method="post" action="{S_SEARCH_ACTION}">
<!-- INCLUDE display_options.html -->
</form>
<!-- ENDIF -->
<div class="pagination"> <div class="pagination">
{SEARCH_MATCHES} {SEARCH_MATCHES}
<!-- IF .pagination --> <!-- IF .pagination -->
@ -192,7 +181,6 @@
<!-- ENDIF --> <!-- ENDIF -->
</div> </div>
</div> </div>
<!-- ENDIF -->
<!-- INCLUDE jumpbox.html --> <!-- INCLUDE jumpbox.html -->

View file

@ -50,16 +50,10 @@
<!-- END attachrow --> <!-- END attachrow -->
</ul> </ul>
<fieldset class="display-options">
<label for="sk">{L_SORT_BY}{L_COLON} <select name="sk" id="sk">{S_SORT_OPTIONS}</select></label>
<label><select name="sd" id="sd">{S_ORDER_SELECT}</select></label>
<input class="button2" type="submit" name="sort" value="{L_SORT}" />
{S_FORM_TOKEN}
</fieldset>
<hr />
<div class="action-bar bottom"> <div class="action-bar bottom">
<!-- INCLUDE display_options.html -->
{S_FORM_TOKEN}
<div class="pagination"> <div class="pagination">
{TOTAL_ATTACHMENTS} {L_TITLE} {TOTAL_ATTACHMENTS} {L_TITLE}
<!-- IF .pagination --> <!-- IF .pagination -->

View file

@ -105,6 +105,9 @@
<hr /> <hr />
<div class="action-bar bottom"> <div class="action-bar bottom">
<!-- INCLUDE display_options.html -->
<input type="hidden" name="cur_folder_id" value="{CUR_FOLDER_ID}" />
<div class="pagination"> <div class="pagination">
{TOTAL_MESSAGES} {TOTAL_MESSAGES}
<!-- IF .pagination --> <!-- IF .pagination -->
@ -119,16 +122,6 @@
</div> </div>
</div> </div>
<!-- IF FOLDER_CUR_MESSAGES neq 0 -->
<fieldset class="display-options">
<label>{L_DISPLAY}{L_COLON} {S_SELECT_SORT_DAYS}</label>
<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label>
<label>{S_SELECT_SORT_DIR}</label>
<input type="submit" name="sort" value="{L_GO}" class="button2" />
<input type="hidden" name="cur_folder_id" value="{CUR_FOLDER_ID}" />
</fieldset>
<!-- ENDIF -->
<!-- INCLUDE ucp_pm_message_footer.html --> <!-- INCLUDE ucp_pm_message_footer.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- INCLUDE ucp_footer.html --> <!-- INCLUDE ucp_footer.html -->

View file

@ -217,20 +217,6 @@
<!-- ENDIF --> <!-- ENDIF -->
<!-- END topicrow --> <!-- END topicrow -->
<!-- IF S_SELECT_SORT_DAYS and not S_DISPLAY_ACTIVE -->
<form method="post" action="{S_FORUM_ACTION}">
<fieldset class="display-options">
<!-- IF not S_IS_BOT -->
<label>{L_DISPLAY_TOPICS}{L_COLON} {S_SELECT_SORT_DAYS}</label>
<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label>
<label>{S_SELECT_SORT_DIR}</label>
<input type="submit" name="sort" value="{L_GO}" class="button2" />
<!-- ENDIF -->
</fieldset>
</form>
<hr />
<!-- ENDIF -->
<!-- IF .topicrow and not S_DISPLAY_ACTIVE --> <!-- IF .topicrow and not S_DISPLAY_ACTIVE -->
<div class="action-bar bottom"> <div class="action-bar bottom">
<!-- IF not S_IS_BOT and S_DISPLAY_POST_INFO --> <!-- IF not S_IS_BOT and S_DISPLAY_POST_INFO -->
@ -245,6 +231,12 @@
</div> </div>
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_SELECT_SORT_DAYS and not S_IS_BOT -->
<form method="post" action="{S_FORUM_ACTION}">
<!-- INCLUDE display_options.html -->
</form>
<!-- ENDIF -->
<div class="pagination"> <div class="pagination">
<!-- IF not S_IS_BOT and U_MARK_TOPICS and .topicrow --><a href="{U_MARK_TOPICS}" data-ajax="mark_topics_read">{L_MARK_TOPICS_READ}</a> &bull; <!-- ENDIF --> <!-- IF not S_IS_BOT and U_MARK_TOPICS and .topicrow --><a href="{U_MARK_TOPICS}" data-ajax="mark_topics_read">{L_MARK_TOPICS_READ}</a> &bull; <!-- ENDIF -->
{TOTAL_TOPICS} {TOTAL_TOPICS}

View file

@ -343,19 +343,6 @@
<!-- INCLUDE quickreply_editor.html --> <!-- INCLUDE quickreply_editor.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_NUM_POSTS > 1 or .pagination -->
<form id="viewtopic" method="post" action="{S_TOPIC_ACTION}">
<fieldset class="display-options" style="margin-top: 0; ">
<!-- IF not S_IS_BOT -->
<label>{L_DISPLAY_POSTS}{L_COLON} {S_SELECT_SORT_DAYS}</label>
<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label> <label>{S_SELECT_SORT_DIR}</label>
<input type="submit" name="sort" value="{L_GO}" class="button2" />
<!-- ENDIF -->
</fieldset>
</form>
<hr />
<!-- ENDIF -->
<!-- EVENT viewtopic_body_topic_actions_before --> <!-- EVENT viewtopic_body_topic_actions_before -->
<div class="action-bar bottom"> <div class="action-bar bottom">
<div class="buttons"> <div class="buttons">
@ -372,6 +359,12 @@
<!-- INCLUDE viewtopic_topic_tools.html --> <!-- INCLUDE viewtopic_topic_tools.html -->
<!-- IF (S_NUM_POSTS > 1 or .pagination) and not S_IS_BOT -->
<form method="post" action="{S_TOPIC_ACTION}">
<!-- INCLUDE display_options.html -->
</form>
<!-- ENDIF -->
<!-- IF .quickmod --> <!-- IF .quickmod -->
<div class="dropdown-container dropdown-container-{S_CONTENT_FLOW_BEGIN} dropdown-up dropdown-{S_CONTENT_FLOW_END} dropdown-button-control" id="quickmod"> <div class="dropdown-container dropdown-container-{S_CONTENT_FLOW_BEGIN} dropdown-up dropdown-{S_CONTENT_FLOW_END} dropdown-button-control" id="quickmod">
<span title="{L_QUICK_MOD}" class="dropdown-trigger button icon-button modtools-icon dropdown-select">{L_QUICK_MOD}</span> <span title="{L_QUICK_MOD}" class="dropdown-trigger button icon-button modtools-icon dropdown-select">{L_QUICK_MOD}</span>
@ -399,7 +392,6 @@
<!-- ENDIF --> <!-- ENDIF -->
</div> </div>
<!-- ENDIF --> <!-- ENDIF -->
<div class="clear"></div>
</div> </div>
<!-- EVENT viewtopic_body_footer_before --> <!-- EVENT viewtopic_body_footer_before -->

View file

@ -88,10 +88,6 @@
/* Dropdown menu /* Dropdown menu
---------------------------------------- */ ---------------------------------------- */
.rtl .dropdown-container.topic-tools {
float: right;
}
.rtl .dropdown li { .rtl .dropdown li {
text-align: right; text-align: right;
} }
@ -910,6 +906,10 @@ li.breadcrumbs span:first-child > a {
padding-right: 0; padding-right: 0;
} }
.rtl .dropdown fieldset.display-options label {
text-align: left;
}
/* Display actions for ucp and mcp pages */ /* Display actions for ucp and mcp pages */
.rtl fieldset.display-actions { .rtl fieldset.display-actions {
text-align: left; text-align: left;

View file

@ -82,7 +82,7 @@
font-size: 0; font-size: 0;
} }
.tools-icon:before, .modtools-icon:before, .search-icon:before, .search-adv-icon:before { .tools-icon:before, .modtools-icon:before, .search-icon:before, .search-adv-icon:before, .sort-icon:before {
background-position: -80px 0; background-position: -80px 0;
height: 16px; height: 16px;
margin-top: 2px; margin-top: 2px;
@ -92,6 +92,10 @@
.dropdown-visible .tools-icon:before, .dropdown-visible .tools-icon:before,
.nojs .dropdown-container:hover .tools-icon:before { background-position: -80px -20px; } .nojs .dropdown-container:hover .tools-icon:before { background-position: -80px -20px; }
.sort-icon:before { background-position: -265px 0; }
.dropdown-visible .sort-icon:before,
.nojs .dropdown-container:hover .sort-icon:before { background-position: -265px -20px; }
.search-icon:before { background-position: -245px 0; } .search-icon:before { background-position: -245px 0; }
.search-icon:hover:before { background-position: -245px -20px; } .search-icon:hover:before { background-position: -245px -20px; }

View file

@ -455,10 +455,6 @@ ul.linklist.bulletin > li.no-bulletin:before {
top: auto; top: auto;
} }
.dropdown-container.topic-tools {
float: left;
}
.dropdown-up .dropdown { .dropdown-up .dropdown {
top: auto; top: auto;
bottom: 1.2em; bottom: 1.2em;

View file

@ -177,6 +177,24 @@ fieldset.display-options a {
margin-top: 3px; margin-top: 3px;
} }
.dropdown fieldset.display-options {
font-size: 1em;
margin: 0;
padding: 0;
}
.dropdown fieldset.display-options label {
display: block;
margin: 4px;
padding: 0;
text-align: right;
white-space: nowrap;
}
.dropdown fieldset.display-options select {
min-width: 120px;
}
/* Display actions for ucp and mcp pages */ /* Display actions for ucp and mcp pages */
fieldset.display-actions { fieldset.display-actions {
text-align: right; text-align: right;