From 922147f05a75d5a0e00b34f0102bc014583df984 Mon Sep 17 00:00:00 2001 From: Drae Date: Wed, 4 Jul 2012 23:19:59 +0100 Subject: [ticket/10968] Render pagination within the template Since phpBB 2 pagination has been rendered mostly within the source. This limits just what designers can do with pagination. The current form is also questionable in terms of "best practice". The aim is to move rendering completely to the template via the use of a block element. Enabling S_ template vars also allows for control over specific aspects of the pagination output such as next, previous, active and ellipsis. Related to this - merging the capabilities of the topic_generate_pagination with generate_pagination removes an element of duplication. PHPBB3-10968 --- phpBB/styles/prosilver/template/mcp_forum.html | 61 +++++++++++++++++--- phpBB/styles/prosilver/template/mcp_logs.html | 42 ++++++++++++-- .../styles/prosilver/template/mcp_notes_user.html | 42 ++++++++++++-- phpBB/styles/prosilver/template/mcp_queue.html | 42 ++++++++++++-- phpBB/styles/prosilver/template/mcp_reports.html | 42 ++++++++++++-- phpBB/styles/prosilver/template/mcp_topic.html | 23 +++++++- phpBB/styles/prosilver/template/mcp_warn_list.html | 42 ++++++++++++-- .../styles/prosilver/template/memberlist_body.html | 44 +++++++++++++- .../styles/prosilver/template/posting_smilies.html | 19 +++++- .../styles/prosilver/template/search_results.html | 63 ++++++++++++++++++-- .../styles/prosilver/template/ucp_attachments.html | 42 ++++++++++++-- .../prosilver/template/ucp_groups_manage.html | 19 +++++- .../prosilver/template/ucp_main_bookmarks.html | 36 +++++++++++- .../styles/prosilver/template/ucp_main_front.html | 15 ++++- .../prosilver/template/ucp_main_subscribed.html | 36 +++++++++++- .../prosilver/template/ucp_pm_message_header.html | 21 ++++++- .../prosilver/template/ucp_pm_viewfolder.html | 21 ++++++- .../styles/prosilver/template/viewforum_body.html | 67 ++++++++++++++++++---- .../styles/prosilver/template/viewonline_body.html | 42 +++++++++++++- .../styles/prosilver/template/viewtopic_body.html | 40 +++++++++++-- phpBB/styles/prosilver/theme/colours.css | 23 +++++--- phpBB/styles/prosilver/theme/common.css | 39 ++++++------- phpBB/styles/prosilver/theme/content.css | 4 +- phpBB/styles/subsilver2/template/pagination.html | 12 +++- .../subsilver2/template/posting_smilies.html | 15 ++++- .../styles/subsilver2/template/search_results.html | 13 ++++- .../subsilver2/template/ucp_main_bookmarks.html | 13 ++++- .../subsilver2/template/ucp_main_subscribed.html | 13 ++++- .../styles/subsilver2/template/viewforum_body.html | 26 +++++++-- .../subsilver2/template/viewonline_body.html | 4 +- 30 files changed, 799 insertions(+), 122 deletions(-) (limited to 'phpBB/styles') diff --git a/phpBB/styles/prosilver/template/mcp_forum.html b/phpBB/styles/prosilver/template/mcp_forum.html index afd4f2308a..a31e0fc74a 100644 --- a/phpBB/styles/prosilver/template/mcp_forum.html +++ b/phpBB/styles/prosilver/template/mcp_forum.html @@ -10,11 +10,28 @@
- + @@ -42,7 +59,20 @@ {REPORTED_IMG}  [ {L_DELETE_SHADOW_TOPIC} ]
- {topicrow.PAGINATION} + + + {topicrow.ATTACH_ICON_IMG} {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} » {topicrow.FIRST_POST_TIME}
{topicrow.REPLIES} {L_REPLIES}
{L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL}
{topicrow.LAST_POST_TIME}
@@ -72,11 +102,28 @@
- + diff --git a/phpBB/styles/prosilver/template/mcp_logs.html b/phpBB/styles/prosilver/template/mcp_logs.html index b5561687b2..af101f8d24 100644 --- a/phpBB/styles/prosilver/template/mcp_logs.html +++ b/phpBB/styles/prosilver/template/mcp_logs.html @@ -12,8 +12,25 @@ {L_SEARCH_KEYWORDS}:   @@ -62,8 +79,25 @@ {S_FORM_TOKEN} diff --git a/phpBB/styles/prosilver/template/mcp_notes_user.html b/phpBB/styles/prosilver/template/mcp_notes_user.html index afe904dab3..ea484e5628 100644 --- a/phpBB/styles/prosilver/template/mcp_notes_user.html +++ b/phpBB/styles/prosilver/template/mcp_notes_user.html @@ -55,8 +55,25 @@ {L_SEARCH_KEYWORDS}:   @@ -102,8 +119,25 @@ diff --git a/phpBB/styles/prosilver/template/mcp_queue.html b/phpBB/styles/prosilver/template/mcp_queue.html index e9a477a24c..5dd4308f7a 100644 --- a/phpBB/styles/prosilver/template/mcp_queue.html +++ b/phpBB/styles/prosilver/template/mcp_queue.html @@ -18,8 +18,25 @@
    @@ -73,8 +90,25 @@ diff --git a/phpBB/styles/prosilver/template/mcp_reports.html b/phpBB/styles/prosilver/template/mcp_reports.html index 95e7d9e021..431f50d346 100644 --- a/phpBB/styles/prosilver/template/mcp_reports.html +++ b/phpBB/styles/prosilver/template/mcp_reports.html @@ -20,8 +20,25 @@
      @@ -74,8 +91,25 @@
      diff --git a/phpBB/styles/prosilver/template/mcp_topic.html b/phpBB/styles/prosilver/template/mcp_topic.html index 8d0294d226..2a7b749027 100644 --- a/phpBB/styles/prosilver/template/mcp_topic.html +++ b/phpBB/styles/prosilver/template/mcp_topic.html @@ -139,11 +139,28 @@ onload_functions.push('subPanels()');
      - + diff --git a/phpBB/styles/prosilver/template/mcp_warn_list.html b/phpBB/styles/prosilver/template/mcp_warn_list.html index e4f82bbe67..27adcf40e3 100644 --- a/phpBB/styles/prosilver/template/mcp_warn_list.html +++ b/phpBB/styles/prosilver/template/mcp_warn_list.html @@ -12,8 +12,25 @@ @@ -48,8 +65,25 @@ diff --git a/phpBB/styles/prosilver/template/memberlist_body.html b/phpBB/styles/prosilver/template/memberlist_body.html index d5154761e9..bb3ce814d3 100644 --- a/phpBB/styles/prosilver/template/memberlist_body.html +++ b/phpBB/styles/prosilver/template/memberlist_body.html @@ -41,8 +41,26 @@
    @@ -150,7 +168,27 @@
    diff --git a/phpBB/styles/prosilver/template/posting_smilies.html b/phpBB/styles/prosilver/template/posting_smilies.html index d3d6293586..097d08244d 100644 --- a/phpBB/styles/prosilver/template/posting_smilies.html +++ b/phpBB/styles/prosilver/template/posting_smilies.html @@ -17,7 +17,24 @@
