[ticket/10563] Show deactivated styles below active styles in acp

Separates active and deactivated styles in styles list in acp

PHPBB3-10563
This commit is contained in:
Vjacheslav Trushkin 2012-01-02 21:07:40 +02:00
parent 3e7a0a3746
commit 23363efaaa
3 changed files with 10 additions and 0 deletions

View file

@ -402,6 +402,12 @@
<td class="row3" colspan="{$COLSPAN}"><strong>{L_INSTALLED}</strong></td>
</tr>
<!-- BEGIN installed -->
<!-- IF installed.S_INACTIVE and not $INACTIVE_STYLES -->
<!-- DEFINE $INACTIVE_STYLES = 1 -->
<tr>
<td class="row3" colspan="{$COLSPAN}"><strong>{L_INACTIVE_STYLES}</strong></td>
</tr>
<!-- ENDIF -->
<tr>
<td><strong>{installed.NAME}</strong><!-- IF installed.S_DEFAULT_STYLE --> *<!-- ENDIF --></td>
<!-- IF S_STYLE -->

View file

@ -547,6 +547,7 @@ parse_css_file = {PARSE_CSS_FILE}
{
case 'style':
$sql_from = STYLES_TABLE;
$sql_sort = 'style_active DESC, ' . $sql_sort;
$sql = 'SELECT user_style, COUNT(user_style) AS style_count
FROM ' . USERS_TABLE . '
@ -635,6 +636,8 @@ parse_css_file = {PARSE_CSS_FILE}
'NAME' => $row[$mode . '_name'],
'STYLE_COUNT' => ($mode == 'style' && isset($style_count[$row['style_id']])) ? $style_count[$row['style_id']] : 0,
'S_INACTIVE' => ($mode == 'style' && !$row['style_active']) ? true : false,
)
);
}

View file

@ -267,6 +267,7 @@ $lang = array_merge($lang, array(
'IMG_USER_ICON9' => 'User defined image 9',
'IMG_USER_ICON10' => 'User defined image 10',
'INACTIVE_STYLES' => 'Inactive styles',
'INCLUDE_DIMENSIONS' => 'Include dimensions',
'INCLUDE_IMAGESET' => 'Include imageset',
'INCLUDE_TEMPLATE' => 'Include template',