diff --git a/files/templates/pagination.html b/files/templates/pagination.html index 6530ebebe..ef40bf13d 100644 --- a/files/templates/pagination.html +++ b/files/templates/pagination.html @@ -1,47 +1,45 @@ - {% set ns = namespace() %} - {% if not size %} {% set size = PAGE_SIZE %} {% endif %} {% set num_pages = (total / size) | round(0, 'ceil') | int %} - {% set ns.start_point = page - 2 %} - {% if ns.start_point < 1 %} - {% set ns.start_point = 1 %} + {% set start_point = page - 2 %} + {% if start_point < 1 %} + {% set start_point = 1 %} {% endif %} - {% set end_point = ns.start_point+4 %} + {% set end_point = start_point+4 %} {% if end_point > num_pages %} - {% set ns.start_point = ns.start_point-(end_point-num_pages) %} + {% set start_point = start_point-(end_point-num_pages) %} {% set end_point = num_pages %} {% endif %} - {% if ns.start_point < 1 %} - {% set ns.start_point = 1 %} + {% if start_point < 1 %} + {% set start_point = 1 %} {% endif %} - {% if ns.start_point > 1 %} + {% if start_point > 1 %} 1 - {% if ns.start_point == 3 %} + {% if start_point == 3 %} 2 - {% elif ns.start_point != 2 %} + {% elif start_point != 2 %} ... - {% set ns.start_point = ns.start_point + 1 %} + {% set start_point = start_point + 1 %} {% endif %} {% endif %} - {% for x in range(ns.start_point, end_point+1) %} + {% for x in range(start_point, end_point+1) %} {{x}} diff --git a/files/templates/settings/personal.html b/files/templates/settings/personal.html index 978bedb7e..517127e58 100644 --- a/files/templates/settings/personal.html +++ b/files/templates/settings/personal.html @@ -272,23 +272,23 @@ {% set ns = namespace(slurtext='Enable if you would like to automatically replace slurs.', profanitytext='Enable if you would like to automatically replace profanities.') %} {% if FEATURES['USERS_PERMANENT_WORD_FILTERS'] %} {% if v.slurreplacer == 0 %} - {% set ns.slurtext = 'Enable if you would like to automatically replace slurs. Make filter permanent for a badge!' %} + {% set slurtext = 'Enable if you would like to automatically replace slurs. Make filter permanent for a badge!' %} {% elif v.slurreplacer == 1 %} - {% set ns.slurtext = 'Enable if you would like to automatically replace slurs. Make filter permanent for a badge!' %} + {% set slurtext = 'Enable if you would like to automatically replace slurs. Make filter permanent for a badge!' %} {% else %} - {% set ns.slurtext = "You've enabled the slur replacer permanently! ✊🏿" %} + {% set slurtext = "You've enabled the slur replacer permanently! ✊🏿" %} {% endif %} {% if v.profanityreplacer == 0 %} - {% set ns.profanitytext = 'Enable if you would like to automatically replace profanities. Make filter permanent for a badge!' %} + {% set profanitytext = 'Enable if you would like to automatically replace profanities. Make filter permanent for a badge!' %} {% elif v.profanityreplacer == 1 %} - {% set ns.profanitytext = 'Enable if you would like to automatically replace profanities. Make filter permanent for a badge!' %} + {% set profanitytext = 'Enable if you would like to automatically replace profanities. Make filter permanent for a badge!' %} {% else %} - {% set ns.profanitytext = "You've enabled the profanity replacer permanently! 😇" %} + {% set profanitytext = "You've enabled the profanity replacer permanently! 😇" %} {% endif %} {% endif %} - {{common.toggle_section("Slur Replacer", "slurreplacerswitch", 'slurreplacer', v.slurreplacer, ns.slurtext, FEATURES['USERS_PERMANENT_WORD_FILTERS'] and v.slurreplacer > 1)}} - {{common.toggle_section("Profanity Replacer", "profanityreplacerswitch", 'profanityreplacer', v .profanityreplacer, ns.profanitytext, FEATURES['USERS_PERMANENT_WORD_FILTERS'] and v.profanityreplacer > 1)}} + {{common.toggle_section("Slur Replacer", "slurreplacerswitch", 'slurreplacer', v.slurreplacer, slurtext, FEATURES['USERS_PERMANENT_WORD_FILTERS'] and v.slurreplacer > 1)}} + {{common.toggle_section("Profanity Replacer", "profanityreplacerswitch", 'profanityreplacer', v .profanityreplacer, profanitytext, FEATURES['USERS_PERMANENT_WORD_FILTERS'] and v.profanityreplacer > 1)}}