-
{PAGINATION}
+ {L_CLOSE_WINDOW} diff --git a/phpBB/styles/prosilver/template/search_results.html b/phpBB/styles/prosilver/template/search_results.html index 0a58605b31..7b4ecaab72 100644 --- a/phpBB/styles/prosilver/template/search_results.html +++ b/phpBB/styles/prosilver/template/search_results.html @@ -11,7 +11,7 @@

{L_RETURN_TO_SEARCH_ADV}

- +
@@ -26,7 +26,26 @@
@@ -59,7 +78,20 @@ {searchresults.TOPIC_TITLE} {searchresults.ATTACH_ICON_IMG} {searchresults.UNAPPROVED_IMG} {REPORTED_IMG}
- {searchresults.PAGINATION} + + + {L_POST_BY_AUTHOR} {searchresults.TOPIC_AUTHOR_FULL} » {searchresults.FIRST_POST_TIME} » {L_IN} {searchresults.FORUM_TITLE}
{searchresults.TOPIC_REPLIES}
@@ -127,7 +159,7 @@ - +
@@ -144,10 +176,29 @@
- + diff --git a/phpBB/styles/prosilver/template/ucp_attachments.html b/phpBB/styles/prosilver/template/ucp_attachments.html index 84e4c2e875..b57376344f 100644 --- a/phpBB/styles/prosilver/template/ucp_attachments.html +++ b/phpBB/styles/prosilver/template/ucp_attachments.html @@ -12,8 +12,25 @@ @@ -55,8 +72,25 @@ diff --git a/phpBB/styles/prosilver/template/ucp_groups_manage.html b/phpBB/styles/prosilver/template/ucp_groups_manage.html index a13c043e48..680d39ea1e 100644 --- a/phpBB/styles/prosilver/template/ucp_groups_manage.html +++ b/phpBB/styles/prosilver/template/ucp_groups_manage.html @@ -159,7 +159,24 @@ diff --git a/phpBB/styles/prosilver/template/ucp_main_bookmarks.html b/phpBB/styles/prosilver/template/ucp_main_bookmarks.html index 89502bbc3d..895fce5e51 100644 --- a/phpBB/styles/prosilver/template/ucp_main_bookmarks.html +++ b/phpBB/styles/prosilver/template/ucp_main_bookmarks.html @@ -36,7 +36,20 @@ {NEWEST_POST_IMG} {topicrow.TOPIC_TITLE} {topicrow.UNAPPROVED_IMG} {REPORTED_IMG}
- {topicrow.PAGINATION} + + + {topicrow.ATTACH_ICON_IMG} {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} » {topicrow.FIRST_POST_TIME}
{L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} @@ -50,8 +63,25 @@ diff --git a/phpBB/styles/prosilver/template/ucp_main_front.html b/phpBB/styles/prosilver/template/ucp_main_front.html index b7a0619227..04767b6c01 100644 --- a/phpBB/styles/prosilver/template/ucp_main_front.html +++ b/phpBB/styles/prosilver/template/ucp_main_front.html @@ -16,7 +16,20 @@
style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"> {NEWEST_POST_IMG} {topicrow.TOPIC_TITLE}
- {topicrow.PAGINATION} + + + {topicrow.ATTACH_ICON_IMG} {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} » {topicrow.FIRST_POST_TIME}
{L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} diff --git a/phpBB/styles/prosilver/template/ucp_main_subscribed.html b/phpBB/styles/prosilver/template/ucp_main_subscribed.html index ab65d9b3ae..0324218149 100644 --- a/phpBB/styles/prosilver/template/ucp_main_subscribed.html +++ b/phpBB/styles/prosilver/template/ucp_main_subscribed.html @@ -56,7 +56,20 @@ {NEWEST_POST_IMG} {topicrow.TOPIC_TITLE} {topicrow.UNAPPROVED_IMG} {REPORTED_IMG}
- {topicrow.PAGINATION} + + + {topicrow.ATTACH_ICON_IMG} {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} » {topicrow.FIRST_POST_TIME}
{L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} @@ -69,8 +82,25 @@ diff --git a/phpBB/styles/prosilver/template/ucp_pm_message_header.html b/phpBB/styles/prosilver/template/ucp_pm_message_header.html index d6659fad0f..9af2bf07a5 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_message_header.html +++ b/phpBB/styles/prosilver/template/ucp_pm_message_header.html @@ -20,8 +20,25 @@ diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html b/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html index 20394b254e..8f969a7018 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html +++ b/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html @@ -103,8 +103,25 @@ diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html index f5ff1d3f98..4e368120b8 100644 --- a/phpBB/styles/prosilver/template/viewforum_body.html +++ b/phpBB/styles/prosilver/template/viewforum_body.html @@ -34,7 +34,7 @@ - +
style="margin-top: 2em;"> @@ -55,11 +55,27 @@
- + @@ -142,7 +158,20 @@ style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;" title="{topicrow.TOPIC_FOLDER_IMG_ALT}">{NEWEST_POST_IMG} {topicrow.TOPIC_TITLE} {topicrow.UNAPPROVED_IMG} {REPORTED_IMG}
- {topicrow.PAGINATION} + + + {topicrow.ATTACH_ICON_IMG} {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} » {topicrow.FIRST_POST_TIME} » {L_IN} {topicrow.FORUM_NAME} @@ -193,13 +222,29 @@ - + diff --git a/phpBB/styles/prosilver/template/viewonline_body.html b/phpBB/styles/prosilver/template/viewonline_body.html index 9da8202783..775f182c07 100644 --- a/phpBB/styles/prosilver/template/viewonline_body.html +++ b/phpBB/styles/prosilver/template/viewonline_body.html @@ -4,7 +4,26 @@

