mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 18:08:42 +00:00
chore(web): HTML::navListGroup
This commit is contained in:
parent
aeab23cc9a
commit
92626c1193
@ -610,16 +610,7 @@ EOD);
|
|||||||
<!-- left col -->
|
<!-- left col -->
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
|
|
||||||
<div class="list-group">
|
<?= HTML::navListGroup($tabs_info, $cur_tab) ?>
|
||||||
<?php foreach ($tabs_info as $id => $tab): ?>
|
|
||||||
<a
|
|
||||||
role="button"
|
|
||||||
class="list-group-item list-group-item-action <?= $cur_tab == $id ? 'active' : '' ?>"
|
|
||||||
href="<?= $tab['url'] ?>">
|
|
||||||
<?= $tab['name'] ?>
|
|
||||||
</a>
|
|
||||||
<?php endforeach ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- end left col -->
|
<!-- end left col -->
|
||||||
|
@ -277,16 +277,7 @@ EOD);
|
|||||||
<!-- left col -->
|
<!-- left col -->
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
|
|
||||||
<div class="list-group">
|
<?= HTML::navListGroup($tabs_info, $cur_tab) ?>
|
||||||
<?php foreach ($tabs_info as $id => $tab): ?>
|
|
||||||
<a
|
|
||||||
role="button"
|
|
||||||
class="list-group-item list-group-item-action <?= $cur_tab == $id ? 'active' : '' ?>"
|
|
||||||
href="<?= $tab['url'] ?>">
|
|
||||||
<?= $tab['name'] ?>
|
|
||||||
</a>
|
|
||||||
<?php endforeach ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<a
|
<a
|
||||||
class="btn btn-light d-block mt-2 w-100 text-start text-primary"
|
class="btn btn-light d-block mt-2 w-100 text-start text-primary"
|
||||||
|
@ -34,6 +34,15 @@ class HTML {
|
|||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function navListGroup($tabs_info, $cur) {
|
||||||
|
$html = '<div class="list-group">';
|
||||||
|
foreach ($tabs_info as $id => $tab) {
|
||||||
|
$html .= '<a role="button" class="list-group-item list-group-item-action'.($cur == $id ? ' active' : '').'" href="'.$tab['url'].'">'.$tab['name'].'</a>';
|
||||||
|
}
|
||||||
|
$html .= '</div>';
|
||||||
|
return $html;
|
||||||
|
}
|
||||||
|
|
||||||
public static function hiddenToken() {
|
public static function hiddenToken() {
|
||||||
return '<input type="hidden" name="_token" value="'.crsf_token().'" />';
|
return '<input type="hidden" name="_token" value="'.crsf_token().'" />';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user