From 5219d8ddcc6e0977c6834fa1567d86ee6fd54b53 Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Sat, 24 Sep 2022 13:41:31 +0800 Subject: [PATCH] fix: style --- web/app/controllers/groups.php | 44 +++++++++++++++++----------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/web/app/controllers/groups.php b/web/app/controllers/groups.php index 69e9fcf..d29e204 100644 --- a/web/app/controllers/groups.php +++ b/web/app/controllers/groups.php @@ -11,9 +11,9 @@ become403Page(); } - if (!isset($_COOKIE['bootstrap4'])) { - $REQUIRE_LIB['bootstrap5'] = ''; - } + if (!isset($_COOKIE['bootstrap4'])) { + $REQUIRE_LIB['bootstrap5'] = ''; + } if (isSuperUser($myUser)) { $new_group_form = new UOJForm('new_group'); @@ -34,19 +34,19 @@ echo ''; echo '#', $group['group_id'], ''; - if (isset($REQUIRE_LIB['bootstrap5'])) { - echo ''; - } else { - echo ''; - } + if (isset($REQUIRE_LIB['bootstrap5'])) { + echo ''; + } else { + echo ''; + } if ($group['is_hidden']) { echo ' [隐藏] '; } echo '', $group['title'], ''; + if (isset($REQUIRE_LIB['bootstrap5'])) { + echo ' class="text-decoration-none" '; + } + echo ' href="/group/', $group['group_id'], '">', $group['title'], ''; echo ''; echo "{$group['user_count']}"; @@ -94,23 +94,23 @@ EOD; $from = "`groups` a left join groups_users b on a.id = b.group_id"; - $table_config = array('page_len' => 40, - 'table_classes' => array('table', 'table-bordered', 'table-hover', 'table-striped'), - 'head_pagination' => true, - 'pagination_table' => "`groups`" - ); + $table_config = array('page_len' => 40, + 'table_classes' => array('table', 'table-bordered', 'table-hover', 'table-striped'), + 'head_pagination' => true, + 'pagination_table' => "`groups`" + ); - if (isset($REQUIRE_LIB['bootstrap5'])) { - $table_config['div_classes'] = array('card', 'mb-3'); - $table_config['table_classes'] = array('table', 'uoj-table', 'mb-0'); - } + if (isset($REQUIRE_LIB['bootstrap5'])) { + $table_config['div_classes'] = array('card', 'mb-3'); + $table_config['table_classes'] = array('table', 'uoj-table', 'mb-0'); + } echoLongTable( array('a.id as group_id', 'a.title as title', 'a.is_hidden as is_hidden', 'count(b.username) as user_count'), $from, $cond, 'group by a.id order by a.id asc', $header, 'echoGroup', - $table_config + $table_config ); ?>