diff --git a/web/app/controllers/group.php b/web/app/controllers/group.php index 82e4eed..26a40b4 100644 --- a/web/app/controllers/group.php +++ b/web/app/controllers/group.php @@ -134,16 +134,15 @@ UOJGroup::cur()->userCanView(Auth::user(), ['ensure' => true]); -
-
-

- -

- 15, - 'group_id' => UOJGroup::info('id'), - ]) ?> +
+
+

+ 15, + 'group_id' => UOJGroup::info('id'), + 'flush' => true, + ]) ?>
diff --git a/web/app/controllers/index.php b/web/app/controllers/index.php index 10d91f6..19ce86d 100644 --- a/web/app/controllers/index.php +++ b/web/app/controllers/index.php @@ -60,15 +60,15 @@ $friend_links = DB::selectAll([
-
-
-

- true]) ?> -
- - - -
+
+
+

+
+ true, 'flush' => true]) ?> +
diff --git a/web/app/models/UOJRanklist.php b/web/app/models/UOJRanklist.php index b423fc7..d356291 100644 --- a/web/app/models/UOJRanklist.php +++ b/web/app/models/UOJRanklist.php @@ -5,10 +5,13 @@ class UOJRanklist { $cfg += [ 'top10' => false, 'card' => false, + 'flush' => false, 'group_id' => null, 'page_len' => 50, ]; + $cfg['flush'] |= $cfg['card']; + $conds = []; if ($cfg['group_id']) { @@ -86,6 +89,9 @@ class UOJRanklist { if ($cfg['card']) { echo '
'; + } + + if ($cfg['flush']) { echo '
'; } else { echo '
'; @@ -104,7 +110,18 @@ class UOJRanklist { if ($cfg['card']) { echo '
'; } - echo $pag->pagination(); + + if ($pag->n_pages > 1) { + if ($cfg['flush']) { + echo '
'; + } + + echo $pag->pagination(); + + if ($cfg['flush']) { + echo '
'; + } + } } /**