{TOTAL_GUEST_USERS_ONLINE}{L_SWITCH_GUEST_DISPLAY}

@@ -50,7 +69,26 @@

{L_LEGEND}: {LEGEND}

diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html index 1af512732d..29786f7b86 100644 --- a/phpBB/styles/prosilver/template/viewtopic_body.html +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -45,10 +45,24 @@
- + @@ -252,10 +266,24 @@ - + diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css index fe6a7a7fda..29968cbb14 100644 --- a/phpBB/styles/prosilver/theme/colours.css +++ b/phpBB/styles/prosilver/theme/colours.css @@ -145,25 +145,30 @@ dl.details dd { /* Pagination ---------------------------------------- */ -.pagination span strong { - color: #FFFFFF; - background-color: #4692BF; - border-color: #4692BF; -} - -.pagination span a, .pagination span a:link, .pagination span a:visited { +.pagination li a, .pagination li a:link, .pagination li a:visited { color: #5C758C; background-color: #ECEDEE; border-color: #B4BAC0; } -.pagination span a:hover { +.pagination li.ellipsis span { + background-color: transparent; + color: #000 +} + +.pagination li.active span { + color: #FFFFFF; + background-color: #4692BF; + border-color: #4692BF; +} + +.pagination li a:hover, .pagination .active a:hover { border-color: #368AD2; background-color: #368AD2; color: #FFF; } -.pagination span a:active { +.pagination li a:active, .pagination li.active a:active { color: #5C758C; background-color: #ECEDEE; border-color: #B4BAC0; diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css index 3dda343829..d49b54475f 100644 --- a/phpBB/styles/prosilver/theme/common.css +++ b/phpBB/styles/prosilver/theme/common.css @@ -483,6 +483,7 @@ dl.details dd { overflow: hidden; } + /* Pagination ---------------------------------------- */ .pagination { @@ -493,51 +494,43 @@ dl.details dd { float: right; } -.pagination span.page-sep { - display: none; -} - li.pagination { margin-top: 0; } -.pagination strong, .pagination b { - font-weight: normal; +.pagination img { + vertical-align: middle; } -.pagination span strong { - padding: 0 2px; - margin: 0 2px; - font-weight: normal; - border: 1px solid transparent; - font-size: 0.9em; +.pagination ul { + display: inline-block; + *display: inline; /* IE7 inline-block hack */ + *zoom: 1; + margin-left: 0; + margin-bottom: 0; +} + +.pagination ul li, dl .pagination ul li, dl.icon .pagination ul li { + display: inline; + padding: 0; } -.pagination span a, .pagination span a:link, .pagination span a:visited, .pagination span a:active { +.pagination li a, .pagnation li span, li .pagination li a, li .pagnation li span, .pagination li.active span, .pagination li.ellipsis span { font-weight: normal; text-decoration: none; - margin: 0 2px; padding: 0 2px; border: 1px solid transparent; font-size: 0.9em; line-height: 1.5em; } -.pagination span a:hover { - text-decoration: none; -} - -.pagination img { - vertical-align: middle; -} - /* Pagination in viewforum for multipage topics */ .row .pagination { display: block; float: right; width: auto; margin-top: 0; - padding: 1px 0 1px 15px; + padding: 1px 0 1px 8px; font-size: 0.9em; background: none 0 50% no-repeat; } diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css index 60903911dd..81f3567aba 100644 --- a/phpBB/styles/prosilver/theme/content.css +++ b/phpBB/styles/prosilver/theme/content.css @@ -1,6 +1,8 @@ /* Content Styles ---------------------------------------- */ +/* Forum and topic lists +---------------------------------------- */ ul.topiclist { display: block; list-style-type: none; @@ -701,4 +703,4 @@ dl.pmlist dt textarea { dl.pmlist dd { margin-left: 61% !important; margin-bottom: 2px; -} +} \ No newline at end of file diff --git a/phpBB/styles/subsilver2/template/pagination.html b/phpBB/styles/subsilver2/template/pagination.html index a36eb88d8f..f78bb554fc 100644 --- a/phpBB/styles/subsilver2/template/pagination.html +++ b/phpBB/styles/subsilver2/template/pagination.html @@ -1 +1,11 @@ -{L_GOTO_PAGE} {L_PREVIOUS}  {PAGINATION}  {L_NEXT} + + {L_GOTO_PAGE} + + {pagination.PAGE_NUMBER} + {pagination.PAGE_NUMBER} + {L_ELLIPSIS} + {pagination.PAGE_NUMBER} + {pagination.PAGE_NUMBER} + + + diff --git a/phpBB/styles/subsilver2/template/posting_smilies.html b/phpBB/styles/subsilver2/template/posting_smilies.html index 691ba239b2..30a80e26ab 100644 --- a/phpBB/styles/subsilver2/template/posting_smilies.html +++ b/phpBB/styles/subsilver2/template/posting_smilies.html @@ -16,7 +16,20 @@ {L_SMILIES} - {smiley.SMILEY_CODE}
{PAGINATION}
{L_CLOSE_WINDOW} + {smiley.SMILEY_CODE}
+ + {L_GOTO_PAGE} + + {pagination.PAGE_NUMBER} + {pagination.PAGE_NUMBER} + {L_ELLIPSIS} + {pagination.PAGE_NUMBER} + {pagination.PAGE_NUMBER} + + +
+ + {L_CLOSE_WINDOW} diff --git a/phpBB/styles/subsilver2/template/search_results.html b/phpBB/styles/subsilver2/template/search_results.html index d8a1879ca7..a143a186d7 100644 --- a/phpBB/styles/subsilver2/template/search_results.html +++ b/phpBB/styles/subsilver2/template/search_results.html @@ -42,8 +42,17 @@ {REPORTED_IMG}  - -

[ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {searchresults.PAGINATION} ]

+ +

[ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: + + + {searchresults.pagination.PAGE_NUMBER} + {L_ELLIPSIS} + + {searchresults.pagination.PAGE_NUMBER} + + + ]

{L_IN} {searchresults.FORUM_TITLE}

diff --git a/phpBB/styles/subsilver2/template/ucp_main_bookmarks.html b/phpBB/styles/subsilver2/template/ucp_main_bookmarks.html index 2fa8f6ac2e..ba19c45eab 100644 --- a/phpBB/styles/subsilver2/template/ucp_main_bookmarks.html +++ b/phpBB/styles/subsilver2/template/ucp_main_bookmarks.html @@ -43,8 +43,17 @@

{NEWEST_POST_IMG} {topicrow.ATTACH_ICON_IMG} {topicrow.TOPIC_TITLE}

{L_GLOBAL_ANNOUNCEMENT}{L_FORUM}: {topicrow.FORUM_NAME} - -

[ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {topicrow.PAGINATION} ]

+ +

[ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: + + + {topicrow.pagination.PAGE_NUMBER} + {L_ELLIPSIS} + + {topicrow.pagination.PAGE_NUMBER} + + + ]

diff --git a/phpBB/styles/subsilver2/template/ucp_main_subscribed.html b/phpBB/styles/subsilver2/template/ucp_main_subscribed.html index 42a452549b..13d2935757 100644 --- a/phpBB/styles/subsilver2/template/ucp_main_subscribed.html +++ b/phpBB/styles/subsilver2/template/ucp_main_subscribed.html @@ -52,8 +52,17 @@

{NEWEST_POST_IMG} {topicrow.ATTACH_ICON_IMG} {topicrow.TOPIC_TITLE}

{L_GLOBAL_ANNOUNCEMENT}{L_FORUM}: {topicrow.FORUM_NAME} - -

[ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {topicrow.PAGINATION} ]

+ +

[ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: + + + {topicrow.pagination.PAGE_NUMBER} + {L_ELLIPSIS} + + {topicrow.pagination.PAGE_NUMBER} + + + ]

diff --git a/phpBB/styles/subsilver2/template/viewforum_body.html b/phpBB/styles/subsilver2/template/viewforum_body.html index afb8426799..7f241ce874 100644 --- a/phpBB/styles/subsilver2/template/viewforum_body.html +++ b/phpBB/styles/subsilver2/template/viewforum_body.html @@ -48,8 +48,17 @@ {REPORTED_IMG}  - -

[ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {topicrow.PAGINATION} ]

+ +

[ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: + + + {topicrow.pagination.PAGE_NUMBER} + {L_ELLIPSIS} + + {topicrow.pagination.PAGE_NUMBER} + + + ]

{topicrow.TOPIC_AUTHOR_FULL}

@@ -199,8 +208,17 @@ {REPORTED_IMG}  - -

[ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {topicrow.PAGINATION} ]

+ +

[ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: + + + {topicrow.pagination.PAGE_NUMBER} + {L_ELLIPSIS} + + {topicrow.pagination.PAGE_NUMBER} + + + ]

{L_IN} {topicrow.FORUM_NAME}

diff --git a/phpBB/styles/subsilver2/template/viewonline_body.html b/phpBB/styles/subsilver2/template/viewonline_body.html index 1c8734d06a..b05a9470e0 100644 --- a/phpBB/styles/subsilver2/template/viewonline_body.html +++ b/phpBB/styles/subsilver2/template/viewonline_body.html @@ -8,7 +8,7 @@ - +
{L_GOTO_PAGE} {L_PREVIOUS}  {PAGINATION}  {L_NEXT}
@@ -39,7 +39,7 @@ - +
{L_GOTO_PAGE} {L_PREVIOUS}  {PAGINATION}  {L_NEXT}
-- cgit v1.2.1