2026-10-15 23:04:25 +08:00
|
|
|
|
<?php
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 名册模块的「设置」下拉(v52 用户 2026-10-15 第 6 条)。
|
|
|
|
|
|
*
|
|
|
|
|
|
* 用户原话:「名册右侧,**只保留一个添加成员按钮**,右侧再加一个设置按钮,
|
|
|
|
|
|
* 点击后下拉设置,第一个就是**导入联系人**,第二个就是原来个人设置那里的
|
|
|
|
|
|
* **名册分组**,这样个人设置中就不显示名册分组的内容了。」
|
|
|
|
|
|
*
|
|
|
|
|
|
* ⇒ 名册页右上角从此只有两颗:**添加成员** + **☰ 设置**(设置恒在最右,全站统一)。
|
|
|
|
|
|
* 原来散着的那几颗(从已有家里人里挑 / 导入联系人 / …)全部收进这个下拉。
|
|
|
|
|
|
*
|
2026-10-17 00:15:06 +08:00
|
|
|
|
* 🔴 v54(用户 2026-10-16 第 2 条):第二行**从「名册分组」改叫「名册标签」**。
|
|
|
|
|
|
* 用户原话:「现在应该在这个设置页面,不应该再叫「名册分组」了吧?
|
|
|
|
|
|
* 应该叫「名册标签」,是不是?应该从这里面把所有标签都读出来吧?」
|
|
|
|
|
|
* ⇒ 文案改掉;指向的仍是同一个页面(`people/settings`)与同一个词表。
|
|
|
|
|
|
*
|
2026-10-15 23:04:25 +08:00
|
|
|
|
* 两行(顺序是用户点名的):
|
|
|
|
|
|
* ① 导入联系人 → `people/import`
|
2026-10-17 00:15:06 +08:00
|
|
|
|
* ② 名册标签 → `people/settings`(从个人设置搬过来的那一块)
|
2026-10-15 23:04:25 +08:00
|
|
|
|
*
|
|
|
|
|
|
* 用法(require 前 set 好):
|
|
|
|
|
|
* $plSetCurrent 当前页 key('import'|'groups')用来高亮;'' 也行
|
|
|
|
|
|
*/
|
|
|
|
|
|
$plSetCurrent = (string)($plSetCurrent ?? '');
|
|
|
|
|
|
$plSetOn = static function (string $key) use ($plSetCurrent): string {
|
|
|
|
|
|
return $plSetCurrent === $key ? ' class="on"' : '';
|
|
|
|
|
|
};
|
|
|
|
|
|
$plSetIcon = static function (string $name): string {
|
|
|
|
|
|
$paths = [
|
|
|
|
|
|
'import' => '<path d="M8 2.6v7.2M5 6.8l3 3 3-3M3.2 13.4h9.6"/>',
|
|
|
|
|
|
'groups' => '<rect x="2" y="2.6" width="5" height="5" rx="1"/><rect x="9" y="2.6" width="5" height="5" rx="1"/>'
|
|
|
|
|
|
. '<rect x="2" y="8.6" width="5" height="5" rx="1"/><rect x="9" y="8.6" width="5" height="5" rx="1"/>',
|
|
|
|
|
|
];
|
|
|
|
|
|
$d = $paths[$name] ?? '';
|
|
|
|
|
|
if ($d === '') {
|
|
|
|
|
|
return '';
|
|
|
|
|
|
}
|
|
|
|
|
|
return '<svg class="mi" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"'
|
|
|
|
|
|
. ' fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"'
|
|
|
|
|
|
. ' stroke-linejoin="round">' . $d . '</svg>';
|
|
|
|
|
|
};
|
|
|
|
|
|
?>
|
|
|
|
|
|
<details class="movie-set menu">
|
|
|
|
|
|
<summary class="btn btn-icon" title="名册设置" aria-label="名册设置"><svg viewBox="0 0 16 16" width="18" height="18" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round"><path d="M2.5 4.5h11M2.5 8h11M2.5 11.5h11"/></svg></summary>
|
|
|
|
|
|
<div class="menu-list">
|
|
|
|
|
|
<a href="<?= e(url('people/import')) ?>"<?= $plSetOn('import') ?>><?= $plSetIcon('import') ?><span>导入联系人</span></a>
|
2026-10-17 00:15:06 +08:00
|
|
|
|
<a href="<?= e(url('people/settings')) ?>"<?= $plSetOn('groups') ?>><?= $plSetIcon('groups') ?><span>名册标签</span></a>
|
2026-10-15 23:04:25 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</details>
|
|
|
|
|
|
<?php unset($plSetCurrent, $plSetOn, $plSetIcon); ?>
|