From 558828b7e047e33b0fce5da2a4df8274e497263b Mon Sep 17 00:00:00 2001 From: rubencm Date: Wed, 24 Mar 2021 22:37:24 +0100 Subject: [PATCH] [ticket/16737] Divide acp_search in multiple files PHPBB3-16737 --- phpBB/adm/style/acp_search.html | 175 ------------------ phpBB/adm/style/acp_search_index.html | 80 ++++++++ .../style/acp_search_index_inprogress.html | 34 ++++ phpBB/adm/style/acp_search_settings.html | 78 ++++++++ phpBB/includes/acp/acp_search.php | 5 +- 5 files changed, 195 insertions(+), 177 deletions(-) delete mode 100644 phpBB/adm/style/acp_search.html create mode 100644 phpBB/adm/style/acp_search_index.html create mode 100644 phpBB/adm/style/acp_search_index_inprogress.html create mode 100644 phpBB/adm/style/acp_search_settings.html diff --git a/phpBB/adm/style/acp_search.html b/phpBB/adm/style/acp_search.html deleted file mode 100644 index 36f2268b84..0000000000 --- a/phpBB/adm/style/acp_search.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - -

{L_ACP_SEARCH_SETTINGS}

- -

{L_ACP_SEARCH_SETTINGS_EXPLAIN}

- - - - - - - -

{L_ACP_SEARCH_INDEX}

- - -

{L_CONTINUE_EXPLAIN}

- -
-
- {L_ACP_SUBMIT_CHANGES} -

-   - -

- {S_FORM_TOKEN} -
-
- - -

{L_ACP_SEARCH_INDEX_EXPLAIN}

- - - - {% if backend.S_STATS is not empty %} - -
- -
- - {backend.S_HIDDEN_FIELDS} - - {L_INDEX_STATS}{L_COLON} {backend.L_NAME} ({L_ACTIVE}) - - - - - - - - - - - - - - {% for stat in backend.S_STATS | batch(2, '') %} - - {% for key, value in stat %} - {% if value is not empty %} - - - {% else %} - - - {% endif %} - {% endfor %} - - {% endfor %} - -
{backend.L_NAME} ({L_ACTIVE})
{L_STATISTIC}{L_VALUE}{L_STATISTIC}{L_VALUE}
{{ key }}{L_COLON}{{ value }}
- - {% endif %} - -

- - - - - - - -

- {S_FORM_TOKEN} -
- -
- - - - - - - diff --git a/phpBB/adm/style/acp_search_index.html b/phpBB/adm/style/acp_search_index.html new file mode 100644 index 0000000000..8ce882fa89 --- /dev/null +++ b/phpBB/adm/style/acp_search_index.html @@ -0,0 +1,80 @@ + + + + + + +

{L_ACP_SEARCH_INDEX}

+ +

{L_ACP_SEARCH_INDEX_EXPLAIN}

+ + + + {% if backend.S_STATS is not empty %} + +
+ +
+ + {backend.S_HIDDEN_FIELDS} + + {L_INDEX_STATS}{L_COLON} {backend.L_NAME} ({L_ACTIVE}) + + + + + + + + + + + + + + {% for stat in backend.S_STATS | batch(2, '') %} + + {% for key, value in stat %} + {% if value is not empty %} + + + {% else %} + + + {% endif %} + {% endfor %} + + {% endfor %} + +
{backend.L_NAME} ({L_ACTIVE})
{L_STATISTIC}{L_VALUE}{L_STATISTIC}{L_VALUE}
{{ key }}{L_COLON}{{ value }}
+ + {% endif %} + +

+ + + + + + + +

+ {S_FORM_TOKEN} +
+ +
+ + + diff --git a/phpBB/adm/style/acp_search_index_inprogress.html b/phpBB/adm/style/acp_search_index_inprogress.html new file mode 100644 index 0000000000..6d9630a35a --- /dev/null +++ b/phpBB/adm/style/acp_search_index_inprogress.html @@ -0,0 +1,34 @@ + + + + + + +

{L_ACP_SEARCH_INDEX}

+ +

{L_CONTINUE_EXPLAIN}

+ +
+
+ {L_ACP_SUBMIT_CHANGES} +

+   + +

+ {S_FORM_TOKEN} +
+
+ + diff --git a/phpBB/adm/style/acp_search_settings.html b/phpBB/adm/style/acp_search_settings.html new file mode 100644 index 0000000000..b468fd17ed --- /dev/null +++ b/phpBB/adm/style/acp_search_settings.html @@ -0,0 +1,78 @@ + + + + +

{L_ACP_SEARCH_SETTINGS}

+ +

{L_ACP_SEARCH_SETTINGS_EXPLAIN}

+ + + + diff --git a/phpBB/includes/acp/acp_search.php b/phpBB/includes/acp/acp_search.php index 81053d1f33..28758cd91b 100644 --- a/phpBB/includes/acp/acp_search.php +++ b/phpBB/includes/acp/acp_search.php @@ -203,7 +203,6 @@ class acp_search 'S_SEARCH_TYPES' => $search_options, 'S_YES_SEARCH' => (bool) $config['load_search'], - 'S_SETTINGS' => true, 'U_ACTION' => $this->u_action . '&hash=' . generate_link_hash('acp_search'), ]); @@ -355,7 +354,6 @@ class acp_search $this->page_title = 'ACP_SEARCH_INDEX'; $template->assign_vars(array( - 'S_INDEX' => true, 'U_ACTION' => $this->u_action . '&hash=' . generate_link_hash('acp_search'), 'U_PROGRESS_BAR' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&mode=$mode&action=progress_bar"), 'UA_PROGRESS_BAR' => addslashes(append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&mode=$mode&action=progress_bar")), @@ -363,6 +361,9 @@ class acp_search if (isset($this->state[self::STATE_ACTION])) { + $this->tpl_name = 'acp_search_index'; + $this->page_title = 'ACP_SEARCH_INDEX'; + $template->assign_vars(array( 'S_CONTINUE_INDEXING' => $this->state[1], 'U_CONTINUE_INDEXING' => $this->u_action . '&action=' . $this->state[self::STATE_ACTION] . '&hash=' . generate_link_hash('acp_search'),