From a86df050dbcd16dc8f3545dcb4411b6bed53df26 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 14 Jun 2019 12:12:03 -0400 Subject: [PATCH] feat: change legacy begins to each (#478) * refactor: change legacy begins to each * fix: missed a couple ends * fix: derped find-replace * fix: referencing non-existent root object in categories teaser --- templates/account/blocks.tpl | 6 +-- templates/account/categories.tpl | 4 +- templates/account/edit.tpl | 12 ++--- templates/account/info.tpl | 28 ++++++------ templates/account/profile.tpl | 12 ++--- templates/account/sessions.tpl | 4 +- templates/account/settings.tpl | 44 +++++++++---------- templates/account/uploads.tpl | 4 +- templates/categories.tpl | 16 +++---- templates/category.tpl | 12 ++--- templates/chat.tpl | 4 +- templates/chats.tpl | 4 +- templates/flags/detail.tpl | 16 +++---- templates/flags/list.tpl | 4 +- templates/footer.tpl | 4 +- templates/groups/details.tpl | 16 +++---- templates/groups/list.tpl | 4 +- templates/header.tpl | 4 +- templates/login.tpl | 4 +- templates/notifications.tpl | 8 ++-- templates/partials/account/menu.tpl | 4 +- templates/partials/breadcrumbs.tpl | 4 +- templates/partials/categories/lastpost.tpl | 4 +- templates/partials/category-filter.tpl | 4 +- templates/partials/category-selector.tpl | 4 +- templates/partials/category/subcategory.tpl | 4 +- templates/partials/category/tags.tpl | 4 +- templates/partials/category/tools.tpl | 4 +- templates/partials/chats/dropdown.tpl | 12 ++--- templates/partials/chats/message-window.tpl | 8 ++-- templates/partials/chats/messages.tpl | 4 +- templates/partials/chats/recent_room.tpl | 8 ++-- templates/partials/flags/filters.tpl | 4 +- templates/partials/groups/list.tpl | 8 ++-- templates/partials/groups/memberlist.tpl | 4 +- templates/partials/menu.tpl | 4 +- templates/partials/merge_topics_modal.tpl | 4 +- .../partials/modals/change_picture_modal.tpl | 4 +- .../partials/modals/manage_room_users.tpl | 4 +- templates/partials/modals/post_history.tpl | 4 +- templates/partials/modals/votes_modal.tpl | 8 ++-- templates/partials/notifications_list.tpl | 4 +- templates/partials/paginator.tpl | 4 +- templates/partials/post_bar.tpl | 4 +- templates/partials/posts_list.tpl | 4 +- templates/partials/quick-search-results.tpl | 4 +- templates/partials/tags_list.tpl | 4 +- templates/partials/topic/badge.tpl | 4 +- templates/partials/topic/browsing-users.tpl | 4 +- templates/partials/topic/post-menu-list.tpl | 8 ++-- templates/partials/topic/post.tpl | 8 ++-- templates/partials/topic/topic-menu-list.tpl | 4 +- templates/partials/topics_list.tpl | 10 ++--- templates/partials/users_list.tpl | 4 +- templates/popular.tpl | 12 ++--- templates/recent.tpl | 8 ++-- templates/register.tpl | 8 ++-- templates/registerComplete.tpl | 8 ++-- templates/search.tpl | 8 ++-- templates/tags.tpl | 4 +- templates/top.tpl | 12 ++--- templates/topic.tpl | 18 ++++---- templates/unread.tpl | 12 ++--- templates/users.tpl | 4 +- 64 files changed, 238 insertions(+), 240 deletions(-) diff --git a/templates/account/blocks.tpl b/templates/account/blocks.tpl index 43dbf48..3ec97a8 100644 --- a/templates/account/blocks.tpl +++ b/templates/account/blocks.tpl @@ -17,15 +17,13 @@
- - + {{{ each edit }}}
- - + {{{ end }}}
diff --git a/templates/account/categories.tpl b/templates/account/categories.tpl index 1e56434..8c91e63 100644 --- a/templates/account/categories.tpl +++ b/templates/account/categories.tpl @@ -6,9 +6,9 @@
diff --git a/templates/account/edit.tpl b/templates/account/edit.tpl index 61218d4..262034b 100644 --- a/templates/account/edit.tpl +++ b/templates/account/edit.tpl @@ -26,9 +26,9 @@ [[user:change_password]] - + {{{each editButtons}}} {editButtons.text} - + {{{end}}} @@ -87,11 +87,11 @@ @@ -132,7 +132,7 @@
- + {{{each sso}}}
[[user:sso.dissociate]] @@ -143,7 +143,7 @@ {../name}
- + {{{end}}}
diff --git a/templates/account/info.tpl b/templates/account/info.tpl index 0b1a9de..2f0364f 100644 --- a/templates/account/info.tpl +++ b/templates/account/info.tpl @@ -6,7 +6,7 @@

[[global:sessions]]

- + {{{end}}}
@@ -37,9 +37,9 @@
@@ -50,12 +50,12 @@
@@ -66,12 +66,12 @@
@@ -84,14 +84,14 @@
[[user:info.no-flags]]
@@ -119,7 +119,7 @@
[[user:info.no-ban-history]]
@@ -153,7 +153,7 @@
- + {{{each moderationNotes}}}
@@ -173,7 +173,7 @@
- + {{{end}}}
diff --git a/templates/account/profile.tpl b/templates/account/profile.tpl index 477f442..3233df2 100644 --- a/templates/account/profile.tpl +++ b/templates/account/profile.tpl @@ -18,11 +18,11 @@
- + {{{each selectedGroup}}} {selectedGroup.userTitle} - + {{{end}}}

@@ -113,9 +113,9 @@
@@ -127,9 +127,9 @@

[[global:recentips]]

- + {{{each ips}}}
{ips}
- + {{{end}}}
diff --git a/templates/account/sessions.tpl b/templates/account/sessions.tpl index 33ac3b9..4f250e8 100644 --- a/templates/account/sessions.tpl +++ b/templates/account/sessions.tpl @@ -7,7 +7,7 @@

[[user:sessions.description]]


- + {{{end}}} diff --git a/templates/account/settings.tpl b/templates/account/settings.tpl index 9aa2dfa..82f38dd 100644 --- a/templates/account/settings.tpl +++ b/templates/account/settings.tpl @@ -7,9 +7,9 @@

[[user:select-skin]]

@@ -21,9 +21,9 @@

[[user:homepage_description]]

@@ -101,21 +101,21 @@

[[user:digest_description]]

- + {{{each customSettings}}}

{customSettings.title}

{customSettings.content}
- + {{{end}}} @@ -125,9 +125,9 @@
@@ -137,9 +137,9 @@
@@ -173,7 +173,7 @@

[[user:notifications_and_sounds]]

- + {{{each notificationSettings}}}
@@ -187,17 +187,17 @@
- + {{{end}}}
@@ -207,9 +207,9 @@
@@ -223,9 +223,9 @@
@@ -238,9 +238,9 @@
diff --git a/templates/account/uploads.tpl b/templates/account/uploads.tpl index 414edff..46d5317 100644 --- a/templates/account/uploads.tpl +++ b/templates/account/uploads.tpl @@ -22,7 +22,7 @@ - + {{{each uploads}}} {uploads.url} @@ -33,7 +33,7 @@
- + {{{end}}} diff --git a/templates/categories.tpl b/templates/categories.tpl index 7da0123..e8e26ea 100644 --- a/templates/categories.tpl +++ b/templates/categories.tpl @@ -1,26 +1,26 @@
- + {{{each widgets.header}}} {{widgets.header.html}} - + {{{end}}}

[[pages:categories]]

    - + {{{each categories}}} - + {{{end}}}
- + {{{each widgets.sidebar}}} {{widgets.sidebar.html}} - + {{{end}}}
- + {{{each widgets.footer}}} {{widgets.footer.html}} - + {{{end}}}
diff --git a/templates/category.tpl b/templates/category.tpl index 42cb946..0f6370f 100644 --- a/templates/category.tpl +++ b/templates/category.tpl @@ -1,8 +1,8 @@
- + {{{each widgets.header}}} {{widgets.header.html}} - + {{{end}}}
@@ -50,15 +50,15 @@
- + {{{each widgets.sidebar}}} {{widgets.sidebar.html}} - + {{{end}}}
- + {{{each widgets.footer}}} {{widgets.footer.html}} - + {{{end}}}
diff --git a/templates/chat.tpl b/templates/chat.tpl index e5632f9..f7bf47a 100644 --- a/templates/chat.tpl +++ b/templates/chat.tpl @@ -11,11 +11,11 @@
    - + {{{each rooms}}} - + {{{end}}}
diff --git a/templates/flags/detail.tpl b/templates/flags/detail.tpl index 88a6500..5044a52 100644 --- a/templates/flags/detail.tpl +++ b/templates/flags/detail.tpl @@ -81,9 +81,9 @@
@@ -103,7 +103,7 @@
[[flags:no-notes]]
- + {{{each notes}}} - + {{{end}}}
@@ -146,7 +146,7 @@
[[flags:no-history]]
- + {{{each history}}}
{buildAvatar(history.user, "md", false, "media-object")} @@ -157,15 +157,15 @@
    - + {{{each fields}}}
  • [[flags:@key]]@value
  • - + {{{end}}}
- + {{{end}}}
diff --git a/templates/flags/list.tpl b/templates/flags/list.tpl index 2cc7338..6730c1c 100644 --- a/templates/flags/list.tpl +++ b/templates/flags/list.tpl @@ -42,7 +42,7 @@ - + {{{each flags}}} [[flags:state-{../state}]] @@ -56,7 +56,7 @@ - + {{{end}}} diff --git a/templates/footer.tpl b/templates/footer.tpl index c9585cc..1630523 100644 --- a/templates/footer.tpl +++ b/templates/footer.tpl @@ -20,9 +20,9 @@ - + {{{each scripts}}} - + {{{end}}}