* my: add tips after form title.

This commit is contained in:
liugang
2023-07-08 17:26:54 +08:00
parent c40bbd98c0
commit 0950176dc7
2 changed files with 29 additions and 12 deletions
+14 -6
View File
@@ -1388,13 +1388,21 @@ EOF;
$list = $listID ? $this->user->getContactListByID($listID) : null;
$userList = !empty($list->userList) ? $list->userList : '';
$canEdit = empty($list) || (!empty($list->account) && $list->account == $this->app->user->account);
$this->view->title = $this->lang->my->common . $this->lang->colon . ($listID ? $this->lang->user->contacts->createList : $this->lang->user->contacts->manage);
$this->view->users = $this->user->getPairs('noletter|noempty|noclosed|noclosed', $userList, $this->config->maxCount);
$this->view->lists = $this->user->getContactLists($this->app->user->account, '', 'list');
$this->view->canEdit = $canEdit;
$this->view->list = $list;
$mode = 'create';
$label = $this->lang->my->createContacts;
if($list)
{
$mode = $list->account == $this->app->user->account ? 'edit' : 'view';
$label = $list->account == $this->app->user->account ? $this->lang->my->manageContacts : $this->lang->my->viewContacts;
}
$this->view->title = $this->lang->my->common . $this->lang->colon . $label;
$this->view->users = $this->user->getPairs('noletter|noempty|noclosed|noclosed', $userList, $this->config->maxCount);
$this->view->lists = $this->user->getContactLists($this->app->user->account, '', 'list');
$this->view->mode = $mode;
$this->view->label = $label;
$this->view->list = $list;
$this->display();
}
+15 -6
View File
@@ -40,10 +40,6 @@ if(!empty($list->userList))
foreach(explode(',', $list->userList) as $account) $userList[] = zget($users, $account);
}
$manageTitle = $lang->my->createContacts;
if($canEdit && $list) $manageTitle = $lang->my->manageContacts;
if(!$canEdit) $manageTitle = $lang->my->viewContacts;
panel
(
setClass('panel-form px-4 mx-auto size-lg'),
@@ -99,9 +95,22 @@ panel
div
(
set('class', 'panel-title text-lg flex w-full py-6'),
$manageTitle
$label,
$mode == 'edit' ? array
(
span
(
setClass('text-warning'),
icon('info')
),
span
(
setClass('text-gray text-base font-normal'),
$lang->my->manageSelf
)
) : null
),
$canEdit ? form
($mode == 'create' || $mode == 'edit') ? form
(
set::actions(array()),
formRow